CreateIndex
Creates a new index.
Parameters
index_type: Specifies if the index if for entities or connections.
class: Specified the class of the entity/connection.
property_key: Specifies the name of the property indexed.
[optional] property_type: Specifies the property type.
Details
This command checks if the index already exists and adds one if it doesn’t. The matches are case sensitive for all the parameters.
The index_type parameter can be either “entity” or “connection”.
The property_type parameters specified the data type for the index. The supported types are:
integer (64bit integer)
float (64bit floating point)
string
boolean [true, false]
time (ISO 8601 representation)
property_type will be automatically inferred if there are existing objects with the specified property_key already defined.
Examples
Create an index for the String property “name” for the entities of the class “Person”:
[ {
"CreateIndex" : {
"index_type": "entity",
"class" : "Person",
"property_key" : "name",
"property_type": "string"
}
}]