Interface SearchVectorsResponse.Builder

  • Method Details

    • consumedCapacity

      SearchVectorsResponse.Builder consumedCapacity(VectorCapacity consumedCapacity)

      The capacity units consumed by the SearchVectors operation. Contains VectorSearchRequestBytes, which represents the vector search capacity consumed.

      Parameters:
      consumedCapacity - The capacity units consumed by the SearchVectors operation. Contains VectorSearchRequestBytes, which represents the vector search capacity consumed.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • consumedCapacity

      default SearchVectorsResponse.Builder consumedCapacity(Consumer<VectorCapacity.Builder> consumedCapacity)

      The capacity units consumed by the SearchVectors operation. Contains VectorSearchRequestBytes, which represents the vector search capacity consumed.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to consumedCapacity(VectorCapacity).

      Parameters:
      consumedCapacity - a consumer that will call methods on VectorCapacity.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • searchResults

      A list of items returned by the vector similarity search, sorted by similarity with the most similar item first. Each item contains the projected attributes and a similarity score.

      Parameters:
      searchResults - A list of items returned by the vector similarity search, sorted by similarity with the most similar item first. Each item contains the projected attributes and a similarity score.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • searchResults

      SearchVectorsResponse.Builder searchResults(SearchResultItem... searchResults)

      A list of items returned by the vector similarity search, sorted by similarity with the most similar item first. Each item contains the projected attributes and a similarity score.

      Parameters:
      searchResults - A list of items returned by the vector similarity search, sorted by similarity with the most similar item first. Each item contains the projected attributes and a similarity score.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • searchResults

      A list of items returned by the vector similarity search, sorted by similarity with the most similar item first. Each item contains the projected attributes and a similarity score.

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

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

      Parameters:
      searchResults - a consumer that will call methods on SearchResultItem.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: