// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`Query`](crate::operation::query::builders::QueryFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`index_id(impl Into<String>)`](crate::operation::query::builders::QueryFluentBuilder::index_id) / [`set_index_id(Option<String>)`](crate::operation::query::builders::QueryFluentBuilder::set_index_id):<br>required: **true**<br><p>The identifier of the index for the search.</p><br>
/// - [`query_text(impl Into<String>)`](crate::operation::query::builders::QueryFluentBuilder::query_text) / [`set_query_text(Option<String>)`](crate::operation::query::builders::QueryFluentBuilder::set_query_text):<br>required: **false**<br><p>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, <code>Timeoff AND October AND Category:HR</code> is counted as 3 tokens: <code>timeoff</code>, <code>october</code>, <code>hr</code>. For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/searching-example.html#searching-index-query-syntax">Searching with advanced query syntax</a> in the Amazon Kendra Developer Guide.</p><br>
/// - [`attribute_filter(AttributeFilter)`](crate::operation::query::builders::QueryFluentBuilder::attribute_filter) / [`set_attribute_filter(Option<AttributeFilter>)`](crate::operation::query::builders::QueryFluentBuilder::set_attribute_filter):<br>required: **false**<br><p>Filters search results by document fields/attributes. You can only provide one attribute filter; however, the <code>AndAllFilters</code>, <code>NotFilter</code>, and <code>OrAllFilters</code> parameters contain a list of other filters.</p> <p>The <code>AttributeFilter</code> parameter means you can create a set of filtering rules that a document must satisfy to be included in the query results.</p><br>
/// - [`facets(Facet)`](crate::operation::query::builders::QueryFluentBuilder::facets) / [`set_facets(Option<Vec::<Facet>>)`](crate::operation::query::builders::QueryFluentBuilder::set_facets):<br>required: **false**<br><p>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.</p><br>
/// - [`requested_document_attributes(impl Into<String>)`](crate::operation::query::builders::QueryFluentBuilder::requested_document_attributes) / [`set_requested_document_attributes(Option<Vec::<String>>)`](crate::operation::query::builders::QueryFluentBuilder::set_requested_document_attributes):<br>required: **false**<br><p>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.</p><br>
/// - [`query_result_type_filter(QueryResultType)`](crate::operation::query::builders::QueryFluentBuilder::query_result_type_filter) / [`set_query_result_type_filter(Option<QueryResultType>)`](crate::operation::query::builders::QueryFluentBuilder::set_query_result_type_filter):<br>required: **false**<br><p>Sets the type of query result or response. Only results for the specified type are returned.</p><br>
/// - [`document_relevance_override_configurations(DocumentRelevanceConfiguration)`](crate::operation::query::builders::QueryFluentBuilder::document_relevance_override_configurations) / [`set_document_relevance_override_configurations(Option<Vec::<DocumentRelevanceConfiguration>>)`](crate::operation::query::builders::QueryFluentBuilder::set_document_relevance_override_configurations):<br>required: **false**<br><p>Overrides relevance tuning configurations of fields/attributes set at the index level.</p> <p>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.</p> <p>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.</p><br>
/// - [`page_number(i32)`](crate::operation::query::builders::QueryFluentBuilder::page_number) / [`set_page_number(Option<i32>)`](crate::operation::query::builders::QueryFluentBuilder::set_page_number):<br>required: **false**<br><p>Query results are returned in pages the size of the <code>PageSize</code> parameter. By default, Amazon Kendra returns the first page of results. Use this parameter to get result pages after the first one.</p><br>
/// - [`page_size(i32)`](crate::operation::query::builders::QueryFluentBuilder::page_size) / [`set_page_size(Option<i32>)`](crate::operation::query::builders::QueryFluentBuilder::set_page_size):<br>required: **false**<br><p>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.</p><br>
/// - [`sorting_configuration(SortingConfiguration)`](crate::operation::query::builders::QueryFluentBuilder::sorting_configuration) / [`set_sorting_configuration(Option<SortingConfiguration>)`](crate::operation::query::builders::QueryFluentBuilder::set_sorting_configuration):<br>required: **false**<br><p>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.</p> <p>If you don't provide sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result.</p><br>
/// - [`sorting_configurations(SortingConfiguration)`](crate::operation::query::builders::QueryFluentBuilder::sorting_configurations) / [`set_sorting_configurations(Option<Vec::<SortingConfiguration>>)`](crate::operation::query::builders::QueryFluentBuilder::set_sorting_configurations):<br>required: **false**<br><p>Provides configuration information to determine how the results of a query are sorted.</p> <p>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.</p> <p>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.</p><br>
/// - [`user_context(UserContext)`](crate::operation::query::builders::QueryFluentBuilder::user_context) / [`set_user_context(Option<UserContext>)`](crate::operation::query::builders::QueryFluentBuilder::set_user_context):<br>required: **false**<br><p>The user context token or user and group information.</p><br>
/// - [`visitor_id(impl Into<String>)`](crate::operation::query::builders::QueryFluentBuilder::visitor_id) / [`set_visitor_id(Option<String>)`](crate::operation::query::builders::QueryFluentBuilder::set_visitor_id):<br>required: **false**<br><p>Provides an identifier for a specific user. The <code>VisitorId</code> should be a unique identifier, such as a GUID. Don't use personally identifiable information, such as the user's email address, as the <code>VisitorId</code>.</p><br>
/// - [`spell_correction_configuration(SpellCorrectionConfiguration)`](crate::operation::query::builders::QueryFluentBuilder::spell_correction_configuration) / [`set_spell_correction_configuration(Option<SpellCorrectionConfiguration>)`](crate::operation::query::builders::QueryFluentBuilder::set_spell_correction_configuration):<br>required: **false**<br><p>Enables suggested spell corrections for queries.</p><br>
/// - [`collapse_configuration(CollapseConfiguration)`](crate::operation::query::builders::QueryFluentBuilder::collapse_configuration) / [`set_collapse_configuration(Option<CollapseConfiguration>)`](crate::operation::query::builders::QueryFluentBuilder::set_collapse_configuration):<br>required: **false**<br><p>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.</p><br>
/// - On success, responds with [`QueryOutput`](crate::operation::query::QueryOutput) with field(s):
/// - [`query_id(Option<String>)`](crate::operation::query::QueryOutput::query_id): <p>The identifier for the search. You also use <code>QueryId</code> to identify the search when using the <a href="https://docs.aws.amazon.com/kendra/latest/APIReference/API_SubmitFeedback.html">SubmitFeedback</a> API.</p>
/// - [`result_items(Option<Vec::<QueryResultItem>>)`](crate::operation::query::QueryOutput::result_items): <p>The results of the search.</p>
/// - [`facet_results(Option<Vec::<FacetResult>>)`](crate::operation::query::QueryOutput::facet_results): <p>Contains the facet results. A <code>FacetResult</code> contains the counts for each field/attribute key that was specified in the <code>Facets</code> input parameter.</p>
/// - [`total_number_of_results(Option<i32>)`](crate::operation::query::QueryOutput::total_number_of_results): <p>The total number of items found by the search. However, you can only retrieve up to 100 items. For example, if the search found 192 items, you can only retrieve the first 100 of the items.</p>
/// - [`warnings(Option<Vec::<Warning>>)`](crate::operation::query::QueryOutput::warnings): <p>A list of warning codes and their messages on problems with your query.</p> <p>Amazon Kendra currently only supports one type of warning, which is a warning on invalid syntax used in the query. For examples of invalid query syntax, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/searching-example.html#searching-index-query-syntax">Searching with advanced query syntax</a>.</p>
/// - [`spell_corrected_queries(Option<Vec::<SpellCorrectedQuery>>)`](crate::operation::query::QueryOutput::spell_corrected_queries): <p>A list of information related to suggested spell corrections for a query.</p>
/// - [`featured_results_items(Option<Vec::<FeaturedResultsItem>>)`](crate::operation::query::QueryOutput::featured_results_items): <p>The list of featured result items. Featured results are displayed at the top of the search results page, placed above all other results for certain queries. If there's an exact match of a query, then certain documents are featured in the search results.</p>
/// - On failure, responds with [`SdkError<QueryError>`](crate::operation::query::QueryError)
pub fn query(&self) -> crate::operation::query::builders::QueryFluentBuilder {
crate::operation::query::builders::QueryFluentBuilder::new(self.handle.clone())
}
}