RelationshipIndex and query by RelationshipType
Closed this issue · 1 comments
Hi team,
I don't know if it's the right place to ask for help, but I could not find another place to contact you guys.
My problem is that I want to check if a relationship exists between two nodes, and I want to do it either by checking on a specific attribute of the relationship, or by its RelationshipType. I followed what is described on http://wiki.neo4j.org/content/FAQ#Checking_if_a_relationship_exists_between_two_nodes,
but I think the code is quite old since it is not possible to create a LuceIndexProvider with an argument (not "LuceneIndexProvider( graphDb );") like on the page, and then it just wouldn't work. So how do we use the LuceneIndexProvider now?
Otherwise, to query by RelatinshipType on two nodes, I followed the Relationship Indexes part on http://wiki.neo4j.org/content/Index_Framework, but what is the key to query against the RelationshipType? is it possible? since I can have many relationship between two nodes but with two different types, it would be nice to get the one I want directly, without getting the first node, then all the relationship with it, then checking if the type is the same and the other node ...
Thanks for you replies!!
You'll need to add the relationship types to the index yourself. See the example over here: http://docs.neo4j.org/chunked/snapshot/indexing-relationships.html Does that help? I added it to the docs today, but haven't got around to update the wiki to point to it.
A great way to get in touch with us is the mailing list: https://lists.neo4j.org/mailman/listinfo/user