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