Elasticsearch "should doesn't support arrays"

Is this a bug or a "feature" of multisearch?
....
I have a standard bool query with multiple should term queries. It runs
fine. I turn that into an _msearch and the query fails. In fact, all of the
booleans fail with arrays. Without arrays, they work just fine.

{"error": "should doesn't support arrays"}

Thanks!

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

It's a regression in MultiSearchRequest, introduced by

Jörg

Am 22.02.13 01:14, schrieb jtreher@gmail.com:

Is this a bug or a "feature" of multisearch?
....
I have a standard bool query with multiple should term queries. It
runs fine. I turn that into an _msearch and the query fails. In fact,
all of the booleans fail with arrays. Without arrays, they work just fine.

{"error": "should doesn't support arrays"}

Thanks!

You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

On Fri, 2013-02-22 at 09:15 +0100, Jörg Prante wrote:

It's a regression in MultiSearchRequest, introduced by
https://github.com/elasticsearch/elasticsearch/pull/2482

Actually, I don't think it is.

I think the OP placed the query in the wrong line of the multi-search
request.

This works for me:

curl -XGET 'http://127.0.0.1:9200/test/test/_msearch?pretty=1' -d '
{}
{"query" : {"bool" : {"should" : [{"term" : {"foo" : "bar"}}, {"term" : {"foo" : "baz"}}]}}}
'

clint

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Clinton,

My query is the same format as yours as far as I know.

If i remove the array and make it a single term, I get the normal query
union as you would expect. This is version .20.5

On Friday, February 22, 2013 5:55:21 AM UTC-5, Clinton Gormley wrote:

On Fri, 2013-02-22 at 09:15 +0100, Jörg Prante wrote:

It's a regression in MultiSearchRequest, introduced by
https://github.com/elasticsearch/elasticsearch/pull/2482

Actually, I don't think it is.

I think the OP placed the query in the wrong line of the multi-search
request.

This works for me:

curl -XGET 'http://127.0.0.1:9200/test/test/_msearch?pretty=1' -d '
{}
{"query" : {"bool" : {"should" : [{"term" : {"foo" : "bar"}}, {"term" :
{"foo" : "baz"}}]}}}
'

clint

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

On Fri, 2013-02-22 at 04:51 -0800, jtreher@gmail.com wrote:

Clinton,

My query is the same format as yours as far as I know.

Any chance you can share it? That way I can try it locally

clint

If i remove the array and make it a single term, I get the normal
query union as you would expect. This is version .20.5

On Friday, February 22, 2013 5:55:21 AM UTC-5, Clinton Gormley wrote:
On Fri, 2013-02-22 at 09:15 +0100, Jörg Prante wrote:
> It's a regression in MultiSearchRequest, introduced by
> https://github.com/elasticsearch/elasticsearch/pull/2482
>

    Actually, I don't think it is. 
    
    I think the OP placed the query in the wrong line of the
    multi-search 
    request. 
    
    This works for me: 
    
    curl -XGET
    'http://127.0.0.1:9200/test/test/_msearch?pretty=1'  -d ' 
    {} 
    {"query" : {"bool" : {"should" : [{"term" : {"foo" : "bar"}},
    {"term" : {"foo" : "baz"}}]}}} 
    ' 
    
    clint 

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Clinton,

Thanks a ton for your help verifying it was my syntax. My application was
generating a new line above the initial {}. This seems to have causes the
issue. It was just an oddball error since _msearch was working as long as I
removed the array and presented a single item.

J

On Friday, February 22, 2013 3:15:41 PM UTC-5, Clinton Gormley wrote:

On Fri, 2013-02-22 at 04:51 -0800, jtr...@gmail.com <javascript:> wrote:

Clinton,

My query is the same format as yours as far as I know.

Any chance you can share it? That way I can try it locally

clint

If i remove the array and make it a single term, I get the normal
query union as you would expect. This is version .20.5

On Friday, February 22, 2013 5:55:21 AM UTC-5, Clinton Gormley wrote:
On Fri, 2013-02-22 at 09:15 +0100, Jörg Prante wrote:
> It's a regression in MultiSearchRequest, introduced by
> https://github.com/elasticsearch/elasticsearch/pull/2482
>

    Actually, I don't think it is. 
    
    I think the OP placed the query in the wrong line of the 
    multi-search 
    request. 
    
    This works for me: 
    
    curl -XGET 
    'http://127.0.0.1:9200/test/test/_msearch?pretty=1'  -d ' 
    {} 
    {"query" : {"bool" : {"should" : [{"term" : {"foo" : "bar"}}, 
    {"term" : {"foo" : "baz"}}]}}} 
    ' 
    
    clint 

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Clinton,

I discovered that my Application logic was adding a new line above the
initial {} which seems to have caused the error. You were correct, it was
my syntax! Thanks for verifying. The oddball error really had me confused.

J

On Friday, February 22, 2013 3:15:41 PM UTC-5, Clinton Gormley wrote:

On Fri, 2013-02-22 at 04:51 -0800, jtr...@gmail.com <javascript:> wrote:

Clinton,

My query is the same format as yours as far as I know.

Any chance you can share it? That way I can try it locally

clint

If i remove the array and make it a single term, I get the normal
query union as you would expect. This is version .20.5

On Friday, February 22, 2013 5:55:21 AM UTC-5, Clinton Gormley wrote:
On Fri, 2013-02-22 at 09:15 +0100, Jörg Prante wrote:
> It's a regression in MultiSearchRequest, introduced by
> https://github.com/elasticsearch/elasticsearch/pull/2482
>

    Actually, I don't think it is. 
    
    I think the OP placed the query in the wrong line of the 
    multi-search 
    request. 
    
    This works for me: 
    
    curl -XGET 
    'http://127.0.0.1:9200/test/test/_msearch?pretty=1'  -d ' 
    {} 
    {"query" : {"bool" : {"should" : [{"term" : {"foo" : "bar"}}, 
    {"term" : {"foo" : "baz"}}]}}} 
    ' 
    
    clint 

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.