Search using Elasticsearch
Elasticsearch acts not only as document storage, but also as a tool for searching and analyzing data in the documents using:
- Structured queries similar to SQL queries: to find documents with a set of fields that meet the specified conditions.
- Full text queries: to find a given string in documents and sort the results by relevance. These queries also allow you to use additional search functions, including autocomplete and search for phrases and similar strings. To learn more about full-text search, see the Elasticsearch documentation.
- Complex queries that combine the previous types of queries.
In Managed Service for Elasticsearch, you can perform all these types of queries using the following tools:
- URI queries, in which a Lucene query string is passed in the GET parameter:
?q=<query string>
. - JSON queries written using Elasticsearch QueryDSL.
- SQL queries. Elasticsearch fully supports SQL queries without requiring any intermediary between itself and SQL.
Some search features in Elasticsearch:
- Searches can be performed within a specific index in a cluster or across multiple indexes.
- Asynchronous search is supported for large queries that can be performed over a long period of time.
To learn more about search options, see the Elasticsearch documentation.