Skip to content

Instantly share code, notes, and snippets.

@radu-gheorghe
Created August 20, 2014 09:43
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 radu-gheorghe/e23e5e31fc8c0349f608 to your computer and use it in GitHub Desktop.
Save radu-gheorghe/e23e5e31fc8c0349f608 to your computer and use it in GitHub Desktop.
nested query turned filter
{
"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": "foo@railsdog.com"
}
}
]
}
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment