Is there a way to return only a Similarity’s Coord value as a hit’s score? I’ve overridden every combination of methods I could think of to get this result with no luck. Actually, the score doesn’t have to be the exact Coord value, but all hits should be relative to each other based on that value and nothing else.
For example, if I search “Test Search String” and hit on two words, I want that score to be 66% of the score of a hit on all three words.
This is in Lucene.net 2.9.4, but I can translate any Java implementations as needed.
Thanks in advance.
I never tried it so I don’t know if it would work, but you could probably create your own implementation of Similarity and use it by calling the
Searcher.SetSimilarity()method.Have every methods but
Coord()of yourSimilarityreturn 1. TheCoord()method could simply read: