Hi guys..
I'm having such a strange behaviour when running a quite simple search (janusgraph 0.2).
Pay attention to the following code:
gremlin> graph = JanusGraphFactory.open("/tmp/janus.properties"); g = graph.traversal()
==>graphtraversalsource[standardjanusgraph[cassandra:[localhost]], standard]
gremlin> g.V().has("ferma_type", "com.acme.model.Person").count()
==>14592
gremlin> g.V().has("ferma_type", "com.acme.model.Person").has("name", "John Doe")
gremlin> g.V().has("ferma_type", "com.acme.model.Person").count()
==>4000
gremlin> g.V().has("name", "John Doe").values("ferma_type")
==>com.acme.model.Person
Notice that when I just open the graph and count how many vertices I have with a ferma_type=com.acme.model.Person it returns 14592, which is ok.
But then when I add a has("name", "John Doe") it returns nothing, although theres a vertex matching the query (as you can see in the end).
It gets a little stranger when I count the vertices again and now it returns only 4000...
I have these two indexes defined:
if (!mgmt.containsGraphIndex("byNameMixed")) {
PropertyKey name = mgmt.getOrCreatePropertyKey("name");
mgmt.buildIndex("byNameMixed", Vertex.class).addKey(name, Mapping.TEXTSTRING.asParameter()).buildMixedIndex("search");
}
if (!mgmt.containsGraphIndex("byFermaType")) {
PropertyKey fermaType = getOrCreateProp(mgmt, "ferma_type", String.class);
mgmt.buildIndex("byFermaType", Vertex.class).addKey(fermaType).buildCompositeIndex();
}
Does anybody have a clue of what's going on ?