Class TextSimilarityReranker.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RetrieverBase.AbstractBuilder<TextSimilarityReranker.Builder>
co.elastic.clients.elasticsearch._types.TextSimilarityReranker.Builder
- All Implemented Interfaces:
WithJson<TextSimilarityReranker.Builder>,ObjectBuilder<TextSimilarityReranker>
- Enclosing class:
- TextSimilarityReranker
public static class TextSimilarityReranker.Builder
extends RetrieverBase.AbstractBuilder<TextSimilarityReranker.Builder>
implements ObjectBuilder<TextSimilarityReranker>
Builder for
TextSimilarityReranker.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aTextSimilarityReranker.Required - The document field to be used for text similarity comparisons.inferenceId(String value) Unique identifier of the inference endpoint created using the inference API.inferenceText(String value) Required - The text snippet used as the basis for similarity comparisonrankWindowSize(Integer value) This value determines how many documents we will consider from the nested retriever.Required - The nested retriever which will produce the first-level results, that will later be used for reranking.retriever(RetrieverVariant value) Required - The nested retriever which will produce the first-level results, that will later be used for reranking.Required - The nested retriever which will produce the first-level results, that will later be used for reranking.protected TextSimilarityReranker.Builderself()Methods inherited from class co.elastic.clients.elasticsearch._types.RetrieverBase.AbstractBuilder
filter, filter, filter, filter, minScore, nameMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
retriever
Required - The nested retriever which will produce the first-level results, that will later be used for reranking.API name:
retriever -
retriever
public final TextSimilarityReranker.Builder retriever(Function<Retriever.Builder, ObjectBuilder<Retriever>> fn) Required - The nested retriever which will produce the first-level results, that will later be used for reranking.API name:
retriever -
retriever
Required - The nested retriever which will produce the first-level results, that will later be used for reranking.API name:
retriever -
rankWindowSize
This value determines how many documents we will consider from the nested retriever.API name:
rank_window_size -
inferenceId
Unique identifier of the inference endpoint created using the inference API.API name:
inference_id -
inferenceText
Required - The text snippet used as the basis for similarity comparisonAPI name:
inference_text -
field
Required - The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_textAPI name:
field -
self
- Specified by:
selfin classRetrieverBase.AbstractBuilder<TextSimilarityReranker.Builder>
-
build
Builds aTextSimilarityReranker.- Specified by:
buildin interfaceObjectBuilder<TextSimilarityReranker>- Throws:
NullPointerException- if some of the required fields are null.
-