Hello,
using Kibana 5.4.1
My documents in ElasticSearch have 2 date fields: start and end. Or only start while the event is still happening.
I have created a scripted field in Kibana, length, defined like this
if (!doc['end'].empty) {
return (doc['end'].value - doc['start'].value)/3600000.0
} else {
return null;
}
I can see their values in the Discover page. However, if I try to filter in the query bar with something like this
length:<1
I only get a blank page, with a "No results found" message.
Same with
_exists_:length
Even worse, if I filter by
!_exists_:length
I expected to see those documents with no value defined yet for the field. However, that is not always the result. Sometimes it returns documents with a valid value of the field.
Is it OK to return "null" for a scripted field of type "number"? Is that the issue?