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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is extremely useful for optimizing query performance for large ElasticSearch cluster.
Requesting to please provide support for _routing field for SQL queries. We really appreciate your help!
Thanks for raising this!
Currently, only field defined in index mapping is used as identifier in sql query. _routing is a metafield which is not defined in index mapping, so _routing could not been used as identifier in sql query.
For example, following query will throw SemanticCheckException _routing is not defined.
SELECT age, balance
FROM accounts
WHERE _routing = 'user1'
I think one solution is to borrow pseudo columns concept to expose metadata field like _routing.
@newUserForTesting Can you elaborate on your use case to provide us some insights?
Activity
penghuo commentedon Jan 4, 2022
Thanks for raising this!
Currently, only field defined in index mapping is used as identifier in sql query. _routing is a metafield which is not defined in index mapping, so _routing could not been used as identifier in sql query.
For example, following query will throw SemanticCheckException _routing is not defined.
I think one solution is to borrow pseudo columns concept to expose metadata field like _routing.
@newUserForTesting Can you elaborate on your use case to provide us some insights?
acarbonetto commentedon Jun 30, 2022
Proposal: couchbase offers META() as a way to retrieve metadata fields in their n1ql syntax https://docs.couchbase.com/server/current/n1ql/n1ql-language-reference/indexing-meta-info.html.
We could consider coding something similar to SQL DSL that allows one to do:
[Spotless] Applying Google Code Format for ppl files #12 (#1972)
qianheng-aws commentedon Apr 1, 2026
Resolved by #1805