Skip to content

Instantly share code, notes, and snippets.

@anam-hossain
Created June 25, 2018 12:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anam-hossain/c6b04a2a4c944dbaf668a89233d61de2 to your computer and use it in GitHub Desktop.
Save anam-hossain/c6b04a2a4c944dbaf668a89233d61de2 to your computer and use it in GitHub Desktop.
Multi clause bool query
{
"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