[Neo4j] Batch Insertion, how to index relationships?
ppareja at era7.com
Wed Mar 2 10:43:52 CET 2011
I just checked the wiki looking for information on how to index
relationships in batch insertion mode but
didn't find anything so far.
This can be found in the wiki regarding relationship indexing:
RelationshipIndex friendships = graphDb.index().forRelationships(
// "type" isn't a reserved key and isn't indexed automatically
Relationship relationship = friendships.get( "type", "knows", morpheus,
However I cannot find any code snippet for adding relationships to the
index, not just querying it.
How can these two different cases (*batch insertion and standard mode*) be
Besides that, I was wondering how node relationships retrieval is
In my domain model I have some nodes which have hundred of thousands of
relationships, including different types of them.
Suppose you are already situated on one of these nodes and you want to get
only one specific type of incoming relationships,
retrieval time would be dependent on how many relationships are there
including other types?
or once you specify the relationship type in the node.getRelationships(...)
method it doesn't matter how many relationships are there
of other types in terms of relationship retrieval time?
Thanks in advance,
Pablo Pareja Tobes
More information about the User