neo4j/neo4j — pull request #1122 by tinwelint (2013-08-29 13:06:18+00:00)
Title: Introducing LabelScanStore

A LabelScanStore has one responsibility and that is to be able to quickly
and efficiently answer which nodes have a particular label. It will be
updated with node->label changes transactionally and generally integrates
with Neo4j similarly to SchemaIndexProvider, as a kernel extension.

A default implementation using lucene is added, which can rebuild itself
during the recovery phase of the db if the index backing the scan store is
missing or corrupted.

The main point of integration for the reading of a label scan store is in
statement operations method nodesGetNodesForLabel (in
EntityReadOperastions to be precise), where a piece of code looping over
the node store is now replaced by one line asking the active label scan store
instead.