TaxonomyFacetBuilder (Lucene 10.5.1 sandbox API)
Description: declaration: package: org.apache.lucene.sandbox.facet.utils, class: TaxonomyFacetBuilder

Package org.apache.lucene.sandbox.facet.utils

# Class TaxonomyFacetBuilder

java.lang.Object
org.apache.lucene.sandbox.facet.utils.FacetBuilder
org.apache.lucene.sandbox.facet.utils.TaxonomyFacetBuilder

public final class TaxonomyFacetBuilder extends FacetBuilder
`FacetBuilder` for taxonomy facets.

WARNING: This API is experimental and might change in incompatible ways in the next release.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TaxonomyFacetBuilder(FacetsConfig facetsConfig, TaxonomyReader taxonomyReader, String dimension, String... path)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final FacetResult`
  `getResult()`
  Get results for this request.
  `final TaxonomyFacetBuilder`
  `withSortByCount()`
  Sort results by count.
  `final TaxonomyFacetBuilder`
  `withTopN(int n)`
  Request top N results only.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### TaxonomyFacetBuilder

    public TaxonomyFacetBuilder(FacetsConfig facetsConfig, TaxonomyReader taxonomyReader, String dimension, String... path)

- ## Method Details

  - ### withTopN

    public final TaxonomyFacetBuilder withTopN(int n)
    Request top N results only. If not set, return all results.

  - ### withSortByCount

    public final TaxonomyFacetBuilder withSortByCount()
    Sort results by count.

  - ### getResult

    public final FacetResult getResult()
    Description copied from class: `FacetBuilder`
    Get results for this request.
    Specified by:
      `getResult` in class `FacetBuilder`