After attending the Neo4j meetup in Boston last month, reading MH's Neo4j book, and reading the Neo4j chapter of the O'Rielly Spring Data book, I spent the weekend migrating the user graph of my website to Neo4j. Everything works as the tutorials suggest, but the indexes don't seem to work.
Example:
From the admin panel I can see these nodes and I can see the auto-generated UserNode index.Code:@NodeEntity(useShortNames=true) public class UserNode { @GraphId private Long id; @Indexed(unique=true) private int uId; }
However, when I try to search it, example below, it does not work using the format found for Movie searches in MH's book.
Nothing returned.Code:START n=node:UserNode("uId:1") RETURN n;
If a wildcard is added, all users are returned, so they are indeed in the index.
Returns all users.Code:START n=node:UserNode("uId:*") RETURN n;
So it seems users are in the index, but not being indexed by the provided unique index.
Am I missing anything here? Thanks for any suggestions you may have as I have not seen many examples on how to write Cypher queries to the indexes generated by SDN.
Details:
SDN 2.2.0
Neo4j 1.8.1 (as referenced inside SDN 2.2.0)
Sincerely,
Joseph


Reply With Quote
