I am using Titan 1.0 with elasticsearch as backend. From the titan documentation, I learned that for using elasticsearch, we use mixedIndex while building indexes. Here is my use case and problem: I am creating a graph database for registration data of a book store, for the data I have registration time, and other personal infos such as name and age. I want to query all the users that registered during given time range, in another words, I want a numeric comparison function for the query. This is how I create the index:
PropertyKey propertyKey = mgmt.makePropertyKey("registTime").dataType(Date.class)
.cardinality(Cardinality.SINGLE).make()
timeIndex = mgmt.buildIndex("registeredTime",Vertex.class)
.addKey("registTime", Mapping.TEXTSTRING.asParameter())
.buildMixedIndex("search");
The timeIndex is created successfully, however, when I want to query the registered time with:
g.V().has("registTime", gt("2015-01-01 00:00:00.000+0000"))
it gives me:
WARN com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx - Query requires iterating over all vertices [()]. For better performance, use indexes
and it gives me an empty result, though I checked with gremlin command and confirmed the data is right there. Am I doing anything wrong? How can I solve this problem?