elasticsearch-sql
elasticsearch-sql is a Java plugin that allows you to query Elasticsearch using SQL syntax instead of native query DSL. The project is deprecated and no longer actively maintained; Elastic and AWS now offer official alternatives (X-Pack SQL and OpenDistro for Elasticsearch SQL).
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | NLPchina/elasticsearch-sql |
| Owner | NLPchina |
| Primary language | Java |
| License | Apache-2.0 — OSI-approved |
| Stars | 7k |
| Forks | 1.5k |
| Open issues | 331 |
| Latest release | v9.3.4 (2026-05-04) |
| Last updated | 2026-06-30 |
| Source | https://github.com/NLPchina/elasticsearch-sql |
What elasticsearch-sql is
A Elasticsearch plugin written in Java that transpiles SQL queries to Elasticsearch Query DSL, supporting multiple Elasticsearch versions (1.x through 9.3.4) via version-specific branches. The plugin exposes SQL endpoints and includes a web frontend for query execution and explanation.
Get the elasticsearch-sql source
Clone the repository and explore it locally.
git clone https://github.com/NLPchina/elasticsearch-sql.gitcd elasticsearch-sql# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Select the version-specific branch matching your Elasticsearch version (e.g., elastic6.8.23, elastic9.3.4); mismatched versions risk instability or broken functionality.
- The API endpoint path changed at version 7.5.0.0 from /_sql to /_nlpcn/sql; ensure client tools and documentation are aligned with your deployment version.
- No active security patching; conduct a thorough security audit before using in production, especially if handling sensitive data.
- Behavior divergence from standard SQL is documented in the wiki; test comprehensive query scenarios with your actual data before rollout.
- Web frontend is included but appears to be basic; for enterprise UI, plan to build or integrate custom tooling.
When to avoid it — and what to weigh
- Requiring active vendor support — The project is explicitly deprecated and no longer in active development. Elastic and AWS provide supported alternatives; choose those unless locked into this codebase.
- Building new production systems — New deployments should use X-Pack SQL (Elastic) or OpenDistro SQL (AWS) instead, which receive ongoing maintenance, security patches, and feature updates.
- Complex analytical queries with updates — The plugin does not support DELETE commands in Elasticsearch 2.x–5.x; if your workload requires data mutations via SQL, this is not suitable.
- Heavy reliance on SQL-specific semantics — Elasticsearch is fundamentally document-oriented; full SQL compliance (transactions, joins, normalization) is not guaranteed and may diverge significantly from standard SQL behavior.
License & commercial use
Licensed under Apache License 2.0 (Apache-2.0), an OSI-approved permissive license allowing commercial use, modification, and distribution with liability and trademark limitations.
Apache-2.0 permits commercial use without explicit permission from licensor. However, given the project's deprecated status and lack of active maintenance, commercial deployments should conduct legal and technical due diligence and strongly consider officially supported alternatives (X-Pack SQL, OpenDistro SQL) for liability and support clarity.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Stale |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Moderate |
| DEV.co fit | Possible |
| Assessment confidence | High |
No active security maintenance; no details provided on authentication, authorization, SQL injection prevention, or query complexity limits. Requires manual security review before production use. Elasticsearch cluster security (TLS, auth) must be enforced independently.
Alternatives to consider
X-Pack SQL (Elastic official)
Officially maintained by Elastic, integrated into Elasticsearch, receives regular security and feature updates, supports advanced SQL semantics and licensing models.
OpenDistro for Elasticsearch SQL (AWS)
Actively maintained by AWS, permissively licensed (SSPL/Elastic License), provides SQL interface with AWS support and compatibility across AWS managed Elasticsearch versions.
Presto / Trino federation layer
Decouples SQL translation from Elasticsearch, supports querying multiple data sources, actively maintained by the open-source community, and provides strong SQL standard compliance.
Build on elasticsearch-sql with DEV.co software developers
We recommend X-Pack SQL or OpenDistro for Elasticsearch SQL for production workloads. If you're maintaining legacy code or need technical guidance on migration, contact our engineering team.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
elasticsearch-sql FAQ
Can I use this in production?
Which Elasticsearch versions are supported?
Does this support full SQL compliance?
What is the difference between /_sql and /_nlpcn/sql?
Work with a software development agency
DEV.co helps companies turn open-source tools like elasticsearch-sql into production software. Our software development services cover the full lifecycle — architecture, web development, integration, and maintenance — delivered by software developers and web developers who ship. Engage our software development agency to implement or customize it for your open-source databases stack.
Evaluating a Deprecated Elasticsearch SQL Plugin?
We recommend X-Pack SQL or OpenDistro for Elasticsearch SQL for production workloads. If you're maintaining legacy code or need technical guidance on migration, contact our engineering team.