Hi there,

I have two different CYPHER queries, that i believe should return the save 
result:

MATCH (g:GROUP) RETURN ID(g);
START g=node(*) MATCH (g:GROUP) RETURN ID(g);

The first query should get all nodes that have the label GROUP, while the 
second one should select all nodes and then
match only the nodes that have the GROUP label.
I guess that, in theory, the node IDs returned by both queries should be 
the same. That's not whats happening.

neo4j-sh (0)$ PROFILE MATCH (g:GROUP) RETURN ID(g);
==> +-------+
==> | ID(g) |
==> +-------+
==> | 181   |
==> | 204   |
==> | 205   |
==> | 389   |
==> | 391   |
==> | 376   |
==> | 202   |
==> | 447   |
==> | 416   |
==> | 610   |
==> | 19173 |
==> | 393   |
==> | 19245 |
==> | 19301 |
==> | 19246 |
==> | 233   |
==> | 608   |
==> | 611   |
==> +-------+
==> 18 rows
==> 
==> ColumnFilter(symKeys=["g", "ID(g)"], returnItemNames=["ID(g)"], 
_rows=18, _db_hits=0)
==> Extract(symKeys=["g"], exprKeys=["ID(g)"], _rows=18, _db_hits=0)
==>   Filter(pred="hasLabel(g:GROUP(18))", _rows=18, _db_hits=0)
==>     NodeByLabel(label="GROUP", identifier="g", _rows=18, _db_hits=0)

neo4j-sh (0)$ PROFILE START g=node(*) MATCH (g:GROUP) RETURN ID(g);
==> +-------+
==> | ID(g) |
==> +-------+
==> | 181   |
==> | 202   |
==> | 204   |
==> | 205   |
==> | 233   |
==> | 288   |
==> | 292   |
==> | 376   |
==> | 389   |
==> | 391   |
==> | 393   |
==> | 416   |
==> | 447   |
==> | 504   |
==> | 505   |
==> | 510   |
==> | 511   |
==> | 513   |
==> | 515   |
==> | 608   |
==> | 610   |
==> | 611   |
==> | 19173 |
==> | 19245 |
==> | 19246 |
==> | 19301 |
==> +-------+
==> 26 rows
==> 
==> ColumnFilter(symKeys=["g", "ID(g)"], returnItemNames=["ID(g)"], 
_rows=26, _db_hits=0)
==> Extract(symKeys=["g"], exprKeys=["ID(g)"], _rows=26, _db_hits=0)
==>   Filter(pred="hasLabel(g:GROUP(18))", _rows=26, _db_hits=0)
==>     AllNodes(identifier="g", _rows=836, _db_hits=836)

Looking at the PROFILE result i can confirm that 26 nodes "
hasLabel(g:GROUP(18))" but only 18 return when "NodeByLabel(label="GROUP"".
I'm trying to understand why this is happening but i'm stuck.

It might be important to mention that these nodes are also indexed in an 
Index called "Group". I know that something wrong happened while creating 
the "missing"
8 nodes, because they also weren't properly indexes on Group Index. But i 
was able to fix it, forcing the nodes to be added to the index. But i'm not 
really sure 
how to force the nodes to be labeled, because if I ask for their LABELS(), 
they return all the correct labels.

Do any of you guys have any suggestion on how should I try to tackle this 
problem?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to