4

With the schema based index I can index a property for all nodes that have a given label.

This is a bit confusing if I have the following use case:

Let's say I index node Human with label Student on property name. If I add a new label Teacher, to this node do I also have to index my properties (name in this case) for this new label ?

Or if the label is changed (Student with Teacher) do I have to index for the new label ?

amb
  • 1,599
  • 2
  • 11
  • 18

1 Answers1

0

I have fiddled with neo4j-sh by showing indexed on nodes.

It seems indexes are created only on labels and if a label is removed from a node, those properties will not be indexed anymore. So the index has nothing to do with the node but only with the label.

So one needs to add indexes for any labels that one needs to use on a single node.

amb
  • 1,599
  • 2
  • 11
  • 18