Search APIs
Introduced 1.0
OpenSearch provides a comprehensive suite of search-related APIs that allow you to perform various search operations, test and validate your searches, and work with search templates. OpenSearch supports the following Search APIs.
The endpoint paths listed on this page (for example, GET /{index}/_search) are relative to your OpenSearch host and port. The full URL format is https://<host>:<port>/{index}/_search, for which the default port is 9200. For more information about connecting to OpenSearch, see Communicating with OpenSearch.
Core search APIs
These APIs form the foundation of OpenSearch’s search capabilities:
- Search: Run search queries across one or more indexes.
- Multi-search: Run multiple search requests in a single API call.
- Point in Time: Create a consistent view of the index for search operations.
- Scroll: Retrieve large numbers of results from a search query.
- Count: Get the number of documents that match a query.
Search testing APIs
These APIs help you test, debug, and optimize your search operations:
- Explain: Explain how a specific document matches (or doesn’t match) a query.
- Field capabilities: Get the capabilities of fields across multiple indexes.
- Profile: Profile the execution of search requests.
- Ranking evaluation: Evaluate the quality of search results.
- Search shards: Get information about the shards on which a search request would be executed.
- Validate: Validate a potentially expensive query before executing it.
Search template APIs
These APIs allow you to work with search templates:
- Search template: Use search templates to run parameterized search queries.
- Multi-search template: Execute multiple search template requests in a single API call.
- Render template: Previews the final query generated from a search template by substituting parameters without executing the search.