OpenSearch indexes and search
Search documents instead of joining tables
OpenSearch Service indexes JSON documents so applications can retrieve relevant text, exact categories and aggregations. A search index is a derived copy, not the authoritative order database. For example, an index of fictional products can find the words “blue mug” and restrict results to category kitchen. The local token-matching lab illustrates filtering, not OpenSearch ranking or analyzers.
Mappings and query semantics
A mapping declares field types. A text field is analyzed for full-text search; keyword supports exact values and category aggregation. A numeric field enables range filtering. A bool query can combine a match query with a term filter. The illustrative REST request below is static; run only against a separately approved test index with a matching mapping. Dynamic mappings can infer unexpected types; plan schema changes and reindex into a new index with an alias switch where supported.
{ "query": { "bool": { "must": [ { "match": { "name": "blue mug" } } ], "filter": [ { "term": { "category": "kitchen" } } ] } }}Managed domains and serverless collections
A managed domain lets you choose instance and storage configurations, shard layouts and supported engine versions. Serverless groups indexes into collections and manages indexing/search compute measured in OCUs. Collection types and generations differ in supported APIs, document updates, retention and capacity behavior. Some NextGen configurations support scale-to-zero; do not assume every collection does. Check quotas, minimum/maximum capacity and feature support. Migration from a domain requires a planned data transfer rather than an assumed automatic conversion.
Operate a derived search index
Use private network access where feasible, encryption, and narrowly scoped identity and data policies. Serverless requires appropriate IAM permissions plus data access policy and network access. Monitor indexing errors, freshness lag, search latency and throttling; retry bounded failures and retain replayable source events. A write acknowledgement does not guarantee immediate search visibility. Compare node/storage costs or OCU/storage costs and retain only needed documents. If indexing falls behind, report stale results rather than silently presenting them as current.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
OpenSearch indexes and search — knowledge check
Select and operate analytical SQL, search and BI workloads.
Which mapping type suits exact categories?
Which query pattern combines relevance and a category restriction?
What is a serverless collection?
What does an index write acknowledgement prove?
How should derived search data be recovered?