Interface FacetResult.Builder

All Superinterfaces:
Buildable, CopyableBuilder<FacetResult.Builder,FacetResult>, SdkBuilder<FacetResult.Builder,FacetResult>, SdkPojo
Enclosing class:
FacetResult

public static interface FacetResult.Builder extends SdkPojo, CopyableBuilder<FacetResult.Builder,FacetResult>
  • Method Details

    • documentAttributeKey

      FacetResult.Builder documentAttributeKey(String documentAttributeKey)

      The key for the facet values. This is the same as the DocumentAttributeKey provided in the query.

      Parameters:
      documentAttributeKey - The key for the facet values. This is the same as the DocumentAttributeKey provided in the query.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • documentAttributeValueType

      FacetResult.Builder documentAttributeValueType(String documentAttributeValueType)

      The data type of the facet value. This is the same as the type defined for the index field when it was created.

      Parameters:
      documentAttributeValueType - The data type of the facet value. This is the same as the type defined for the index field when it was created.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • documentAttributeValueType

      FacetResult.Builder documentAttributeValueType(DocumentAttributeValueType documentAttributeValueType)

      The data type of the facet value. This is the same as the type defined for the index field when it was created.

      Parameters:
      documentAttributeValueType - The data type of the facet value. This is the same as the type defined for the index field when it was created.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • documentAttributeValueCountPairs

      FacetResult.Builder documentAttributeValueCountPairs(Collection<DocumentAttributeValueCountPair> documentAttributeValueCountPairs)

      An array of key/value pairs, where the key is the value of the attribute and the count is the number of documents that share the key value.

      Parameters:
      documentAttributeValueCountPairs - An array of key/value pairs, where the key is the value of the attribute and the count is the number of documents that share the key value.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • documentAttributeValueCountPairs

      FacetResult.Builder documentAttributeValueCountPairs(DocumentAttributeValueCountPair... documentAttributeValueCountPairs)

      An array of key/value pairs, where the key is the value of the attribute and the count is the number of documents that share the key value.

      Parameters:
      documentAttributeValueCountPairs - An array of key/value pairs, where the key is the value of the attribute and the count is the number of documents that share the key value.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • documentAttributeValueCountPairs

      FacetResult.Builder documentAttributeValueCountPairs(Consumer<DocumentAttributeValueCountPair.Builder>... documentAttributeValueCountPairs)

      An array of key/value pairs, where the key is the value of the attribute and the count is the number of documents that share the key value.

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

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

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