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

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

# Class LongValueFacetBuilder

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

public final class LongValueFacetBuilder extends FacetBuilder
`FacetBuilder` for distinct numeric field values.

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LongValueFacetBuilder(String field)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final FacetResult`
  `getResult()`
  Get results for this request.
  `final LongValueFacetBuilder`
  `withSortByCount()`
  Sort results by count.
  `final LongValueFacetBuilder`
  `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

  - ### LongValueFacetBuilder

    public LongValueFacetBuilder(String field)

- ## Method Details

  - ### withTopN

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

  - ### withSortByCount

    public final LongValueFacetBuilder 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`