org.hibernate.search.query.facet

## Interface Facet

- All Known Subinterfaces:
    RangeFacet<T>
  All Known Implementing Classes:
    AbstractFacet, RangeFacetImpl

      public interface Facet

  A single facet (field value and count).
  Author:
    Hardy Ferentschik

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getCount()`
    `String` | `getFacetingName()`
    `Query` | `getFacetQuery()`
    `String` | `getFieldName()` Return the `Document` field name this facet is targeting.
    `String` | `getValue()`

- - ### Method Detail

    - #### getFacetingName

          String getFacetingName()

      Returns:
        the faceting name this `Facet` belongs to.
      See Also:
        `FacetingRequest.getFacetingName()`

    - #### getFieldName

          String getFieldName()

      Return the `Document` field name this facet is targeting. The field needs to be indexed with `Analyze.NO`.
      Returns:
        the `Document` field name this facet is targeting.

    - #### getValue

          String getValue()

      Returns:
        the value of this facet. In case of a discrete facet it is the actual `Document` field value. In case of a range query the value is a string representation of the range.

    - #### getCount

          int getCount()

      Returns:
        the facet count.

    - #### getFacetQuery

          Query getFacetQuery()

      Returns:
        a Lucene `Query` which which can be executed to retrieve all documents matching the value of this facet.

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved