lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <ysee...@gmail.com>
Subject Re: only getting Hits with score >= threshold
Date Wed, 11 May 2005 02:02:03 GMT
But only Hits normalizes scores AFAIK, so going the route of using a
HitCollector means doing your own score normalization.

The easiest, If you don't need sorting, is to use Hits and iterate
over the docs until hits.score() is less than the threshold.

Note that it may not make sense filtering by an arbitrary score
(normalized or not).

-Yonik

On 5/10/05, Otis Gospodnetic <otis_gospodnetic@yahoo.com> wrote:
> Hi Kai,
> 
> You could use HitCollector for this:
> http://lucene.apache.org/java/docs/api/org/apache/lucene/search/HitCollector.html
> 
> Here are some bits about HitCollector:
> http://www.lucenebook.com/search?query=hitcollector+score
> A custom HitCollector comes with the book, and you can download the
> sources from the site, so help yourself. :)
> 
> Otis
> 
> 
> --- Kai Gülzau <kguelzau@novomind.com> wrote:
> > Hi,
> >
> > i'm trying to collect Documents whose (normalized) score
> > is greater than a given threshold.
> > But i don't know what is the smartest way to do so :)
> >
> > Do i have to subclass (Index)Searcher and override
> >
> >   search(Query query, Filter filter, final int nDocs)
> >
> > to achieve this?
> >
> >
> >
> > Kai Gülzau
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message