1 year ago

#375203

test-img

curiosityrock

neo4j full text doesn't return the highest score for exact match

I am trying to understand why some results have higher score by using neo4j full text index even though i have the exact match of the keyword in my database. For example; I'm looking for the word 'NATIONAL' which i have the exact word in my database. However, if any the node's properties have 'national' keyword more than once, that takes the most priority. I was expecting it to have the highest score with 'national' since this one exactly matches with my keyword. I tried using different type of analyzers, or wildcards, or fuzzy search extension for full text search but they are not helping.

My query and results;

CALL db.index.fulltext.queryNodes("agencyName", "NATIONAL") YIELD node, score
RETURN node.name,score

node.name   score
"NATIONAL - NATIONAL - National Media"  0.9501346349716187
"NATIONAL - NATIONAL - National Day Council"    0.9501346349716187
"NATIONAL - NATIONAL - Cheggs"  0.9361587762832642

.......

I have 4k nodes so i can't share all of it but exact match 'NATIONAL' is almost at the bottom of the list with the least score. I am wondering maybe neo4j full text search was not the best tool for what i'm trying to do.(Neo4j documentations use a similar approach for movieset, so i thought it would have worked). A simple logic that checks the difference between my node's length and search keyword's length would give me a better precision.

search

neo4j

full-text-search

0 Answers

Your Answer

Accepted video resources