@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class QueryResultItem extends Object implements Serializable, Cloneable, StructuredPojo
A single query result.
A query result contains information about a document returned by the query. This includes the original location of the document, a list of attributes assigned to the document, and relevant text from the document that satisfies the query.
Constructor and Description |
---|
QueryResultItem() |
Modifier and Type | Method and Description |
---|---|
QueryResultItem |
clone() |
boolean |
equals(Object obj) |
List<AdditionalResultAttribute> |
getAdditionalAttributes()
One or more additional attributes associated with the query result.
|
List<DocumentAttribute> |
getDocumentAttributes()
An array of document attributes for the document that the query result maps to.
|
TextWithHighlights |
getDocumentExcerpt()
An extract of the text in the document.
|
String |
getDocumentId()
The unique identifier for the document.
|
TextWithHighlights |
getDocumentTitle()
The title of the document.
|
String |
getDocumentURI()
The URI of the original location of the document.
|
String |
getId()
The unique identifier for the query result.
|
ScoreAttributes |
getScoreAttributes()
Indicates the confidence that Amazon Kendra has that a result matches the query that you provided.
|
String |
getType()
The type of document.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setAdditionalAttributes(Collection<AdditionalResultAttribute> additionalAttributes)
One or more additional attributes associated with the query result.
|
void |
setDocumentAttributes(Collection<DocumentAttribute> documentAttributes)
An array of document attributes for the document that the query result maps to.
|
void |
setDocumentExcerpt(TextWithHighlights documentExcerpt)
An extract of the text in the document.
|
void |
setDocumentId(String documentId)
The unique identifier for the document.
|
void |
setDocumentTitle(TextWithHighlights documentTitle)
The title of the document.
|
void |
setDocumentURI(String documentURI)
The URI of the original location of the document.
|
void |
setId(String id)
The unique identifier for the query result.
|
void |
setScoreAttributes(ScoreAttributes scoreAttributes)
Indicates the confidence that Amazon Kendra has that a result matches the query that you provided.
|
void |
setType(String type)
The type of document.
|
String |
toString()
Returns a string representation of this object.
|
QueryResultItem |
withAdditionalAttributes(AdditionalResultAttribute... additionalAttributes)
One or more additional attributes associated with the query result.
|
QueryResultItem |
withAdditionalAttributes(Collection<AdditionalResultAttribute> additionalAttributes)
One or more additional attributes associated with the query result.
|
QueryResultItem |
withDocumentAttributes(Collection<DocumentAttribute> documentAttributes)
An array of document attributes for the document that the query result maps to.
|
QueryResultItem |
withDocumentAttributes(DocumentAttribute... documentAttributes)
An array of document attributes for the document that the query result maps to.
|
QueryResultItem |
withDocumentExcerpt(TextWithHighlights documentExcerpt)
An extract of the text in the document.
|
QueryResultItem |
withDocumentId(String documentId)
The unique identifier for the document.
|
QueryResultItem |
withDocumentTitle(TextWithHighlights documentTitle)
The title of the document.
|
QueryResultItem |
withDocumentURI(String documentURI)
The URI of the original location of the document.
|
QueryResultItem |
withId(String id)
The unique identifier for the query result.
|
QueryResultItem |
withScoreAttributes(ScoreAttributes scoreAttributes)
Indicates the confidence that Amazon Kendra has that a result matches the query that you provided.
|
QueryResultItem |
withType(QueryResultType type)
The type of document.
|
QueryResultItem |
withType(String type)
The type of document.
|
public void setId(String id)
The unique identifier for the query result.
id
- The unique identifier for the query result.public String getId()
The unique identifier for the query result.
public QueryResultItem withId(String id)
The unique identifier for the query result.
id
- The unique identifier for the query result.public void setType(String type)
The type of document.
type
- The type of document.QueryResultType
public String getType()
The type of document.
QueryResultType
public QueryResultItem withType(String type)
The type of document.
type
- The type of document.QueryResultType
public QueryResultItem withType(QueryResultType type)
The type of document.
type
- The type of document.QueryResultType
public List<AdditionalResultAttribute> getAdditionalAttributes()
One or more additional attributes associated with the query result.
public void setAdditionalAttributes(Collection<AdditionalResultAttribute> additionalAttributes)
One or more additional attributes associated with the query result.
additionalAttributes
- One or more additional attributes associated with the query result.public QueryResultItem withAdditionalAttributes(AdditionalResultAttribute... additionalAttributes)
One or more additional attributes associated with the query result.
NOTE: This method appends the values to the existing list (if any). Use
setAdditionalAttributes(java.util.Collection)
or withAdditionalAttributes(java.util.Collection)
if you want to override the existing values.
additionalAttributes
- One or more additional attributes associated with the query result.public QueryResultItem withAdditionalAttributes(Collection<AdditionalResultAttribute> additionalAttributes)
One or more additional attributes associated with the query result.
additionalAttributes
- One or more additional attributes associated with the query result.public void setDocumentId(String documentId)
The unique identifier for the document.
documentId
- The unique identifier for the document.public String getDocumentId()
The unique identifier for the document.
public QueryResultItem withDocumentId(String documentId)
The unique identifier for the document.
documentId
- The unique identifier for the document.public void setDocumentTitle(TextWithHighlights documentTitle)
The title of the document. Contains the text of the title and information for highlighting the relevant terms in the title.
documentTitle
- The title of the document. Contains the text of the title and information for highlighting the relevant
terms in the title.public TextWithHighlights getDocumentTitle()
The title of the document. Contains the text of the title and information for highlighting the relevant terms in the title.
public QueryResultItem withDocumentTitle(TextWithHighlights documentTitle)
The title of the document. Contains the text of the title and information for highlighting the relevant terms in the title.
documentTitle
- The title of the document. Contains the text of the title and information for highlighting the relevant
terms in the title.public void setDocumentExcerpt(TextWithHighlights documentExcerpt)
An extract of the text in the document. Contains information about highlighting the relevant terms in the excerpt.
documentExcerpt
- An extract of the text in the document. Contains information about highlighting the relevant terms in the
excerpt.public TextWithHighlights getDocumentExcerpt()
An extract of the text in the document. Contains information about highlighting the relevant terms in the excerpt.
public QueryResultItem withDocumentExcerpt(TextWithHighlights documentExcerpt)
An extract of the text in the document. Contains information about highlighting the relevant terms in the excerpt.
documentExcerpt
- An extract of the text in the document. Contains information about highlighting the relevant terms in the
excerpt.public void setDocumentURI(String documentURI)
The URI of the original location of the document.
documentURI
- The URI of the original location of the document.public String getDocumentURI()
The URI of the original location of the document.
public QueryResultItem withDocumentURI(String documentURI)
The URI of the original location of the document.
documentURI
- The URI of the original location of the document.public List<DocumentAttribute> getDocumentAttributes()
An array of document attributes for the document that the query result maps to. For example, the document author (Author) or the source URI (SourceUri) of the document.
public void setDocumentAttributes(Collection<DocumentAttribute> documentAttributes)
An array of document attributes for the document that the query result maps to. For example, the document author (Author) or the source URI (SourceUri) of the document.
documentAttributes
- An array of document attributes for the document that the query result maps to. For example, the document
author (Author) or the source URI (SourceUri) of the document.public QueryResultItem withDocumentAttributes(DocumentAttribute... documentAttributes)
An array of document attributes for the document that the query result maps to. For example, the document author (Author) or the source URI (SourceUri) of the document.
NOTE: This method appends the values to the existing list (if any). Use
setDocumentAttributes(java.util.Collection)
or withDocumentAttributes(java.util.Collection)
if
you want to override the existing values.
documentAttributes
- An array of document attributes for the document that the query result maps to. For example, the document
author (Author) or the source URI (SourceUri) of the document.public QueryResultItem withDocumentAttributes(Collection<DocumentAttribute> documentAttributes)
An array of document attributes for the document that the query result maps to. For example, the document author (Author) or the source URI (SourceUri) of the document.
documentAttributes
- An array of document attributes for the document that the query result maps to. For example, the document
author (Author) or the source URI (SourceUri) of the document.public void setScoreAttributes(ScoreAttributes scoreAttributes)
Indicates the confidence that Amazon Kendra has that a result matches the query that you provided. Each result is
placed into a bin that indicates the confidence, VERY_HIGH
, HIGH
, MEDIUM
and LOW
. You can use the score to determine if a response meets the confidence needed for your
application.
The field is only set to LOW
when the Type
field is set to DOCUMENT
and
Amazon Kendra is not confident that the result matches the query.
scoreAttributes
- Indicates the confidence that Amazon Kendra has that a result matches the query that you provided. Each
result is placed into a bin that indicates the confidence, VERY_HIGH
, HIGH
,
MEDIUM
and LOW
. You can use the score to determine if a response meets the
confidence needed for your application.
The field is only set to LOW
when the Type
field is set to DOCUMENT
and Amazon Kendra is not confident that the result matches the query.
public ScoreAttributes getScoreAttributes()
Indicates the confidence that Amazon Kendra has that a result matches the query that you provided. Each result is
placed into a bin that indicates the confidence, VERY_HIGH
, HIGH
, MEDIUM
and LOW
. You can use the score to determine if a response meets the confidence needed for your
application.
The field is only set to LOW
when the Type
field is set to DOCUMENT
and
Amazon Kendra is not confident that the result matches the query.
VERY_HIGH
, HIGH
,
MEDIUM
and LOW
. You can use the score to determine if a response meets the
confidence needed for your application.
The field is only set to LOW
when the Type
field is set to
DOCUMENT
and Amazon Kendra is not confident that the result matches the query.
public QueryResultItem withScoreAttributes(ScoreAttributes scoreAttributes)
Indicates the confidence that Amazon Kendra has that a result matches the query that you provided. Each result is
placed into a bin that indicates the confidence, VERY_HIGH
, HIGH
, MEDIUM
and LOW
. You can use the score to determine if a response meets the confidence needed for your
application.
The field is only set to LOW
when the Type
field is set to DOCUMENT
and
Amazon Kendra is not confident that the result matches the query.
scoreAttributes
- Indicates the confidence that Amazon Kendra has that a result matches the query that you provided. Each
result is placed into a bin that indicates the confidence, VERY_HIGH
, HIGH
,
MEDIUM
and LOW
. You can use the score to determine if a response meets the
confidence needed for your application.
The field is only set to LOW
when the Type
field is set to DOCUMENT
and Amazon Kendra is not confident that the result matches the query.
public String toString()
toString
in class Object
Object.toString()
public QueryResultItem clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.