Interface DocumentAttributeValueCountPair.Builder

    • Method Detail

      • documentAttributeValue

        DocumentAttributeValueCountPair.Builder documentAttributeValue​(DocumentAttributeValue documentAttributeValue)

        The value of the attribute/field. For example, "HR".

        Parameters:
        documentAttributeValue - The value of the attribute/field. For example, "HR".
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • count

        DocumentAttributeValueCountPair.Builder count​(Integer count)

        The number of documents in the response that have the attribute/field value for the key.

        Parameters:
        count - The number of documents in the response that have the attribute/field value for the key.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • facetResults

        DocumentAttributeValueCountPair.Builder facetResults​(Collection<FacetResult> facetResults)

        Contains the results of a document attribute/field that is a nested facet. A FacetResult contains the counts for each facet nested within a facet.

        For example, the document attribute or facet "Department" includes a value called "Engineering". In addition, the document attribute or facet "SubDepartment" includes the values "Frontend" and "Backend" for documents assigned to "Engineering". You can display nested facets in the search results so that documents can be searched not only by department but also by a sub department within a department. The counts for documents that belong to "Frontend" and "Backend" within "Engineering" are returned for a query.

        Parameters:
        facetResults - Contains the results of a document attribute/field that is a nested facet. A FacetResult contains the counts for each facet nested within a facet.

        For example, the document attribute or facet "Department" includes a value called "Engineering". In addition, the document attribute or facet "SubDepartment" includes the values "Frontend" and "Backend" for documents assigned to "Engineering". You can display nested facets in the search results so that documents can be searched not only by department but also by a sub department within a department. The counts for documents that belong to "Frontend" and "Backend" within "Engineering" are returned for a query.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • facetResults

        DocumentAttributeValueCountPair.Builder facetResults​(FacetResult... facetResults)

        Contains the results of a document attribute/field that is a nested facet. A FacetResult contains the counts for each facet nested within a facet.

        For example, the document attribute or facet "Department" includes a value called "Engineering". In addition, the document attribute or facet "SubDepartment" includes the values "Frontend" and "Backend" for documents assigned to "Engineering". You can display nested facets in the search results so that documents can be searched not only by department but also by a sub department within a department. The counts for documents that belong to "Frontend" and "Backend" within "Engineering" are returned for a query.

        Parameters:
        facetResults - Contains the results of a document attribute/field that is a nested facet. A FacetResult contains the counts for each facet nested within a facet.

        For example, the document attribute or facet "Department" includes a value called "Engineering". In addition, the document attribute or facet "SubDepartment" includes the values "Frontend" and "Backend" for documents assigned to "Engineering". You can display nested facets in the search results so that documents can be searched not only by department but also by a sub department within a department. The counts for documents that belong to "Frontend" and "Backend" within "Engineering" are returned for a query.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • facetResults

        DocumentAttributeValueCountPair.Builder facetResults​(Consumer<FacetResult.Builder>... facetResults)

        Contains the results of a document attribute/field that is a nested facet. A FacetResult contains the counts for each facet nested within a facet.

        For example, the document attribute or facet "Department" includes a value called "Engineering". In addition, the document attribute or facet "SubDepartment" includes the values "Frontend" and "Backend" for documents assigned to "Engineering". You can display nested facets in the search results so that documents can be searched not only by department but also by a sub department within a department. The counts for documents that belong to "Frontend" and "Backend" within "Engineering" are returned for a query.

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

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #facetResults(List).

        Parameters:
        facetResults - a consumer that will call methods on FacetResult.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #facetResults(java.util.Collection)