Results 1 to 2 of 2

Thread: [neo4j] Searching @Indexed created index from console not working

Hybrid View

  1. #1
    Join Date
    Mar 2013
    Posts
    2

    Default [neo4j] Searching @Indexed created index from console not working

    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:

    Code:
    @NodeEntity(useShortNames=true)
    public class UserNode {
    	@GraphId
    	private Long id;
    	
    	@Indexed(unique=true)
    	private int uId;
    }
    From the admin panel I can see these nodes and I can see the auto-generated UserNode index.

    However, when I try to search it, example below, it does not work using the format found for Movie searches in MH's book.

    Code:
    START n=node:UserNode("uId:1") RETURN n;
    Nothing returned.

    If a wildcard is added, all users are returned, so they are indeed in the index.

    Code:
    START n=node:UserNode("uId:*") RETURN n;
    Returns all users.

    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

  2. #2
    Join Date
    Mar 2013
    Posts
    2

    Default

    So, to poke this again, the Spring Data Neo4j example code does not appear to create a usable Neo4J index.

    Can anyone provide clarification as to the proper setup needed to make this work beyond the annotations the book describes running on the embedded server? Thanks.

    Joe

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •