-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
CCS: terms lookup query doesn't support looking up terms on remote indices #61364
Comments
Pinging @elastic/es-search (:Search/Search) |
This requires knowledge about how the terms query works internally. Terms lookup uses the get API to retrieve the document that contains the ids. Get is not search, hence it has no cross-cluster support, meaning index prefixes don't get resolved, and indices can only be local. The terms query gets rewritten on the coordinating node (CCS cluster when using CCS), and as part of the rewrite phase the document containing the ids is fetched locally. This can only work if the lookup data is located in the CCS cluster, and no index prefix is used in the terms query definition. Otherwise, the lookup can also happen on the client side. Terms lookup is concise, but it isn't more optimized than fetching the ids and providing them directly as part of the terms query, that is what happens under the hood anyways. |
I wonder if this should be considered a bug, or maybe converted into a doc improvement to document the limitation that I described above. |
@lucabelluccini can I get feedback on the explanation I gave above? |
Pinging @elastic/es-docs (>docs) |
Changes: * Notes that you can't use cross-cluster search to run a terms lookup on a remote index. * Removes a redundant sentence noting `_source` is enabled by default. Closes #61364.
Elasticsearch version (
bin/elasticsearch --version
): 7.6.2, 7.9.0JVM version (
java -version
): bundledDescription of the problem including expected versus actual behavior:
It is not possible to use the terms lookup query using a remote index. A 404 error is returned.
Steps to reproduce:
main
ccs
ccs
cluster to connect to themain
cluster using the steps provided in our documentationmain
cluster (as per example) and test the lookup terms search:elastic
(superuser
) to avoid any security role to setupccs
cluster to themain
cluster (works ok) with a match all querymain
(it fails)The text was updated successfully, but these errors were encountered: