--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: elasticsearch excerpt: | DuckDB Community Extensions Query Elasticsearch indices directly using SQL extension: name: elasticsearch description: Query Elasticsearch indices directly using SQL version: 1.0.0 language: C++ build: cmake license: MIT maintainers: - tlinhart repo: github: tlinhart/duckdb-elasticsearch ref: 5b340f5460e22e282f469eb3e021d3cce0b9d747 ref_next: e89032ec14cd3746917645c7542171409a97f2f3 docs: hello_world: | -- Basic query. SELECT * FROM elasticsearch_query( host := 'localhost', index := 'products' ); -- Query with authentication. SELECT * FROM elasticsearch_query( host := 'localhost', index := 'logs-*', username := 'elastic', password := 'secret', use_ssl := true ); -- Filter pushdown – WHERE clauses are translated to Elasticsearch Query DSL. SELECT name, price FROM elasticsearch_query( host := 'localhost', index := 'products' ) WHERE category = 'electronics' AND price > 100; -- Geospatial query pushdown (requires the DuckDB spatial extension). INSTALL spatial; LOAD spatial; SELECT name FROM elasticsearch_query( host := 'localhost', index := 'places' ) WHERE ST_Intersects(ST_GeomFromGeoJSON(geometry), ST_Point(-122.4194, 37.7749)); -- Combine WHERE clause with a base Elasticsearch query. SELECT title, author FROM elasticsearch_query( host := 'localhost', index := 'books', query := '{"match": {"description": "science fiction"}}' ) WHERE in_stock = true LIMIT 10; extended_description: | The DuckDB Elasticsearch extension enables querying Elasticsearch indices directly using SQL. It supports filter, projection and limit pushdown for optimized queries, automatic schema inference from index mappings and handles complex types like nested objects, arrays and geospatial types. Key features: - Filter pushdown – `WHERE` clauses are translated to Elasticsearch Query DSL. - Projection pushdown – only requested columns are fetched via `_source` filtering. - Limit pushdown – `LIMIT`/`OFFSET` clauses are pushed to Elasticsearch. - Automatic schema inference from index mappings with array detection. - Support for multi-index queries (e.g. `logs-*`). - Geospatial types (`geo_point`, `geo_shape`) converted to GeoJSON format. - SSL/TLS support with configurable certificate verification. - Automatic retry with exponential backoff for transient errors. For detailed documentation, visit the [extension repository](https://github.com/tlinhart/duckdb-elasticsearch). extension_star_count: 23 extension_star_count_pretty: 23 extension_download_count: 3307 extension_download_count_pretty: 3.3k image: '/images/community_extensions/social_preview/preview_community_extension_elasticsearch.png' layout: community_extension_doc --- ### Compatibility Matrix This table covers all DuckDB releases that have not reached [end-of-life](https://duckdb.org/release_calendar), including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 | | :--- | :---: | :---: | :---: | :---: | :---: | | Linux AMD64 | ✅ | ❌ | ❌ | ❌ | ❌ | | Linux ARM64 | ✅ | ❌ | ❌ | ❌ | ❌ | | macOS AMD64 | ✅ | ❌ | ❌ | ❌ | ❌ | | macOS ARM64 | ✅ | ❌ | ❌ | ❌ | ❌ | | Windows AMD64 | ✅ | ❌ | ❌ | ❌ | ❌ | | Windows ARM64 | ❌ | ❌ | ❌ | ❌ | ❌ | | WebAssembly | ✅ | ❌ | ❌ | ❌ | ❌ | ### Installing and Loading ```sql INSTALL {{ page.extension.name }} FROM community; LOAD {{ page.extension.name }}; ``` {% if page.docs.hello_world %} ### Example ```sql {{ page.docs.hello_world }}``` {% endif %} {% if page.docs.extended_description %} ### About {{ page.extension.name }} {{ page.docs.extended_description }} {% endif %} ### Added Functions
| function_name | function_type | description | comment | examples | |---------------------|---------------|-------------|---------|----------| | elasticsearch_query | table | NULL | NULL | | ### Overloaded Functions
This extension does not add any function overloads. ### Added Types
This extension does not add any types. ### Added Settings
This extension does not add any settings.