Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-25-2020 04:16 AM
I'm trying to use search fuzzy and with proximity in combination. I found an answer for how to do it with Lucene here, but it doesn't seem to work:
Trying something like
CALL db.index.fulltext.queryNodes('myIndex', '“bill~ killl~”~2')
doesn't work for me. I get Lucene parse errors:
Failed to invoke procedure `db.index.fulltext.queryNodes`: Caused by: org.apache.lucene.queryparser.classic.ParseException: Encountered " <FUZZY_SLOP> "~5 "" at line 1, column 22.
Was expecting one of:
<EOF>
<AND> ...
<OR> ...
<NOT> ...
"+" ...
"-" ...
<BAREOPER> ...
"(" ...
"*" ...
"^" ...
<QUOTED> ...
<TERM> ...
<PREFIXTERM> ...
<WILDTERM> ...
<REGEXPTERM> ...
"[" ...
Is it at all possible to tune the fuzzy search within a proximity search? Because fuzziness seems to be there anyways but I can't add any score limits manually. For instance, this works and get matches:
CALL db.index.fulltext.queryNodes('myIndex', '“bill killl”~2')
but I can't do
CALL db.index.fulltext.queryNodes('myIndex', '“bill~0.8 killl~0.7”~2')
without getting parse errors.
04-16-2021 10:28 AM
I am having the same issue due to some special characters in the query:
CALL db.index.fulltext.queryNodes("NameIndex", 'killl~~2')
If I remove one of the '~', it won't report the problem. Some other characters that cause the same issue: '!'. Is there a solution to fix this?
04-16-2021 10:32 AM
This is a report here:
Can't the Neo4j Team fix this as suggested in the question by using the 'escape' function. Some special characters or punctuations marks are common in text.
All the sessions of the conference are now available online