This is an automated email from the ASF dual-hosted git repository.
sereda pushed a commit to branch site
in repository https://gitbox.apache.org/repos/asf/calcite.git
The following commit(s) were added to refs/heads/site by this push:
new 2afea1f Site: Elastic query example on _MAP
2afea1f is described below
commit 2afea1fc94c5cda594535f5d194b86f723e2e8be
Author: Andrei Sereda <[email protected]>
AuthorDate: Thu Jan 3 11:33:36 2019 -0500
Site: Elastic query example on _MAP
---
site/_docs/elasticsearch_adapter.md | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/site/_docs/elasticsearch_adapter.md
b/site/_docs/elasticsearch_adapter.md
index 3eff935..b9bab31 100644
--- a/site/_docs/elasticsearch_adapter.md
+++ b/site/_docs/elasticsearch_adapter.md
@@ -75,7 +75,7 @@ For example, in the example dataset there is an Elasticsearch
type
named `zips` under index named `usa`.
We can issue a simple query to fetch the names of all the states
-stored in the type `zips`. By default, Elasticsearch returns only 10 rows:
+stored in the type `zips`.
{% highlight sql %}
sqlline> SELECT * from "zips";
@@ -130,6 +130,12 @@ The final source json given to Elasticsearch is below:
}
{% endhighlight %}
+You can also query elastic search index without prior view definition:
+
+{% highlight sql %}
+sqlline> SELECT _MAP['city'], _MAP['state'] from "elasticsearch"."zips" order
by _MAP['state'];
+{% endhighlight %}
+
### 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.