-
Couldn't load subscription status.
- Fork 2.3k
Revert "Enable skip_list for @timestamp field or index sort field #19661
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,7 +58,6 @@ | |
| import org.opensearch.common.util.FeatureFlags; | ||
| import org.opensearch.common.util.LocaleUtils; | ||
| import org.opensearch.common.xcontent.support.XContentMapValues; | ||
| import org.opensearch.index.IndexSortConfig; | ||
| import org.opensearch.index.compositeindex.datacube.DimensionType; | ||
| import org.opensearch.index.fielddata.IndexFieldData; | ||
| import org.opensearch.index.fielddata.IndexNumericFieldData.NumericType; | ||
|
|
@@ -754,7 +753,6 @@ public DocValueFormat docValueFormat(@Nullable String format, ZoneId timeZone) { | |
| private final boolean indexed; | ||
| private final boolean hasDocValues; | ||
| private final boolean skiplist; | ||
| private final boolean isSkiplistConfigured; | ||
| private final Locale locale; | ||
| private final String format; | ||
| private final String printFormat; | ||
|
|
@@ -780,7 +778,6 @@ private DateFieldMapper( | |
| this.indexed = builder.index.getValue(); | ||
| this.hasDocValues = builder.docValues.getValue(); | ||
| this.skiplist = builder.skiplist.getValue(); | ||
| this.isSkiplistConfigured = builder.skiplist.isConfigured(); | ||
| this.locale = builder.locale.getValue(); | ||
| this.format = builder.format.getValue(); | ||
| this.printFormat = builder.printFormat.getValue(); | ||
|
|
@@ -838,7 +835,7 @@ protected void parseCreateField(ParseContext context) throws IOException { | |
| context.doc().add(new LongPoint(fieldType().name(), timestamp)); | ||
| } | ||
| if (hasDocValues) { | ||
| if (skiplist || isSkiplistDefaultEnabled(context.indexSettings().getIndexSortConfig(), fieldType().name())) { | ||
| if (skiplist) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will this result in same error if someone enables skiplist setting on a cluster having indices created with <= 2.19 version? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am wondering if we can leverage the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, skip_list mapping is on creation only, so OS will reject the request to update the mapping. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I was repling to your 1st question.
That should work for upgrade case. Let me confirm it manually, that'll be easy, then I can come up with bwc test case. |
||
| context.doc().add(SortedNumericDocValuesField.indexedField(fieldType().name(), timestamp)); | ||
| } else { | ||
| context.doc().add(new SortedNumericDocValuesField(fieldType().name(), timestamp)); | ||
|
|
@@ -851,19 +848,6 @@ protected void parseCreateField(ParseContext context) throws IOException { | |
| } | ||
| } | ||
|
|
||
| boolean isSkiplistDefaultEnabled(IndexSortConfig indexSortConfig, String fieldName) { | ||
| if (!isSkiplistConfigured) { | ||
| if (indexSortConfig.hasPrimarySortOnField(fieldName)) { | ||
| return true; | ||
| } | ||
| if (DataStreamFieldMapper.Defaults.TIMESTAMP_FIELD.getName().equals(fieldName)) { | ||
| return true; | ||
| } | ||
|
|
||
| } | ||
| return false; | ||
| } | ||
|
|
||
| @Override | ||
| protected String getFieldValue(ParseContext context) throws IOException { | ||
| if (context.externalValueSet()) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.