Package org.apache.lucene.facet.facetset

# Class FacetSetMatcher

java.lang.Object
org.apache.lucene.facet.facetset.FacetSetMatcher

Direct Known Subclasses:
  `ExactFacetSetMatcher`, `RangeFacetSetMatcher`

public abstract class FacetSetMatcher extends Object
Matches the encoded `FacetSet` that was indexed in `FacetSetsField`.

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

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final int`
  `dims`
  The number of dimensions that are matched by this matcher.
  `final String`
  `label`
  The label to associate to this matcher's aggregated value.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `FacetSetMatcher(String label, int dims)`
  Constructs a new matcher.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract boolean`
  `matches(long[] dimValues)`
  Returns true if the facet set encoded in the given `long[]` is matched by this matcher.

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

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

- ## Field Details

  - ### label

    public final String label
    The label to associate to this matcher's aggregated value.

  - ### dims

    public final int dims
    The number of dimensions that are matched by this matcher.

- ## Constructor Details

  - ### FacetSetMatcher

    protected FacetSetMatcher(String label, int dims)
    Constructs a new matcher.
    Parameters:
      `label` - the label to associate to this matcher's aggregated value
      `dims` - the number of dimensions that are matched by this matcher

- ## Method Details

  - ### matches

    public abstract boolean matches(long[] dimValues)
    Returns true if the facet set encoded in the given `long[]` is matched by this matcher.
    Parameters:
      `dimValues` - the encoded dimension values of a single facet set in this field