Created
August 20, 2014 09:43
-
-
Save radu-gheorghe/e23e5e31fc8c0349f608 to your computer and use it in GitHub Desktop.
nested query turned filter
This file contains 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
{ | |
"size": 100, | |
"query": { | |
"filtered": { | |
"query": { | |
"multi_match": { | |
"query": "gospel", | |
"fields": [ | |
"title.raw^60", | |
"authors.raw^40", | |
"subjects.raw^20", | |
"title", | |
"authors", | |
"subjects" | |
] | |
} | |
}, | |
"filter": { | |
"bool": { | |
"must": { | |
"nested": { | |
"path": "clients", | |
"filter": { | |
"bool": { | |
"must": [ | |
{ | |
"term": { | |
"clients.email": "[email protected]" | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment