cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Updating a node label from a property or creating an index

We have a property in our db that has gotten more important over time and we are searching on it a lot. We have been debating either making it a node label, or creating an index on the property. So if the structure were

a:ProgNode {KDM:p1, size:10,etc etc

Would we be better just creating an index on KDM or defining it like this

a:ProgNode:KDMVALUE {size:10, etc etc)

If the answer is define it as a label on Node, is there a simple cypher that can do it ? Thanks

3 REPLIES 3

intouch_vivek
Graph Steward

Hi @bill.dickenson,

I would suggest to have a look into the requirement and indexes in Neo4j.


OR
Several other documents available at Neo4j.

Inshort, Label Index to restrict the Search on given Label and is nothing to do with property value present in the Label. On the other hand when you create a Explicit property index then your search will look into the index to fulfill the search result.

Creating a unique constraint on a node property worked for me in a production environment.

Thank you all. That was very helpful.