Hi all,

as far as i know, the Batch Inserter Index has a slightly different 
behaviour than the default LuceneIndex:

1. It supports the addition of multiple Key/Value pairs at once and
2. Multiple calls to add() will result in multiple Index entries

The default Lucene Index implementation does not support this. What 
seems to be undesired behaviour mainly introduced to gain a little bit 
of performance has a huge benefit:

It allows indexing of M:N-Relations at the node level. Imagine a graph 
with 2 Persons and 4 kinds of Vehicles: Person 1, Person 2, yellow 
buses, yellow bicyles, red buses and red bicycles. Let the graph be the 
following:
Person 1 -OWNS-> Yellow Bus
Person 2 -OWNS-> Red Bicycle
Person 2 -OWNS-> Red Bus
Person 2 -OWNS-> Yellow Bicyle

Using the batch inserter one can now call
personNodeIndex.add(1, color->yellow, vehicle->bus)
personNodeIndex.add(1, color->red, vehicle->bicyle)
personNodeIndex.add(1, color->red, vehicle->bus)
personNodeIndex.add(1, color->yellow, vehicle->bicycle)

and personNodeIndex.query("color:yellow vehicle:bus") will return *only* 
person 1.

Since this behaviour is not present in the LuceneIndex, i fear that you 
will probably try to "fix" the behaviour to be the same as with 
LuceneIndex. Are there plans to do so?

 From my perspective, it would be a cooler thing to have the 
BatchInserterIndexes behaviour within the LuceneIndex to. Do you plan 
something like this?

Best regards,
Benjamin
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to