Getting started
What is OpenSearch?
OpenSearch is a managed cloud search service for structured data. Configure your schema, upload data, and call the OpenSearch API or use an SDK to run searches — no infrastructure management required. SDKs are available for major programming languages. For a full list, see the SDK overview.
What are the benefits of using OpenSearch?
OpenSearch scales infrastructure automatically as your data grows, so you don't need to provision or manage search servers. Search traffic runs independently of your application servers, keeping your existing services unaffected. The service is designed to return high-relevance results quickly.
How is OpenSearch billed?
OpenSearch supports two billing methods:
Storage and queries per second (QPS): Charges based on the amount of data stored and the query rate. If you choose this method, logical computing unit (LCU) consumption data is available for performance evaluation but does not apply to billing.
LCU-based: Charges based on LCU consumption.
For pricing details, see Overview.
Applications and schema
What is an application?
An application is a collection of searchable documents that share the same schema. To create one: define your data tables and field types, configure search properties, and upload data. Once set up, query it through the OpenSearch API or console. Create, manage, and delete applications from the OpenSearch console or via the API.
Why do I need to define indexes when setting up a schema?
Indexes make keyword search possible. An index field maps to one or more source fields. When you define index fields, OpenSearch builds inverted indexes that retrieve matching documents efficiently.
For example, a forum might need two search modes: a comprehensive search across title, body, and author, and a title-only search. Create two index fields — one mapping title, body, and author to a default field, and another mapping just title to a title_search field. Then use query=default:'keyword' for comprehensive search and query=title_search:'keyword' for title-only search.
What is a template?
A template is a pre-configured application container that includes a schema and sorting configuration. Templates are based on common internet data patterns and reduce setup time. View available templates when creating an application in the console.
Can I modify the schema of a template-based application?
Yes. Go to the application details page and click Modify Offline Application. For details, see Perform offline changes.
Data upload and management
How do I upload data to an application?
The method depends on your data source:
ApsaraDB RDS, MaxCompute, or PolarDB: Configure the data source connection in the OpenSearch console. Data syncs automatically, and incremental updates stay in sync going forward.
Other sources: Upload data by calling the OpenSearch API or using the upload feature in the console. Only JSON format is supported.
How many documents can I upload?
There is no built-in document limit. Set a quota in the console based on your needs (see Change the configurations of an instance). If you need to upload a large batch at once, submit a ticket for approval — the same process as requesting a high QPS quota. Higher quotas result in higher costs, so set the quota to match your actual data volume.
What's the difference between the ADD and UPDATE statements?
When a field has no value specified:
ADD: OpenSearch assigns the field's default value.
UPDATE: OpenSearch leaves the field unchanged (no value is assigned).
How do I delete a document?
Run the DELETE statement using an OpenSearch SDK, or delete the document from the Search Test page in the console.
How do I clear all documents from an application?
To keep the application name: Delete documents one by one.
To discard the application name: Create a new application, copy the configuration over, and delete the original.
OpenSearch applications of the advanced edition also support scheduled document clearing. Set a retention period of 7 to 180 days, and documents are cleared automatically after that period.
How do I delete an application?
In the OpenSearch console, go to the application details page and click Delete Application. Confirm the deletion in the dialog that appears.
Search behavior
What search types does OpenSearch support?
OpenSearch supports text and numeric searches, with features including query, filter, sorting, statistics, aggregation, custom indexes, custom sorting, and drop-down suggestions. Configure analysis options such as synonyms and spell correction to fine-tune results.
How many search requests can I send?
There is no built-in request limit. Set a QPS quota in the console based on your needs. If your service requires a high QPS, submit a ticket in advance — automatic resource adjustment can take a few days.
How fast are search responses?
Latency depends on query complexity and the number of matched documents. Test against your actual query patterns to get an accurate baseline.
Can I retrieve all documents from an application?
No. OpenSearch uses inverted indexes optimized for relevance-ranked retrieval, not full data export. Each query returns a limited number of results. For pagination, set the viewtotal parameter in the response. For the per-query document limit, see Limits.
Why does an array appear as a string in search results?
Array elements are separated by the tab delimiter (\t). Parse the string on \t to recover the array.
Does OpenSearch support custom analyzers and dictionaries?
OpenSearch supports multiple built-in analysis methods and lets you customize analysis configuration. Custom dictionaries are not supported — all applications share the same dictionary configuration. For details, see Fields and analyzers.
Why can't I find a document containing "mxplayer" by searching "mx" or "player"?
OpenSearch performs word-level analysis on English text. "mxplayer" is treated as a single token, so searching for "mx", "player", or "mx player" won't match it.
Does OpenSearch support languages other than Chinese and English?
Semantic analysis is available for Chinese and English. For space-delimited languages such as Portuguese and Russian, OpenSearch supports basic word matching. Japanese and Korean are not supported. General analyzers are available for Thai and Vietnamese. For details, see Text analyzers.
How do I show the most relevant result from each store and the total match count per store?
Use the distinct and aggregate clauses together. distinct groups results by a field (such as store ID), and aggregate computes totals or other statistics within each group.
Does OpenSearch cache search results?
Yes. Results for identical queries are cached for 5 minutes. Caching is enabled by default and cannot be disabled or reconfigured.
API and SDKs
Where do I find the API endpoint for my region?
OpenSearch is deployed across multiple regions, each with a dedicated endpoint. Go to your application details page to find the endpoint for your region.
I uploaded data with status OK, but the console shows an error. What happened?
A 200 OK response means OpenSearch received the data, not that processing succeeded. Processing errors are recorded separately in the error logs.
To investigate:
Open the OpenSearch console and go to Error logs.
Check for entries related to your upload, noting the field or document that caused the error.
Fix the issue in your data or schema, then re-upload the affected documents.
OpenSearch does not provide an API operation for querying error messages — use the error logs in the console.
Still have questions? Submit a ticket.