# {"match": {"region": "EAST"}}

**URL:** <https://discuss.elastic.co/t/match-region-east/140926>\
**Category:** Elasticsearch\
**Created:** [July 20, 2018, 3:06pm UTC](https://discuss.elastic.co/t/match-region-east/140926 "2018-07-20T15:06:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mahesh\_Bablu](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@Mahesh\_Bablu](https://discuss.elastic.co/u/Mahesh_Bablu)\
**Post date:** [July 20, 2018, 3:06pm UTC](https://discuss.elastic.co/t/match-region-east/140926/1 "2018-07-20T15:06:35Z")

</div>

> [@Index privileges](https://discuss.elastic.co/t/index-privileges/74101):
>
> Hi there I was trying to give access to user with this query. "{ "match": { "path.raw": { "query": "/var/log/top10/customer.log", "type": "phrase" } } }" I would like log in and directly get all info about it "customer.log". Can you help me? Greetings

reference

Can anyone please tell me the query for not matching.  
Like I need {"match": {"region": "EAST"}} exactly opposite.  
Eg: match regions without EAST

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [July 20, 2018, 3:31pm UTC](https://discuss.elastic.co/t/match-region-east/140926/2 "2018-07-20T15:31:29Z")

</div>

This is not really an x-pack issue, I will move this over to Elasticsearch.

Furthermore take a look at the [bool query](https://www.elastic.co/guide/en/elasticsearch/reference/6.3/query-dsl-bool-query.html#query-dsl-bool-query), specifically the `must_not` part.

--Alex

---

<div class="post-metadata">

**Author:** ![Mahesh\_Bablu](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@Mahesh\_Bablu](https://discuss.elastic.co/u/Mahesh_Bablu)\
**Post date:** [July 20, 2018, 4:16pm UTC](https://discuss.elastic.co/t/match-region-east/140926/3 "2018-07-20T16:16:49Z")

</div>

Yes, I had tried with must\_not but it is throwing the error \*\*Visualize: [must\_not] query malformed, no start\_object after query name  
\*\*

query I wrote is `{"must_not": [{"match": {"attr_details.keyword": "Sales"}}]}`

---

<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:** [August 17, 2018, 4:17pm UTC](https://discuss.elastic.co/t/match-region-east/140926/4 "2018-08-17T16:17:00Z")

</div>

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