@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()
Enables filtered searches based on document attributes.
|
List<DocumentRelevanceConfiguration> |
getDocumentRelevanceOverrideConfigurations()
Overrides relevance tuning configurations of fields or attributes set at the index level.
|
List<Facet> |
getFacets()
An array of documents attributes.
|
String |
getIndexId()
The unique identifier of the index to 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.
|
String |
getQueryText()
The text to search for.
|
List<String> |
getRequestedDocumentAttributes()
An array of document attributes to include in the response.
|
SortingConfiguration |
getSortingConfiguration()
Provides information that determines how the results of the query are sorted.
|
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)
Enables filtered searches based on document attributes.
|
void |
setDocumentRelevanceOverrideConfigurations(Collection<DocumentRelevanceConfiguration> documentRelevanceOverrideConfigurations)
Overrides relevance tuning configurations of fields or attributes set at the index level.
|
void |
setFacets(Collection<Facet> facets)
An array of documents attributes.
|
void |
setIndexId(String indexId)
The unique identifier of the index to 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.
|
void |
setQueryText(String queryText)
The text to search for.
|
void |
setRequestedDocumentAttributes(Collection<String> requestedDocumentAttributes)
An array of document attributes to include in the response.
|
void |
setSortingConfiguration(SortingConfiguration sortingConfiguration)
Provides information that determines how the results of the query are sorted.
|
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)
Enables filtered searches based on document attributes.
|
QueryRequest |
withDocumentRelevanceOverrideConfigurations(Collection<DocumentRelevanceConfiguration> documentRelevanceOverrideConfigurations)
Overrides relevance tuning configurations of fields or attributes set at the index level.
|
QueryRequest |
withDocumentRelevanceOverrideConfigurations(DocumentRelevanceConfiguration... documentRelevanceOverrideConfigurations)
Overrides relevance tuning configurations of fields or attributes set at the index level.
|
QueryRequest |
withFacets(Collection<Facet> facets)
An array of documents attributes.
|
QueryRequest |
withFacets(Facet... facets)
An array of documents attributes.
|
QueryRequest |
withIndexId(String indexId)
The unique identifier of the index to 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.
|
QueryRequest |
withQueryResultTypeFilter(String queryResultTypeFilter)
Sets the type of query.
|
QueryRequest |
withQueryText(String queryText)
The text to search for.
|
QueryRequest |
withRequestedDocumentAttributes(Collection<String> requestedDocumentAttributes)
An array of document attributes to include in the response.
|
QueryRequest |
withRequestedDocumentAttributes(String... requestedDocumentAttributes)
An array of document attributes to include in the response.
|
QueryRequest |
withSortingConfiguration(SortingConfiguration sortingConfiguration)
Provides information that determines how the results of the query are sorted.
|
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 unique identifier of the index to search. The identifier is returned in the response from the
CreateIndex
operation.
indexId
- The unique identifier of the index to search. The identifier is returned in the response from the
CreateIndex
operation.public String getIndexId()
The unique identifier of the index to search. The identifier is returned in the response from the
CreateIndex
operation.
CreateIndex
operation.public QueryRequest withIndexId(String indexId)
The unique identifier of the index to search. The identifier is returned in the response from the
CreateIndex
operation.
indexId
- The unique identifier of the index to search. The identifier is returned in the response from the
CreateIndex
operation.public void setQueryText(String queryText)
The text to search for.
queryText
- The text to search for.public String getQueryText()
The text to search for.
public QueryRequest withQueryText(String queryText)
The text to search for.
queryText
- The text to search for.public void setAttributeFilter(AttributeFilter attributeFilter)
Enables filtered searches based on document attributes. You can only provide one attribute filter; however, the
AndAllFilters
, NotFilter
, and OrAllFilters
parameters contain a list of
other filters.
The AttributeFilter
parameter enables you to create a set of filtering rules that a document must
satisfy to be included in the query results.
attributeFilter
- Enables filtered searches based on document attributes. You can only provide one attribute filter;
however, the AndAllFilters
, NotFilter
, and OrAllFilters
parameters
contain a list of other filters.
The AttributeFilter
parameter enables you to create a set of filtering rules that a document
must satisfy to be included in the query results.
public AttributeFilter getAttributeFilter()
Enables filtered searches based on document attributes. You can only provide one attribute filter; however, the
AndAllFilters
, NotFilter
, and OrAllFilters
parameters contain a list of
other filters.
The AttributeFilter
parameter enables you to 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 enables you to create a set of filtering rules that a document
must satisfy to be included in the query results.
public QueryRequest withAttributeFilter(AttributeFilter attributeFilter)
Enables filtered searches based on document attributes. You can only provide one attribute filter; however, the
AndAllFilters
, NotFilter
, and OrAllFilters
parameters contain a list of
other filters.
The AttributeFilter
parameter enables you to create a set of filtering rules that a document must
satisfy to be included in the query results.
attributeFilter
- Enables filtered searches based on document attributes. You can only provide one attribute filter;
however, the AndAllFilters
, NotFilter
, and OrAllFilters
parameters
contain a list of other filters.
The AttributeFilter
parameter enables you to 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 attributes. Amazon Kendra returns a count for each attribute key specified. You can use this information to help narrow the search for your user.
public void setFacets(Collection<Facet> facets)
An array of documents attributes. Amazon Kendra returns a count for each attribute key specified. You can use this information to help narrow the search for your user.
facets
- An array of documents attributes. Amazon Kendra returns a count for each attribute key specified. You can
use this information to help narrow the search for your user.public QueryRequest withFacets(Facet... facets)
An array of documents attributes. Amazon Kendra returns a count for each attribute key specified. You can use this information to help narrow the search for your user.
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 attributes. Amazon Kendra returns a count for each attribute key specified. You can
use this information to help narrow the search for your user.public QueryRequest withFacets(Collection<Facet> facets)
An array of documents attributes. Amazon Kendra returns a count for each attribute key specified. You can use this information to help narrow the search for your user.
facets
- An array of documents attributes. Amazon Kendra returns a count for each attribute key specified. You can
use this information to help narrow the search for your user.public List<String> getRequestedDocumentAttributes()
An array of document attributes to include in the response. No other document attributes are included in the response. By default all document attributes are included in the response.
public void setRequestedDocumentAttributes(Collection<String> requestedDocumentAttributes)
An array of document attributes to include in the response. No other document attributes are included in the response. By default all document attributes are included in the response.
requestedDocumentAttributes
- An array of document attributes to include in the response. No other document attributes are included in
the response. By default all document attributes are included in the response.public QueryRequest withRequestedDocumentAttributes(String... requestedDocumentAttributes)
An array of document attributes to include in the response. No other document attributes are included in the response. 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 attributes to include in the response. No other document attributes are included in
the response. By default all document attributes are included in the response.public QueryRequest withRequestedDocumentAttributes(Collection<String> requestedDocumentAttributes)
An array of document attributes to include in the response. No other document attributes are included in the response. By default all document attributes are included in the response.
requestedDocumentAttributes
- An array of document attributes to include in the response. No other document attributes are included in
the response. By default all document attributes are included in the response.public void setQueryResultTypeFilter(String queryResultTypeFilter)
Sets the type of query. Only results for the specified query type are returned.
queryResultTypeFilter
- Sets the type of query. Only results for the specified query type are returned.QueryResultType
public String getQueryResultTypeFilter()
Sets the type of query. Only results for the specified query type are returned.
QueryResultType
public QueryRequest withQueryResultTypeFilter(String queryResultTypeFilter)
Sets the type of query. Only results for the specified query type are returned.
queryResultTypeFilter
- Sets the type of query. Only results for the specified query type are returned.QueryResultType
public QueryRequest withQueryResultTypeFilter(QueryResultType queryResultTypeFilter)
Sets the type of query. Only results for the specified query type are returned.
queryResultTypeFilter
- Sets the type of query. Only results for the specified query type are returned.QueryResultType
public List<DocumentRelevanceConfiguration> getDocumentRelevanceOverrideConfigurations()
Overrides relevance tuning configurations of fields or 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 at the index level, but you do not use this API to override any relevance tuning in the index, then Amazon Kendra uses the relevance tuning that is configured at the index level.
If there is relevance tuning configured for fields at the index level, but 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 at the index level, but you do not use this API to override any relevance tuning in the index, then Amazon Kendra uses the relevance tuning that is configured at the index level.
If there is relevance tuning configured for fields at the index level, but 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 or 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 at the index level, but you do not use this API to override any relevance tuning in the index, then Amazon Kendra uses the relevance tuning that is configured at the index level.
If there is relevance tuning configured for fields at the index level, but 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 or 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 at the index level, but you do not use this API to override any relevance tuning in the index, then Amazon Kendra uses the relevance tuning that is configured at the index level.
If there is relevance tuning configured for fields at the index level, but 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 or 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 at the index level, but you do not use this API to override any relevance tuning in the index, then Amazon Kendra uses the relevance tuning that is configured at the index level.
If there is relevance tuning configured for fields at the index level, but 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 or 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 at the index level, but you do not use this API to override any relevance tuning in the index, then Amazon Kendra uses the relevance tuning that is configured at the index level.
If there is relevance tuning configured for fields at the index level, but 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 or 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 at the index level, but you do not use this API to override any relevance tuning in the index, then Amazon Kendra uses the relevance tuning that is configured at the index level.
If there is relevance tuning configured for fields at the index level, but 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 or 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 at the index level, but you do not use this API to override any relevance tuning in the index, then Amazon Kendra uses the relevance tuning that is configured at the index level.
If there is relevance tuning configured for fields at the index level, but 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 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 String toString()
toString
in class Object
Object.toString()
public QueryRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()