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"?
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.
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"?
> 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 :)
> 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"?
> > 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"?