You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by ja...@nokia.com on 2010/06/02 11:11:41 UTC

Docs with any score are collected in the Collector implementations

Hi,

Formerly the HitCollector stored only docs with score bigger than 0.0f. This check is not implemented in any Collector implementation. Especially in the two implementation used by solr: InOrderTopScoreDocCollector and OutOfOrderTopScoreDocCollector.

How to not collect documents with a score less or equal to 0.0f?

Jan

RE: Docs with any score are collected in the Collector implementations

Posted by ja...@nokia.com.
Added a comment in the JIRA mentioned below. I do not feel to create already a patch on my first chat to you guys ;)

Jan

-----Original Message-----
From: ext Simon Willnauer [mailto:simon.willnauer@googlemail.com] 
Sent: Mittwoch, 2. Juni 2010 11:47
To: java-user@lucene.apache.org
Subject: Re: Docs with any score are collected in the Collector implementations

AFAIK, exchangeing the Collector is one of the last tricky parts which
is not solvable via the XML configuration. I recall talking to Mark a
while ago about reasons against replacing your Lucene app with Solr
and HitCollector / Collector came up during that. I think you need to
touch SolrIndexSearcher and maybe build your own QueryCompontent. Yet,
I am not a Solr expert so maybe Mark, Yonik or Chris could jump in
here?!

simon

On Wed, Jun 2, 2010 at 11:36 AM, Michael McCandless
<lu...@mikemccandless.com> wrote:
> Yeah might be the wrong mailing list :)  Though there is alot of overlap...
>
> Solr's QueryComponent doesn't seem to allow specifying your own
> collector... and this issue is still open:
>
>    https://issues.apache.org/jira/browse/SOLR-1680
>
> I think we need to hear from a Solr guru (not me)!
>
> Mike
>
> On Wed, Jun 2, 2010 at 5:28 AM,  <ja...@nokia.com> wrote:
>> Thanks, have overseen this implementation. How to get solr configured to use this wrapper collector? Or is this the wrong mailing list for this question? :)
>>
>> As far as I read the solr code it is not meant to configure the collectors at all without touching the code...
>>
>> Jan
>>
>> -----Original Message-----
>> From: ext Michael McCandless [mailto:lucene@mikemccandless.com]
>> Sent: Mittwoch, 2. Juni 2010 11:15
>> To: java-user@lucene.apache.org
>> Subject: Re: Docs with any score are collected in the Collector implementations
>>
>> Use PositiveScoresOnlyCollector.
>>
>> Mike
>>
>> On Wed, Jun 2, 2010 at 5:11 AM,  <ja...@nokia.com> wrote:
>>> Hi,
>>>
>>> Formerly the HitCollector stored only docs with score bigger than 0.0f. This check is not implemented in any Collector implementation. Especially in the two implementation used by solr: InOrderTopScoreDocCollector and OutOfOrderTopScoreDocCollector.
>>>
>>> How to not collect documents with a score less or equal to 0.0f?
>>>
>>> Jan
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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


Re: Docs with any score are collected in the Collector implementations

Posted by Simon Willnauer <si...@googlemail.com>.
AFAIK, exchangeing the Collector is one of the last tricky parts which
is not solvable via the XML configuration. I recall talking to Mark a
while ago about reasons against replacing your Lucene app with Solr
and HitCollector / Collector came up during that. I think you need to
touch SolrIndexSearcher and maybe build your own QueryCompontent. Yet,
I am not a Solr expert so maybe Mark, Yonik or Chris could jump in
here?!

simon

On Wed, Jun 2, 2010 at 11:36 AM, Michael McCandless
<lu...@mikemccandless.com> wrote:
> Yeah might be the wrong mailing list :)  Though there is alot of overlap...
>
> Solr's QueryComponent doesn't seem to allow specifying your own
> collector... and this issue is still open:
>
>    https://issues.apache.org/jira/browse/SOLR-1680
>
> I think we need to hear from a Solr guru (not me)!
>
> Mike
>
> On Wed, Jun 2, 2010 at 5:28 AM,  <ja...@nokia.com> wrote:
>> Thanks, have overseen this implementation. How to get solr configured to use this wrapper collector? Or is this the wrong mailing list for this question? :)
>>
>> As far as I read the solr code it is not meant to configure the collectors at all without touching the code...
>>
>> Jan
>>
>> -----Original Message-----
>> From: ext Michael McCandless [mailto:lucene@mikemccandless.com]
>> Sent: Mittwoch, 2. Juni 2010 11:15
>> To: java-user@lucene.apache.org
>> Subject: Re: Docs with any score are collected in the Collector implementations
>>
>> Use PositiveScoresOnlyCollector.
>>
>> Mike
>>
>> On Wed, Jun 2, 2010 at 5:11 AM,  <ja...@nokia.com> wrote:
>>> Hi,
>>>
>>> Formerly the HitCollector stored only docs with score bigger than 0.0f. This check is not implemented in any Collector implementation. Especially in the two implementation used by solr: InOrderTopScoreDocCollector and OutOfOrderTopScoreDocCollector.
>>>
>>> How to not collect documents with a score less or equal to 0.0f?
>>>
>>> Jan
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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


