1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`Retrieve`](crate::operation::retrieve::builders::RetrieveFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`index_id(impl Into<String>)`](crate::operation::retrieve::builders::RetrieveFluentBuilder::index_id) / [`set_index_id(Option<String>)`](crate::operation::retrieve::builders::RetrieveFluentBuilder::set_index_id):<br>required: **true**<br><p>The identifier of the index to retrieve relevant passages for the search.</p><br>
    ///   - [`query_text(impl Into<String>)`](crate::operation::retrieve::builders::RetrieveFluentBuilder::query_text) / [`set_query_text(Option<String>)`](crate::operation::retrieve::builders::RetrieveFluentBuilder::set_query_text):<br>required: **true**<br><p>The input query text to retrieve relevant passages 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::retrieve::builders::RetrieveFluentBuilder::attribute_filter) / [`set_attribute_filter(Option<AttributeFilter>)`](crate::operation::retrieve::builders::RetrieveFluentBuilder::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>
    ///   - [`requested_document_attributes(impl Into<String>)`](crate::operation::retrieve::builders::RetrieveFluentBuilder::requested_document_attributes) / [`set_requested_document_attributes(Option<Vec::<String>>)`](crate::operation::retrieve::builders::RetrieveFluentBuilder::set_requested_document_attributes):<br>required: **false**<br><p>A list of document fields/attributes to include in the response. You can limit the response to include certain document fields. By default, all document fields are included in the response.</p><br>
    ///   - [`document_relevance_override_configurations(DocumentRelevanceConfiguration)`](crate::operation::retrieve::builders::RetrieveFluentBuilder::document_relevance_override_configurations) / [`set_document_relevance_override_configurations(Option<Vec::<DocumentRelevanceConfiguration>>)`](crate::operation::retrieve::builders::RetrieveFluentBuilder::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::retrieve::builders::RetrieveFluentBuilder::page_number) / [`set_page_number(Option<i32>)`](crate::operation::retrieve::builders::RetrieveFluentBuilder::set_page_number):<br>required: **false**<br><p>Retrieved relevant passages 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::retrieve::builders::RetrieveFluentBuilder::page_size) / [`set_page_size(Option<i32>)`](crate::operation::retrieve::builders::RetrieveFluentBuilder::set_page_size):<br>required: **false**<br><p>Sets the number of retrieved relevant passages 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>
    ///   - [`user_context(UserContext)`](crate::operation::retrieve::builders::RetrieveFluentBuilder::user_context) / [`set_user_context(Option<UserContext>)`](crate::operation::retrieve::builders::RetrieveFluentBuilder::set_user_context):<br>required: **false**<br><p>The user context token or user and group information.</p><br>
    /// - On success, responds with [`RetrieveOutput`](crate::operation::retrieve::RetrieveOutput) with field(s):
    ///   - [`query_id(Option<String>)`](crate::operation::retrieve::RetrieveOutput::query_id): <p>The identifier of query used 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::<RetrieveResultItem>>)`](crate::operation::retrieve::RetrieveOutput::result_items): <p>The results of the retrieved relevant passages for the search.</p>
    /// - On failure, responds with [`SdkError<RetrieveError>`](crate::operation::retrieve::RetrieveError)
    pub fn retrieve(&self) -> crate::operation::retrieve::builders::RetrieveFluentBuilder {
        crate::operation::retrieve::builders::RetrieveFluentBuilder::new(self.handle.clone())
    }
}