Following query with function score query which gives articles with pub date published after 2014-07 a higher weightage is not working. Any ideas how to do this please?
{
"from" : 0,
"size" : 10,
"query" : {
"function_score" : {
"query" : {
"bool" : {
"must" : {
"multi_match" : {
"query" : "influence ",
"fields" : [ "title^10", "description" ]
}
},
"filter" : {
"range" : {
"pubdate" : {
"from" : "2010-01",
"to" : "2016-08",
"include_lower" : true,
"include_upper" : true
}
}
}
}
},
"functions" : [ {
"filter" : {
"range" : {
"pubdate" : {
"from" : "2014-07",
"to" : null,
"include_lower" : true,
"include_upper" : true
}
}
},
"weight" : 10.0
} ]
}
}
}