Apologies if this would be better placed in the Elasticsearch forum.
Whenever I do a search on my index in Kibana the score always returns as null so the results are just sorted by the timestamp. I'm sure the scoring worked on previous indexes in Kibana so I'm just wondering if anyone had any suggestions why it is not working now?
Score is only provided by ES when you are doing a query (in Kibana, using the query bar at the top). So if you are not searching for something, then you won't see any score.
Can you provide some details about what it is you are searching for, how it's showing up and how you'd expect it to show up?
Any query i do doesn't return a score. The returned results are fine but are sorted by timestamp (so most recent logs at the top) instead of relevance (based on the score).
I've noticed an old index i have in Kibana which is not time based (no timestamps) does produce scores when queried, and even with no query the score is 1 instead of null.
Can timebased events not produce scores??
1 Like
They can. I remember the catch now though.
If you are using this in Discover, you have to add the _score
field to the table and then manually sort by the score.
IIRC, that's just how ES works - if you don't use the _score
field then it doesn't get a value.
2 Likes
Ah fantastic that did indeed work. Shame there is not an option to automatically use and sort by _score on search like non time-based events do. Anyway great help thank you very much!