0

I want to do ranking in Lucene search but I couldn't. I implemented Lucene in Java and the code indexing files and searching in indexed files. But I want to evaluate and make ranking function which returns double between 0 to 1. How can I implement this function. Thanks a lot!

Umidjon Urunov
  • 651
  • 1
  • 17
  • 39

1 Answers1

0

Lucene uses TF-IDF similarity algorithm which you can override.

Alternatively, you can use boosting - either when indexing or querying. This is much simpler approach and requires less effort.

mindas
  • 26,463
  • 15
  • 97
  • 154