Skip to content

Instantly share code, notes, and snippets.

@honzakral
Forked from jockee/gist:9bff22fcef7cff2f0bd8
Last active August 29, 2015 14:04
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 honzakral/29e84d67f7f917c20927 to your computer and use it in GitHub Desktop.
Save honzakral/29e84d67f7f917c20927 to your computer and use it in GitHub Desktop.
"query": {
"bool": {
"must": [
{
"query_string": {
"query": "\"ruby\" OR \"rubi\" OR \"rubz\"",
"default_operator": "or"
}
}
],
"should": [
{
"query_string": {
"query": "\"menlo park\""
}
},
{
"filtered": {
"filter": {
"geo_distance": {
"_cache": true,
"city_geo_point": [
-122.1811111,
37.4538889
],
"distance": "50km"
}
}
}
}
],
"minimum_should_match": 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment