alexanoid
alexanoid

Reputation: 25770

Passing parameter into Cypher query node_auto_index

I'm trying to pass a parameter into the Cypher query node_auto_index without any luck.

DecisionRepository.class:

@Query("START d=node:node_auto_index(':text') MATCH (d:Decision) RETURN d") 
List<Decision> searchDecisions(String text);

Usage:

List<Decision> searchDecisions = decisionRepository.searchDecisions("name:aDbma~ OR name:mosyl~");

Is it possible and if so where I'm wrong ?

Upvotes: 2

Views: 223

Answers (1)

FrobberOfBits
FrobberOfBits

Reputation: 18002

Use query parameters

START d=node:node_auto_index({myLuceneQuery}) RETURN d;

Then send "name:aDbma~ OR name:mosyl~" as {myLuceneQuery}

Upvotes: 2

Related Questions