Interface SearchMemoriesRequest.Builder

  • Method Details

    • spaceId

      The space to search. Use actorId to narrow the search within it.

      Parameters:
      spaceId - The space to search. Use actorId to narrow the search within it.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • memoryStrategies

      SearchMemoriesRequest.Builder memoryStrategies(Collection<StrategySelector> memoryStrategies)

      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.

      Parameters:
      memoryStrategies - 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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • memoryStrategies

      SearchMemoriesRequest.Builder memoryStrategies(StrategySelector... memoryStrategies)

      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.

      Parameters:
      memoryStrategies - 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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • memoryStrategies

      SearchMemoriesRequest.Builder memoryStrategies(Consumer<StrategySelector.Builder>... memoryStrategies)

      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.

      This is a convenience method that creates an instance of the StrategySelector.Builder avoiding the need to create one manually via StrategySelector.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to memoryStrategies(List<StrategySelector>).

      Parameters:
      memoryStrategies - a consumer that will call methods on StrategySelector.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • 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).

      Parameters:
      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).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • query

      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.

      Parameters:
      query - 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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sort

      The sort order (see SearchSort). Omit to return the most relevant memories first.

      Parameters:
      sort - The sort order (see SearchSort). Omit to return the most relevant memories first.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • maxResults

      SearchMemoriesRequest.Builder maxResults(Integer maxResults)

      The maximum number of memories to return, from 1 to 100. The default is 20.

      Parameters:
      maxResults - The maximum number of memories to return, from 1 to 100. The default is 20.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • nextToken

      SearchMemoriesRequest.Builder nextToken(String nextToken)

      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.

      Parameters:
      nextToken - 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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • overrideConfiguration

      SearchMemoriesRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      overrideConfiguration - The override configuration.
      Returns:
      This object for method chaining.
    • overrideConfiguration

      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      builderConsumer - A Consumer to which an empty AwsRequestOverrideConfiguration.Builder will be given.
      Returns:
      This object for method chaining.