Record Class CreateIndexRequestWithBM25Similarity
java.lang.Object
java.lang.Record
com.atlassian.confluence.plugins.opensearch.client.CreateIndexRequestWithBM25Similarity
- All Implemented Interfaces:
org.opensearch.client.json.JsonpSerializable
public record CreateIndexRequestWithBM25Similarity(org.opensearch.client.opensearch.indices.CreateIndexRequest delegate, CreateIndexRequestWithBM25Similarity.Bm25Settings bm25Settings)
extends Record
implements org.opensearch.client.json.JsonpSerializable
Decorates
CreateIndexRequest
with BM25 default similarity settings.
It patches the JSON payload, because OpenSearch-java client does not currently support similarity settings.
Feature request: https://github.com/opensearch-project/opensearch-java/issues/987
Open PR: https://github.com/opensearch-project/opensearch-java/pull/989/files#- Since:
- 9.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
BM25 similarity parameters -
Field Summary
Modifier and TypeFieldDescriptionstatic final org.opensearch.client.transport.Endpoint<CreateIndexRequestWithBM25Similarity,
org.opensearch.client.opensearch.indices.CreateIndexResponse, org.opensearch.client.opensearch._types.ErrorResponse> -
Constructor Summary
ConstructorDescriptionCreateIndexRequestWithBM25Similarity
(org.opensearch.client.opensearch.indices.CreateIndexRequest delegate, CreateIndexRequestWithBM25Similarity.Bm25Settings bm25Settings) Creates an instance of aCreateIndexRequestWithBM25Similarity
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebm25Settings
record component.org.opensearch.client.opensearch.indices.CreateIndexRequest
delegate()
Returns the value of thedelegate
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.of
(Function<org.opensearch.client.opensearch.indices.CreateIndexRequest.Builder, org.opensearch.client.util.ObjectBuilder<org.opensearch.client.opensearch.indices.CreateIndexRequest>> fn, CreateIndexRequestWithBM25Similarity.Bm25Settings bm25Settings) org.opensearch.client.opensearch.indices.CreateIndexResponse
performRequest
(org.opensearch.client.opensearch.OpenSearchClient client) void
serialize
(jakarta.json.stream.JsonGenerator generator, org.opensearch.client.json.JsonpMapper mapper) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
ENDPOINT
public static final org.opensearch.client.transport.Endpoint<CreateIndexRequestWithBM25Similarity,org.opensearch.client.opensearch.indices.CreateIndexResponse, ENDPOINTorg.opensearch.client.opensearch._types.ErrorResponse>
-
-
Constructor Details
-
CreateIndexRequestWithBM25Similarity
public CreateIndexRequestWithBM25Similarity(org.opensearch.client.opensearch.indices.CreateIndexRequest delegate, CreateIndexRequestWithBM25Similarity.Bm25Settings bm25Settings) Creates an instance of aCreateIndexRequestWithBM25Similarity
record class.- Parameters:
delegate
- the value for thedelegate
record componentbm25Settings
- the value for thebm25Settings
record component
-
-
Method Details
-
of
public static CreateIndexRequestWithBM25Similarity of(Function<org.opensearch.client.opensearch.indices.CreateIndexRequest.Builder, org.opensearch.client.util.ObjectBuilder<org.opensearch.client.opensearch.indices.CreateIndexRequest>> fn, CreateIndexRequestWithBM25Similarity.Bm25Settings bm25Settings) -
serialize
public void serialize(jakarta.json.stream.JsonGenerator generator, org.opensearch.client.json.JsonpMapper mapper) - Specified by:
serialize
in interfaceorg.opensearch.client.json.JsonpSerializable
-
performRequest
public org.opensearch.client.opensearch.indices.CreateIndexResponse performRequest(org.opensearch.client.opensearch.OpenSearchClient client) throws IOException - Throws:
IOException
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
delegate
public org.opensearch.client.opensearch.indices.CreateIndexRequest delegate()Returns the value of thedelegate
record component.- Returns:
- the value of the
delegate
record component
-
bm25Settings
Returns the value of thebm25Settings
record component.- Returns:
- the value of the
bm25Settings
record component
-