diff --git a/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsResponse.java b/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsResponse.java index f0d097aafafb5..599c2fa883dc7 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsResponse.java +++ b/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsResponse.java @@ -65,10 +65,7 @@ public Failure(StreamInput in) throws IOException { index = in.readString(); if (in.getVersion().before(Version.V_2_0_0)) { // ignore removed type from pre-2.0.0 versions - String type = in.readOptionalString(); - if (type != null) { - throw new IllegalStateException("types are no longer supported but found [" + type + "]"); - } + in.readOptionalString(); } id = in.readString(); cause = in.readException(); diff --git a/server/src/main/java/org/opensearch/index/query/MoreLikeThisQueryBuilder.java b/server/src/main/java/org/opensearch/index/query/MoreLikeThisQueryBuilder.java index 0d2260bc8b38a..1ecc88387e549 100644 --- a/server/src/main/java/org/opensearch/index/query/MoreLikeThisQueryBuilder.java +++ b/server/src/main/java/org/opensearch/index/query/MoreLikeThisQueryBuilder.java @@ -226,10 +226,7 @@ public Item(@Nullable String index, XContentBuilder doc) { index = in.readOptionalString(); if (in.getVersion().before(Version.V_2_0_0)) { // types no longer supported so ignore - String type = in.readOptionalString(); - if (type != null) { - throw new IllegalStateException("types are no longer supported but found [" + type + "]"); - } + in.readOptionalString(); } if (in.readBoolean()) { doc = (BytesReference) in.readGenericValue();