I have a Titan graph with ES backend and DynamoDB for persistence.
Method has("mykey", "value")
never retrieves a vertex. it always return nothing when querying for a mykey
which is indexed by Elasticsearch. The index is updated and enabled.
WHen running this query,
gremlin> graph.indexQuery("verticesIndex2", "v.mykey:myvalue").vertices().asList().size()
==>1 // It works here!! The vertex is retrieved successfully.
gremlin> g.V().has("mykey", "myvalue").hasNext()
==>false // doesn't retrieve anything!!!
gremlin> g.V(16998408).values("mykey")
==>myvalue // the vertex exists in my graph for sure !!
I tried a trick to make it work
gremlin> g.V().has("mykey").has("mykey", "myvalue").next()
19:49:44 WARN com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx - Query requires iterating over all vertices [()]. For better performance, use indexes
==>v[16998408] // It works !!
This seems to be an issue somewhere, but not sure where exactly. Any thoughts on this?