Skip to content

Instantly share code, notes, and snippets.

@clintongormley
Created November 1, 2013 11:08
Show Gist options
  • Save clintongormley/7263976 to your computer and use it in GitHub Desktop.
Save clintongormley/7263976 to your computer and use it in GitHub Desktop.
(match 'name' to 'foo') OR (NOT match 'email' to 'foo').
curl -XGET "http://localhost:9200/_search" -d'
{
"query": {
"bool": {
"should": [
{
"match": {
"name": "foo"
}
},
{
"bool": {
"must_not": {
"match": {
"email": "foo"
}
}
}
}
]
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment