Skip to content

Commit d1d73c1

Browse files
authored
Mark fuzzy filter GA and remove experimental setting (#12631) (#12750)
Signed-off-by: mgodwan <mgodwan@amazon.com>
1 parent a6e49ef commit d1d73c1

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
@@ -55,6 +55,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5555
### Changed
5656
- Allow composite aggregation to run under a parent filter aggregation ([#11499](https://github.com/opensearch-project/OpenSearch/pull/11499))
5757
- 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))
58+
- Mark fuzzy filter GA and remove experimental setting ([12631](https://github.com/opensearch-project/OpenSearch/pull/12631))
5859

5960
### Deprecated
6061

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.PLUGGABLE_CACHE_SETTING,
4039
FeatureFlags.REMOTE_STORE_MIGRATION_EXPERIMENTAL_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
@@ -66,7 +66,6 @@
6666
import java.util.function.UnaryOperator;
6767

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

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

977973
scopedSettings.addSettingsUpdateConsumer(
978974
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
@@ -676,8 +676,6 @@ protected Settings featureFlagSettings() {
676676
// Enabling Telemetry setting by default
677677
featureSettings.put(FeatureFlags.TELEMETRY_SETTING.getKey(), true);
678678

679-
// Enabling fuzzy set for tests by default
680-
featureSettings.put(FeatureFlags.DOC_ID_FUZZY_SET_SETTING.getKey(), true);
681679
return featureSettings.build();
682680
}
683681

0 commit comments

Comments
 (0)