Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch connector documentation fixes #12912

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions presto-docs/src/main/sphinx/connector/elasticsearch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ Field Required Type Description
``clusterName`` required string Elasticsearch cluster name.
``index`` required string Elasticsearch index that is backing this table.
``indexExactMatch`` optional boolean If set to true, the index specified with the ``index`` property is used. Otherwise, all indices starting with the prefix specified by the ``index`` property are used.
``type`` required string Elasticsearch `mapping type`_, which determines how the document are indexed.
``type`` required string Elasticsearch `mapping type`_, which determines how the document are indexed (like "_doc").
``columns`` optional list List of column metadata information.
=================== ========= ============== =============================

Expand All @@ -263,11 +263,31 @@ Optionally, column metadata can be described in the same table description JSON
===================== ========= ============== =============================
Field Required Type Description
===================== ========= ============== =============================
``name`` optional string Column name of Elasticsearch field.
``type`` optional string Column type of Elasticsearch `field`_.
``jsonPath`` optional string Json path of Elasticsearch field.
``jsonType`` optional string Json type of Elasticsearch field.
``name`` required string Column name of Elasticsearch field.
``type`` required string Column type of Elasticsearch field (see second column of `data type mapping`_).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer keep the field link, and point to type mapping

``jsonPath`` required string Json path of Elasticsearch field (when in doubt set to the same as ``name``).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we use words other than 'when in doubt'? maybe default as name?

``jsonType`` required string Json type of Elasticsearch field (when in doubt set to the same as ``type``).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as jsonType

``ordinalPosition`` optional integer Ordinal position of the column.
===================== ========= ============== =============================

.. _field: https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer keep this link, as users might not be familiar with elasticsearch type

.. _data type mapping: #data-types

Data Types
----------

The data type mappings are as follows:

============= ======
Elasticsearch Presto
============= ======
``binary`` ``VARBINARY``
``boolean`` ``BOOLEAN``
``double`` ``DOUBLE``
``float`` ``DOUBLE``
``integer`` ``INTEGER``
``keyword`` ``VARCHAR``
``long`` ``BIGINT``
``string`` ``VARCHAR``
``text`` ``VARCHAR``
(all others) (unsupported)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/all others/others/g

============= ======