Company
Date Published
Author
Przemysław Witek
Word count
1107
Language
-
Hacker News points
None

Summary

Przemysław Witek's blog post discusses the use of Elasticsearch transforms to track the most recent customer orders by creating an entity-centric index that contains only the latest document for each entity. The introduction of the "latest" transforming function in Elasticsearch version 7.12 optimizes the process by eliminating the need for a full scan of the source index, unlike the previous pivot and scripted_metric aggregation method, which was resource-intensive and slower. The post outlines the steps to implement this transform using Kibana's "Sample eCommerce orders" data set, including setting up the destination index template and configuring the transform to run continuously, ensuring the destination index is updated with the latest orders. Additionally, it highlights the importance of setting a retention policy to clean up outdated entries, thus maintaining an efficient and current index. The new functionality is presented as useful for various applications, such as identifying inactive customers, tracking machine statuses, and monitoring air pollution data.