Skip to content

Instantly share code, notes, and snippets.

@jockee
Created July 29, 2014 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jockee/9bff22fcef7cff2f0bd8 to your computer and use it in GitHub Desktop.
Save jockee/9bff22fcef7cff2f0bd8 to your computer and use it in GitHub Desktop.
"query": {
"bool": {
"should": [
{
"query_string": {
"query": "(\"menlo park\") +(\"ruby\" OR \"rubi\" OR \"rubz\")",
"default_operator": "or"
}
},
{
"filtered": {
"filter": {
"or": [
{
"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