Skip to content

Instantly share code, notes, and snippets.

@silvestrelosada
Created November 4, 2016 08:59
Show Gist options
  • Save silvestrelosada/26dc0cf4439394f9a99ae01231bf34d8 to your computer and use it in GitHub Desktop.
Save silvestrelosada/26dc0cf4439394f9a99ae01231bf34d8 to your computer and use it in GitHub Desktop.
{
"query": {
"function_score": {
"query": {
"match_all": {
"boost": 0
}
},
"functions": [{
"gauss": {
"coordinates": {
"scale": "1500km",
"offset": "30km",
"decay": 0.5,
"origin": {
"lon": 50.8503396,
"lat": 4.3517103
}
}
},
"weight": 1
}, {
"filter": {
"term": {
"required_skills": 107
}
},
"weight": 0.3
}, {
"filter": {
"term": {
"required_skills": 96
}
},
"weight": 0.22
}, {
"filter": {
"term": {
"required_skills": 35
}
},
"weight": 0.23
}, {
"filter": {
"terms": {
"jobterm": [5]
}
},
"weight": 0.01
}, {
"filter": {
"terms": {
"jobtype": [5]
}
},
"weight": 0.01
}],
"score_mode": "sum",
"boost_mode": "sum"
}
},
"filter": {
"bool": {
"must": [{
"term": {
"invited_employees": 125
}
}]
}
},
"explain": true,
"from": 0,
"size": 25
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment