Skip to content

Instantly share code, notes, and snippets.

@loren
Created October 29, 2014 15:08
Show Gist options
  • Save loren/df85de9536216ae32b19 to your computer and use it in GitHub Desktop.
Save loren/df85de9536216ae32b19 to your computer and use it in GitHub Desktop.
Combining Gaussian filter and constant boost factor based on date range filter
{
"functions": [
{
"field_value_factor": {
"field": "popularity",
"modifier": "log2p"
}
},
{
"filter": {
"range": {
"taken_at": {
"gte": "now-6w/w"
}
}
},
"gauss": {
"taken_at": {
"scale": "4w"
}
}
},
{
"filter": {
"range": {
"taken_at": {
"lt": "now-6w/w"
}
}
},
"boost_factor": 0.119657286
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment