org.hibernate.search.query.facet

## Interface FacetSelection

-     public interface FacetSelection

  Groups a set of `Facet` to be applied onto a query. The facet criteria within a `FacetSelection` are combined in a disjunction (logical OR).
  Author:
    Hardy Ferentschik

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearSelectedFacets()` Clear all facets in this selection
    `void` | `deselectFacets(Facet... facets)`
    `BooleanClause.Occur` | `getOccurType()`
    `List<Facet>` | `getSelectedFacets()`
    `void` | `selectFacets(Facet... facets)`
    `void` | `selectFacets(FacetCombine combineBy, Facet... facets)`

- - ### Method Detail

    - #### selectFacets

          void selectFacets(Facet... facets)

      Parameters:
        `facets` - An array of facets which have to be applied as disjunction onto the current query. Facets are combined via `FacetCombine.OR`.

    - #### selectFacets

          void selectFacets(FacetCombine combineBy,
                            Facet... facets)

      Parameters:
        `combineBy` - enum value defining how the different facet should be combined when building a boolean query which gets applied onto the current query
        `facets` - An array of facets which have to be applied as disjunction onto the current query

    - #### getSelectedFacets

          List<Facet> getSelectedFacets()

      Returns:
        returns an unmodifiable list of the currently selected facets

    - #### getOccurType

          BooleanClause.Occur getOccurType()

      Returns:
        the operator used to combine the facets.

    - #### deselectFacets

          void deselectFacets(Facet... facets)

      Parameters:
        `facets` - An array of facets to e removed from the current facet. Facets which were not part of this selection will be ignored.

    - #### clearSelectedFacets

          void clearSelectedFacets()

      Clear all facets in this selection

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