-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Set default index mode for TimeSeries to null
#98808
Conversation
When a query of a filter gets rewritten to MatchNoDocsQuery, segments will not produce any results. We can therefore skip processing such segments. This applies to FilterByFilterAggregator and FiltersAggregator, as well as to TermsAggregator when it uses StringTermsAggregatorFromFilters internally; the latter is an adapter aggregator to FilterByFilterAggregator. Fixes elastic#94637
This reverts commit 56abb86.
This reverts commit e370194.
Hi @kkrik-es, I've created a changelog YAML for you. |
@elasticsearchmachine run elasticsearch-ci/full-bwc |
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 forgot to say this in the previous PR, but maybe we should add a rest test (that checks that source mode is included in template simulate api)?
Otherwise LGTM.
server/src/main/java/org/elasticsearch/index/mapper/SourceFieldMapper.java
Outdated
Show resolved
Hide resolved
Good call, added the test. |
* Skip segment for MatchNoDocsQuery filters. When a query of a filter gets rewritten to MatchNoDocsQuery, segments will not produce any results. We can therefore skip processing such segments. This applies to FilterByFilterAggregator and FiltersAggregator, as well as to TermsAggregator when it uses StringTermsAggregatorFromFilters internally; the latter is an adapter aggregator to FilterByFilterAggregator. Fixes elastic#94637 * Update docs/changelog/98295.yaml * Check all filters for `MatchNoDocsQuery`. * Skip optimization when 'other' bucket is requested. * Revert "Set default index mode for TimeSeries to `null` (elastic#98586)" This reverts commit 56abb86. * Revert "Rollback of elastic#98586 (elastic#98805)" This reverts commit e370194. * Skip updating source when missing synthetic mode * Update docs/changelog/98808.yaml * Skip matching assert in MapperService too * Refine the assert * Extend versions before 8.6, when TS had no synthetic source * Add source field mapping for non-synthetic TSDB * Delete 98586.yaml Duplicate changelog * Add comment to TSDB_NO_SYNTHETIC mapping * Spotless fix * Add yaml test * Fix version skip in yaml test
💚 Backport successful
|
* Skip segment for MatchNoDocsQuery filters. When a query of a filter gets rewritten to MatchNoDocsQuery, segments will not produce any results. We can therefore skip processing such segments. This applies to FilterByFilterAggregator and FiltersAggregator, as well as to TermsAggregator when it uses StringTermsAggregatorFromFilters internally; the latter is an adapter aggregator to FilterByFilterAggregator. Fixes #94637 * Update docs/changelog/98295.yaml * Check all filters for `MatchNoDocsQuery`. * Skip optimization when 'other' bucket is requested. * Revert "Set default index mode for TimeSeries to `null` (#98586)" This reverts commit 56abb86. * Revert "Rollback of #98586 (#98805)" This reverts commit e370194. * Skip updating source when missing synthetic mode * Update docs/changelog/98808.yaml * Skip matching assert in MapperService too * Refine the assert * Extend versions before 8.6, when TS had no synthetic source * Add source field mapping for non-synthetic TSDB * Delete 98586.yaml Duplicate changelog * Add comment to TSDB_NO_SYNTHETIC mapping * Spotless fix * Add yaml test * Fix version skip in yaml test
* Skip segment for MatchNoDocsQuery filters. When a query of a filter gets rewritten to MatchNoDocsQuery, segments will not produce any results. We can therefore skip processing such segments. This applies to FilterByFilterAggregator and FiltersAggregator, as well as to TermsAggregator when it uses StringTermsAggregatorFromFilters internally; the latter is an adapter aggregator to FilterByFilterAggregator. Fixes elastic#94637 * Update docs/changelog/98295.yaml * Check all filters for `MatchNoDocsQuery`. * Skip optimization when 'other' bucket is requested. * Revert "Set default index mode for TimeSeries to `null` (elastic#98586)" This reverts commit 56abb86. * Revert "Rollback of elastic#98586 (elastic#98805)" This reverts commit e370194. * Skip updating source when missing synthetic mode * Update docs/changelog/98808.yaml * Skip matching assert in MapperService too * Refine the assert * Extend versions before 8.6, when TS had no synthetic source * Add source field mapping for non-synthetic TSDB * Delete 98586.yaml Duplicate changelog * Add comment to TSDB_NO_SYNTHETIC mapping * Spotless fix * Add yaml test * Fix version skip in yaml test
Yet another test affected by the fix for showing the synthetic source, elastic#98808. This can trigger an assert in older versions as the mapping they produce (without synthetic source) doesn't match the one they may get from the master, if the latter is in version 8.10+. Fixes elastic#101121
If the default index mode matches the specified, we skip printing the synthetic source info in mappings. This leads to confusion as it's not immediately visible (or well known) that time series indices use synthetic source by default.
Leaving the default index mode to null does the trick here. We do pass the right value for time series indexes while building the mapping so there's no other functional impact.
This was attempted in #98586, got rolled back because it broke bwc #98803. Rolling fwd with a fix for this.
Fixes #97429