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 Steven Bower <sm...@alcyon.net> on 2013/08/15 23:19:04 UTC

AND not working

I have query like:

q=foo AND bar
defType=edismax
qf=field1
qf=field2
qf=field3

with debug on I see it parsing to this:

(+(DisjunctionMaxQuery((field1:foo | field2:foo | field3:foo))
DisjunctionMaxQuery((field1:and | field2:and | field3:and))
DisjunctionMaxQuery((field1:bar | field2:bar | field3:bar))))/no_coord

basically it seems to be treating the AND as a term... any thoughts?

thx,

steve

Re: AND not working

Posted by Jack Krupansky <ja...@basetechnology.com>.
If something causes an exception when edismax has called the basic Lucene 
query parser, edismax will eat the exception, escape operators (your "AND") 
and reparse, where your "AND" then gets treated as a simple term.

Maybe some difficulty in your field type analyzer?

We need to see your full query URL, request handler, and field types.

-- Jack Krupansky

-----Original Message----- 
From: Steven Bower
Sent: Thursday, August 15, 2013 5:19 PM
To: solr-user
Subject: AND not working

I have query like:

q=foo AND bar
defType=edismax
qf=field1
qf=field2
qf=field3

with debug on I see it parsing to this:

(+(DisjunctionMaxQuery((field1:foo | field2:foo | field3:foo))
DisjunctionMaxQuery((field1:and | field2:and | field3:and))
DisjunctionMaxQuery((field1:bar | field2:bar | field3:bar))))/no_coord

basically it seems to be treating the AND as a term... any thoughts?

thx,

steve 


Re: AND not working

Posted by Steven Bower <sm...@alcyon.net>.
https://issues.apache.org/jira/browse/SOLR-5163


On Thu, Aug 15, 2013 at 6:04 PM, Steven Bower <sm...@alcyon.net> wrote:

> @Yonik that was exactly the issue... I'll file a ticket... there def
> should be an exception thrown for something like this..
>
> It would seem to me that eating any sort of exception is a really bad
> thing...
>
> steve
>
>
> On Thu, Aug 15, 2013 at 5:59 PM, Yonik Seeley <yo...@lucidworks.com>wrote:
>
>> I can reproduce something like this by specifying a field that doesn't
>> exist for a "qf" param.
>> This seems like a bug... if a field doesn't exist, we should throw an
>> exception (since it's a parameter error not related to the "q" string
>> where
>> we avoid throwing any errors).
>>
>> -Yonik
>> http://lucidworks.com
>>
>>
>> On Thu, Aug 15, 2013 at 5:19 PM, Steven Bower <sm...@alcyon.net>
>> wrote:
>>
>> > I have query like:
>> >
>> > q=foo AND bar
>> > defType=edismax
>> > qf=field1
>> > qf=field2
>> > qf=field3
>> >
>> > with debug on I see it parsing to this:
>> >
>> > (+(DisjunctionMaxQuery((field1:foo | field2:foo | field3:foo))
>> > DisjunctionMaxQuery((field1:and | field2:and | field3:and))
>> > DisjunctionMaxQuery((field1:bar | field2:bar | field3:bar))))/no_coord
>> >
>> > basically it seems to be treating the AND as a term... any thoughts?
>> >
>> > thx,
>> >
>> > steve
>> >
>>
>
>

Re: AND not working

Posted by Steven Bower <sm...@alcyon.net>.
@Yonik that was exactly the issue... I'll file a ticket... there def should
be an exception thrown for something like this..

It would seem to me that eating any sort of exception is a really bad
thing...

steve


On Thu, Aug 15, 2013 at 5:59 PM, Yonik Seeley <yo...@lucidworks.com> wrote:

> I can reproduce something like this by specifying a field that doesn't
> exist for a "qf" param.
> This seems like a bug... if a field doesn't exist, we should throw an
> exception (since it's a parameter error not related to the "q" string where
> we avoid throwing any errors).
>
> -Yonik
> http://lucidworks.com
>
>
> On Thu, Aug 15, 2013 at 5:19 PM, Steven Bower <sm...@alcyon.net>
> wrote:
>
> > I have query like:
> >
> > q=foo AND bar
> > defType=edismax
> > qf=field1
> > qf=field2
> > qf=field3
> >
> > with debug on I see it parsing to this:
> >
> > (+(DisjunctionMaxQuery((field1:foo | field2:foo | field3:foo))
> > DisjunctionMaxQuery((field1:and | field2:and | field3:and))
> > DisjunctionMaxQuery((field1:bar | field2:bar | field3:bar))))/no_coord
> >
> > basically it seems to be treating the AND as a term... any thoughts?
> >
> > thx,
> >
> > steve
> >
>

Re: AND not working

Posted by Yonik Seeley <yo...@lucidworks.com>.
I can reproduce something like this by specifying a field that doesn't
exist for a "qf" param.
This seems like a bug... if a field doesn't exist, we should throw an
exception (since it's a parameter error not related to the "q" string where
we avoid throwing any errors).

-Yonik
http://lucidworks.com


On Thu, Aug 15, 2013 at 5:19 PM, Steven Bower <sm...@alcyon.net> wrote:

> I have query like:
>
> q=foo AND bar
> defType=edismax
> qf=field1
> qf=field2
> qf=field3
>
> with debug on I see it parsing to this:
>
> (+(DisjunctionMaxQuery((field1:foo | field2:foo | field3:foo))
> DisjunctionMaxQuery((field1:and | field2:and | field3:and))
> DisjunctionMaxQuery((field1:bar | field2:bar | field3:bar))))/no_coord
>
> basically it seems to be treating the AND as a term... any thoughts?
>
> thx,
>
> steve
>