SearchMemoriesInput
¶
Source code in docs_src/capo_opensearchmemory/types/search_memories_input.py
actor_id
instance-attribute
¶
actor_id: ActorId
The actor whose memories to search (exact match). Required: every search covers exactly one actor, and a memory stored without an actor is never returned. This is the only way to filter by actor: a query that references system_metadata.actor_id fails with ValidationException (reason nonFilterableField).
max_results
instance-attribute
¶
max_results: NotRequired[MaxResults]
The maximum number of memories to return, from 1 to 100. The default is 20.
memory_strategies
instance-attribute
¶
memory_strategies: NotRequired[StrategySelectorList]
The strategies to search, as a list of selectors. Each selector names a memory type and, optionally, specific strategy names of that type. A space can hold several strategies of the same type. A selector without memoryStrategyNames searches every strategy of its type, and omitting memoryStrategies searches every strategy in the space. A name that is not a declared strategy of that type fails with ValidationException.
next_token
instance-attribute
¶
next_token: NotRequired[PaginationToken]
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.
query
instance-attribute
¶
query: SearchQuery
The query: a subset of the OpenSearch Query DSL (see SearchQuery). You can't use the actor and session fields system_metadata.actor_id and system_metadata.session_id here. Use the top-level actorId to filter by actor. Searching memories doesn't filter by session.
sort
instance-attribute
¶
sort: NotRequired[SearchSort]
The sort order (see SearchSort). Omit to return the most relevant memories first.