# Elastic search query for multiple term usage

**URL:** <https://discuss.elastic.co/t/elastic-search-query-for-multiple-term-usage/177849>\
**Category:** Elasticsearch\
**Created:** [April 22, 2019, 12:34pm UTC](https://discuss.elastic.co/t/elastic-search-query-for-multiple-term-usage/177849 "2019-04-22T12:34:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmanju2020](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rmanju2020/32/44560_2.png) [@rmanju2020](https://discuss.elastic.co/u/rmanju2020)\
**Post date:** [April 22, 2019, 12:34pm UTC](https://discuss.elastic.co/t/elastic-search-query-for-multiple-term-usage/177849/1 "2019-04-22T12:34:20Z")

</div>

Hi,

Its regarding elasticdump tool.I have required to output the result in a file with filters.

1. 

elasticdump --input=http://localhost:9200/2\_logmon\_eventlog-2019\_04\_22 --output="C:\2\_logmon\_eventlog-2019\_04\_22\_\_20190419235959.json" --searchBody "{"query":{"filtered":{"query":{"bool":{"must":{"term":**{"Type":["Error","Audit Success"]}**}}}}}}" --type=data \>

The above query is failing with error

Mon, 22 Apr 2019 11:44:59 GMT | Total Writes: 0  
Mon, 22 Apr 2019 11:44:59 GMT | dump ended with error (get phase) =\> Error: {"error":"SearchPhaseExecutionException[Failed to execute phase [init\_scan], all shards failed; shardFailures {[hq26BW7OS3aPqZ4vx0gQAg][2\_logmon\_eventlog-2019\_04\_22][0]: SearchParseException[[2\_logmon\_eventlog-2019\_04\_22][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"filtered":{"query":{"bool":{"must":{"match":{"Type":["Error","Audit Success"]}}}}}},"size":20}]]]; nested: QueryParsingException[[2\_logmon\_eventlog-2019\_04\_22] [match] query parsed in simplified form, with direct field name, but included more options than just the field name, possibly use its 'options' form, with 'query' element?]; }{[hq26BW7OS3aPqZ4vx0gQAg][2\_logmon\_eventlog-2019\_04\_22][1]:

2)elasticdump --input=http://localhost:9200/2\_logmon\_eventlog-2019\_04\_22 --output="C:\2\_logmon\_eventlog-2019\_04\_22\_\_20190419235959.json" --searchBody "{"query":{"filtered":{"query":{"bool":{"must":{"match": **{"Type":"Audit Success"}** }}}}}}" --type=data

Is listing all data.

Here my question how to check Type for multiple keywords like #1 query..Kindly suggest.

---

<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:** [May 20, 2019, 12:34pm UTC](https://discuss.elastic.co/t/elastic-search-query-for-multiple-term-usage/177849/2 "2019-05-20T12:34:26Z")

</div>

Closed on May 20, 2019, 12:34pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
