File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
modules/transport-grpc/spi/src/main/java/org/opensearch/transport/grpc/spi Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 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+ /**
10+ * Service Provider Interface (SPI) for extending gRPC transport query conversion capabilities.
11+ * <p>
12+ * This package provides the core interfaces and registry for implementing custom query converters
13+ * that can transform protobuf query messages into OpenSearch QueryBuilder objects. External plugins
14+ * can implement the {@link org.opensearch.transport.grpc.spi.QueryBuilderProtoConverter} interface
15+ * to add support for custom query types in gRPC requests.
16+ * </p>
17+ * <p>
18+ * The SPI mechanism leverages OpenSearch's {@code ExtensiblePlugin} framework, which internally
19+ * uses Java's {@code ServiceLoader} for discovery. Plugins must:
20+ * </p>
21+ * <ul>
22+ * <li>Implement {@link org.opensearch.transport.grpc.spi.QueryBuilderProtoConverter}</li>
23+ * <li>Return the converter instance from their plugin's {@code createComponents()} method</li>
24+ * <li>Create a {@code META-INF/services} file listing their converter implementation</li>
25+ * <li>Declare {@code transport-grpc} in their plugin descriptor's {@code extended.plugins} list</li>
26+ * </ul>
27+ * <p>
28+ * For converters that need to handle nested queries (e.g., filter clauses), the registry injection
29+ * pattern allows access to built-in converters for standard query types like MatchAll, Term, and Terms.
30+ * </p>
31+ *
32+ * @since 3.2.0
33+ */
34+ package org .opensearch .transport .grpc .spi ;
You can’t perform that action at this time.
0 commit comments