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

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

# Class RangeFacetBuilderFactory

java.lang.Object
org.apache.lucene.sandbox.facet.utils.RangeFacetBuilderFactory

public final class RangeFacetBuilderFactory extends Object
`FacetBuilder` factory for faceting types base on numeric fields.

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static CommonFacetBuilder`
  `forDoubleRanges(String dimension, MultiDoubleValuesSource valuesSource, DoubleRange... ranges)`
  Request double range facets for provided `MultiDoubleValuesSource` by default sorted in original ranges order.
  `static CommonFacetBuilder`
  `forDoubleRanges(String field, DoubleRange... ranges)`
  Request double range facets for numeric field by name.
  `static CommonFacetBuilder`
  `forLongRanges(String dimension, MultiLongValuesSource valuesSource, LongRange... ranges)`
  Request long range facets for provided `MultiLongValuesSource` by default sorted in original ranges order.
  `static CommonFacetBuilder`
  `forLongRanges(String field, LongRange... ranges)`
  Request long range facets for numeric field by name.

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

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

- ## Method Details

  - ### forLongRanges

    public static CommonFacetBuilder forLongRanges(String field, LongRange... ranges)
    Request long range facets for numeric field by name.

  - ### forLongRanges

    public static CommonFacetBuilder forLongRanges(String dimension, MultiLongValuesSource valuesSource, LongRange... ranges)
    Request long range facets for provided `MultiLongValuesSource` by default sorted in original ranges order.
    Parameters:
      `dimension` - dimension to return in results to match `LongRangeFacetCounts.getTopChildren(int, java.lang.String, java.lang.String[])` results
      `valuesSource` - value source
      `ranges` - ranges

  - ### forDoubleRanges

    public static CommonFacetBuilder forDoubleRanges(String field, DoubleRange... ranges)
    Request double range facets for numeric field by name.

  - ### forDoubleRanges

    public static CommonFacetBuilder forDoubleRanges(String dimension, MultiDoubleValuesSource valuesSource, DoubleRange... ranges)
    Request double range facets for provided `MultiDoubleValuesSource` by default sorted in original ranges order.
    Parameters:
      `dimension` - dimension to return in results to match `DoubleRangeFacetCounts.getTopChildren(int, java.lang.String, java.lang.String[])` results
      `valuesSource` - value source
      `ranges` - ranges