Urgent.News

What's breaking now, across thousands of outlets.

Tech

OpenSearch Under the Hood: How It Actually Works

I have been using OpenSearch for querying and aggregating data at work. Initially, I was just maintaining the code, but after working with it for some time, I started wondering what actually happens behind those queries. When I search for something, does OpenSearch search the original JSON documents? And when an aggregation runs across multiple shards, how does OpenSearch get one final result? So…

OpenSearch is a tool for efficiently searching and analyzing large datasets. It works by organizing data across a cluster of nodes, where each node contains multiple shards. An index is a logical grouping of related documents, similar to a table. Within an index, each document is a piece of data with fields, like name, region, and amount.

When you search, OpenSearch doesn't simply scan every document. Instead, it uses an inverted index to quickly locate documents containing specific words. For example, if you search for "OpenSearch," the inverted index tells you which documents contain that term. Doc values allow for efficient sorting and aggregations, like calculating the sum of amounts or finding top regions.

When you send a query, it's distributed across the relevant shards. Each shard processes the request on its local data and returns the results. A coordinating node then merges these results to provide the final answer. However, for aggregations, the process can be more complex. Since documents are distributed across shards, each shard performs local processing and sends results back to the coordinating node. The node then combines these results to get the final global output.

This method can sometimes give approximate results, especially when aggregating across multiple shards. The coordinating node combines individual shard results, but a region with a lower count on each shard might still have a high global count once all shards' results are merged. This is where distributed aggregation becomes tricky and sometimes requires approximations to ensure accuracy.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

My LTIMindtree Interview Experience (2026 Batch) | GET Role

Last year, I went through the campus placement process for LTIMindtree for the Graduate Engineer Trainee (GET) role (4.05 LPA).

  • LTIMindtree Graduate Engineer Trainee (GET) process concluded in November 2025
  • Technical interview focused on resume projects and computer science fundamentals
  • HR interview assessed communication skills and company fit

My friend was lost in the internship hunt, so I built him Get A Job.

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend What I Built I wanted to build something a friend could actually use beyond this weekend.

  • "Get A Job" simplifies internship search and applications
  • Open-source AI tool consolidates internship discovery and application process
  • Local AI processing ensures data privacy and flexibility

Is Manual Testing Dead in 2026, or More Valuable Than Ever?

You've heard the prediction every year for a decade: automation is about to kill manual testing. In 2026, with AI writing test suites on demand and generating code faster than humans can review it…

  • Manual testing's tedious parts automated, leaving critical bug uncovering
  • Mechanical regression testing dies, replaced by AI-generated suites
  • Exploratory testing thrives, humans form hypotheses to find critical bugs

More from Sunday 4 October →