aws-sdk-opensearchmemory 1.0.0

AWS SDK for Amazon OpenSearch Memory
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`SearchEvents`](crate::operation::search_events::builders::SearchEventsFluentBuilder) operation.
    /// This operation supports pagination; See [`into_paginator()`](crate::operation::search_events::builders::SearchEventsFluentBuilder::into_paginator).
    ///
    /// - The fluent builder is configurable:
    ///   - [`space_id(impl Into<String>)`](crate::operation::search_events::builders::SearchEventsFluentBuilder::space_id) / [`set_space_id(Option<String>)`](crate::operation::search_events::builders::SearchEventsFluentBuilder::set_space_id):<br>required: **true**<br><p>The space whose events to search. Use <code>actorId</code> and <code>sessionIds</code> to narrow the search within it.</p><br>
    ///   - [`actor_id(impl Into<String>)`](crate::operation::search_events::builders::SearchEventsFluentBuilder::actor_id) / [`set_actor_id(Option<String>)`](crate::operation::search_events::builders::SearchEventsFluentBuilder::set_actor_id):<br>required: **true**<br><p>The actor whose events to search (exact match). Required: every search covers exactly one actor, and an event stored without an actor is never returned. Narrow the search further with <code>sessionIds</code>, combined by AND. This is the only way to filter by actor: a query that references <code>system_metadata.actor_id</code> fails with <code>ValidationException</code> (reason <code>nonFilterableField</code>).</p><br>
    ///   - [`session_ids(impl Into<String>)`](crate::operation::search_events::builders::SearchEventsFluentBuilder::session_ids) / [`set_session_ids(Option<Vec::<String>>)`](crate::operation::search_events::builders::SearchEventsFluentBuilder::set_session_ids):<br>required: **false**<br><p>Returns only events from one of these sessions (exact match). Combined with <code>actorId</code> by AND. Omit for no session filter. An empty list fails validation. An event stored without a session never matches a session filter. This is the only way to filter by session: a query that references <code>system_metadata.session_id</code> fails with <code>ValidationException</code> (reason <code>nonFilterableField</code>).</p><br>
    ///   - [`query(Document)`](crate::operation::search_events::builders::SearchEventsFluentBuilder::query) / [`set_query(Option<Document>)`](crate::operation::search_events::builders::SearchEventsFluentBuilder::set_query):<br>required: **true**<br><p>The query: a subset of the OpenSearch Query DSL (see <code>SearchQuery</code>), validated by the same rules as on <code>SearchMemories</code>. Query event text as <code>text</code> and embeddings as <code>vector</code>. A search covers both conversation turns and chunks of documents submitted as a <code>blob</code>. You can't use actor and session fields here. Use the top-level <code>actorId</code> and <code>sessionIds</code>.</p> <p>To search only the content of particular events, filter on <code>event_ids</code> with <code>term</code> or <code>terms</code>, for example with the <code>sourceEventIds</code> that a <code>SearchMemories</code> result returns. A <code>terms</code> clause on <code>event_ids</code> can list up to 10 event IDs. More IDs fail with <code>ValidationException</code> (reason <code>queryBodyTooLarge</code>). You can use <code>event_ids</code> only in <code>term</code>, <code>terms</code>, and <code>exists</code> queries.</p><br>
    ///   - [`sort(Document)`](crate::operation::search_events::builders::SearchEventsFluentBuilder::sort) / [`set_sort(Option<Document>)`](crate::operation::search_events::builders::SearchEventsFluentBuilder::set_sort):<br>required: **false**<br><p>The sort order (see <code>SearchSort</code>). Omit to return the most relevant events first.</p><br>
    ///   - [`max_results(i32)`](crate::operation::search_events::builders::SearchEventsFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::search_events::builders::SearchEventsFluentBuilder::set_max_results):<br>required: **false**<br><p>The maximum number of events to return, from 1 to 100. The default is 20.</p><br>
    ///   - [`next_token(impl Into<String>)`](crate::operation::search_events::builders::SearchEventsFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::search_events::builders::SearchEventsFluentBuilder::set_next_token):<br>required: **false**<br><p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p><br>
    /// - On success, responds with [`SearchEventsOutput`](crate::operation::search_events::SearchEventsOutput) with field(s):
    ///   - [`events(Vec::<EventSearchSummary>)`](crate::operation::search_events::SearchEventsOutput::events): <p>The matching event chunks, in the order <code>sort</code> requests, or most relevant first when it has none. Empty when nothing matches. Each result is the matching chunk of an event. Call <code>GetEvent</code> for the whole event.</p>
    ///   - [`next_token(Option<String>)`](crate::operation::search_events::SearchEventsOutput::next_token): <p>The token for the next set of results. Absent when there are no more results.</p>
    /// - On failure, responds with [`SdkError<SearchEventsError>`](crate::operation::search_events::SearchEventsError)
    pub fn search_events(&self) -> crate::operation::search_events::builders::SearchEventsFluentBuilder {
        crate::operation::search_events::builders::SearchEventsFluentBuilder::new(self.handle.clone())
    }
}