architect4r icon indicating copy to clipboard operation
architect4r copied to clipboard

Indexes?

Open gilbert opened this issue 12 years ago • 3 comments

Are indexes on the roadmap? What would it take to implement them?

gilbert avatar Apr 06 '12 03:04 gilbert

I have not yet worked with neo4j indexes, as all my projects rely on elasticsearch for data indexing. But I guess it would not be too much work. Have you thought about the api to access the index? How would you like to have it?

namxam avatar Apr 07 '12 11:04 namxam

Sorry for the delay, I've been sick recently.

My use case is unique usernames. It'd be nice to write a simple index :username similar to neo4j.rb. On the other hand, neo4j has support for unique indexes, so maybe it'd be better to have that separate from normal indexes (perhaps like unique :username?).

What are your thoughts? I'm new to neo4j, so my opinion doesn't weigh too much.

gilbert avatar Apr 10 '12 23:04 gilbert

neoid gem has an index implementation, not too sure the code would help but the usage is quite clean, inside the model you define a block with the fields you want to have indexed, a .fulltext and .exact is used to define each one. Actually when I think about it, it looks a little like how you define them using thinking_sphinx.

alank64 avatar Mar 12 '13 01:03 alank64