sasi
sasi

Reputation: 4318

creating labels and index for already existed nodes in neo4j

We are using Neo4j 2.0.0.M05, i just searched for creating labels and index for already existed bulk of nodes, didnt get perfect answer.

we are using node_auto_index property, but fetching is very slow ,how can we create Labels and Indexes for Bulk of Existing nodes.

Upvotes: 0

Views: 601

Answers (1)

Eve Freeman
Eve Freeman

Reputation: 33165

In 2.0, the indexes are easy to create in Cypher:

CREATE INDEX on :Label(property);

It will go and populate the index with current nodes that have the :Label label.

Then you query with the label again:

MATCH (n:Label) 
WHERE n.property = "..." 
RETURN n;

Upvotes: 1

Related Questions