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
Nested ClassesModifier and TypeClassDescriptionstatic final recordBM25 similarity parameters -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.opensearch.client.transport.Endpoint<CreateIndexRequestWithBM25Similarity, org.opensearch.client.opensearch.indices.CreateIndexResponse, org.opensearch.client.opensearch._types.ErrorResponse> -
Constructor Summary
ConstructorsConstructorDescriptionCreateIndexRequestWithBM25Similarity(org.opensearch.client.opensearch.indices.CreateIndexRequest delegate, CreateIndexRequestWithBM25Similarity.Bm25Settings bm25Settings) Creates an instance of aCreateIndexRequestWithBM25Similarityrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebm25Settingsrecord component.org.opensearch.client.opensearch.indices.CreateIndexRequestdelegate()Returns the value of thedelegaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()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.CreateIndexResponseperformRequest(org.opensearch.client.opensearch.OpenSearchClient client) voidserialize(jakarta.json.stream.JsonGenerator generator, org.opensearch.client.json.JsonpMapper mapper) final StringtoString()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 aCreateIndexRequestWithBM25Similarityrecord class.- Parameters:
delegate- the value for thedelegaterecord componentbm25Settings- the value for thebm25Settingsrecord 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:
serializein 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 thedelegaterecord component.- Returns:
- the value of the
delegaterecord component
-
bm25Settings
Returns the value of thebm25Settingsrecord component.- Returns:
- the value of the
bm25Settingsrecord component
-