Skip to content

Instantly share code, notes, and snippets.

Created March 3, 2016 20:22
Show Gist options
  • Save anonymous/a33fbd076581218497f4 to your computer and use it in GitHub Desktop.
Save anonymous/a33fbd076581218497f4 to your computer and use it in GitHub Desktop.
{
"fields": [
"location"
],
"query": {
"function_score": {
"functions": [
{
"exp": {
"location": {
"origin": {
"lat": 45.6394,
"lon": -89.4122
},
"offset": "10mi",
"scale": "120mi"
}
},
"weight": 1
}
],
"query": {
"bool": {
"must": [
{
"term": {
"industry": "apparel_textile"
}
}
],
"should": [
{
"match": {
"capability": {
"boost": 1,
"query": 233
}
}
},
{
"match": {
"capability": {
"boost": 1,
"query": 235
}
}
},
{
"match": {
"capability": {
"boost": 1,
"query": 267
}
}
}
],
"must_not": [
{
"term": {
"state": "draft"
}
}
]
}
},
"boost_mode": "sum"
}
},
"sort": {
"_score": "desc",
"profile_quality_score_1": "desc",
"_geo_distance": {
"location": {
"lat": 45.6394,
"lon": -89.4122
},
"order": "asc",
"unit": "mi",
"distance_type": "plane"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment