org.hibernate.search.annotations

## Annotation Type Facet

-     @Retention(value=RUNTIME)
       @Target(value={METHOD,FIELD})
       @Documented
       @Repeatable(value=Facets.class)
      public @interface Facet

  Extension annotation for `@Field` enabling it for faceting.
  Author:
    Hardy Ferentschik
  Experimental
    : This feature is experimental

- - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `FacetEncodingType` | `encoding`
    `String` | `forField`
    `String` | `name`

- - ### Element Detail

    - #### name

          public abstract String name

      Returns:
        the facet name. Defaults to the name of the field this facet refers to
      Default:
        ""

  - - #### forField

          public abstract String forField

      Returns:
        the field name this annotation refers to. It can be omitted in case there is only a single `@Field` annotation
      Default:
        ""

  - - #### encoding

          public abstract FacetEncodingType encoding

      Returns:
        the encoding type to use for this facet. Per default the encoding type is chosen based on the type of the entity property.
      Default:
        org.hibernate.search.annotations.FacetEncodingType.AUTO

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