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


(Mahesh Bablu) #1


reference

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


(Alexander Reelsen) #2

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

Furthermore take a look at the bool query, specifically the must_not part.

--Alex


(Mahesh Bablu) #3

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"}}]}


(system) #4

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