The "index concept"

39 views
Skip to first unread message

kodo

unread,
May 2, 2012, 2:23:24 PM5/2/12
to Neo4j
Hi!

I have a question regering the purpose or "use case" behind neo4j's
index concept. I realize that I'm able to specify different index
configurations but is it still possible to create inter-index
traversals - in other words will I be able to create relationships
between nodes residing in different indexes? Furthermore is the
concept of enabling storage of relationships in different indexes
related to the fact that different lucene-parameters may be specified?
Are there any other advantages besides "logical separations of
classes"?

Cheers

Matt Luongo

unread,
May 2, 2012, 2:59:42 PM5/2/12
to ne...@googlegroups.com
I can help with some of this I think.

The Neo4j index mechanism is orthogonal to the graph, which is its own natural index. So relationships and nodes can be connected in any way, and indexed in any way- the two don't affect each other.

Different indexes allow different Lucene parameters, or even entirely different index implementations. You still might have cause to separate things, however- eg, for performance reasons- but those reasons are best left to a Lucene expert.

- Matt

Matt Luongo

unread,
May 2, 2012, 3:03:39 PM5/2/12
to ne...@googlegroups.com
Are there any other advantages besides "logical separations of
classes"?

Aside from performance and configuration advantages, there's also a major disadvantage- separation of "collision domains" (not the real term at all). What I mean is that when all primitives of a type are indexed in one Lucene index, you can query across fields and let Lucene do the lifting. Splitting up into different indices for different types of nodes, etc makes you handle the join between the indices when you have a complex query.

Anyway, just a few thoughts- anyone on the team feel free to correct me :)

- Matt

Mattias Persson

unread,
May 2, 2012, 3:46:27 PM5/2/12
to ne...@googlegroups.com


2012/5/2 Matt Luongo <mhlu...@gmail.com>

I can help with some of this I think.

The Neo4j index mechanism is orthogonal to the graph, which is its own natural index. So relationships and nodes can be connected in any way, and indexed in any way- the two don't affect each other.

Different indexes allow different Lucene parameters, or even entirely different index implementations. You still might have cause to separate things, however- eg, for performance reasons- but those reasons are best left to a Lucene expert.

- Matt

Very well put, Matt! This is essentially what I would write.

Whereas Lucene is very good as a generic index solution, there's room for improvements for exact indexes in particular... and here pluggable index providers is useful. You just supply config parameter "provider"="my-other-index-implementation" which is registered via java service API and that index name is associated with that implementation, which can be a key/value store or similar. Better support for implementing index providers yourself is coming soon I think.



On Wednesday, May 2, 2012 2:23:24 PM UTC-4, kodo wrote:
Hi!

I have a question regering the purpose or "use case" behind neo4j's
index concept. I realize that I'm able to specify different index
configurations but is it still possible to create inter-index
traversals - in other words will I be able to create relationships
between nodes residing in different indexes? Furthermore is the
concept of enabling storage of relationships in different indexes
related to the fact that different lucene-parameters may be specified?
Are there any other advantages besides "logical separations of
classes"?

Cheers



--
Mattias Persson, [mat...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com

kodo

unread,
May 3, 2012, 12:28:23 AM5/3/12
to Neo4j
Matt & Mattias!

Many thanks for your answers, they definitely made the concept(s)
clearer:)

Keep up the good work with this exciting tool!

Cheers

On 2 Maj, 21:46, Mattias Persson <matt...@neotechnology.com> wrote:
> 2012/5/2 Matt Luongo <mhluo...@gmail.com>
> Mattias Persson, [matt...@neotechnology.com]
> Hacker, Neo Technologywww.neotechnology.com
Reply all
Reply to author
Forward
0 new messages