You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "zane@navigo.com" <za...@navigo.com> on 2013/02/26 18:17:47 UTC
Unexpected '-' Results
We want to treat all optional parameters as required. I thought setting:
q.op=AND and mm=100% (using edismax request handler) would achieve this
result, but I get unexpected results
1) medical => 4,425
2) medical retired => 272
3) medical retired -working => 5,041
4) medical AND retired AND -working => 216
We expect the 3rd and 4th queries to be equivalent, but we're obviously
missing something.
It doesn't seem to be an issue with the number of terms, since:
medical retired husband => 52
Regards,
Z
--
View this message in context: http://lucene.472066.n3.nabble.com/Unexpected-Results-tp4043107.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Unexpected '-' Results
Posted by Jan Høydahl <ja...@cominvent.com>.
Or you can put that energy or money into contributing to solving SOLR-2649 :)
--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com
27. feb. 2013 kl. 17:36 skrev zane@navigo.com:
> Yes... we were trying to avoid getting between solr and the user query, but
> that's a good suggestion on a relatively simple approach. To make it full
> correct, I fear, gets towards a full formal query parser, but we may be able
> to slide. For now, we can leave it as a known issue and just let the power
> searchers know.
>
> Thanks for your help.
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Unexpected-Results-tp4043107p4043418.html
> Sent from the Solr - User mailing list archive at Nabble.com.
Re: Unexpected '-' Results
Posted by "zane@navigo.com" <za...@navigo.com>.
Yes... we were trying to avoid getting between solr and the user query, but
that's a good suggestion on a relatively simple approach. To make it full
correct, I fear, gets towards a full formal query parser, but we may be able
to slide. For now, we can leave it as a known issue and just let the power
searchers know.
Thanks for your help.
--
View this message in context: http://lucene.472066.n3.nabble.com/Unexpected-Results-tp4043107p4043418.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Unexpected '-' Results
Posted by Jan Høydahl <ja...@cominvent.com>.
Well, as long as you know that introducing operators in your query will fallback to a pure boolean SHOULD query, you can do the workaround in your client query generating code, such as prefixing non-prefixed words with a "+".
--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com
27. feb. 2013 kl. 00:19 skrev zane@navigo.com:
> Thanks for the heads up. I"ll keep an eye on the issue. Based on the
> comments, there's no workaround, I suppose?
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Unexpected-Results-tp4043107p4043239.html
> Sent from the Solr - User mailing list archive at Nabble.com.
Re: Unexpected '-' Results
Posted by "zane@navigo.com" <za...@navigo.com>.
Thanks for the heads up. I"ll keep an eye on the issue. Based on the
comments, there's no workaround, I suppose?
--
View this message in context: http://lucene.472066.n3.nabble.com/Unexpected-Results-tp4043107p4043239.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Unexpected '-' Results
Posted by Jan Høydahl <ja...@cominvent.com>.
If you add debugQuery=true to your search you will see how it is parsed:
1. <str name="parsedquery_toString">+(text:medical)</str>
2. <str name="parsedquery_toString">+(((text:medical) (text:retired))~2)</str>
3. <str name="parsedquery_toString">+((text:medical) (text:retired) -(text:working))</str>
4. <str name="parsedquery_toString">+(+(text:medical) +(text:retired) -(text:working))</str>
I think you're seeing an effect of https://issues.apache.org/jira/browse/SOLR-2649 here.
Compare the results of 3) with the result when you put -working as a filter instead:
<str name="parsedquery_toString">+(((text:medical) (text:retired))~2)</str>
<arr name="filter_queries"><str>-working</str></arr>
--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com
26. feb. 2013 kl. 18:17 skrev zane@navigo.com:
> We want to treat all optional parameters as required. I thought setting:
> q.op=AND and mm=100% (using edismax request handler) would achieve this
> result, but I get unexpected results
>
> 1) medical => 4,425
> 2) medical retired => 272
> 3) medical retired -working => 5,041
> 4) medical AND retired AND -working => 216
>
> We expect the 3rd and 4th queries to be equivalent, but we're obviously
> missing something.
>
> It doesn't seem to be an issue with the number of terms, since:
>
> medical retired husband => 52
>
> Regards,
> Z
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Unexpected-Results-tp4043107.html
> Sent from the Solr - User mailing list archive at Nabble.com.