Check whether a field exists in elasticsearch


(Luvpreet Singh) #1

I want to draw a timeseries graph in Timelion of Kibana.

For example, below checks for documents which have rating equal to 5.

.es(index='database', timefield='booking_time', q='rating:5')

I want to draw only those documents which have a specific field in it.

In discover tab, I know how to do it, _exists_:field_name.

but I don't know how to do it in Timelion expression.


(Brandon Kobel) #2

@sLuvpreet33 the q= parameter in Timelion can be used like the discover tab's query bar, so you can do:

.es(index='database', timefield='booking_time', q='rating:5 AND _exists_:field_name')

(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.