Skip to content

Conversation

@smalyshev
Copy link
Contributor

@smalyshev smalyshev commented Aug 27, 2025

Add mode filter capability to _resolve/index API:

GET _resolve/index/*,*:*?expand_wildcards=open&mode=lookup

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.

@elasticsearchmachine
Copy link
Collaborator

Hi @smalyshev, I've created a changelog YAML for you.

@smalyshev smalyshev added the :Data Management/Indices APIs APIs to create and manage indices and templates label Aug 27, 2025
@smalyshev smalyshev marked this pull request as ready for review August 27, 2025 23:31
@elasticsearchmachine elasticsearchmachine added Team:Data Management Meta label for data/management team Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch labels Aug 27, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-foundations (Team:Search Foundations)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

Copy link
Contributor

@quux00 quux00 left a 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"
Copy link
Contributor

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.

Copy link
Contributor Author

@smalyshev smalyshev Aug 28, 2025

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.

Copy link
Member

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:

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.

@smalyshev smalyshev requested a review from quux00 September 2, 2025 21:58
index: my-ts-index
body:
settings:
index.mode: time_series
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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...

@smalyshev smalyshev enabled auto-merge (squash) September 3, 2025 01:02
@smalyshev smalyshev merged commit 6e82ade into elastic:main Sep 3, 2025
33 checks passed
@smalyshev smalyshev deleted the resolve-index-mode-filter branch September 3, 2025 04:51
smalyshev added a commit to elastic/elasticsearch-specification that referenced this pull request Sep 3, 2025
smalyshev added a commit to elastic/elasticsearch-specification that referenced this pull request Sep 3, 2025
* Document new index mode filter for _resolve/index

See: elastic/elasticsearch#133616
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/Indices APIs APIs to create and manage indices and templates >enhancement :Search Foundations/CCS Team:Data Management Meta label for data/management team Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants