In Lucene, how will the terms be used in calculating points, can I redefine it with CustomScoreQuery?

Did someone successfully redefine the count of documents in the request to determine the "relevance" of the term for the contents of the field through one own function? If so, was that through CustomScoreQuery and overriding customScore (int, float, float)? I can't seem to find a way to create a custom sort or a custom counter that can rank exact word matches much higher than other matches with prefix terms. Any suggestions would be appreciated.

+4
source share
1 answer

I don’t know lucene directly, but I can tell you that Solr, a lucene-based application, has this function:

Query enhancement through functions

Let me know if this helps you.

+1
source

Source: https://habr.com/ru/post/1276551/


All Articles