tinkerpop/blueprints — Issue #192: [Neo4jBatchGraph] edge index gets not created automatically 
Author: 2nd-metaman
Created: 2011-12-09 23:08:58+00:00
State: open

Hello, I have some very simple code which creates a Neo4jBatchGraph, wraps that in GraphSail,
and then tries to load triples from an NTriples file.

However, I get this error:
java.lang.IllegalStateException: the provided graph has no 'edges' index

After some googling, I found out that this can be fixed by the following lines of code:
// neobatch.createAutomaticIndex(Index.VERTICES, Vertex.class, null);
// neobatch.createAutomaticIndex(Index.EDGES, Edge.class, null);

However, if I then load the directory as a normal GraphSail ( Neo4jGraph () ) , and ask some SPARQL queries, then I get different answers then if I would have started with a normal Neo4jGraph in the first place.

What I am trying to say is this:
* It seems like Neo4JGraph is using some sort of magic when it creates the default indeces.
* Neo4jBatchGraph is not implementing the same kind of magic
* Manually recreating that magic is not working for me.

However, it seems to me, like Neo4jBatchGraph is not usable as an out-of-the-box replacement for a Neo4JGraph right now. So that looks like a bug to me.

The code which I am using is here: https://gist.github.com/1453740

Please let me know if you have other questions, or if I am just doing something wrong.

sincerely, Benjamin.