Querying for Null values from elasticsearch data source

I am new to Grafana and elasticsearch. I am storing Jaeger data to elastic search, for which I want to create dashboards in grafana. In the elastic data there is a"references" field which is “null” for some of the incoming data (Jaeger parent span).
How I can query for null values in Grafana? I have tried some thing like “NOT exists:references” in Grfana, but it doesn’t work.

field.name: “”

Fadjar Tandabawana

Thank you for your reply. Can you be a little bit more specific.
Fo eg: I have 4 spans for a trace. The main span and child spans have references field.
The references field is null in main span, where as in childspan it is an object. Refer the attached image.

Main span details is shown below. Note the references field.
I want to get the count of the parent span, where references field is null or not defined.
I have also noticed that there is no index on references. but only on child fields.

So in the above case if I have to search for references with no value, how exactly I have to do that?
I have tried both references: “” and references.spanID: “” ., In both cases search doesn’t return any results.

Ok, now I understand what you want…

Perhaps you could try this in Query:

NOT references:*

It means query for index with reference without value.

Fadjar Tandabawana