@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class QueryRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
NOOP
Constructor and Description |
---|
QueryRequest() |
Modifier and Type | Method and Description |
---|---|
QueryRequest |
clone()
Creates a shallow clone of this object for all fields except the handler context.
|
boolean |
equals(Object obj) |
AttributeFilter |
getAttributeFilter()
Filters search results by document fields/attributes.
|
CollapseConfiguration |
getCollapseConfiguration()
Provides configuration to determine how to group results by document attribute value, and how to display them
(collapsed or expanded) under a designated primary document for each group.
|
List<DocumentRelevanceConfiguration> |
getDocumentRelevanceOverrideConfigurations()
Overrides relevance tuning configurations of fields/attributes set at the index level.
|
List<Facet> |
getFacets()
An array of documents fields/attributes for faceted search.
|
String |
getIndexId()
The identifier of the index for the search.
|
Integer |
getPageNumber()
Query results are returned in pages the size of the
PageSize parameter. |
Integer |
getPageSize()
Sets the number of results that are returned in each page of results.
|
String |
getQueryResultTypeFilter()
Sets the type of query result or response.
|
String |
getQueryText()
The input query text for the search.
|
List<String> |
getRequestedDocumentAttributes()
An array of document fields/attributes to include in the response.
|
SortingConfiguration |
getSortingConfiguration()
Provides information that determines how the results of the query are sorted.
|
List<SortingConfiguration> |
getSortingConfigurations()
Provides configuration information to determine how the results of a query are sorted.
|
SpellCorrectionConfiguration |
getSpellCorrectionConfiguration()
Enables suggested spell corrections for queries.
|
UserContext |
getUserContext()
The user context token or user and group information.
|
String |
getVisitorId()
Provides an identifier for a specific user.
|
int |
hashCode() |
void |
setAttributeFilter(AttributeFilter attributeFilter)
Filters search results by document fields/attributes.
|
void |
setCollapseConfiguration(CollapseConfiguration collapseConfiguration)
Provides configuration to determine how to group results by document attribute value, and how to display them
(collapsed or expanded) under a designated primary document for each group.
|
void |
setDocumentRelevanceOverrideConfigurations(Collection<DocumentRelevanceConfiguration> documentRelevanceOverrideConfigurations)
Overrides relevance tuning configurations of fields/attributes set at the index level.
|
void |
setFacets(Collection<Facet> facets)
An array of documents fields/attributes for faceted search.
|
void |
setIndexId(String indexId)
The identifier of the index for the search.
|
void |
setPageNumber(Integer pageNumber)
Query results are returned in pages the size of the
PageSize parameter. |
void |
setPageSize(Integer pageSize)
Sets the number of results that are returned in each page of results.
|
void |
setQueryResultTypeFilter(String queryResultTypeFilter)
Sets the type of query result or response.
|
void |
setQueryText(String queryText)
The input query text for the search.
|
void |
setRequestedDocumentAttributes(Collection<String> requestedDocumentAttributes)
An array of document fields/attributes to include in the response.
|
void |
setSortingConfiguration(SortingConfiguration sortingConfiguration)
Provides information that determines how the results of the query are sorted.
|
void |
setSortingConfigurations(Collection<SortingConfiguration> sortingConfigurations)
Provides configuration information to determine how the results of a query are sorted.
|
void |
setSpellCorrectionConfiguration(SpellCorrectionConfiguration spellCorrectionConfiguration)
Enables suggested spell corrections for queries.
|
void |
setUserContext(UserContext userContext)
The user context token or user and group information.
|
void |
setVisitorId(String visitorId)
Provides an identifier for a specific user.
|
String |
toString()
Returns a string representation of this object.
|
QueryRequest |
withAttributeFilter(AttributeFilter attributeFilter)
Filters search results by document fields/attributes.
|
QueryRequest |
withCollapseConfiguration(CollapseConfiguration collapseConfiguration)
Provides configuration to determine how to group results by document attribute value, and how to display them
(collapsed or expanded) under a designated primary document for each group.
|
QueryRequest |
withDocumentRelevanceOverrideConfigurations(Collection<DocumentRelevanceConfiguration> documentRelevanceOverrideConfigurations)
Overrides relevance tuning configurations of fields/attributes set at the index level.
|
QueryRequest |
withDocumentRelevanceOverrideConfigurations(DocumentRelevanceConfiguration... documentRelevanceOverrideConfigurations)
Overrides relevance tuning configurations of fields/attributes set at the index level.
|
QueryRequest |
withFacets(Collection<Facet> facets)
An array of documents fields/attributes for faceted search.
|
QueryRequest |
withFacets(Facet... facets)
An array of documents fields/attributes for faceted search.
|
QueryRequest |
withIndexId(String indexId)
The identifier of the index for the search.
|
QueryRequest |
withPageNumber(Integer pageNumber)
Query results are returned in pages the size of the
PageSize parameter. |
QueryRequest |
withPageSize(Integer pageSize)
Sets the number of results that are returned in each page of results.
|
QueryRequest |
withQueryResultTypeFilter(QueryResultType queryResultTypeFilter)
Sets the type of query result or response.
|
QueryRequest |
withQueryResultTypeFilter(String queryResultTypeFilter)
Sets the type of query result or response.
|
QueryRequest |
withQueryText(String queryText)
The input query text for the search.
|
QueryRequest |
withRequestedDocumentAttributes(Collection<String> requestedDocumentAttributes)
An array of document fields/attributes to include in the response.
|
QueryRequest |
withRequestedDocumentAttributes(String... requestedDocumentAttributes)
An array of document fields/attributes to include in the response.
|
QueryRequest |
withSortingConfiguration(SortingConfiguration sortingConfiguration)
Provides information that determines how the results of the query are sorted.
|
QueryRequest |
withSortingConfigurations(Collection<SortingConfiguration> sortingConfigurations)
Provides configuration information to determine how the results of a query are sorted.
|
QueryRequest |
withSortingConfigurations(SortingConfiguration... sortingConfigurations)
Provides configuration information to determine how the results of a query are sorted.
|
QueryRequest |
withSpellCorrectionConfiguration(SpellCorrectionConfiguration spellCorrectionConfiguration)
Enables suggested spell corrections for queries.
|
QueryRequest |
withUserContext(UserContext userContext)
The user context token or user and group information.
|
QueryRequest |
withVisitorId(String visitorId)
Provides an identifier for a specific user.
|
addHandlerContext, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public void setIndexId(String indexId)
The identifier of the index for the search.
indexId
- The identifier of the index for the search.public String getIndexId()
The identifier of the index for the search.
public QueryRequest withIndexId(String indexId)
The identifier of the index for the search.
indexId
- The identifier of the index for the search.public void setQueryText(String queryText)
The input query text for the search. Amazon Kendra truncates queries at 30 token words, which excludes
punctuation and stop words. Truncation still applies if you use Boolean or more advanced, complex queries. For
example, Timeoff AND October AND Category:HR
is counted as 3 tokens: timeoff
,
october
, hr
. For more information, see Searching
with advanced query syntax in the Amazon Kendra Developer Guide.
queryText
- The input query text for the search. Amazon Kendra truncates queries at 30 token words, which excludes
punctuation and stop words. Truncation still applies if you use Boolean or more advanced, complex queries.
For example, Timeoff AND October AND Category:HR
is counted as 3 tokens: timeoff
, october
, hr
. For more information, see Searching with advanced query syntax in the Amazon Kendra Developer Guide.public String getQueryText()
The input query text for the search. Amazon Kendra truncates queries at 30 token words, which excludes
punctuation and stop words. Truncation still applies if you use Boolean or more advanced, complex queries. For
example, Timeoff AND October AND Category:HR
is counted as 3 tokens: timeoff
,
october
, hr
. For more information, see Searching
with advanced query syntax in the Amazon Kendra Developer Guide.
Timeoff AND October AND Category:HR
is counted as 3 tokens:
timeoff
, october
, hr
. For more information, see Searching with advanced query syntax in the Amazon Kendra Developer Guide.public QueryRequest withQueryText(String queryText)
The input query text for the search. Amazon Kendra truncates queries at 30 token words, which excludes
punctuation and stop words. Truncation still applies if you use Boolean or more advanced, complex queries. For
example, Timeoff AND October AND Category:HR
is counted as 3 tokens: timeoff
,
october
, hr
. For more information, see Searching
with advanced query syntax in the Amazon Kendra Developer Guide.
queryText
- The input query text for the search. Amazon Kendra truncates queries at 30 token words, which excludes
punctuation and stop words. Truncation still applies if you use Boolean or more advanced, complex queries.
For example, Timeoff AND October AND Category:HR
is counted as 3 tokens: timeoff
, october
, hr
. For more information, see Searching with advanced query syntax in the Amazon Kendra Developer Guide.public void setAttributeFilter(AttributeFilter attributeFilter)
Filters search results by document fields/attributes. You can only provide one attribute filter; however, the
AndAllFilters
, NotFilter
, and OrAllFilters
parameters contain a list of
other filters.
The AttributeFilter
parameter means you can create a set of filtering rules that a document must
satisfy to be included in the query results.
attributeFilter
- Filters search results by document fields/attributes. You can only provide one attribute filter; however,
the AndAllFilters
, NotFilter
, and OrAllFilters
parameters contain a
list of other filters.
The AttributeFilter
parameter means you can create a set of filtering rules that a document
must satisfy to be included in the query results.
public AttributeFilter getAttributeFilter()
Filters search results by document fields/attributes. You can only provide one attribute filter; however, the
AndAllFilters
, NotFilter
, and OrAllFilters
parameters contain a list of
other filters.
The AttributeFilter
parameter means you can create a set of filtering rules that a document must
satisfy to be included in the query results.
AndAllFilters
, NotFilter
, and OrAllFilters
parameters contain
a list of other filters.
The AttributeFilter
parameter means you can create a set of filtering rules that a document
must satisfy to be included in the query results.
public QueryRequest withAttributeFilter(AttributeFilter attributeFilter)
Filters search results by document fields/attributes. You can only provide one attribute filter; however, the
AndAllFilters
, NotFilter
, and OrAllFilters
parameters contain a list of
other filters.
The AttributeFilter
parameter means you can create a set of filtering rules that a document must
satisfy to be included in the query results.
attributeFilter
- Filters search results by document fields/attributes. You can only provide one attribute filter; however,
the AndAllFilters
, NotFilter
, and OrAllFilters
parameters contain a
list of other filters.
The AttributeFilter
parameter means you can create a set of filtering rules that a document
must satisfy to be included in the query results.
public List<Facet> getFacets()
An array of documents fields/attributes for faceted search. Amazon Kendra returns a count for each field key specified. This helps your users narrow their search.
public void setFacets(Collection<Facet> facets)
An array of documents fields/attributes for faceted search. Amazon Kendra returns a count for each field key specified. This helps your users narrow their search.
facets
- An array of documents fields/attributes for faceted search. Amazon Kendra returns a count for each field
key specified. This helps your users narrow their search.public QueryRequest withFacets(Facet... facets)
An array of documents fields/attributes for faceted search. Amazon Kendra returns a count for each field key specified. This helps your users narrow their search.
NOTE: This method appends the values to the existing list (if any). Use
setFacets(java.util.Collection)
or withFacets(java.util.Collection)
if you want to override the
existing values.
facets
- An array of documents fields/attributes for faceted search. Amazon Kendra returns a count for each field
key specified. This helps your users narrow their search.public QueryRequest withFacets(Collection<Facet> facets)
An array of documents fields/attributes for faceted search. Amazon Kendra returns a count for each field key specified. This helps your users narrow their search.
facets
- An array of documents fields/attributes for faceted search. Amazon Kendra returns a count for each field
key specified. This helps your users narrow their search.public List<String> getRequestedDocumentAttributes()
An array of document fields/attributes to include in the response. You can limit the response to include certain document fields. By default, all document attributes are included in the response.
public void setRequestedDocumentAttributes(Collection<String> requestedDocumentAttributes)
An array of document fields/attributes to include in the response. You can limit the response to include certain document fields. By default, all document attributes are included in the response.
requestedDocumentAttributes
- An array of document fields/attributes to include in the response. You can limit the response to include
certain document fields. By default, all document attributes are included in the response.public QueryRequest withRequestedDocumentAttributes(String... requestedDocumentAttributes)
An array of document fields/attributes to include in the response. You can limit the response to include certain document fields. By default, all document attributes are included in the response.
NOTE: This method appends the values to the existing list (if any). Use
setRequestedDocumentAttributes(java.util.Collection)
or
withRequestedDocumentAttributes(java.util.Collection)
if you want to override the existing values.
requestedDocumentAttributes
- An array of document fields/attributes to include in the response. You can limit the response to include
certain document fields. By default, all document attributes are included in the response.public QueryRequest withRequestedDocumentAttributes(Collection<String> requestedDocumentAttributes)
An array of document fields/attributes to include in the response. You can limit the response to include certain document fields. By default, all document attributes are included in the response.
requestedDocumentAttributes
- An array of document fields/attributes to include in the response. You can limit the response to include
certain document fields. By default, all document attributes are included in the response.public void setQueryResultTypeFilter(String queryResultTypeFilter)
Sets the type of query result or response. Only results for the specified type are returned.
queryResultTypeFilter
- Sets the type of query result or response. Only results for the specified type are returned.QueryResultType
public String getQueryResultTypeFilter()
Sets the type of query result or response. Only results for the specified type are returned.
QueryResultType
public QueryRequest withQueryResultTypeFilter(String queryResultTypeFilter)
Sets the type of query result or response. Only results for the specified type are returned.
queryResultTypeFilter
- Sets the type of query result or response. Only results for the specified type are returned.QueryResultType
public QueryRequest withQueryResultTypeFilter(QueryResultType queryResultTypeFilter)
Sets the type of query result or response. Only results for the specified type are returned.
queryResultTypeFilter
- Sets the type of query result or response. Only results for the specified type are returned.QueryResultType
public List<DocumentRelevanceConfiguration> getDocumentRelevanceOverrideConfigurations()
Overrides relevance tuning configurations of fields/attributes set at the index level.
If you use this API to override the relevance tuning configured at the index level, but there is no relevance tuning configured at the index level, then Amazon Kendra does not apply any relevance tuning.
If there is relevance tuning configured for fields at the index level, and you use this API to override only some of these fields, then for the fields you did not override, the importance is set to 1.
If you use this API to override the relevance tuning configured at the index level, but there is no relevance tuning configured at the index level, then Amazon Kendra does not apply any relevance tuning.
If there is relevance tuning configured for fields at the index level, and you use this API to override only some of these fields, then for the fields you did not override, the importance is set to 1.
public void setDocumentRelevanceOverrideConfigurations(Collection<DocumentRelevanceConfiguration> documentRelevanceOverrideConfigurations)
Overrides relevance tuning configurations of fields/attributes set at the index level.
If you use this API to override the relevance tuning configured at the index level, but there is no relevance tuning configured at the index level, then Amazon Kendra does not apply any relevance tuning.
If there is relevance tuning configured for fields at the index level, and you use this API to override only some of these fields, then for the fields you did not override, the importance is set to 1.
documentRelevanceOverrideConfigurations
- Overrides relevance tuning configurations of fields/attributes set at the index level.
If you use this API to override the relevance tuning configured at the index level, but there is no relevance tuning configured at the index level, then Amazon Kendra does not apply any relevance tuning.
If there is relevance tuning configured for fields at the index level, and you use this API to override only some of these fields, then for the fields you did not override, the importance is set to 1.
public QueryRequest withDocumentRelevanceOverrideConfigurations(DocumentRelevanceConfiguration... documentRelevanceOverrideConfigurations)
Overrides relevance tuning configurations of fields/attributes set at the index level.
If you use this API to override the relevance tuning configured at the index level, but there is no relevance tuning configured at the index level, then Amazon Kendra does not apply any relevance tuning.
If there is relevance tuning configured for fields at the index level, and you use this API to override only some of these fields, then for the fields you did not override, the importance is set to 1.
NOTE: This method appends the values to the existing list (if any). Use
setDocumentRelevanceOverrideConfigurations(java.util.Collection)
or
withDocumentRelevanceOverrideConfigurations(java.util.Collection)
if you want to override the existing
values.
documentRelevanceOverrideConfigurations
- Overrides relevance tuning configurations of fields/attributes set at the index level.
If you use this API to override the relevance tuning configured at the index level, but there is no relevance tuning configured at the index level, then Amazon Kendra does not apply any relevance tuning.
If there is relevance tuning configured for fields at the index level, and you use this API to override only some of these fields, then for the fields you did not override, the importance is set to 1.
public QueryRequest withDocumentRelevanceOverrideConfigurations(Collection<DocumentRelevanceConfiguration> documentRelevanceOverrideConfigurations)
Overrides relevance tuning configurations of fields/attributes set at the index level.
If you use this API to override the relevance tuning configured at the index level, but there is no relevance tuning configured at the index level, then Amazon Kendra does not apply any relevance tuning.
If there is relevance tuning configured for fields at the index level, and you use this API to override only some of these fields, then for the fields you did not override, the importance is set to 1.
documentRelevanceOverrideConfigurations
- Overrides relevance tuning configurations of fields/attributes set at the index level.
If you use this API to override the relevance tuning configured at the index level, but there is no relevance tuning configured at the index level, then Amazon Kendra does not apply any relevance tuning.
If there is relevance tuning configured for fields at the index level, and you use this API to override only some of these fields, then for the fields you did not override, the importance is set to 1.
public void setPageNumber(Integer pageNumber)
Query results are returned in pages the size of the PageSize
parameter. By default, Amazon Kendra
returns the first page of results. Use this parameter to get result pages after the first one.
pageNumber
- Query results are returned in pages the size of the PageSize
parameter. By default, Amazon
Kendra returns the first page of results. Use this parameter to get result pages after the first one.public Integer getPageNumber()
Query results are returned in pages the size of the PageSize
parameter. By default, Amazon Kendra
returns the first page of results. Use this parameter to get result pages after the first one.
PageSize
parameter. By default, Amazon
Kendra returns the first page of results. Use this parameter to get result pages after the first one.public QueryRequest withPageNumber(Integer pageNumber)
Query results are returned in pages the size of the PageSize
parameter. By default, Amazon Kendra
returns the first page of results. Use this parameter to get result pages after the first one.
pageNumber
- Query results are returned in pages the size of the PageSize
parameter. By default, Amazon
Kendra returns the first page of results. Use this parameter to get result pages after the first one.public void setPageSize(Integer pageSize)
Sets the number of results that are returned in each page of results. The default page size is 10. The maximum number of results returned is 100. If you ask for more than 100 results, only 100 are returned.
pageSize
- Sets the number of results that are returned in each page of results. The default page size is 10. The
maximum number of results returned is 100. If you ask for more than 100 results, only 100 are returned.public Integer getPageSize()
Sets the number of results that are returned in each page of results. The default page size is 10. The maximum number of results returned is 100. If you ask for more than 100 results, only 100 are returned.
public QueryRequest withPageSize(Integer pageSize)
Sets the number of results that are returned in each page of results. The default page size is 10. The maximum number of results returned is 100. If you ask for more than 100 results, only 100 are returned.
pageSize
- Sets the number of results that are returned in each page of results. The default page size is 10. The
maximum number of results returned is 100. If you ask for more than 100 results, only 100 are returned.public void setSortingConfiguration(SortingConfiguration sortingConfiguration)
Provides information that determines how the results of the query are sorted. You can set the field that Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or descending order. In the case of ties in sorting the results, the results are sorted by relevance.
If you don't provide sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result.
sortingConfiguration
- Provides information that determines how the results of the query are sorted. You can set the field that
Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or
descending order. In the case of ties in sorting the results, the results are sorted by relevance.
If you don't provide sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result.
public SortingConfiguration getSortingConfiguration()
Provides information that determines how the results of the query are sorted. You can set the field that Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or descending order. In the case of ties in sorting the results, the results are sorted by relevance.
If you don't provide sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result.
If you don't provide sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result.
public QueryRequest withSortingConfiguration(SortingConfiguration sortingConfiguration)
Provides information that determines how the results of the query are sorted. You can set the field that Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or descending order. In the case of ties in sorting the results, the results are sorted by relevance.
If you don't provide sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result.
sortingConfiguration
- Provides information that determines how the results of the query are sorted. You can set the field that
Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or
descending order. In the case of ties in sorting the results, the results are sorted by relevance.
If you don't provide sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result.
public List<SortingConfiguration> getSortingConfigurations()
Provides configuration information to determine how the results of a query are sorted.
You can set upto 3 fields that Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or descending order. The sort field quota can be increased.
If you don't provide a sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result. In the case of ties in sorting the results, the results are sorted by relevance.
You can set upto 3 fields that Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or descending order. The sort field quota can be increased.
If you don't provide a sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result. In the case of ties in sorting the results, the results are sorted by relevance.
public void setSortingConfigurations(Collection<SortingConfiguration> sortingConfigurations)
Provides configuration information to determine how the results of a query are sorted.
You can set upto 3 fields that Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or descending order. The sort field quota can be increased.
If you don't provide a sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result. In the case of ties in sorting the results, the results are sorted by relevance.
sortingConfigurations
- Provides configuration information to determine how the results of a query are sorted.
You can set upto 3 fields that Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or descending order. The sort field quota can be increased.
If you don't provide a sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result. In the case of ties in sorting the results, the results are sorted by relevance.
public QueryRequest withSortingConfigurations(SortingConfiguration... sortingConfigurations)
Provides configuration information to determine how the results of a query are sorted.
You can set upto 3 fields that Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or descending order. The sort field quota can be increased.
If you don't provide a sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result. In the case of ties in sorting the results, the results are sorted by relevance.
NOTE: This method appends the values to the existing list (if any). Use
setSortingConfigurations(java.util.Collection)
or
withSortingConfigurations(java.util.Collection)
if you want to override the existing values.
sortingConfigurations
- Provides configuration information to determine how the results of a query are sorted.
You can set upto 3 fields that Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or descending order. The sort field quota can be increased.
If you don't provide a sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result. In the case of ties in sorting the results, the results are sorted by relevance.
public QueryRequest withSortingConfigurations(Collection<SortingConfiguration> sortingConfigurations)
Provides configuration information to determine how the results of a query are sorted.
You can set upto 3 fields that Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or descending order. The sort field quota can be increased.
If you don't provide a sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result. In the case of ties in sorting the results, the results are sorted by relevance.
sortingConfigurations
- Provides configuration information to determine how the results of a query are sorted.
You can set upto 3 fields that Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or descending order. The sort field quota can be increased.
If you don't provide a sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result. In the case of ties in sorting the results, the results are sorted by relevance.
public void setUserContext(UserContext userContext)
The user context token or user and group information.
userContext
- The user context token or user and group information.public UserContext getUserContext()
The user context token or user and group information.
public QueryRequest withUserContext(UserContext userContext)
The user context token or user and group information.
userContext
- The user context token or user and group information.public void setVisitorId(String visitorId)
Provides an identifier for a specific user. The VisitorId
should be a unique identifier, such as a
GUID. Don't use personally identifiable information, such as the user's email address, as the
VisitorId
.
visitorId
- Provides an identifier for a specific user. The VisitorId
should be a unique identifier, such
as a GUID. Don't use personally identifiable information, such as the user's email address, as the
VisitorId
.public String getVisitorId()
Provides an identifier for a specific user. The VisitorId
should be a unique identifier, such as a
GUID. Don't use personally identifiable information, such as the user's email address, as the
VisitorId
.
VisitorId
should be a unique identifier,
such as a GUID. Don't use personally identifiable information, such as the user's email address, as the
VisitorId
.public QueryRequest withVisitorId(String visitorId)
Provides an identifier for a specific user. The VisitorId
should be a unique identifier, such as a
GUID. Don't use personally identifiable information, such as the user's email address, as the
VisitorId
.
visitorId
- Provides an identifier for a specific user. The VisitorId
should be a unique identifier, such
as a GUID. Don't use personally identifiable information, such as the user's email address, as the
VisitorId
.public void setSpellCorrectionConfiguration(SpellCorrectionConfiguration spellCorrectionConfiguration)
Enables suggested spell corrections for queries.
spellCorrectionConfiguration
- Enables suggested spell corrections for queries.public SpellCorrectionConfiguration getSpellCorrectionConfiguration()
Enables suggested spell corrections for queries.
public QueryRequest withSpellCorrectionConfiguration(SpellCorrectionConfiguration spellCorrectionConfiguration)
Enables suggested spell corrections for queries.
spellCorrectionConfiguration
- Enables suggested spell corrections for queries.public void setCollapseConfiguration(CollapseConfiguration collapseConfiguration)
Provides configuration to determine how to group results by document attribute value, and how to display them (collapsed or expanded) under a designated primary document for each group.
collapseConfiguration
- Provides configuration to determine how to group results by document attribute value, and how to display
them (collapsed or expanded) under a designated primary document for each group.public CollapseConfiguration getCollapseConfiguration()
Provides configuration to determine how to group results by document attribute value, and how to display them (collapsed or expanded) under a designated primary document for each group.
public QueryRequest withCollapseConfiguration(CollapseConfiguration collapseConfiguration)
Provides configuration to determine how to group results by document attribute value, and how to display them (collapsed or expanded) under a designated primary document for each group.
collapseConfiguration
- Provides configuration to determine how to group results by document attribute value, and how to display
them (collapsed or expanded) under a designated primary document for each group.public String toString()
toString
in class Object
Object.toString()
public QueryRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()