Created
June 29, 2011 11:05
-
-
Save butlermh/1053648 to your computer and use it in GitHub Desktop.
Nested boolean queries for ElasticSearch
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
{ | |
"bool":{ | |
"must":[ | |
{ | |
"query_string":{ | |
"default_field":"content", | |
"query":"test1" | |
} | |
}, | |
{ | |
"query_string":{ | |
"default_field":"content", | |
"query":"test4" | |
} | |
} | |
], | |
"must_not":{ | |
"query_string":{ | |
"default_field":"content", | |
"query":"test2" | |
} | |
}, | |
"should":{ | |
"query_string":{ | |
"default_field":"content", | |
"query":"test3" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is not nested is it? It's the outer level for what is contained inside a bool query