Spec-Zone.ru › Elasticsearch 7
›Elasticsearch Guide [7.17] ›REST APIs ›SQL APIs

SQL translate API

Translates an SQL search into a search API request containing Query DSL. See SQL Translate API.

POST _sql/translate
{
  "query": "SELECT * FROM library ORDER BY page_count DESC",
  "fetch_size": 10
}

Request

GET _sql/translate

POST _sql/translate

Prerequisites

  • If the Elasticsearch security features are enabled, you must have the read index privilege for the data stream, index, or alias you search.

Limitations

See SQL Limitations.

Request body

The SQL translate API accepts the same request body parameters as the SQL search API, excluding cursor.

Response body

The SQL translate API returns the same response body as the search API.

© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/sql-translate-api.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API