lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <...@teamware.com>
Subject Re: Combining score from two or more hits
Date Thu, 22 Mar 2007 19:51:10 GMT
Erick Erickson wrote:
> Don't know if it's useful or not, but if you used  TopDocs instead,
> you have access to an array of ScoreDoc which you could modify
> freely. In my app, I used a FieldSortedHitQueue to re-sort things
> when I needed to.

Thanks Erick, I've been using TopDocs, but am playing with my own HitCollector 
variant of TopDocHitCollector.  The problem is not adjusting the score, it's 
what to adjust it by, i.e. is it possible to re-evaluate the scores of H1 and H2 
knowing that the original query resulted in hits on H1 AND H2.

Antony

> 
> ERick
> 
> On 3/22/07, Antony Bowesman <adb@teamware.com> wrote:
>>
>> I have indexed objects that contain one or more attachments.  Each
>> attachment is
>> indexed as a separate Document along with the object metadata.
>>
>> When I make a search, I may get hits in more than one Document that refer
>> to the
>> same object.  I have a HitCollector which knows if the object has already
>> been
>> found, so I want to be able to update the score of an existing hit in a
>> way that
>> makes sense.  e.g. If hit H1 has score 1.35 and hit H2 has score 2.9 
>> is is
>> possible to re-score it on the basis that the real hit result is (H1 AND
>> H2).
>>
>> I can take the highest score of any Document, but just wondered if 
>> this is
>> possible during the HitCollector.collect method?
>>
>> Antony



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


Mime
View raw message