@warkolm @tsmalley
The above solution that i have shared was a work around that i could do.
But this is what i am not looking for.
I want to use the original dataset, which has a timestamp field in it. I then want to utilize that timestamp to reflect the @timestamp in elasticsearch....which can be done.
Then i want to fetch records using a query and custom score function such that the most recent ones have highest score and the score gradually decreases with timestamp. This again can be done.
Refer
Using this discussion i created a score function for timestamp.
So now i have the original dataset without the myscore field, and using my custom query i get results which has score updated according to timestamp.
Query
curl -XGET 'localhost:9200/test/_search?pretty' -H 'Content-Type: application/json' -d'
{
"query": {
"function_score": {
"gauss": {
"@timestamp": {
"origin": "1496061764181",
"scale": "1ms",
"decay" : 0.5
}
}
}
}
}
'
But the problem is that i cannot achieve this fading effect when i consider _score field. Refer below screenshots.
Options
Why is _score field on hovering over the point not reflecting the score? And why can't the fading effect be achieved with this?
Please can you suggest what can be done.