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 19:10:02 UTC

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

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<ma...@lucene.apache.org>
> For additional commands, e-mail: java-user-help@lucene.apache.org<ma...@lucene.apache.org>
>
>


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

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Wed, Jun 2, 2010 at 1:10 PM,  <ja...@nokia.com> 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


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

Posted by Chris Hostetter <ho...@fucit.org>.
: 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