lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: Hit & Score [ Between ]
Date Wed, 04 Aug 2004 16:03:29 GMT
You could instead use a HitCollector to gather only documents with 
scores in that range.

Doug

Karthik N S wrote:
> Hi 
> 
> Apologies....
> 
> If I want to get all the  hits for Scores  between  0.5f  to 0.8f, 
> I usally use
> query = QueryParser.parse(srchkey,Fields, analyzer);
> int tothits = searcher.search(query);
> 
> for (int i = 0; i<tothits ; i++) {
>         docs = hits.doc(i);
>         Score = hits.score(i);
>          
>         if ((Score > 0.5f ) && (Score < 0.8f) ) {
>             System.out.println(" FileName  : " + docs.get("filename");
>         }
> }
> 
> Is there any other way to Do this ,
> Please Advise me..........
> 
> Thx.
> 
>         
>       WITH WARM REGARDS 
>       HAVE A NICE DAY 
>       [ N.S.KARTHIK] 
>      
> 
> 
> 
> ---------------------------------------------------------------------
> 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