Skip to content
Browse files

Site: Improve documentation for ElasticSearch Adapter

1. Clarify documentation on Scroll API usage in ElasticSearch adapter
2. Remove stale mention of missing support for aggregations.
3. Remove links to old ES adapters: calcite-elasticsearch2 and calcite-elasticsearch5
  • Loading branch information...
asereda-gs committed Dec 24, 2018
1 parent a3711d7 commit c3e076c0b8bc3b4f69d90cf08f7c6a082a4fe564
Showing with 9 additions and 10 deletions.
  1. +1 −3 site/_docs/
  2. +8 −7 site/_docs/
@@ -31,9 +31,7 @@ presenting the data as tables within a schema.
* CSV adapter (<a href="{{ site.apiRoot }}/org/apache/calcite/adapter/csv/package-summary.html">example/csv</a>)
* [Druid adapter](druid_adapter.html) (<a href="{{ site.apiRoot }}/org/apache/calcite/adapter/druid/package-summary.html">calcite-druid</a>)
* [Elasticsearch adapter](elasticsearch_adapter.html)
(<a href="{{ site.apiRoot }}/org/apache/calcite/adapter/elasticsearch2/package-summary.html">calcite-elasticsearch2</a>
<a href="{{ site.apiRoot }}/org/apache/calcite/adapter/elasticsearch5/package-summary.html">calcite-elasticsearch5</a>)
(<a href="{{ site.apiRoot }}/org/apache/calcite/adapter/elasticsearch/package-summary.html">calcite-elasticsearch</a>)
* [File adapter](file_adapter.html) (<a href="{{ site.apiRoot }}/org/apache/calcite/adapter/file/package-summary.html">calcite-file</a>)
* [Geode adapter](geode_adapter.html) (<a href="{{ site.apiRoot }}/org/apache/calcite/adapter/geode/package-summary.html">calcite-geode</a>)
* JDBC adapter (part of <a href="{{ site.apiRoot }}/org/apache/calcite/adapter/jdbc/package-summary.html">calcite-core</a>)
@@ -47,19 +47,17 @@ A basic example of a model file is given below:
"type": "custom",
"name": "elasticsearch",
"factory": "org.apache.calcite.adapter.elasticsearch2.Elasticsearch2SchemaFactory",
"factory": "org.apache.calcite.adapter.elasticsearch.ElasticsearchSchemaFactory",
"operand": {
"coordinates": "{'': 9300}",
"userConfig": "{'bulk.flush.max.actions': 10, 'bulk.flush.max.size.mb': 1}",
"index": "usa"
{% endhighlight %}

This adapter is targeted for Elasticsearch 2.x. To use Calcite with Elasticsearch 5.x+ you can use the factory
of the adapter targeted for Elasticsearch 5.x: `org.apache.calcite.adapter.elasticsearch5.Elasticsearch5SchemaFactory`
This adapter is targeted for Elasticsearch versions 2 or older.

Assuming this file is stored as `model.json`, you can connect to
Elasticsearch via [`sqlline`]( as
@@ -134,6 +132,9 @@ The final source json given to Elasticsearch is below:
{% endhighlight %}
This is the initial version of the Calcite Elasticsearch adapter.
Work is in progress to introduce new features like aggregations into
### Use of Scrolling API
For queries without aggregate functions (like `COUNT`, `MAX` etc.) elastic adapter
uses [scroll API](, by default.
This ensures that consistent and full data-set is returned to end user (lazily and in batches). Please note that
scroll is automatically cleared (removed) when all query resuts are consumed.

0 comments on commit c3e076c

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.