org.hibernate.search.annotations

## Annotation Type FullTextFilterDef

-     @Retention(value=RUNTIME)
       @Target(value={PACKAGE,TYPE})
       @Documented
       @Repeatable(value=FullTextFilterDefs.class)
      public @interface FullTextFilterDef

  Defines a FullTextFilter that can be optionally applied to every FullText Queries While not related to a specific indexed entity, the annotation has to be set on one of them
  Author:
    Emmanuel Bernard

- - ### Required Element Summary

    Required Elements
    Modifier and Type | Required Element and Description
    --- | ---
    `Class<?>` | `impl` The implementation of this filter definition.
    `String` | `name`

  - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `FilterCacheModeType` | `cache`

- - ### Element Detail

    - #### name

          public abstract String name

      Returns:
        the filter name. Must be unique across all mappings for a given persistence unit

  - - #### impl

          public abstract Class<?> impl

      The implementation of this filter definition. May be:
      - a class implementing `Query` or
      - a filter factory class, defining a method annotated with `Factory` which has no parameters and returns a `Query` instance.
      The given class must define a no-args constructor and a JavaBeans setter method for each parameter to be passed via `FullTextFilter.setParameter(String, Object)`.

      The Lucene filter created by this filter definition must be thread-safe.

      Returns:
        A class implementing `Query` or a factory class

  - - #### cache

          public abstract FilterCacheModeType cache

      Returns:
        The cache mode for the filter. Default to instance and results caching
      Default:
        org.hibernate.search.annotations.FilterCacheModeType.INSTANCE_AND_DOCIDSETRESULTS

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