lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: HITCOLLECTOR+SCORE+DELIMA
Date Mon, 13 Dec 2004 11:34:32 GMT

On Dec 13, 2004, at 1:16 AM, Karthik N S wrote:
> So u say I have to Build a Filter to Collect all the Scores between 
> the 2
> Ranges [ 0.2f to 1.0f]

My message is being misinterpreted.  I said "filter" as a verb, not a 
noun.  :)  In other words, I was not intending to mean write a Filter - 
a Filter would not be able to filter on score.

> so the API for the same would be
>
>  Hits hit = search(Query query, Filter filtertoGetScore)
>
>
>  But while writing the Filter  Score again depends on Hits  ====> 
> Score =
> hits.score(x);

Again, you cannot write a Filter (capital 'F') to deal with score.

Please re-read what I said below...

> Hits are in descending score
> order, so you may just want to use Hits and filter based on the score
> provided by hits.score(i).

Iterate over Hits... when you encounter scores below your desired 
range, stop iterating.  Why is this simple procedure not good enough 
for what you are trying to achieve?

	Erik


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


Mime
View raw message