I can't think of a way to do that kind of correlation across documents in Kibana right now, because it only supports a subset of the pipeline aggregations available in Elasticsearch.
If you create your own visualization tool you could use a terms aggregation on the ids followed by a top_hits aggregation that includes your type field. Then you could use that in a bucket_selector pipeline aggregation to filter out all id buckets that have both the "registered" and " in_transit" types.
Thank you for your reply. I will certainly look in to that.
Would it be good practice to make a call to elastic and retrieve the corresponding "registered" event when the "in_transit" event arrives. I could then add a field to it in order to identify it. This way if it does not have that field I know the "in_transit" in not yet present.
Or would you advise against this approach?
Yes, doing this during ingestion is definitely a possibility and provides the best performance. If you are using Logstash to ingest your data the Elasticsearch filter could help you with that.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.