Skip to content

Select time-series indices with TS command #126436

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
merged 1 commit into from
Apr 8, 2025

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented Apr 8, 2025

With this change, the TS command will target only time_series indexes.

@dnhatn dnhatn force-pushed the time-series-mode branch from 15cde6c to f5d8038 Compare April 8, 2025 04:05
@dnhatn dnhatn requested review from kkrik-es and martijnvg April 8, 2025 05:24
@dnhatn dnhatn marked this pull request as ready for review April 8, 2025 05:24
@elasticsearchmachine elasticsearchmachine added Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) Team:StorageEngine labels Apr 8, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

LGTM 👍

// TODO: Maybe if no indices are returned, retry without index mode and provide a clearer error message.
var indexModeFilter = new TermQueryBuilder(IndexModeFieldMapper.NAME, IndexMode.TIME_SERIES.getName());
if (requestFilter != null) {
requestFilter = new BoolQueryBuilder().filter(requestFilter).filter(indexModeFilter);
Copy link
Contributor

Choose a reason for hiding this comment

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

How fast is this? Do we need to worry about performance?

Copy link
Member Author

Choose a reason for hiding this comment

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

There is an overhead with field-caps when using indexFilter, as we have to dispatch sub-requests for every copy instead of one copy per index without the filter. However, this overhead should be small, and we plan to work on minimizing the overhead for index filters that can be rewritten on the coordinators.

Copy link
Contributor

@kkrik-es kkrik-es left a comment

Choose a reason for hiding this comment

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

Just a minor question, looks good otherwise.

@dnhatn
Copy link
Member Author

dnhatn commented Apr 8, 2025

@martijnvg @kkrik-es Thanks!

@dnhatn dnhatn merged commit c1a3065 into elastic:main Apr 8, 2025
17 checks passed
@dnhatn dnhatn deleted the time-series-mode branch April 8, 2025 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL >non-issue :StorageEngine/TSDB You know, for Metrics Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) Team:StorageEngine v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants