Announcement Announcement Module
Collapse
No announcement yet.
Support for Cypher/Lucene Query Language in @Query Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Support for Cypher/Lucene Query Language in @Query

    I'm trying to perform a composite key looking in Cypher using the @Query annotation for a GraphRepository. When I try to to do something like:

    Code:
    	@Query("START userNode=node:UserNode(name:{0} AND userId:{1}) RETURN userNode")
    I get errors:

    Code:
    Error executing statement START userNode=node:UserNode(name:{0} AND userId:{1}) RETURN userNode; nested exception is `=` expected
    "START userNode=node:UserNode(name:{0} AND userId:{1}) RETURN userNode"
    I tried to add quotes around it:

    Code:
    @Query("START userNode=node:UserNode(\"name:{0} AND userId:{1}\") RETURN userNode")
    I get another error:

    Code:
    java.lang.RuntimeException: org.apache.lucene.queryParser.ParseException: Cannot parse 'name:{0} AND userId:{1}': Encountered " "}" "} "" at line 1, column 7.
    Was expecting one of:
        "TO" ...
        <RANGEEX_QUOTED> ...
        <RANGEEX_GOOP> ...
    Does spring-data-neo4j 2.1.0-RELEASE support lucene query notation in @Query's for cypher?
Working...
X