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 Michael Ryan <mr...@moreover.com> on 2013/03/20 01:52:29 UTC

Nested queries with proximity/slop

I was wondering if anyone is aware of an existing Jira for this bug...

_query_:"\"a b\"~2"
...is parsed as...
PhraseQuery(someField:"a b")
...instead of the expected...
PhraseQuery(someField:"a b"~2)

_query_:"\"a b\""~2
...is parsed as...
PhraseQuery(someField:"a b"~2)

_query_:"\"a b\"~2"~3
...is parsed as...
PhraseQuery(someField:"a b"~3)

Basically, if a nested query produces a PhraseQuery with slop, the slop is overridden (or set to 0) by the slop on the magic _query_ field (of course, having slop on the _query_ field would make no sense).

Looked around in Jira, but couldn't find this having been reported. I guess it is just a bit esoteric...

-Michael

Re: Nested queries with proximity/slop

Posted by Yonik Seeley <yo...@lucidworks.com>.
https://issues.apache.org/jira/browse/SOLR-4625

-Yonik
http://lucidworks.com


On Tue, Mar 19, 2013 at 11:12 PM, Yonik Seeley <yo...@lucidworks.com> wrote:
> On Tue, Mar 19, 2013 at 8:52 PM, Michael Ryan <mr...@moreover.com> wrote:
>> I was wondering if anyone is aware of an existing Jira for this bug...
>>
>> _query_:"\"a b\"~2"
>> ...is parsed as...
>> PhraseQuery(someField:"a b")
>> ...instead of the expected...
>> PhraseQuery(someField:"a b"~2)
>>
>> _query_:"\"a b\""~2
>> ...is parsed as...
>> PhraseQuery(someField:"a b"~2)
>>
>> _query_:"\"a b\"~2"~3
>> ...is parsed as...
>> PhraseQuery(someField:"a b"~3)
>>
>> Basically, if a nested query produces a PhraseQuery with slop, the slop is overridden (or set to 0) by the slop on the magic _query_ field (of course, having slop on the _query_ field would make no sense).
>>
>> Looked around in Jira, but couldn't find this having been reported. I guess it is just a bit esoteric...
>
> Definitely looks like a bug that I haven't seen before.   Could you
> open a JIRA issue for this?
>
> -Yonik
> http://lucidworks.com

Re: Nested queries with proximity/slop

Posted by Yonik Seeley <yo...@lucidworks.com>.
On Tue, Mar 19, 2013 at 8:52 PM, Michael Ryan <mr...@moreover.com> wrote:
> I was wondering if anyone is aware of an existing Jira for this bug...
>
> _query_:"\"a b\"~2"
> ...is parsed as...
> PhraseQuery(someField:"a b")
> ...instead of the expected...
> PhraseQuery(someField:"a b"~2)
>
> _query_:"\"a b\""~2
> ...is parsed as...
> PhraseQuery(someField:"a b"~2)
>
> _query_:"\"a b\"~2"~3
> ...is parsed as...
> PhraseQuery(someField:"a b"~3)
>
> Basically, if a nested query produces a PhraseQuery with slop, the slop is overridden (or set to 0) by the slop on the magic _query_ field (of course, having slop on the _query_ field would make no sense).
>
> Looked around in Jira, but couldn't find this having been reported. I guess it is just a bit esoteric...

Definitely looks like a bug that I haven't seen before.   Could you
open a JIRA issue for this?

-Yonik
http://lucidworks.com