Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-23-2020 02:07 PM
According to the documentation, to be exact match in fulltext search:
if we are only interested in exact matches, then we can quote the string we are searching for.
CALL db.index.fulltext.queryNodes("titlesAndDescriptions", "\"Full Metal Jacket\"") YIELD node, score
RETURN node.title, score
However, I tried a number of queries in my graph with quotes on the query terms, and it's surprising that sometimes it produces one singe result, and sometimes it produces multiple results, which says that the exact match works as expected sometimes, and at other times it doesn't effect at all.
For example, for the following query:
profile
CALL db.index.fulltext.queryNodes("NameIndex", "\"pure\"")
YIELD node, score
RETURN node._name, score limit 10
It always produces more than one result. If I only searches for 'pure', it should empty, right? Since none of them are exact match with 'pure'.
|"100% Pure"|4.58421516418457|
|---|---|
|"Pure as Fior"|4.58421516418457|
|"Pure Heals"|4.58421516418457|
|"Pure paw paw"|4.2646050453186035|
|"PURE BEAU ESSENCE"|4.2646050453186035|
|"Pure Gold Collagen"|4.2646050453186035|
Does this look like a bug, although I doubt?
11-23-2020 02:55 PM
Clarifying question: Do you mean exact case match? There's some stuff about Lucene's full text search on the internet (which is what Neo4J uses by default.)
Other than that, I don't know much about this stuff yet.
11-23-2020 03:54 PM
@clem According to documentation, it is exact phrase match, when a query term is enclosed with a quote, PhraseQuery.
All the sessions of the conference are now available online