Class DocumentRating.Builder
- java.lang.Object
-
- org.opensearch.client.util.ObjectBuilderBase
-
- org.opensearch.client.opensearch.core.rank_eval.DocumentRating.Builder
-
- All Implemented Interfaces:
ObjectBuilder<DocumentRating>
- Enclosing class:
- DocumentRating
public static class DocumentRating.Builder extends ObjectBuilderBase implements ObjectBuilder<DocumentRating>
Builder forDocumentRating
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentRating
build()
Builds aDocumentRating
.DocumentRating.Builder
id(java.lang.String value)
Required - The document ID.DocumentRating.Builder
index(java.lang.String value)
Required - The document's index.DocumentRating.Builder
rating(int value)
Required - The document's relevance with regard to this search request.-
Methods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAdd, _listAddAll, _listAddAll, _mapPut, _mapPutAll
-
-
-
-
Method Detail
-
id
public final DocumentRating.Builder id(java.lang.String value)
Required - The document ID.API name:
_id
-
index
public final DocumentRating.Builder index(java.lang.String value)
Required - The document's index. For data streams, this should be the document's backing index.API name:
_index
-
rating
public final DocumentRating.Builder rating(int value)
Required - The document's relevance with regard to this search request.API name:
rating
-
build
public DocumentRating build()
Builds aDocumentRating
.- Specified by:
build
in interfaceObjectBuilder<DocumentRating>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-
-