Has someone successfully overridden the scoring of documents in a query so that the "relevancy" of a term to the field contents can be determined through one's own function? If so, was it by implementing a CustomScoreQuery and overriding the customScore(int, float, float)? I cannot seem to find a way to build either a custom sort or a custom scorer that can rank exact term matches much higher than other prefix term matches. Any suggestions would be appreciated.
views:
667answers:
1
+4
Q:
In Lucene how do terms get used in calculating scores, can I override it with a CustomScoreQuery?
+1
A:
I don't know lucene directly, but I can tell you that Solr, an application based on lucene, has got this feature:
Let me know if it helps you.
volothamp
2008-09-16 12:51:01
I'm accepting this because it's the only answer, it is an answer about Solr though, but it's somewhat helpful.
dlamblin
2009-09-02 16:27:25
Did you find a solution to your problem?
Jenea
2010-04-09 12:29:07