diff --git a/server/src/main/java/org/opensearch/transport/protobuf/FetchSearchResultProtobuf.java b/server/src/main/java/org/opensearch/transport/protobuf/FetchSearchResultProtobuf.java index 723322b3102ef..f5533a5dceac7 100644 --- a/server/src/main/java/org/opensearch/transport/protobuf/FetchSearchResultProtobuf.java +++ b/server/src/main/java/org/opensearch/transport/protobuf/FetchSearchResultProtobuf.java @@ -16,7 +16,7 @@ import java.io.IOException; /** - * FetchSearchResult child which implements serde operations as protobuf. + * FetchSearchResult which leverages protobuf for transport layer serialization. * @opensearch.internal */ public class FetchSearchResultProtobuf extends FetchSearchResult { diff --git a/server/src/main/java/org/opensearch/transport/protobuf/ProtoSerDeHelpers.java b/server/src/main/java/org/opensearch/transport/protobuf/ProtoSerDeHelpers.java index 147804a2be738..b5c7088fa9374 100644 --- a/server/src/main/java/org/opensearch/transport/protobuf/ProtoSerDeHelpers.java +++ b/server/src/main/java/org/opensearch/transport/protobuf/ProtoSerDeHelpers.java @@ -237,6 +237,7 @@ public static Object missingValueFromProto(MissingValueProto proto) { case INT_VAL: if (proto.getIntVal() == 1) { return SortField.STRING_FIRST; } if (proto.getIntVal() == 2) { return SortField.STRING_LAST; } + throw new TransportSerializationException("Unexpected sortField missingValue (INT_VAL): " + proto.getIntVal()); case OBJ_VAL: return genericObjectFromProto(proto.getObjVal()); default: diff --git a/server/src/main/java/org/opensearch/transport/protobuf/SearchHitProtobuf.java b/server/src/main/java/org/opensearch/transport/protobuf/SearchHitProtobuf.java index b3fa973a17e47..d77b450331d28 100644 --- a/server/src/main/java/org/opensearch/transport/protobuf/SearchHitProtobuf.java +++ b/server/src/main/java/org/opensearch/transport/protobuf/SearchHitProtobuf.java @@ -35,7 +35,7 @@ import static org.opensearch.transport.protobuf.ProtoSerDeHelpers.searchShardTargetToProto; /** - * Serialization/Deserialization implementations for SearchHit. + * SearchHit which leverages protobuf for transport layer serialization. * @opensearch.internal */ public class SearchHitProtobuf extends SearchHit { diff --git a/server/src/main/java/org/opensearch/transport/protobuf/SearchHitsProtobuf.java b/server/src/main/java/org/opensearch/transport/protobuf/SearchHitsProtobuf.java index ef5f7a4997de8..499c8799fa184 100644 --- a/server/src/main/java/org/opensearch/transport/protobuf/SearchHitsProtobuf.java +++ b/server/src/main/java/org/opensearch/transport/protobuf/SearchHitsProtobuf.java @@ -29,7 +29,7 @@ import static org.opensearch.transport.protobuf.SearchHitProtobuf.sortValueToProto; /** - * SearchHits child which implements serde operations as protobuf. + * SearchHits which leverages protobuf for transport layer serialization. * @opensearch.internal */ public class SearchHitsProtobuf extends SearchHits {