Repository: calcite
Updated Branches:
  refs/heads/master a3711d78d -> c3e076c0b


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


Project: http://git-wip-us.apache.org/repos/asf/calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/c3e076c0
Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/c3e076c0
Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/c3e076c0

Branch: refs/heads/master
Commit: c3e076c0b8bc3b4f69d90cf08f7c6a082a4fe564
Parents: a3711d7
Author: Andrei Sereda <[email protected]>
Authored: Mon Dec 24 14:15:57 2018 -0500
Committer: Andrei Sereda <[email protected]>
Committed: Mon Dec 24 14:59:02 2018 -0500

----------------------------------------------------------------------
 site/_docs/adapter.md               |  4 +---
 site/_docs/elasticsearch_adapter.md | 15 ++++++++-------
 2 files changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/calcite/blob/c3e076c0/site/_docs/adapter.md
----------------------------------------------------------------------
diff --git a/site/_docs/adapter.md b/site/_docs/adapter.md
index 80fbd21..b1c9dec 100644
--- a/site/_docs/adapter.md
+++ b/site/_docs/adapter.md
@@ -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>
-  and
-  <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>)

http://git-wip-us.apache.org/repos/asf/calcite/blob/c3e076c0/site/_docs/elasticsearch_adapter.md
----------------------------------------------------------------------
diff --git a/site/_docs/elasticsearch_adapter.md 
b/site/_docs/elasticsearch_adapter.md
index 21f2459..1594a13 100644
--- a/site/_docs/elasticsearch_adapter.md
+++ b/site/_docs/elasticsearch_adapter.md
@@ -47,10 +47,9 @@ 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": "{'127.0.0.1': 9300}",
-        "userConfig": "{'bulk.flush.max.actions': 10, 
'bulk.flush.max.size.mb': 1}",
         "index": "usa"
       }
     }
@@ -58,8 +57,7 @@ A basic example of a model file is given below:
 }
 {% 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`](https://github.com/julianhyde/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
-it.
+### Use of Scrolling API
+For queries without aggregate functions (like `COUNT`, `MAX` etc.) elastic 
adapter 
+uses [scroll 
API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html),
 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.
+

Reply via email to