NLPchina/elasticsearch-sql
Use SQL to query Elasticsearch
What this project is
elasticsearch-sql is a plugin for Elasticsearch (a search and analytics engine) that lets you query your data using familiar SQL syntax instead of Elasticsearch's own query language. You can also use Elasticsearch's built-in functions inside your SQL statements.
Current status
⚠️ Deprecated — the project is no longer actively developed. The README explicitly recommends switching to the official alternatives:
- x-pack-sql (Elastic's official SQL plugin)
- OpenDistro for Elasticsearch SQL (supported by AWS, Apache 2 licensed)
How it works
You install it as a plugin into your Elasticsearch instance. Once installed, you can send SQL queries to a special endpoint, and the plugin translates them into Elasticsearch queries behind the scenes.
Important path change
If you're using version 7.5.0.0 or later, the API endpoints changed:
| Old path | New path |
|---|---|
/_sql |
/_nlpcn/sql |
/_sql/_explain |
/_nlpcn/sql/explain |
The _explain endpoint shows how a SQL query gets translated into an Elasticsearch query.
Version compatibility
The README includes a large compatibility table covering Elasticsearch versions from 1.x up to 8.9.0 (and build status badges suggest branches for 6.8.23, 7.17.28, 8.19.15, and 9.3.4). Each Elasticsearch version has a matching plugin version — for example, ES 7.17.28 pairs with plugin version 7.17.28.0.
Known limitations
For Elasticsearch versions 2.0.0 through 5.6.5, the delete commands are not supported. (Versions after that don't list this limitation.)
Extras
- The project has a web frontend (a screenshot is referenced in the README) for interacting with the SQL interface visually.
- A wiki is available for more documentation.
- CI build status is tracked for several maintained branches (6.8.23, 7.17.28, 8.19.15, 9.3.4, and master).
Bottom line
If you need SQL access to Elasticsearch today, this project is a historical solution — the README itself tells you to use the official alternatives instead.
Related
- Project
- Project
- Project
- Project