lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrzej Bialecki>
Subject Re: Is negative boost possible?
Date Mon, 12 Oct 2009 16:03:46 GMT
Yonik Seeley wrote:
> On Mon, Oct 12, 2009 at 5:58 AM, Andrzej Bialecki <> wrote:
>> BTW, standard Collectors collect only results
>> with positive scores, so if you want to collect results with negative scores
>> as well then you need to use a custom Collector.
> Solr never discarded non-positive hits, and now Lucene 2.9 no longer
> does either.

Hmm ... The code that I pasted in my previous email uses, int), which in turn uses search(Query, Filter, 
int), and it doesn't return any results if only the first clause is 
present (the one with negative boost) even though it's a matching clause.

I think this is related to the fact that in TopScoreDocCollector:48 the 
pqTop.score is initialized to 0, and then all results that have lower 
score that this are discarded. Perhaps this should be initialized to 

Best regards,
Andrzej Bialecki     <><
  ___. ___ ___ ___ _ _   __________________________________
[__ || __|__/|__||\/|  Information Retrieval, Semantic Web
___|||__||  \|  ||  |  Embedded Unix, System Integration  Contact: info at sigram dot com

View raw message