Disabling scoring in Lucene(.NET)
Posted
by user72185
on Stack Overflow
See other posts from Stack Overflow
or by user72185
Published on 2010-04-14T14:04:42Z
Indexed on
2010/04/18
12:13 UTC
Read the original article
Hit count: 408
lucene
|lucene.net
Hi,
When searching, is there a way to disable scoring for any query?
The scenario is that the user refines his query by trying different combinations of words, phrases etc., and needs realtime (well, reasonably fast at least) responses on the number of hits.
Search time slows down a lot when there are millions of hits due to scoring, but the user really doesn't care about all these documents. As soon as he sees there are 1M+ hits he will start adding additional words to the query. A "Sort by relevance" option would allow him to do this quickly, while turning scoring back on when the number of hits is reasonable.
Is this possible?
I'm using Lucene.NET 2.9.2 but AFAIK it is identical to the Java version.
© Stack Overflow or respective owner