Skip to content

Commit e3a7ec9

Browse files
mgodwanshiv0408
authored andcommitted
Mark fuzzy filter GA and remove experimental setting (opensearch-project#12631)
Signed-off-by: mgodwan <mgodwan@amazon.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
1 parent 242266e commit e3a7ec9

File tree

6 files changed

+5
-35
lines changed

6 files changed

+5
-35
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
144144
### Changed
145145
- Allow composite aggregation to run under a parent filter aggregation ([#11499](https://github.com/opensearch-project/OpenSearch/pull/11499))
146146
- Quickly compute terms aggregations when the top-level query is functionally match-all for a segment ([#11643](https://github.com/opensearch-project/OpenSearch/pull/11643))
147+
- Mark fuzzy filter GA and remove experimental setting ([12631](https://github.com/opensearch-project/OpenSearch/pull/12631))
147148

148149
### Deprecated
149150

qa/rolling-upgrade/build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible) {
6262
setting 'repositories.url.allowed_urls', 'http://snapshot.test*'
6363
setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
6464
setting 'http.content_type.required', 'true'
65-
systemProperty 'opensearch.experimental.optimize_doc_id_lookup.fuzzy_set.enabled', 'true'
6665
}
6766
}
6867

server/src/main/java/org/opensearch/common/settings/FeatureFlagSettings.java

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ protected FeatureFlagSettings(
3535
FeatureFlags.TELEMETRY_SETTING,
3636
FeatureFlags.DATETIME_FORMATTER_CACHING_SETTING,
3737
FeatureFlags.WRITEABLE_REMOTE_INDEX_SETTING,
38-
FeatureFlags.DOC_ID_FUZZY_SET_SETTING,
3938
FeatureFlags.REMOTE_STORE_MIGRATION_EXPERIMENTAL_SETTING,
4039
FeatureFlags.PLUGGABLE_CACHE_SETTING
4140
);

server/src/main/java/org/opensearch/common/util/FeatureFlags.java

-7
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ public class FeatureFlags {
5959
*/
6060
public static final String WRITEABLE_REMOTE_INDEX = "opensearch.experimental.feature.writeable_remote_index.enabled";
6161

62-
/**
63-
* Gates the optimization to enable bloom filters for doc id lookup.
64-
*/
65-
public static final String DOC_ID_FUZZY_SET = "opensearch.experimental.optimize_doc_id_lookup.fuzzy_set.enabled";
66-
6762
/**
6863
* Gates the functionality of pluggable cache.
6964
* Enables OpenSearch to use pluggable caches with respective store names via setting.
@@ -133,7 +128,5 @@ public static boolean isEnabled(Setting<Boolean> featureFlag) {
133128
Property.NodeScope
134129
);
135130

136-
public static final Setting<Boolean> DOC_ID_FUZZY_SET_SETTING = Setting.boolSetting(DOC_ID_FUZZY_SET, false, Property.NodeScope);
137-
138131
public static final Setting<Boolean> PLUGGABLE_CACHE_SETTING = Setting.boolSetting(PLUGGABLE_CACHE, false, Property.NodeScope);
139132
}

server/src/main/java/org/opensearch/index/IndexSettings.java

+4-24
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
import java.util.function.UnaryOperator;
6666

6767
import static org.opensearch.Version.V_2_7_0;
68-
import static org.opensearch.common.util.FeatureFlags.DOC_ID_FUZZY_SET_SETTING;
6968
import static org.opensearch.common.util.FeatureFlags.SEARCHABLE_SNAPSHOT_EXTENDED_COMPATIBILITY;
7069
import static org.opensearch.index.codec.fuzzy.FuzzySetParameters.DEFAULT_FALSE_POSITIVE_PROBABILITY;
7170
import static org.opensearch.index.mapper.MapperService.INDEX_MAPPING_DEPTH_LIMIT_SETTING;
@@ -969,11 +968,8 @@ public IndexSettings(final IndexMetadata indexMetadata, final Settings nodeSetti
969968
*/
970969
widenIndexSortType = IndexMetadata.SETTING_INDEX_VERSION_CREATED.get(settings).before(V_2_7_0);
971970

972-
boolean isOptimizeDocIdLookupUsingFuzzySetFeatureEnabled = FeatureFlags.isEnabled(DOC_ID_FUZZY_SET_SETTING);
973-
if (isOptimizeDocIdLookupUsingFuzzySetFeatureEnabled) {
974-
enableFuzzySetForDocId = scopedSettings.get(INDEX_DOC_ID_FUZZY_SET_ENABLED_SETTING);
975-
docIdFuzzySetFalsePositiveProbability = scopedSettings.get(INDEX_DOC_ID_FUZZY_SET_FALSE_POSITIVE_PROBABILITY_SETTING);
976-
}
971+
setEnableFuzzySetForDocId(scopedSettings.get(INDEX_DOC_ID_FUZZY_SET_ENABLED_SETTING));
972+
setDocIdFuzzySetFalsePositiveProbability(scopedSettings.get(INDEX_DOC_ID_FUZZY_SET_FALSE_POSITIVE_PROBABILITY_SETTING));
977973

978974
scopedSettings.addSettingsUpdateConsumer(
979975
TieredMergePolicyProvider.INDEX_COMPOUND_FORMAT_SETTING,
@@ -1873,30 +1869,14 @@ public boolean isEnableFuzzySetForDocId() {
18731869
}
18741870

18751871
public void setEnableFuzzySetForDocId(boolean enableFuzzySetForDocId) {
1876-
verifyFeatureToSetDocIdFuzzySetSetting(enabled -> this.enableFuzzySetForDocId = enabled, enableFuzzySetForDocId);
1872+
this.enableFuzzySetForDocId = enableFuzzySetForDocId;
18771873
}
18781874

18791875
public double getDocIdFuzzySetFalsePositiveProbability() {
18801876
return docIdFuzzySetFalsePositiveProbability;
18811877
}
18821878

18831879
public void setDocIdFuzzySetFalsePositiveProbability(double docIdFuzzySetFalsePositiveProbability) {
1884-
verifyFeatureToSetDocIdFuzzySetSetting(
1885-
fpp -> this.docIdFuzzySetFalsePositiveProbability = fpp,
1886-
docIdFuzzySetFalsePositiveProbability
1887-
);
1888-
}
1889-
1890-
private static <T> void verifyFeatureToSetDocIdFuzzySetSetting(Consumer<T> settingUpdater, T val) {
1891-
if (FeatureFlags.isEnabled(DOC_ID_FUZZY_SET_SETTING)) {
1892-
settingUpdater.accept(val);
1893-
} else {
1894-
throw new IllegalArgumentException(
1895-
"Fuzzy set for optimizing doc id lookup "
1896-
+ "cannot be enabled with feature flag ["
1897-
+ FeatureFlags.DOC_ID_FUZZY_SET
1898-
+ "] set to false"
1899-
);
1900-
}
1880+
this.docIdFuzzySetFalsePositiveProbability = docIdFuzzySetFalsePositiveProbability;
19011881
}
19021882
}

test/framework/src/main/java/org/opensearch/test/OpenSearchIntegTestCase.java

-2
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,6 @@ protected Settings featureFlagSettings() {
669669
// Enabling Telemetry setting by default
670670
featureSettings.put(FeatureFlags.TELEMETRY_SETTING.getKey(), true);
671671

672-
// Enabling fuzzy set for tests by default
673-
featureSettings.put(FeatureFlags.DOC_ID_FUZZY_SET_SETTING.getKey(), true);
674672
return featureSettings.build();
675673
}
676674

0 commit comments

Comments
 (0)