Add index on old data #220

andreasronge opened this Issue Oct 31, 2012 · 2 comments


None yet

3 participants

Neo4jRB member

It should be easier to add index on old data.

See the RSpec test #cffe7a4

Not sure what the api should look like, maybe just Person.reindex!


Referenced Spec

Also seems related to #257. Or at least, this would at least solve part of that problem.

Would all the Person nodes need to already have their relationship to the Person-class-node? (not sure what the name of this is yet) I'm assuming so?

Neo4jRB member

The use case is that the developer first writes the Person class without specifiing an index, e.g.

class Person < Neo4j::Rails::Model
  property :name

This will create the Person-class node and connect all Person nodes to it automatically.
The developer then decide that an index is needed on property.
He then needs to add index on the name property in the Person class and reindex all the old nodes, e.g. Person.reindex(:name)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment