Skip to content

Instantly share code, notes, and snippets.

@dstarh
Created March 24, 2014 13:54
Show Gist options
  • Save dstarh/9740529 to your computer and use it in GitHub Desktop.
Save dstarh/9740529 to your computer and use it in GitHub Desktop.
{
"query": {
"filtered": {
"filter": {
"and": [
{
"and": [
{
"or": [
{
"missing": {
"field": "user_id"
}
},
{
"term": {
"user_id": 1234567
}
}
]
}
]
},
{
"and": [
{
"term": {
"meta_tag_ids": 1
}
},
{
"or": [
{
"term": {
"meta_tag_ids": 11111
}
},
{
"term": {
"meta_tag_ids": 22222
}
}
]
}
]
}
]
},
"query": {
"multi_match": {
"fields": [
"name",
"ingredients"
],
"query": "beef",
"operator": "and",
"fuzziness": 0.7
}
}
}
},
"from": 0,
"size": 10
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment