Skip to content

Commit f131e6d

Browse files
dayana-jreta
andauthored
Add gRPC supports for Search foundation; match-all query (#2071)
* feat: add transparent gRPC transport as separate java-client-grpc module Adds a transparent gRPC transport layer that routes bulk operations over gRPC for improved performance while falling back to REST for all other operations. Isolated in a separate java-client-grpc module to prevent classpath conflicts. Includes: - GrpcTransport + HybridTransport (automatic routing and fallback) - Translation layer (BulkRequest/Response <-> protobuf conversion) - TLS support (trust cert, trust store, mTLS, insecure, hostname override) - Basic auth, AWS SigV4, and JWT authentication interceptors - Channel health monitoring via gRPC connectivity state machine - Integration tests (framework-compliant, version-gated to 3.5.0+) - Sample code and CI configuration Signed-off-by: Dayana Jean <jeadayao@amazon.com> * ci: retrigger CI Signed-off-by: Dayana Jean <jeadayao@amazon.com> * Making the FieldMappingUtil package private Co-authored-by: Andriy Redko <drreta@gmail.com> Signed-off-by: Dayana <jeandayana28@gmail.com> * Making this package private Apply suggestion from @reta Co-authored-by: Andriy Redko <drreta@gmail.com> Signed-off-by: Dayana <jeandayana28@gmail.com> * Making BasicAuthInterceptor package private Apply suggestion from @reta Co-authored-by: Andriy Redko <drreta@gmail.com> Signed-off-by: Dayana <jeandayana28@gmail.com> * Remove unused toHttpStatus method and fix test package for package-private classes - Removed GrpcStatusConverter.toHttpStatus() which was unused anywhere in the codebase (per maintainer feedback) - Moved TranslationTest to the translation package so it can access package-private FieldMappingUtil and GrpcStatusConverter.convert() Signed-off-by: Dayana Jean <jeadayao@amazon.com> * refactor: split AWS SigV4 into AwsGrpcTransport per maintainer feedback Follows the same pattern as ApacheHttpClient5Transport (general) vs AwsSdk2Transport (AWS-specific) in the existing codebase. Changes: - Created AwsGrpcTransport: extends GrpcTransport, adds SigV4 signing - AwsGrpcTransport.awsBuilder(host, port).sigV4(...).tls(...).build() - Requires sigV4Config and TLS - Overrides preProcessBulk() for payload hash computation - Removed SigV4 from GrpcTransport: - Removed .sigV4() builder method - Removed sigV4Interceptor field - Added protected preProcessBulk() hook for subclasses - GrpcTransport is now purely general-purpose (basic auth, JWT, TLS) - Updated tests to use AwsGrpcTransport for SigV4 tests Signed-off-by: Dayana Jean <jeadayao@amazon.com> * refactor: remove silent REST fallback from HybridTransport Per maintainer feedback: if the intent is to use gRPC for a supported endpoint, errors should propagate to the user rather than silently falling back to REST. Changes: - HybridTransport no longer catches gRPC errors and retries via REST - Removed fallbackOnError constructor parameter and field - Routing behavior preserved: unsupported endpoints → REST directly - gRPC-supported endpoints: errors propagate to caller - Simplified performRequest/performRequestAsync (no try/catch) - Updated tests: testGrpcErrorPropagatesForSupportedEndpoint Behavior: client.bulk(req) → gRPC (errors propagate if gRPC fails) client.search(req) → REST (not supported by gRPC, routed directly) Signed-off-by: Dayana Jean <jeadayao@amazon.com> * docs: update comments to reflect routing instead of fallback Stale references to 'automatic REST fallback' replaced with accurate 'REST routing for unsupported endpoints' language throughout. - GrpcTransport: updated javadoc and error message - GrpcDemo: rewrote Demo 3 to show REST routing (not fallback on error) - GrpcAwsSigV4: updated to use AwsGrpcTransport.awsBuilder() - GrpcBulkIT: renamed testRestFallback → testRestRouting Signed-off-by: Dayana Jean <jeadayao@amazon.com> * fix: make integration test base classes self-contained Per maintainer feedback: OpenSearchJavaClientTestCase and TestcontainersThreadFilter are internal test classes not exposed for external module use. Changes: - AbstractGrpcIT: now extends nothing, uses standard JUnit 4 + Assume - Removed dependency on OpenSearchJavaClientTestCase - Removed @ThreadLeakFilters(TestcontainersThreadFilter) - Uses Assume.assumeTrue() with manual version parsing - Reads cluster config from system properties directly - GrpcTransportSupport: converted from interface (extending OpenSearchTransportSupport) to utility class - GrpcBulkIT: no longer implements GrpcTransportSupport interface Signed-off-by: Dayana Jean <jeadayao@amazon.com> * fix: lower java-client-grpc baseline from JDK 11 to JDK 8 Per maintainer feedback: opensearch-java baseline is JDK 8 and gRPC-Java supports Java 8. No technical reason to require JDK 11. Changes: - build.gradle.kts: targetCompatibility/sourceCompatibility → 1.8 - GrpcSigV4Test: replaced 'var' (Java 10+) with explicit types Signed-off-by: Dayana Jean <jeadayao@amazon.com> * fix: remove explicit jackson test deps (transitive via java-client) Per maintainer feedback: opensearch-java has a hard dependency on Jackson 3.x, so it comes transitively. No need to declare it again. Signed-off-by: Dayana Jean <jeadayao@amazon.com> * fix: wire up integration tests with java21 source set Per maintainer feedback: integration tests were not being compiled or run. Added the standard java21 source set configuration used by java-client to java-client-grpc. Changes: - Added unitTest/integrationTest task definitions - Added java21 source set (src/test/java11) gated on JDK 21+ - Added test framework, testcontainers, opensearch-testcontainers deps - Added static import for JUnit Assert in GrpcBulkIT - Integration tests now compile and will run with: ./gradlew :java-client-grpc:integrationTest -Dtests.opensearch.version=3.5.0 Signed-off-by: Dayana Jean <jeadayao@amazon.com> * ci: add OpenSearch 3.5.0 to integration test matrix Adds the first gRPC-capable version to the test matrix so the gRPC integration tests run in CI. Includes both Java 21 and Java 25. Signed-off-by: Dayana Jean <jeadayao@amazon.com> * fix: replace wildcard import with explicit imports (spotless) Spotless rejects wildcard imports. Replaced 'import static org.junit.Assert.*' with explicit imports for assertEquals, assertFalse, assertNotNull, assertTrue. Signed-off-by: Dayana Jean <jeadayao@amazon.com> * fix: remove java21 classes from unitTest task The java21 source set only contains integration tests (integTest package). Adding it to unitTest causes 'No tests found' failure since the filter excludes integTest classes. Only integrationTest needs the java21 classes. Signed-off-by: Dayana Jean <jeadayao@amazon.com> * fix: spotless formatting for samples (license header, import order) - GrpcDemo.java: replaced custom header with standard Apache-2.0 license - GrpcAwsSigV4.java: fixed import ordering (AwsGrpcTransport alphabetical) - Removed unused imports Signed-off-by: Dayana Jean <jeadayao@amazon.com> * fix: skip gRPC integration tests when port is unreachable assumeGrpcSupported() now verifies both: 1. Server version is 3.5.0+ (via REST info endpoint) 2. gRPC port is actually reachable (TCP socket check) This prevents test failures when running integrationTest against OpenSearch versions that don't have gRPC enabled or when the gRPC port isn't exposed by testcontainers. Signed-off-by: Dayana Jean <jeadayao@amazon.com> * fix: only enable gRPC in testcontainer for OpenSearch 3.5.0+ GrpcTestContainerRule now checks the tests.opensearch.version property before adding gRPC configuration. Older versions (1.x, 2.x) don't support aux.transport.types and would fail to start. On pre-3.5.0 versions: - Container starts without gRPC config (REST only) - gRPC port not exposed - Tests skip via assumeGrpcSupported() (version check + port check) Signed-off-by: Dayana Jean <jeadayao@amazon.com> * ci: exclude grpc integration tests until OpenSearch 3.5.0 is released OpenSearch 3.5.0 Docker image is not yet published, so the gRPC integration tests cannot run in CI. Changes: - Exclude :java-client-grpc:integrationTest from the main CI run (all matrix versions are pre-3.5.0) - Comment out 3.5.0 entries in test matrix (uncomment when released) The gRPC integration tests can still be run locally against a container started manually or once 3.5.0 is published. Signed-off-by: Dayana Jean <jeadayao@amazon.com> * fix: graceful skip on container failure + re-enable 3.5.0 in CI OpenSearch 3.5.0 Docker image is published. Re-enabled in CI matrix. Changes: - GrpcTestContainerRule.before(): catches ContainerLaunchException and calls Assume.assumeTrue(false) to skip tests gracefully instead of failing the build - Added 5-minute startup timeout for CI environments - Removed duplicate disk watermark env var - Re-enabled 3.5.0 in test-integration.yml matrix - Removed -x :java-client-grpc:integrationTest exclusion On pre-3.5.0 versions: container starts without gRPC, tests skip via assumeGrpcSupported(). On 3.5.0+: if container fails for any reason, tests skip instead of failing the build. Signed-off-by: Dayana Jean <jeadayao@amazon.com> * fix: spotless formatting on GrpcTestContainerRule Signed-off-by: Dayana Jean <jeadayao@amazon.com> * fix: remove grpcStatusToHttpStatus from FieldMappingUtil Per maintainer feedback: method was only used in tests, not in production code. Removed the method and its 7 associated tests. Signed-off-by: Dayana Jean <jeadayao@amazon.com> * fix: skip gRPC tests early with assumeTrue for unsupported versions Per maintainer feedback: use assumeTrue in the class rule to skip tests immediately for older versions, rather than conditionally configuring the container. Changes: - GrpcTestContainerRule.before(): assumeTrue("OpenSearch should support gRPC", supportsGrpc(version)) skips for pre-3.5.0 - createContainer(): always configures gRPC (only reached for 3.5.0+) - Removed conditional gRPC config logic Signed-off-by: Dayana Jean <jeadayao@amazon.com> * fix: make GrpcChannelFactory methods package-private Signed-off-by: Dayana Jean <jeadayao@amazon.com> * fix: apply maintainer suggestions on visibility and naming 1. BasicAuthInterceptor: constructor now package-private 2. GrpcChannelFactory: class now package-private (final class, no public) 3. GrpcTestContainerRule renamed to OpenSearchGrpcTestContainerRule 4. Updated references in AbstractGrpcIT Signed-off-by: Dayana Jean <jeadayao@amazon.com> * feat: implement search over gRPC with match_all query support Adds search-over-gRPC support to the Java client transport, starting with match_all query. Follows the same pattern as Bulk. New files: - SearchRequestConverter: converts SearchRequest → protobuf - match_all query fully implemented - Unsupported query types throw UnsupportedOperationException with message directing to REST or contributing the converter - SearchResponseConverter: converts protobuf SearchResponse → java - Full response: took, timed_out, _shards, hits (total, max_score) - Per-hit: _index, _id, _score, _version, _seq_no, _primary_term - _source deserialization: bytes → JSON → TDocument via JsonpMapper - SearchRequestConverterTest: 7 unit tests - GrpcSearchIT: 3 integration tests (match_all, pagination, empty) Modified files: - GrpcTransport: added SearchServiceBlockingStub, registered SearchRequest._ENDPOINT, added performSearch() handler Query types not yet implemented (server supports them, client converter needs extending): - term, terms, match, match_phrase, bool, range, prefix, wildcard, regexp, fuzzy, exists, ids, nested, geo_distance, knn, hybrid Signed-off-by: Dayana Jean <jeadayao@amazon.com> * Enhanced the endpoint support with request argument as suggested from feedback Signed-off-by: Dayana Jean <jeadayao@amazon.com> --------- Signed-off-by: Dayana Jean <jeadayao@amazon.com> Signed-off-by: Dayana <jeandayana28@gmail.com> Co-authored-by: Andriy Redko <drreta@gmail.com>
1 parent 83652e0 commit f131e6d

8 files changed

Lines changed: 679 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
2323
- Added `equals()` and `hashCode()` implementations to `FieldValue` ([#1998](https://github.com/opensearch-project/opensearch-java/pull/1998))
2424
- Add document lifecycle guide and runnable sample ([#2017](https://github.com/opensearch-project/opensearch-java/pull/2017))
2525
- Add transparent gRPC transport with HybridTransport (bulk over gRPC, REST fallback), translation layer, TLS, basic auth, AWS SigV4, and JWT support ([#2062](https://github.com/opensearch-project/opensearch-java/pull/2062))
26+
- Add search over gRPC with match_all query support, SearchRequestConverter, SearchResponseConverter, and _source deserialization ([#2071](https://github.com/opensearch-project/opensearch-java/pull/2071))
2627

2728
### Fixed
2829
- Fix `unitTest` task not running the tests in the `test` source set ([#2074](https://github.com/opensearch-project/opensearch-java/pull/2074))

java-client-grpc/src/main/java/org/opensearch/client/transport/grpc/GrpcTransport.java

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
import org.opensearch.client.json.JsonpMapper;
1818
import org.opensearch.client.opensearch.core.BulkRequest;
1919
import org.opensearch.client.opensearch.core.BulkResponse;
20+
import org.opensearch.client.opensearch.core.SearchRequest;
21+
import org.opensearch.client.opensearch.core.SearchResponse;
2022
import org.opensearch.client.transport.Endpoint;
2123
import org.opensearch.client.transport.OpenSearchTransport;
2224
import org.opensearch.client.transport.TransportException;
@@ -25,6 +27,7 @@
2527
import org.opensearch.client.transport.grpc.translation.BulkResponseConverter;
2628
import org.opensearch.client.transport.grpc.translation.GrpcStatusConverter;
2729
import org.opensearch.protobufs.services.DocumentServiceGrpc;
30+
import org.opensearch.protobufs.services.SearchServiceGrpc;
2831

2932
/**
3033
* Pure gRPC transport for OpenSearch. Implements {@link OpenSearchTransport} and routes
@@ -52,7 +55,8 @@ public class GrpcTransport implements OpenSearchTransport {
5255
static {
5356
java.util.Set<Endpoint<?, ?, ?>> endpoints = new java.util.HashSet<>();
5457
endpoints.add(BulkRequest._ENDPOINT);
55-
// Future: SearchRequest._ENDPOINT, KnnSearchRequest._ENDPOINT
58+
endpoints.add(SearchRequest._ENDPOINT);
59+
// Future: KnnSearchRequest._ENDPOINT
5660
SUPPORTED_ENDPOINTS = java.util.Collections.unmodifiableSet(endpoints);
5761
}
5862

@@ -63,10 +67,35 @@ public static boolean isEndpointSupported(Endpoint<?, ?, ?> endpoint) {
6367
return SUPPORTED_ENDPOINTS.contains(endpoint);
6468
}
6569

70+
/**
71+
* Returns true if the given endpoint and request can be handled by gRPC transport.
72+
* For endpoints that only partially support gRPC (e.g., search with limited query types),
73+
* this method inspects the request to determine if gRPC can handle it.
74+
*/
75+
public static <RequestT> boolean isEndpointSupported(Endpoint<?, ?, ?> endpoint, RequestT request) {
76+
if (!SUPPORTED_ENDPOINTS.contains(endpoint)) {
77+
return false;
78+
}
79+
// Bulk: all operations supported
80+
if (endpoint == BulkRequest._ENDPOINT) {
81+
return true;
82+
}
83+
// Search: only match_all is currently supported
84+
if (endpoint == SearchRequest._ENDPOINT && request instanceof SearchRequest) {
85+
SearchRequest searchRequest = (SearchRequest) request;
86+
if (searchRequest.query() == null) {
87+
return true; // No query = match_all by default
88+
}
89+
return searchRequest.query().isMatchAll();
90+
}
91+
return true;
92+
}
93+
6694
// ─── Instance Fields ─────────────────────────────────────────────────────────
6795

6896
private final ManagedChannel channel;
6997
private final DocumentServiceGrpc.DocumentServiceBlockingStub documentStub;
98+
private final SearchServiceGrpc.SearchServiceBlockingStub searchStub;
7099
private final JsonpMapper jsonpMapper;
71100
private final GrpcTransportOptions grpcOptions;
72101
private final TransportOptions transportOptions;
@@ -81,6 +110,7 @@ public static boolean isEndpointSupported(Endpoint<?, ?, ?> endpoint) {
81110
) {
82111
this.channel = channel;
83112
this.documentStub = channel != null ? DocumentServiceGrpc.newBlockingStub(channel) : null;
113+
this.searchStub = channel != null ? SearchServiceGrpc.newBlockingStub(channel) : null;
84114
this.jsonpMapper = jsonpMapper;
85115
this.grpcOptions = grpcOptions;
86116
this.transportOptions = transportOptions;
@@ -101,7 +131,7 @@ public <RequestT, ResponseT, ErrorT> ResponseT performRequest(
101131
@Nullable TransportOptions options
102132
) throws IOException {
103133

104-
if (!GrpcTransport.isEndpointSupported(endpoint)) {
134+
if (!GrpcTransport.isEndpointSupported(endpoint, request)) {
105135
throw new UnsupportedOperationException(
106136
"Endpoint not supported by gRPC transport: "
107137
+ endpoint.requestUrl(request)
@@ -113,6 +143,9 @@ public <RequestT, ResponseT, ErrorT> ResponseT performRequest(
113143
if (endpoint == BulkRequest._ENDPOINT) {
114144
return (ResponseT) performBulk((BulkRequest) request);
115145
}
146+
if (endpoint == SearchRequest._ENDPOINT) {
147+
return (ResponseT) performSearch((SearchRequest) request);
148+
}
116149

117150
throw new UnsupportedOperationException("Endpoint registered but no handler: " + endpoint.requestUrl(request));
118151
}
@@ -238,6 +271,31 @@ private BulkResponse performBulk(BulkRequest request) throws TransportException
238271
}
239272
}
240273

274+
@SuppressWarnings("unchecked")
275+
private <TDocument> SearchResponse<TDocument> performSearch(SearchRequest request) throws TransportException {
276+
// Convert client request to protobuf
277+
org.opensearch.protobufs.SearchRequest protoRequest = org.opensearch.client.transport.grpc.translation.SearchRequestConverter
278+
.toProto(request, jsonpMapper);
279+
280+
// Execute gRPC call
281+
try {
282+
org.opensearch.protobufs.SearchResponse protoResponse = searchStub.search(protoRequest);
283+
284+
// Convert response — use Object.class as default; the actual deserialization
285+
// is handled by the endpoint's response deserializer in the transport layer
286+
return (SearchResponse<TDocument>) org.opensearch.client.transport.grpc.translation.SearchResponseConverter.fromProto(
287+
protoResponse,
288+
jsonpMapper,
289+
(Class<TDocument>) Object.class
290+
);
291+
} catch (StatusRuntimeException e) {
292+
throw new TransportException(
293+
"gRPC search request failed: " + e.getStatus().getDescription(),
294+
new org.opensearch.client.transport.TransportException(e.getMessage(), e)
295+
);
296+
}
297+
}
298+
241299
// ─── Builder ─────────────────────────────────────────────────────────────────
242300

243301
/**

java-client-grpc/src/main/java/org/opensearch/client/transport/grpc/HybridTransport.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public <RequestT, ResponseT, ErrorT> ResponseT performRequest(
5858
@Nullable TransportOptions options
5959
) throws IOException {
6060

61-
// Route unsupported endpoints directly to REST
62-
if (!GrpcTransport.isEndpointSupported(endpoint)) {
61+
// Route unsupported endpoints/requests directly to REST
62+
if (!GrpcTransport.isEndpointSupported(endpoint, request)) {
6363
return restTransport.performRequest(request, endpoint, options);
6464
}
6565

@@ -73,8 +73,8 @@ public <RequestT, ResponseT, ErrorT> CompletableFuture<ResponseT> performRequest
7373
Endpoint<RequestT, ResponseT, ErrorT> endpoint,
7474
@Nullable TransportOptions options
7575
) {
76-
// Route unsupported endpoints directly to REST
77-
if (!GrpcTransport.isEndpointSupported(endpoint)) {
76+
// Route unsupported endpoints/requests directly to REST
77+
if (!GrpcTransport.isEndpointSupported(endpoint, request)) {
7878
return restTransport.performRequestAsync(request, endpoint, options);
7979
}
8080

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The OpenSearch Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*/
8+
9+
package org.opensearch.client.transport.grpc.translation;
10+
11+
import org.opensearch.client.json.JsonpMapper;
12+
import org.opensearch.client.opensearch._types.query_dsl.MatchAllQuery;
13+
import org.opensearch.client.opensearch._types.query_dsl.Query;
14+
import org.opensearch.client.opensearch.core.SearchRequest;
15+
16+
/**
17+
* Converts opensearch-java SearchRequest to protobuf SearchRequest.
18+
*
19+
* Currently supported query types:
20+
* - match_all — matches all documents
21+
*
22+
* Query types not yet implemented (these can be executed over gRPC once
23+
* the converter is extended — the server already supports them):
24+
* - term, terms, terms_set
25+
* - match, match_phrase, match_phrase_prefix, match_bool_prefix, multi_match
26+
* - bool, constant_score, function_score
27+
* - range, prefix, wildcard, regexp, fuzzy, exists, ids
28+
* - nested, geo_distance, geo_bounding_box
29+
* - knn, hybrid, script
30+
*
31+
* To add a new query type, implement a convertXxx() method and add a case
32+
* to convertQuery(Query).
33+
*/
34+
public class SearchRequestConverter {
35+
36+
/**
37+
* Convert an opensearch-java SearchRequest to a protobuf SearchRequest.
38+
*
39+
* @param request the client SearchRequest
40+
* @param jsonpMapper the JSON mapper (for future use with script queries)
41+
* @return the protobuf SearchRequest
42+
*/
43+
public static org.opensearch.protobufs.SearchRequest toProto(SearchRequest request, JsonpMapper jsonpMapper) {
44+
org.opensearch.protobufs.SearchRequest.Builder protoBuilder = org.opensearch.protobufs.SearchRequest.newBuilder();
45+
46+
// Set index(es)
47+
if (request.index() != null && !request.index().isEmpty()) {
48+
protoBuilder.addAllIndex(request.index());
49+
}
50+
51+
// Build SearchRequestBody
52+
org.opensearch.protobufs.SearchRequestBody.Builder bodyBuilder = org.opensearch.protobufs.SearchRequestBody.newBuilder();
53+
54+
// Set size
55+
if (request.size() != null) {
56+
bodyBuilder.setSize(request.size());
57+
}
58+
59+
// Set from (pagination offset)
60+
if (request.from() != null) {
61+
bodyBuilder.setFrom(request.from());
62+
}
63+
64+
// Convert query
65+
if (request.query() != null) {
66+
bodyBuilder.setQuery(convertQuery(request.query()));
67+
}
68+
69+
protoBuilder.setSearchRequestBody(bodyBuilder.build());
70+
return protoBuilder.build();
71+
}
72+
73+
/**
74+
* Convert an opensearch-java Query to a protobuf QueryContainer.
75+
*
76+
* @throws UnsupportedOperationException if the query type is not yet supported
77+
*/
78+
private static org.opensearch.protobufs.QueryContainer convertQuery(Query query) {
79+
org.opensearch.protobufs.QueryContainer.Builder containerBuilder = org.opensearch.protobufs.QueryContainer.newBuilder();
80+
81+
if (query.isMatchAll()) {
82+
containerBuilder.setMatchAll(convertMatchAll(query.matchAll()));
83+
} else {
84+
throw new UnsupportedOperationException(
85+
"Query type '"
86+
+ query._kind()
87+
+ "' is not yet supported for gRPC transport in this version. "
88+
+ "Use REST transport for this query type."
89+
);
90+
}
91+
92+
return containerBuilder.build();
93+
}
94+
95+
/**
96+
* Convert MatchAllQuery to protobuf.
97+
* MatchAllQuery has only optional boost and _name fields.
98+
*/
99+
private static org.opensearch.protobufs.MatchAllQuery convertMatchAll(MatchAllQuery matchAll) {
100+
org.opensearch.protobufs.MatchAllQuery.Builder builder = org.opensearch.protobufs.MatchAllQuery.newBuilder();
101+
102+
if (matchAll.boost() != null) {
103+
builder.setBoost(matchAll.boost().floatValue());
104+
}
105+
106+
return builder.build();
107+
}
108+
}

0 commit comments

Comments
 (0)