-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Add index mode to resolve index response. #132858
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
Merged
seanzatzdev
merged 11 commits into
elastic:main
from
seanzatzdev:feature/resolve-add-index
Aug 18, 2025
Merged
Changes from 7 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
56c67a2
Add index mode to resolve index response.
seanzatzdev dc0a082
Merge branch 'main' into feature/resolve-add-index
seanzatzdev 47a34f8
Update yaml rest test requirements
seanzatzdev 9dc7294
Fix unit test
seanzatzdev b7bcdff
Merge branch 'main' into feature/resolve-add-index
seanzatzdev bd62d59
[CI] Auto commit changes from spotless
7d7510c
Update docs/changelog/132858.yaml
seanzatzdev 4c6afcf
BWC changes and more test cases added
seanzatzdev e599a1a
BWC changes and more test cases added
seanzatzdev fbdf04e
BWC changes and more test cases added
seanzatzdev 1ea083e
Merge branch 'main' into feature/resolve-add-index
seanzatzdev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| pr: 132858 | ||
| summary: Add index mode to resolve index response | ||
| area: Indices APIs | ||
| type: feature | ||
| issues: [] |
74 changes: 74 additions & 0 deletions
74
...estTest/resources/rest-api-spec/test/indices.resolve_index/25_resolve_index_with_mode.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| --- | ||
| setup: | ||
| - do: | ||
| indices.delete: | ||
| index: my-std-index | ||
| ignore_unavailable: true | ||
| - do: | ||
| indices.delete: | ||
| index: my-ts-index | ||
| ignore_unavailable: true | ||
|
|
||
| # Only run this test if the cluster supports time series indexing. | ||
| # If your project uses a different feature flag name, adjust it here. | ||
| --- | ||
| "resolve index returns mode for standard and time_series indices": | ||
| - requires: | ||
| cluster_features: ["gte_v8.5.0"] | ||
| reason: "Requires time series indexing support introduced in v8.5.0" | ||
|
|
||
| # Create a standard index | ||
| - do: | ||
| indices.create: | ||
| index: my-std-index | ||
| body: | ||
| settings: | ||
| number_of_shards: 1 | ||
| number_of_replicas: 0 | ||
|
|
||
| # Create a time-series index | ||
| - do: | ||
| indices.create: | ||
| index: my-ts-index | ||
| body: | ||
| settings: | ||
| index.mode: time_series | ||
| number_of_shards: 1 | ||
| number_of_replicas: 0 | ||
| index.routing_path: ["host"] | ||
| mappings: | ||
| properties: | ||
| "@timestamp": | ||
| type: date | ||
| host: | ||
| type: keyword | ||
| time_series_dimension: true | ||
| metric: | ||
| type: keyword | ||
| value: | ||
| type: double | ||
|
|
||
| # Resolve standard index and verify mode | ||
| - do: | ||
| indices.resolve_index: | ||
| name: my-std-index | ||
| - match: { indices.0.name: "my-std-index" } | ||
| - match: { indices.0.mode: "standard" } | ||
|
|
||
| # Resolve time-series index and verify mode | ||
| - do: | ||
| indices.resolve_index: | ||
| name: my-ts-index | ||
| - match: { indices.0.name: "my-ts-index" } | ||
| - match: { indices.0.mode: "time_series" } | ||
|
|
||
| --- | ||
| teardown: | ||
| - do: | ||
| indices.delete: | ||
| index: my-std-index | ||
| ignore_unavailable: true | ||
| - do: | ||
| indices.delete: | ||
| index: my-ts-index | ||
| ignore_unavailable: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.