Created
June 25, 2018 12:11
-
-
Save anam-hossain/c6b04a2a4c944dbaf668a89233d61de2 to your computer and use it in GitHub Desktop.
Multi clause bool query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"query": { | |
"bool": { | |
"must": [{ | |
"bool": { | |
"should": [{ | |
"match": { | |
"make": "Audi" | |
} | |
}, { | |
"match": { | |
"make": "Kia" | |
} | |
}, { | |
"match": { | |
"make": "Toyota" | |
} | |
}] | |
} | |
}, { | |
"bool": { | |
"should": [{ | |
"match": { | |
"model": "A6" | |
} | |
}, { | |
"match": { | |
"model": "Camry" | |
} | |
}, { | |
"match": { | |
"model": "Optima" | |
} | |
}] | |
} | |
}, { | |
"bool": { | |
"must": [{ | |
"match": { | |
"condition": "used" | |
} | |
}] | |
} | |
}] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment