Strange query results in kibana: Understanding the behavior of event.original and similar fields
While working with Kibana, we recently encountered a puzzling situation: queries involving the field event.original returned unexpected results. Let’s break down what happened, why it occurs, and how to identify other fields with similar behavior.
The observed “strange behaviour“
no filter on event.original: there are some documents with values in event.original and some without values in that field Everything seems normal here:
Now let’s assume you just want to see the documents where event.originalis empty, you would do a query like the following
filter event.original does not exist: you still get the same documents as before; you would expect not to see the marked documents in the result
Now let’s assume you just want to see the documents where event.originalis not empty, you would do a query like the following
filter event.original does exist: but Kibana returned no results, even though the previous queries showed documents having this field set.
This contradiction raised the question: Why does Kibana behave this way?
The Root Cause
The key lies in how Elasticsearch handles indexed vs. non-indexed fields.
Fields like event.original are often not indexed by default. They are stored in the _source for retrieval but cannot be used for filtering or aggregations because they lack an inverted index.
When you run a query such as exists: event.original or NOT exists: event.original, Elasticsearch evaluates it based on indexed fields. Since event.original is not indexed, the query logic fails, bringing misleading results.
Kibana’s UI does not always make this distinction clear, which can cause confusion.
Additionally, there is another setting called doc_values, that also may cause confusion.
See the following table to understand the settings:
Why are some fields not indexed?
Non-indexed fields are typically:
Large text blobs (e.g., raw logs, original event payloads).
Fields intended for display or debugging rather than search.
Configured this way to save storage and improve performance.
Navigate to Stack Management → Index Patterns → Fields.
Fields marked as Searchable: No or Aggregatable: No are likely not indexed.
Consult ECS documentation for common non-indexed fields:
event.original
See the full list below found out with another method
Can we get a full list of such ECS fields? Yes. Follow these steps:
Export ECS8 component template to ecs8.json
Search for “index”: false
You will find the fields below. If you want to automize, use this command:
# install xml2 and make sure that field @timestamp is called only timestamp since xml2 cannot handle fields with @ in the name
cat ecs8.xml | tr -d '@'| xml2 | grep index.false | cut -f4- -d/ | sed s,/properties/,/,g | sed 's,/index=,: index=,'| tr / .
You could change the mapping of those fields; it is strongly recommended to keep the ECS standards. If you want to have the contents of such a field searchable, we suggest copying the content of the field (using a pipeline) into a new custom field (example: event.Original ) and map it as you want (keyword, text, …)
As traffic to applications deployed on OpenShift grows, it's essential to gain visibility into the flow of data entering your cluster. Monitoring this incoming traffic helps administrators maintain optimal performance, reduce security risks, and quickly resolve any emerging issues. Enabling Read More
When designing an Elasticsearch architecture, choosing the right storage is crucial. While NFS might seem like a convenient and flexible option, it comes with several pitfalls when used for hosting live Elasticsearch data (hot, warm, cold, and frozen nodes). However, Read More
In a previous blog post by one of my colleagues, we shared how we developed a powerful semantic search engine for our NetEye User Guide. This solution uses Elasticsearch in combination with machine learning models like ELSER to index and Read More
Hello everyone! As you may remember, a topic I like to discuss a lot on this blog is the Proof of Concept (POC) about how we could enhance search within our online NetEye User Guide. Well, we're happy to share Read More
We all know that NetEye Upgrades are boring activities. Upgrading is important and useful because it brings you bug fixes and new features, but nonetheless it's extremely expensive in terms of time. The most boring, tiring and lengthy part is Read More