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 dabboo <ag...@sapient.com> on 2009/05/20 07:35:00 UTC

Issue with AND/OR Operator in Dismax Request

Hi, 

I am not getting correct results with a Query which has multiple AND | OR
operator. 

Query Format q=((A AND B) OR (C OR D) OR E) 

?q=((intAgeFrom_product_i:[0+TO+3]+AND+intAgeTo_product_i:[3+TO+*])+OR+(intAgeFrom_product_i:[0+TO+3]+AND+intAgeTo_product_i:[0+TO+3])+OR+(ageFrom_product_s:Adult))&qt=dismaxrequest 

Query return correct result without Dismaxrequest, but incorrect results
with Dismaxrequest. 

I have to use dismaxrequest because i need boosting of search results 

According to some posts there are issues with AND | OR operator with
dismaxrequest. 
Please let me know if anyone has faced the same problem and if there is any
way to make the query work with dismaxrequest. 

I also believe that there is some patch available for this in one of the
JIRA. I would appreciate if somebody can let me know the URL, so that I can
take a look at the patch.

Thanks for the help.

Thanks, 
Amit Garg
-- 
View this message in context: http://www.nabble.com/Issue-with-AND-OR-Operator-in-Dismax-Request-tp23629269p23629269.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Issue with AND/OR Operator in Dismax Request

Posted by Doug Steigerwald <ds...@mcclatchyinteractive.com>.
http://issues.apache.org/jira/browse/SOLR-405 ?

It's quite old and it's exactly what you want, but I think it might be  
the JIRA ticket that Otis mentioned.  Using a filter query was what we  
really needed.  I'm also not really sure why you need a dismax query  
at all.  You're not querying for the same thing in multiple fields.

Doug

On May 20, 2009, at 1:18 PM, dabboo wrote:

>
> Hi,
>
> Yeah you are right. Can you please tell me the URL of JIRA.
>
> Thanks,
> Amit
>
>
>
> Otis Gospodnetic wrote:
>>
>>
>> Amit,
>>
>> That's the same question as the other day, right?
>> Yes, DisMax doesn't play well with Boolean operators.  Check JIRA,  
>> it has
>> a search box, so you may be able to find related patches.
>> I think the patch I was thinking about is actually for something  
>> else -
>> allowing field names to be specified in query string and DixMax  
>> handling
>> that correctly.
>>
>> Otis
>> --
>> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
>>
>>
>>
>> ----- Original Message ----
>>> From: dabboo <ag...@sapient.com>
>>> To: solr-user@lucene.apache.org
>>> Sent: Wednesday, May 20, 2009 1:35:00 AM
>>> Subject: Issue with AND/OR Operator in Dismax Request
>>>
>>>
>>> Hi,
>>>
>>> I am not getting correct results with a Query which has multiple  
>>> AND | OR
>>> operator.
>>>
>>> Query Format q=((A AND B) OR (C OR D) OR E)
>>>
>>> ?q=((intAgeFrom_product_i:[0+TO+3]+AND+intAgeTo_product_i:[3+TO+*]) 
>>> +OR+(intAgeFrom_product_i:[0+TO+3]+AND+intAgeTo_product_i:[0+TO+3]) 
>>> +OR+(ageFrom_product_s:Adult))&qt=dismaxrequest
>>>
>>>
>>> Query return correct result without Dismaxrequest, but incorrect  
>>> results
>>> with Dismaxrequest.
>>>
>>> I have to use dismaxrequest because i need boosting of search  
>>> results
>>>
>>> According to some posts there are issues with AND | OR operator with
>>> dismaxrequest.
>>> Please let me know if anyone has faced the same problem and if  
>>> there is
>>> any
>>> way to make the query work with dismaxrequest.
>>>
>>> I also believe that there is some patch available for this in one  
>>> of the
>>> JIRA. I would appreciate if somebody can let me know the URL, so  
>>> that I
>>> can
>>> take a look at the patch.
>>>
>>> Thanks for the help.
>>>
>>> Thanks,
>>> Amit Garg
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/Issue-with-AND-OR-Operator-in-Dismax-Request-tp23629269p23629269.html
>>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Issue-with-AND-OR-Operator-in-Dismax-Request-tp23629269p23639786.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: Issue with AND/OR Operator in Dismax Request

