-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Add mode filter to _resolve/index #133616
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
Conversation
|
Hi @smalyshev, I've created a changelog YAML for you. |
|
Pinging @elastic/es-search-foundations (Team:Search Foundations) |
|
Pinging @elastic/es-data-management (Team:Data Management) |
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.
Nice work. Requested a few clarifications.
| }, | ||
| "mode": { | ||
| "type": "string", | ||
| "description": "Filter indices by index mode" |
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.
Is there a way to specify that the default is "all modes"? If not, are there any other (non-automated) docs where we can document this? I haven't grokked the new docs model for 9x.
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.
I'm not sure if there's a way to express this in this JSON. There's another spec in elasticsearch-specification repo which I'll update, I think that one is in Typescript and has more expressive power.
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.
You can indeed specify a default. Here's an example:
| "default": "5d" |
That said, I'm working on generating rest-api-spec from https://github.com/elastic/elasticsearch-specification and ultimately moving it into the Elasticsearch repo, so that's the important part. And there, defaults are specified with the @server_default annotation.
server/src/main/java/org/elasticsearch/action/admin/indices/resolve/ResolveIndexAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/admin/indices/resolve/ResolveIndexAction.java
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/action/admin/indices/resolve/ResolveIndexTests.java
Show resolved
Hide resolved
| index: my-ts-index | ||
| body: | ||
| settings: | ||
| index.mode: time_series |
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.
It looks like we support a comma-delimited list, right? It would be good to exercise that somewhere in the yaml rest test.
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.
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.
Or you mean an index with double mode when created? I have no idea what would happen then tbh...
* Document new index mode filter for _resolve/index See: elastic/elasticsearch#133616
Add mode filter capability to
_resolve/indexAPI:This will fetch all lookup indices (and only lookup indices).
The option accepts comma-separated list:
lookup, standard. The values must be one of the valid index modes.This would be helpful e.g. for Kibana when it may want to retrieve the list of lookup indices on multiple clusters for code completion.