Rebuilding the label data store fixed the problem. But it got me a little bit worried. Do you know why this (the faulty label indexing) could have happened?
On Tuesday, February 4, 2014 8:47:08 AM UTC, Jorge Braz wrote: > > > > On Monday, February 3, 2014 9:42:52 PM UTC, Michael Hunger wrote: >> >> Did you by chance update from 2.0-M06 to 2.0 final? Without rebuilding >> the label store? see >> http://blog.neo4j.org/2013/11/neo4j-200-rc1-final-preparations.html >> > > Nope. I'm still using neo4j-community-2.0.0-M06. > Nevertheless, i'll try rebuilding the label data store. > > Thanks! > > >> >> >> >> what happens if you run: >> >> START g=node(*) WERE g:GROUP RETURN ID(g); >> >> >> >> Caution: manual upgrade between milestones >> Data stores created with any previous milestone version can not be used >> with 2.0.0-RC1 unless a manual upgrade is performed. This is due to >> incompatible changes made to the store files. Please proceed with caution, >> backing up your data before attempting to manually upgrade. >> >> >> Manual upgrade (only from 2.0.0-M06, and after you've backed up): >> >> 1. Cleanly shut down on the old version on Neo4j 2.0.0-M06 >> $ bin/neo4j stop >> 2. Navigate to the database directory >> $ cd data/graph.db >> 3. Delete the label scan store (this is the critical part that has a >> new format). It will be recreated on startup. >> $ rm -rf schema/label >> 4. Start with the new version of Neo4j 2.0.0-RC1 >> $ bin/neo4j start >> >> >> >> Am 03.02.2014 um 17:52 schrieb Jorge Braz <[email protected]>: >> >> 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. >> >> >> -- 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.
