Reputation: 135
When I execute the below query in neo4j console, i get the correct result set. start n=node:search('username:*') return n.username;
I am using spring data neo4j in my java web app.
In the repository code, i defined query as:
@Query("START n=node:search({0}) RETURN n.name as name, n.username as username Parameter passed {0} = 'username:*'
There is no exception but the result set size is 0.
Can you please help me resolve the issue?
Upvotes: 0
Views: 786
Reputation: 33155
Unfortunately, the whole lucene query cannot be a parameter in Cypher, as far as I know. You'll need to resort to string concatenation/interpolation, probably. Similar to the issue I posted about relationship types as parameters: https://github.com/neo4j/neo4j/issues/340
Upvotes: 1