Posted by dabboo <ag...@sapient.com>.
Hi,

Yeah you are right. Can you please tell me the URL of JIRA.

Thanks,
Amit



Otis Gospodnetic wrote:
> 
> 
> Amit,
> 
> That's the same question as the other day, right?
> Yes, DisMax doesn't play well with Boolean operators.  Check JIRA, it has
> a search box, so you may be able to find related patches.
> I think the patch I was thinking about is actually for something else -
> allowing field names to be specified in query string and DixMax handling
> that correctly.
> 
>  Otis
> --
> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
> 
> 
> 
> ----- Original Message ----
>> From: dabboo <ag...@sapient.com>
>> To: solr-user@lucene.apache.org
>> Sent: Wednesday, May 20, 2009 1:35:00 AM
>> Subject: Issue with AND/OR Operator in Dismax Request
>> 
>> 
>> Hi, 
>> 
>> I am not getting correct results with a Query which has multiple AND | OR
>> operator. 
>> 
>> Query Format q=((A AND B) OR (C OR D) OR E) 
>> 
>> ?q=((intAgeFrom_product_i:[0+TO+3]+AND+intAgeTo_product_i:[3+TO+*])+OR+(intAgeFrom_product_i:[0+TO+3]+AND+intAgeTo_product_i:[0+TO+3])+OR+(ageFrom_product_s:Adult))&qt=dismaxrequest 
>> 
>> 
>> Query return correct result without Dismaxrequest, but incorrect results
>> with Dismaxrequest. 
>> 
>> I have to use dismaxrequest because i need boosting of search results 
>> 
>> According to some posts there are issues with AND | OR operator with
>> dismaxrequest. 
>> Please let me know if anyone has faced the same problem and if there is
>> any
>> way to make the query work with dismaxrequest. 
>> 
>> I also believe that there is some patch available for this in one of the
>> JIRA. I would appreciate if somebody can let me know the URL, so that I
>> can
>> take a look at the patch.
>> 
>> Thanks for the help.
>> 
>> Thanks, 
>> Amit Garg
>> -- 
>> View this message in context: 
>> http://www.nabble.com/Issue-with-AND-OR-Operator-in-Dismax-Request-tp23629269p23629269.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Issue-with-AND-OR-Operator-in-Dismax-Request-tp23629269p23639786.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Issue with AND/OR Operator in Dismax Request

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Amit,

That's the same question as the other day, right?
Yes, DisMax doesn't play well with Boolean operators.  Check JIRA, it has a search box, so you may be able to find related patches.
I think the patch I was thinking about is actually for something else - allowing field names to be specified in query string and DixMax handling that correctly.

 Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



----- Original Message ----
> From: dabboo <ag...@sapient.com>
> To: solr-user@lucene.apache.org
> Sent: Wednesday, May 20, 2009 1:35:00 AM
> Subject: Issue with AND/OR Operator in Dismax Request
> 
> 
> Hi, 
> 
> I am not getting correct results with a Query which has multiple AND | OR
> operator. 
> 
> Query Format q=((A AND B) OR (C OR D) OR E) 
> 
> ?q=((intAgeFrom_product_i:[0+TO+3]+AND+intAgeTo_product_i:[3+TO+*])+OR+(intAgeFrom_product_i:[0+TO+3]+AND+intAgeTo_product_i:[0+TO+3])+OR+(ageFrom_product_s:Adult))&qt=dismaxrequest 
> 
> 
> Query return correct result without Dismaxrequest, but incorrect results
> with Dismaxrequest. 
> 
> I have to use dismaxrequest because i need boosting of search results 
> 
> According to some posts there are issues with AND | OR operator with
> dismaxrequest. 
> Please let me know if anyone has faced the same problem and if there is any
> way to make the query work with dismaxrequest. 
> 
> I also believe that there is some patch available for this in one of the
> JIRA. I would appreciate if somebody can let me know the URL, so that I can
> take a look at the patch.
> 
> Thanks for the help.
> 
> Thanks, 
> Amit Garg
> -- 
> View this message in context: 
> http://www.nabble.com/Issue-with-AND-OR-Operator-in-Dismax-Request-tp23629269p23629269.html
> Sent from the Solr - User mailing list archive at Nabble.com.