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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to