⚙️ DevOps & Platform Eng
The _id Sort That Nuked Our OpenSearch Cluster: A Heap of Trouble
One field in a sort query. That's all it took to push our OpenSearch cluster to the brink. JVM at 99%, errors everywhere — a classic prod nightmare.
theAIcatchup
Apr 10, 2026
3 min read
⚡ Key Takeaways
-
Never sort on _id or metadata fields without doc values — use a mapped keyword instead.
𝕏
-
Doc values (disk, index-time) beat fielddata (heap, query-time) for production sorts and aggs.
𝕏
-
Monitor JVM heap and fielddata cache; they're early warnings for sort-induced outages.
𝕏
The 60-Second TL;DR
- Never sort on _id or metadata fields without doc values — use a mapped keyword instead.
- Doc values (disk, index-time) beat fielddata (heap, query-time) for production sorts and aggs.
- Monitor JVM heap and fielddata cache; they're early warnings for sort-induced outages.
Published by
theAIcatchup
Ship faster. Build smarter.
Worth sharing?
Get the best Developer Tools stories of the week in your inbox — no noise, no spam.