Re: Incorrect result when lucene index is present


inverseintegral42@...
 

Hey Marc,

I actually just tested your example where p and q are of type Integer with cql and elasticsearch:

PropertiesConfiguration conf = ConfigurationUtil.loadPropertiesConfig("conf/test.properties");
graph = JanusGraphFactory.open(conf);

GraphTraversalSource g = graph.traversal();
JanusGraphManagement m = graph.openManagement();

VertexLabel l = m.makeVertexLabel("L").make();
PropertyKey p = m.makePropertyKey("p").dataType(Integer.class).make();
PropertyKey q = m.makePropertyKey("q").dataType(Integer.class).make();
m.buildIndex("someName", Vertex.class).addKey(p).addKey(q).indexOnly(l).buildMixedIndex("jgex");
m.commit();

g.addV("L").property("p", 1).next();
g.tx().commit();

System.out.println(g.V().hasLabel("L").has("q").count().next());
System.out.println(g.V().hasLabel("L").has("q", not(eq(2))).count().next());
But I get the output 0, 0 which is what I would expect. You wrote that you got the output 0, 1 though. Do you have any idea where this could come from?

Join {janusgraph-users@lists.lfaidata.foundation to automatically receive all group messages.