FAQ
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

Search Discussions

  • Michael McCandless at Jun 2, 2010 at 9:15 am
    Use PositiveScoresOnlyCollector.

    Mike
    On Wed, Jun 2, 2010 at 5:11 AM, 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
  • Jan Kurella at Jun 2, 2010 at 9:29 am
    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
    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, 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
  • Michael McCandless at Jun 2, 2010 at 9:37 am
    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, 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
    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,  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
  • Simon Willnauer at Jun 2, 2010 at 9:47 am
    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
    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,  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
    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,  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
  • Jan Kurella at Jun 2, 2010 at 11:48 am
    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
    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
    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,  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
    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,  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
  • Chris Hostetter at Jun 2, 2010 at 4:19 pm
    : 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
  • Jan Kurella at Jun 2, 2010 at 5:09 pm
    Ok,

    that's probably because I move from lucene to solr.

    We will need to filter them from the result manually then first.

    Jan
    ----- Ursprüngliche Mitteilung -----
    : 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
  • Chris Hostetter at Jun 2, 2010 at 5:25 pm
    : that's probably because I move from lucene to solr.
    :
    : We will need to filter them from the result manually then first.

    Can you explain why? ... in particular, can you explain what types of
    queries you have that produce negative scores for matches, but where you
    don't want to see those matches in the results?

    becuase frankly the fact that some HitCollectors use to ignore negative
    scores was generally considered a bug -- the fact that a score is negative
    doesn't change that it's a match. if you're dealing with some type of
    Query object whose results you think should be filtered to exclude the
    negativescores, that makes me wonder if hte Query itself is implemented
    incorrectly.

    (excluding negative scores is like excluding scores below "3.1415" -- it's
    an arbitrary cut off that's generally meaningless)


    -Hoss


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Yonik Seeley at Jun 2, 2010 at 6:37 pm

    On Wed, Jun 2, 2010 at 1:10 PM, wrote:
    that's probably because I move from lucene to solr.

    We will need to filter them from the result manually then first.
    Solr has a function range query that can filter out any values outside
    of the given range.
    http://www.lucidimagination.com/blog/2009/07/06/ranges-over-functions-in-solr-14/

    And of course, a function query can consist of a normal relevancy
    query... so here is a lucene query of "text:solr" with a lower bound
    of 0 exclusive:

    http://localhost:8983/solr/select?q={!frange l=0
    incl=false}query($qq)&qq=text:solr

    -Yonik
    http://www.lucidimagination.com

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedJun 2, '10 at 9:12a
activeJun 2, '10 at 6:37p
posts10
users5
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase