-
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
Support complex datemath expressions in index and index alias names #100646
Conversation
Hi @volodk85, I've created a changelog YAML for you. |
Jenkins run elasticsearch-ci/bwc |
Pinging @elastic/es-search (Team:Search) |
@quux00 could you have a look at this please? |
@@ -160,6 +160,11 @@ private static SearchRequest skipRemoteIndexNames(SearchRequest source) { | |||
} | |||
|
|||
private static boolean isRemoteExpression(String expression) { | |||
return expression.contains(":"); | |||
// remote index name contains ':' symbol inside their names (remote cluster name separator), e.g. cluster0:index-name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is worded slightly incorrectly. I think the better way to say it would be:
An index expression that references a remote cluster uses ":" to separate the cluster-alias from the index portion of the expression, e.g., cluster0:index-name ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than one minor nit about javadoc comment wording, LGTM
Jenkins run elasticsearch-ci/part-3 |
@elasticmachine update branch |
Currently this call trips over if Search/Count/Reindex API is queried with complex date-math index name which contains semicolon
:
inside(human readable index name is:
<datemath-{2001-01-01-13||+1h/h{yyyy-MM-dd-HH|-07:00}}>
and it evaluates to
datemath-2001-01-01-14
){"error":{"root_cause":[{"type":"no_such_remote_cluster_exception","reason":"no such remote cluster: [<datemath-{2001-01-01-13||+1h/h{yyyy-MM-dd-HH|-07]","stack_trace":"org.elasticsearch.transport.NoSuchRemoteClusterException: no such remote cluster: [<datemath-{2001-01-01-13||+1h/h{yyyy-MM-dd-HH|-07]\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.cluster.metadata.ClusterNameExpressionResolver.resolveClusterNames(ClusterNameExpressionResolver.java:41)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.transport.RemoteClusterAware.groupClusterIndices(RemoteClusterAware.java:85)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.transport.RemoteClusterService.groupIndices(RemoteClusterService.java:181)
More info is here #96968 (comment)