DEV.co
Open-Source Databases · NLPchina

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).

Source: GitHub — github.com/NLPchina/elasticsearch-sql
7k
GitHub stars
1.5k
Forks
Java
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
RepositoryNLPchina/elasticsearch-sql
OwnerNLPchina
Primary languageJava
LicenseApache-2.0 — OSI-approved
Stars7k
Forks1.5k
Open issues331
Latest releasev9.3.4 (2026-05-04)
Last updated2026-06-30
Sourcehttps://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.

Quickstart

Get the elasticsearch-sql source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/NLPchina/elasticsearch-sql.gitcd elasticsearch-sql# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Legacy system migration from SQL databases

Teams with existing SQL-based tooling and queries can use this plugin to gradually migrate to Elasticsearch without rewriting all query logic, particularly for read-heavy analytics workloads.

Ad-hoc SQL exploration of Elasticsearch data

Development teams and analysts familiar with SQL can query Elasticsearch clusters without learning Query DSL, reducing onboarding friction for SQL-proficient staff.

Multi-version Elasticsearch support requirement

Organizations running Elasticsearch versions 1.x through 9.x that need SQL capability across disparate cluster versions can use the version-specific branches for uniform query interface.

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.

SignalAssessment
MaintenanceStale
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitPossible
Assessment confidenceHigh
Security considerations

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.

Software development agency

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.co

Related 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?
Not recommended. The project is deprecated and unsupported. Use X-Pack SQL or OpenDistro SQL instead for production deployments requiring vendor backing.
Which Elasticsearch versions are supported?
Version-specific branches exist for 1.x through 9.3.4 (as of the latest release 2026-05-04). Each branch must match your cluster version exactly.
Does this support full SQL compliance?
No. It transpiles SQL to Elasticsearch Query DSL but has limitations: no transactions, limited JOIN support, no DELETE in older versions, and some semantic differences from standard SQL.
What is the difference between /_sql and /_nlpcn/sql?
API endpoint path was renamed at v7.5.0.0 from /_sql to /_nlpcn/sql. Client tools and integrations must use the version-appropriate path.

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.