lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karthik N S" <kart...@controlnet.co.in>
Subject RE: HITCOLLECTOR+SCORE+DELIMA
Date Mon, 13 Dec 2004 06:16:52 GMT

Hi Guys

Apologies..........


So u say I have to Build a Filter to Collect all the Scores between the 2
Ranges [ 0.2f to 1.0f]


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);



 How To solve this Or Am I in Wrong Process........


Any Simple Src for the same will be greatly appreciated.  :)

Thx in advance



-----Original Message-----
From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
Sent: Friday, December 10, 2004 6:54 PM
To: Lucene Users List
Subject: Re: HITCOLLECTOR+SCORE+DELIMA


On Dec 10, 2004, at 7:39 AM, Karthik N S wrote:
> I am still in delima on How to use the HitCollector for returning
> Hits hits
> between scores  0.2f to 1.0f ,
>
> There is not a simple example for the same, yet lot's of talk on usage
> for
> the same on the form.

Unfortunately there isn't a clean way to stop a HitCollector - it will
simply collect all hits.

Also, scores are _not_ normalized when passed to a HitCollector, so you
may get scores > 1.0.  Hits, however, does normalize and you're
guaranteed that scores will be <= 1.0.  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).

	Erik


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


---------------------------------------------------------------------
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