@Generated(value="software.amazon.awssdk:codegen") public final class Document extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Document.Builder,Document>
Information about a document from a search service such as OpenSearch (self managed). Amazon Kendra Intelligent Ranking uses this information to rank and score on.
| Modifier and Type | Class and Description |
|---|---|
static interface |
Document.Builder |
| Modifier and Type | Method and Description |
|---|---|
String |
body()
The body text of the search service's document.
|
static Document.Builder |
builder() |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
String |
groupId()
The optional group identifier of the document from the search service.
|
int |
hashCode() |
boolean |
hasTokenizedBody()
For responses, this returns true if the service returned a value for the TokenizedBody property.
|
boolean |
hasTokenizedTitle()
For responses, this returns true if the service returned a value for the TokenizedTitle property.
|
String |
id()
The identifier of the document from the search service.
|
Float |
originalScore()
The original document score or rank from the search service.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends Document.Builder> |
serializableBuilderClass() |
String |
title()
The title of the search service's document.
|
Document.Builder |
toBuilder() |
List<String> |
tokenizedBody()
The body text of the search service's document represented as a list of tokens or words.
|
List<String> |
tokenizedTitle()
The title of the search service's document represented as a list of tokens or words.
|
String |
toString()
Returns a string representation of this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final String id()
The identifier of the document from the search service.
public final String groupId()
The optional group identifier of the document from the search service. Documents with the same group identifier are grouped together and processed as one document within the service.
public final String title()
The title of the search service's document.
public final String body()
The body text of the search service's document.
public final boolean hasTokenizedTitle()
isEmpty() method on the property).
This is useful because the SDK will never return a null collection or map, but you may need to differentiate
between the service returning nothing (or null) and the service returning an empty collection or map. For
requests, this returns true if a value for the property was specified in the request builder, and false if a
value was not specified.public final List<String> tokenizedTitle()
The title of the search service's document represented as a list of tokens or words. You must choose to provide
Title or TokenizedTitle. You cannot provide both.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasTokenizedTitle() method.
Title or TokenizedTitle. You cannot provide both.public final boolean hasTokenizedBody()
isEmpty() method on the property).
This is useful because the SDK will never return a null collection or map, but you may need to differentiate
between the service returning nothing (or null) and the service returning an empty collection or map. For
requests, this returns true if a value for the property was specified in the request builder, and false if a
value was not specified.public final List<String> tokenizedBody()
The body text of the search service's document represented as a list of tokens or words. You must choose to
provide Body or TokenizedBody. You cannot provide both.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasTokenizedBody() method.
Body or TokenizedBody. You cannot provide both.public final Float originalScore()
The original document score or rank from the search service. Amazon Kendra Intelligent Ranking gives the document a new score or rank based on its intelligent search algorithms.
public Document.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<Document.Builder,Document>public static Document.Builder builder()
public static Class<? extends Document.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2023. All rights reserved.