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: selective-field and score
Date Fri, 30 Jan 2004 16:50:16 GMT
If you know the document id, you can use IndexSearcher.explain() (you 
could do a TermQuery to find it to get the number, or get to it more 
directly through IndexReader perhaps).

You are affecting the score by adding more to the query as the score is 
based on the query itself.

	Erik


On Jan 30, 2004, at 11:32 AM, Fabio Gasparetti wrote:

> I'd like to have the query score of one particular document,
> without cycling all the results.
> I've used a "id" field so I can select the doc, then I execute:
>
> QueryParser.parse("("+queryString+") AND id:"+id, "text", analyzer);
>
> But in this way, the obtained score from hits is always 1.
> If the id field is dropped, I've the correct score,
> but I'm not able to directly select the doc I want.
>
>
>
>
>
> ---------------------------------------------------------------------
> 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