Hello,

I'm in a situation where a search query string is being submitted
simultaneously to Lucene, and to an external API.

Results are fetched from both sources. I already have a score available for
Lucene results, but I don't have a score for the results fetched from the
external source.

I'd like to calculate scores of results from the API, so that I can rank
the results by the score, and show the top 5 results from both sources.
(I.e the results would be merged.)

Is there any Lucene API method, to which I can submit a search string and
result string, and get a score back? If not, which class contains the
source code for calculating the score, so that I can implement my own
scoring class, using the same algorithm?

I've looked at the Similarity class Javadocs, but it doesn't include any
source code for calculating the score.

Any help would be greatly appreciated. Thanks.

Reply via email to