diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c22630635..57e5f1d4a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,9 +17,10 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Changed ### Deprecated -- Deprecated "_toQuery()" in Query and QueryVariant ([#760](https://github.com/opensearch-project/opensearch-java/pull/760) +- Deprecated "_toQuery()" in Query and QueryVariant ([#760](https://github.com/opensearch-project/opensearch-java/pull/760)) ### Removed +- Removed unsupported `prefix` field from CompletionSuggester ([#812](https://github.com/opensearch-project/opensearch-java/pull/812)) ### Fixed - Fix partial success results for msearch_template ([#709](https://github.com/opensearch-project/opensearch-java/pull/709)) diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/CompletionSuggester.java b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/CompletionSuggester.java index 42a7ba1280..8bba13b7f9 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/core/search/CompletionSuggester.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/core/search/CompletionSuggester.java @@ -54,9 +54,6 @@ public class CompletionSuggester extends SuggesterBase implements FieldSuggester @Nullable private final SuggestFuzziness fuzzy; - @Nullable - private final String prefix; - @Nullable private final String regex; @@ -70,7 +67,6 @@ private CompletionSuggester(Builder builder) { this.contexts = ApiTypeHelper.unmodifiable(builder.contexts); this.fuzzy = builder.fuzzy; - this.prefix = builder.prefix; this.regex = builder.regex; this.skipDuplicates = builder.skipDuplicates; @@ -103,14 +99,6 @@ public final SuggestFuzziness fuzzy() { return this.fuzzy; } - /** - * API name: {@code prefix} - */ - @Nullable - public final String prefix() { - return this.prefix; - } - /** * API name: {@code regex} */ @@ -152,11 +140,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("fuzzy"); this.fuzzy.serialize(generator, mapper); - } - if (this.prefix != null) { - generator.writeKey("prefix"); - generator.write(this.prefix); - } if (this.regex != null) { generator.writeKey("regex"); @@ -184,9 +167,6 @@ public static class Builder extends SuggesterBase.AbstractBuilder imple @Nullable private SuggestFuzziness fuzzy; - @Nullable - private String prefix; - @Nullable private String regex; @@ -228,14 +208,6 @@ public final Builder fuzzy(Function