-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Implement hidden indices #50452
Implement hidden indices #50452
Conversation
Pinging @elastic/es-core-infra (:Core/Infra/Core) |
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.
Looks good overall, not much to comment on aside from stuff already on the to-do list.
server/src/main/java/org/elasticsearch/action/support/IndicesOptions.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/metadata/IndexNameExpressionResolver.java
Outdated
Show resolved
Hide resolved
This commit updates the BWC version we use in wire serialization for the hidden indices to V_7_7_0 after the backport of the feature to the 7.x branch. Relates #50452
This change introduces a new feature for indices so that they can be hidden from wildcard expansion. The feature is referred to as hidden indices. An index can be marked hidden through the use of an index setting, `index.hidden`, at creation time. One primary use case for this feature is to have a construct that fits indices that are created by the stack that contain data used for display to the user and/or intended for querying by the user. The desire to keep them hidden is to avoid confusing users when searching all of the data they have indexed and getting results returned from indices created by the system. Hidden indices have the following properties: * API calls for all indices (empty indices array, _all, or *) will not return hidden indices by default. * Wildcard expansion will not return hidden indices by default unless the wildcard pattern begins with a `.`. This behavior is similar to shell expansion of wildcards. * REST API calls can enable the expansion of wildcards to hidden indices with the `expand_wildcards` parameter. To expand wildcards to hidden indices, use the value `hidden` in conjunction with `open` and/or `closed`. * Creation of a hidden index will ignore global index templates. A global index template is one with a match-all pattern. * Index templates can make an index hidden, with the exception of a global index template. * Accessing a hidden index directly requires no additional parameters. Relates elastic#50251
This commit updates the BWC version we use in wire serialization for the hidden indices to V_7_7_0 after the backport of the feature to the 7.x branch. Relates elastic#50452
@jaymode This makes sense when it comes to searching user data, but how about monitoring data like index stats? Specifically, does it make sense for the ref: #56949 and elastic/beats#18639 |
Also somewhat related to my previous comment, |
@ycombinator thanks for the input here. I went back and looked at the original design which only stated that hidden indices would be hidden during wildcard resolution for search; they should not be hidden in non data APIs. I'm going to discuss this with a few others to ensure we still want this behavior.
Not every cat API supports the wildcard expansion parameters and I think that should be a separate issue. |
@jaymode Any updates on this discussion? Should
++ will move this to a separate issue. |
@ycombinator we discussed this today in the system indices sync and did not come away with a clear conclusion to make any changes. The consensus was that wildcard resolution differences between APIs could be confusing. A stats call returning hidden indices while a search call doesn't feels wrong. That said we did say we could like at maybe changing classes of APIs and how they behave but we need a strong argument. |
Thanks for discussing this @jaymode. Acknowledged that the |
This change introduces a new feature for indices so that they can be
hidden from wildcard expansion. The feature is referred to as hidden
indices. An index can be marked hidden through the use of an index
setting,
index.hidden
, at creation time. One primary use case forthis feature is to have a construct that fits indices that are created
by the stack that contain data used for display to the user and/or
intended for querying by the user. The desire to keep them hidden is
to avoid confusing users when searching all of the data they have
indexed and getting results returned from indices created by the
system.
Hidden indices have the following properties:
return hidden indices by default.
the wildcard pattern begins with a
.
. This behavior is similar toshell expansion of wildcards.
indices with the
expand_wildcards
parameter. To expand wildcardsto hidden indices, use the value
hidden
in conjunction withopen
and/or
closed
.global index template is one with a match-all pattern.
global index template.
This PR is a draft/wip of the hidden indices feature described in #50251. There is still a good amount of work left to do (below), but opening this is primarily to provide the opportunity for early feedback.To Do:
IndicesAndAliasesResolver