Introduction
Hint
This article is generated by AI translation.
jdbc-elastic is an ElasticSearch JDBC adapter that lets developers operate ElasticSearch via standard JDBC interfaces and native REST API commands. The goal is to let you use ElasticSearch seamlessly with the familiar JDBC programming model.
Core Features
- Native Command Support: Supports common ElasticSearch REST API commands, including
GET,POST,PUT,DELETE,HEAD. - JDBC Standard Interface: Supports
Connection,Statement,PreparedStatement,ResultSetetc. - Parameter Placeholders: Supports
?placeholders in URL paths and JSON Body, and setting parameters viaPreparedStatement. - ResultSet Mapping: Automatically maps ElasticSearch JSON responses to JDBC
ResultSet. - Auto Generated Keys: Supports
Statement.RETURN_GENERATED_KEYS, automatically returning the generated_idon insert. - Multi-Command Support: Supports batch operations like
_mget,_msearch. - Index Management: Supports index creation, deletion, Mapping settings, Settings configuration, Alias management, etc.
- Pre-read Optimization: Supports pre-read configuration for large result sets to optimize read performance.
- Multi-Version Compatibility: Compatible with ES6/ES7/ES8/ES9 without adjusting dependencies.
Architecture
Internally parses QueryDSL commands, converts them into underlying REST requests, and communicates using the official ElasticSearch REST Client.
Use Cases
- Need unified (JDBC) access to ElasticSearch in Java projects.
- Prefer to use native REST API style commands for ElasticSearch.
- Need to integrate ElasticSearch into existing JDBC-based data processing flows.