Solr fuzzy match has better score than exact match

Viewed 3182

I'm doing a fuzzy search in Solr, and in rare cases the exact match has score lower than a fuzzy match. I even found a reason using debugQuery: fuzzy match has matched 3 different words, and exact match matched only one. So the "sum of" 3 matches got better value, than one. Here is part of the "explain".

Is there any way to configure Solr for ranking exact matches higher than fuzzy, even in this case?

P.S. I already using omitTermFreqAndPositions="true" omitNorms="true", but it doesn't help if we have a fuzzy match against different words.

2 Answers

I had a similar problem and solved this by using copyField and doing exact and fuzzy (phonetic in my case) matching on separate fields.

Then used EdisMax's qf field to give higher weight for matches on exact field vs ones on fuzzy matching.

Related