# Msearch not working with bool must

**URL:** <https://discuss.elastic.co/t/msearch-not-working-with-bool-must/12294>\
**Category:** Elasticsearch\
**Created:** [June 6, 2013, 10:20am UTC](https://discuss.elastic.co/t/msearch-not-working-with-bool-must/12294 "2013-06-06T10:20:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vineeth\_mohan](https://avatars.discourse-cdn.com/v4/letter/v/bc79bd/32.png) [@vineeth\_mohan](https://discuss.elastic.co/u/vineeth_mohan)\
**Post date:** [June 6, 2013, 10:20am UTC](https://discuss.elastic.co/t/msearch-not-working-with-bool-must/12294/1 "2013-06-06T10:20:36Z")

</div>

Hi ,

The following works perfectly.  
cat names  
{"index":"events","type":"news"}  
{"query":{"term":{"Type":"MarketEvent"}}}  
{"query":{"term":{"Type":"MarketEvent"}}}

curl -XGET '[http://localhost:9200/\_msearch](http://localhost:9200/_msearch)' --data-binary @names

The following also works  
{"index":"events","type":"news"}  
{"query":{"bool":{"must":[{"query\_string":{"query":"\*","fields":["Events.Event"],"default\_operator":"AND"}},{"term":{"Type":"MarketEvent"}}]}}}

But queries with more than 1 bool doesn't work -  
cat names  
{"index":"events","type":"news"}  
{"query":{"bool":{"must":[{"query\_string":{"query":"_","fields":["Events.Event"],"default\_operator":"AND"}},{"term":{"Type":"MarketEvent"}}]}}}  
{"query":{"bool":{"must":[{"query\_string":{"query":"_","fields":["Events.Event"],"default\_operator":"AND"}},{"term":{"Type":"MarketEvent"}}]}}}

curl -XGET '[http://72.94.201.24:8003/\_msearch](http://72.94.201.24:8003/_msearch)' --data-binary @names  
{"error":"must doesn't support arrays"}

Am not seeing any log for this in logs ( not in DEBUG mode too)  
Is this a bug ?

Thanks  
Vineeth

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![vineeth\_mohan](https://avatars.discourse-cdn.com/v4/letter/v/bc79bd/32.png) [@vineeth\_mohan](https://discuss.elastic.co/u/vineeth_mohan)\
**Post date:** [June 7, 2013, 2:12pm UTC](https://discuss.elastic.co/t/msearch-not-working-with-bool-must/12294/2 "2013-06-07T14:12:03Z")

</div>

Can someone please answer to this.  
Am blocked with this issue.

Thanks  
Vineeth

On Thu, Jun 6, 2013 at 3:50 PM, Vineeth Mohan [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com)wrote:

> Hi ,
> 
> The following works perfectly.  
> cat names  
> {"index":"events","type":"news"}  
> {"query":{"term":{"Type":"MarketEvent"}}}  
> {"query":{"term":{"Type":"MarketEvent"}}}
> 
> curl -XGET '[http://localhost:9200/\_msearch](http://localhost:9200/_msearch)' --data-binary @names
> 
> The following also works  
> {"index":"events","type":"news"}
> 
> {"query":{"bool":{"must":[{"query\_string":{"query":"\*","fields":["Events.Event"],"default\_operator":"AND"}},{"term":{"Type":"MarketEvent"}}]}}}
> 
> But queries with more than 1 bool doesn't work -  
> cat names  
> {"index":"events","type":"news"}
> 
> {"query":{"bool":{"must":[{"query\_string":{"query":"\*","fields":["Events.Event"],"default\_operator":"AND"}},{"term":{"Type":"MarketEvent"}}]}}}
> 
> {"query":{"bool":{"must":[{"query\_string":{"query":"\*","fields":["Events.Event"],"default\_operator":"AND"}},{"term":{"Type":"MarketEvent"}}]}}}
> 
> curl -XGET '[http://72.94.201.24:8003/\_msearch](http://72.94.201.24:8003/_msearch)' --data-binary @names  
> {"error":"must doesn't support arrays"}
> 
> Am not seeing any log for this in logs ( not in DEBUG mode too)  
> Is this a bug ?
> 
> Thanks  
> Vineeth

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![vineeth\_mohan](https://avatars.discourse-cdn.com/v4/letter/v/bc79bd/32.png) [@vineeth\_mohan](https://discuss.elastic.co/u/vineeth_mohan)\
**Post date:** [June 8, 2013, 2:03am UTC](https://discuss.elastic.co/t/msearch-not-working-with-bool-must/12294/3 "2013-06-08T02:03:38Z")

</div>

I have moved this to stackoverflow -

> <https://stackoverflow.com/questions/16995294/msearch-not-working-with-bool-must>

Thanks  
Vineeth

On Fri, Jun 7, 2013 at 7:42 PM, Vineeth Mohan [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com)wrote:

> Can someone please answer to this.  
> Am blocked with this issue.
> 
> Thanks  
> Vineeth
> 
> On Thu, Jun 6, 2013 at 3:50 PM, Vineeth Mohan [vineethmohan@algotree.com](mailto:vineethmohan@algotree.com)wrote:
> 
> > Hi ,
> > 
> > The following works perfectly.  
> > cat names  
> > {"index":"events","type":"news"}  
> > {"query":{"term":{"Type":"MarketEvent"}}}  
> > {"query":{"term":{"Type":"MarketEvent"}}}
> > 
> > curl -XGET '[http://localhost:9200/\_msearch](http://localhost:9200/_msearch)' --data-binary @names
> > 
> > The following also works  
> > {"index":"events","type":"news"}
> > 
> > {"query":{"bool":{"must":[{"query\_string":{"query":"\*","fields":["Events.Event"],"default\_operator":"AND"}},{"term":{"Type":"MarketEvent"}}]}}}
> > 
> > But queries with more than 1 bool doesn't work -  
> > cat names  
> > {"index":"events","type":"news"}
> > 
> > {"query":{"bool":{"must":[{"query\_string":{"query":"\*","fields":["Events.Event"],"default\_operator":"AND"}},{"term":{"Type":"MarketEvent"}}]}}}
> > 
> > {"query":{"bool":{"must":[{"query\_string":{"query":"\*","fields":["Events.Event"],"default\_operator":"AND"}},{"term":{"Type":"MarketEvent"}}]}}}
> > 
> > curl -XGET '[http://72.94.201.24:8003/\_msearch](http://72.94.201.24:8003/_msearch)' --data-binary @names  
> > {"error":"must doesn't support arrays"}
> > 
> > Am not seeing any log for this in logs ( not in DEBUG mode too)  
> > Is this a bug ?
> > 
> > Thanks  
> > Vineeth

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:32am UTC](https://discuss.elastic.co/t/msearch-not-working-with-bool-must/12294/4 "2017-07-06T02:32:15Z")

</div>


