Skip to content

Instantly share code, notes, and snippets.

@evasilenko-light
Last active September 3, 2015 08:58
Show Gist options
  • Save evasilenko-light/29bec8b8c948bde6f8cd to your computer and use it in GitHub Desktop.
Save evasilenko-light/29bec8b8c948bde6f8cd to your computer and use it in GitHub Desktop.
{
"_source": {
"exclude": ["location", "photos"]
},
"query": {
"bool": {
"must": [
{
"fuzzy_like_this_field": {
"name": {
"like_text": "1"
}
}
},
{
"match": {
"open": true
}
}
]
}
},
"filter": {
"bool": {
"must": [
{
"script": {
"script": "for(item in ['alcohol', 'wheelchair accessible']){ if( !(item in doc['attributes']) ){ return 0; }; }; return 1;"
}
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment