Interface Facet.Builder

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

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

    • documentAttributeKey

      Facet.Builder documentAttributeKey(String documentAttributeKey)

      The unique key for the document attribute.

      Parameters:
      documentAttributeKey - The unique key for the document attribute.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • facets

      Facet.Builder facets(Collection<Facet> facets)

      An array of document attributes that are nested facets 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. This helps your users further narrow their search.

      You can only have one nested facet within a facet. If you want to increase this limit, contact Support.

      Parameters:
      facets - An array of document attributes that are nested facets 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. This helps your users further narrow their search.

      You can only have one nested facet within a facet. If you want to increase this limit, contact Support.

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

      Facet.Builder facets(Facet... facets)

      An array of document attributes that are nested facets 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. This helps your users further narrow their search.

      You can only have one nested facet within a facet. If you want to increase this limit, contact Support.

      Parameters:
      facets - An array of document attributes that are nested facets 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. This helps your users further narrow their search.

      You can only have one nested facet within a facet. If you want to increase this limit, contact Support.

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

      Facet.Builder facets(Consumer<Facet.Builder>... facets)

      An array of document attributes that are nested facets 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. This helps your users further narrow their search.

      You can only have one nested facet within a facet. If you want to increase this limit, contact Support.

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

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

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

      Facet.Builder maxResults(Integer maxResults)

      Maximum number of facet values per facet. The default is 10. You can use this to limit the number of facet values to less than 10. If you want to increase the default, contact Support.

      Parameters:
      maxResults - Maximum number of facet values per facet. The default is 10. You can use this to limit the number of facet values to less than 10. If you want to increase the default, contact Support.
      Returns:
      Returns a reference to this object so that method calls can be chained together.