Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add index on old data #220

Closed
andreasronge opened this Issue · 2 comments

3 participants

@andreasronge

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!

@saterus

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?

@andreasronge
Owner

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
end

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
Something went wrong with that request. Please try again.