Decay function returning documents where the freshness column is not present


(Pradeep B) #1

Hi All,
I am trying to create a Guassian decay function on top of a data field : lastUpdatedDate. However, this field is not present in all the documents.
when i model my query like below, i observe that the returned results at the top are the ones in which the field is not present in the document. How to tweak this behaviour to actually incentivize the documents which have the date captured ?

POST /test_index/_search
{
"query": {
"function_score": {
"query": {
"match": {
"name": "ACME"
}
},
"guass": {
"lastUpdatedDate": {
"scale": "6w"
}
}
}
}
}


(system) #2