My ES document looks like this:
where ResponseQ1, ResponseQ2 and ResponseCompleted are integers and the rest are string text.
I need to create a query with the condition where either 1 or 2 (BUT not all 3) sub-conditions are fulfilled:
Doing a bool query with "should" can easily get me a simple OR relationship where 1, 2 or 3 of the subconditions are met, but I simply cannot figure out how to fulfill the "BUT not all 3 subconditions".
Would really appreciate some pointers on this, thanks.
I'm using ElasticSearch 2.2 running my queries through Kibana 4.4.1.
I would suggest the querystring query
below.
(ResponseQ1:0 OR ResponseQ2:0 OR ResponseQ3:"skipped) NOT (ResponseQ1:0 AND Response Q2:0 AND ResponseQ3:"skipped")