calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrei Sereda <and...@sereda.cc>
Subject ElasticSearch adapter. Exposing meta fields (like _id, _uid etc.)
Date Sat, 22 Dec 2018 00:14:09 GMT
Hello,

Upon indexing, elastic allocates a unique _id
<https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-id-field.html>
for each document (unless specified by the user). Currently when mapping
between elastic result and calcite return type we query only _source or
fields attributes. _id is not part those but exposed at higher level in
query response (see SearchHit
<https://www.elastic.co/guide/en/elasticsearch/reference/6.1/_the_search_api.html>
).

Currently  _MAP['foo'] becomes _source.get('foo') (or fields.get('foo')).

Do you think we should make _MAP['_id'] available implicitly ?

I have a couple of use-cases where one needs to know document ID.

Please note this makes sense only for non-aggregate queries.

Regards,

Andrei.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message