Re: Docs with any score are collected in the Collector implementations

Posted by Michael McCandless <lu...@mikemccandless.com>.
Yeah might be the wrong mailing list :)  Though there is alot of overlap...

Solr's QueryComponent doesn't seem to allow specifying your own
collector... and this issue is still open:

    https://issues.apache.org/jira/browse/SOLR-1680

I think we need to hear from a Solr guru (not me)!

Mike

On Wed, Jun 2, 2010 at 5:28 AM,  <ja...@nokia.com> wrote:
> Thanks, have overseen this implementation. How to get solr configured to use this wrapper collector? Or is this the wrong mailing list for this question? :)
>
> As far as I read the solr code it is not meant to configure the collectors at all without touching the code...
>
> Jan
>
> -----Original Message-----
> From: ext Michael McCandless [mailto:lucene@mikemccandless.com]
> Sent: Mittwoch, 2. Juni 2010 11:15
> To: java-user@lucene.apache.org
> Subject: Re: Docs with any score are collected in the Collector implementations
>
> Use PositiveScoresOnlyCollector.
>
> Mike
>
> On Wed, Jun 2, 2010 at 5:11 AM,  <ja...@nokia.com> wrote:
>> Hi,
>>
>> Formerly the HitCollector stored only docs with score bigger than 0.0f. This check is not implemented in any Collector implementation. Especially in the two implementation used by solr: InOrderTopScoreDocCollector and OutOfOrderTopScoreDocCollector.
>>
>> How to not collect documents with a score less or equal to 0.0f?
>>
>> Jan
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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


RE: Docs with any score are collected in the Collector implementations

Posted by Chris Hostetter <ho...@fucit.org>.
: Thanks, have overseen this implementation. How to get solr configured to 
: use this wrapper collector? Or is this the wrong mailing list for this 
: question? :)
: 
: As far as I read the solr code it is not meant to configure the collectors at all without touching the code...

correct ... Collector "injection" is something that has never been figured 
out very well.  as for your original question...

: > Formerly the HitCollector stored only docs with score bigger than 
: 0.0f. This check is not implemented in any Collector implementation. 
: Especially in the two implementation used by solr: 

Unless i am remembering horribly incorrectly, the HitCollector used in 
Sol has always collected *matches* (regardless of wether the score was 
positive or negative) since hte first version of Solr -- that's how 
FunctionQueries worked correctly.

So while it's true that *some* of the HitCllectors shipped with Lucene may 
have changed wether they collect docs with negative scores, nothing has 
changed in Solr.


-Hoss


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


RE: Docs with any score are collected in the Collector implementations

Posted by ja...@nokia.com.
Thanks, have overseen this implementation. How to get solr configured to use this wrapper collector? Or is this the wrong mailing list for this question? :)

As far as I read the solr code it is not meant to configure the collectors at all without touching the code...

Jan

-----Original Message-----
From: ext Michael McCandless [mailto:lucene@mikemccandless.com] 
Sent: Mittwoch, 2. Juni 2010 11:15
To: java-user@lucene.apache.org
Subject: Re: Docs with any score are collected in the Collector implementations

Use PositiveScoresOnlyCollector.

Mike

On Wed, Jun 2, 2010 at 5:11 AM,  <ja...@nokia.com> wrote:
> Hi,
>
> Formerly the HitCollector stored only docs with score bigger than 0.0f. This check is not implemented in any Collector implementation. Especially in the two implementation used by solr: InOrderTopScoreDocCollector and OutOfOrderTopScoreDocCollector.
>
> How to not collect documents with a score less or equal to 0.0f?
>
> Jan
>

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


Re: Docs with any score are collected in the Collector implementations

Posted by Michael McCandless <lu...@mikemccandless.com>.
Use PositiveScoresOnlyCollector.

Mike

On Wed, Jun 2, 2010 at 5:11 AM,  <ja...@nokia.com> wrote:
> Hi,
>
> Formerly the HitCollector stored only docs with score bigger than 0.0f. This check is not implemented in any Collector implementation. Especially in the two implementation used by solr: InOrderTopScoreDocCollector and OutOfOrderTopScoreDocCollector.
>
> How to not collect documents with a score less or equal to 0.0f?
>
> Jan
>

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