org.hibernate.search.annotations

## Annotation Type ClassBridge

-     @Retention(value=RUNTIME)
       @Target(value=TYPE)
       @Documented
       @Repeatable(value=ClassBridges.class)
      public @interface ClassBridge

  This annotation allows a user to apply an implementation class to a Lucene document to manipulate it in any way the user sees fit.
  Author:
    John Griffin, Hardy Ferentschik

- - ### Required Element Summary

    Required Elements
    Modifier and Type | Required Element and Description
    --- | ---
    `Class<?>` | `impl`

  - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `Analyze` | `analyze`
    `Analyzer` | `analyzer`
    `Boost` | `boost`
    `Index` | `index`
    `String` | `name`
    `Normalizer` | `normalizer`
    `Norms` | `norms`
    `Parameter[]` | `params`
    `Store` | `store`
    `TermVector` | `termVector`

- - ### Element Detail

    - #### impl

          public abstract Class<?> impl

      Returns:
        Custom implementation of class bridge

  - - #### name

          public abstract String name

      Returns:
        default field name passed to your bridge implementation (see `FieldBridge.set(String, Object, org.apache.lucene.document.Document, org.hibernate.search.bridge.LuceneOptions)`).

        Note:
        You can ignore the passed field name in your bridge implementation and add a field or even fields with different names, however any analyzer specified via `analyzer()` will only apply for the field name specified with this parameter.

      Default:
        ""

  - - #### store

          public abstract Store store

      Returns:
        Returns an instance of the `Store` enum, indicating whether the value should be stored in the document. Defaults to `Store.NO`
      Default:
        org.hibernate.search.annotations.Store.NO

  - - #### index

          public abstract Index index

      Returns:
        Returns a `Index` enum defining whether the value should be indexed or not. Defaults to `Index.YES`
      Default:
        org.hibernate.search.annotations.Index.YES

  - - #### analyze

          public abstract Analyze analyze

      Returns:
        Returns a `Analyze` enum defining whether the value should be analyzed or not. Defaults to `Analyze.YES`
      Default:
        org.hibernate.search.annotations.Analyze.YES

  - - #### norms

          public abstract Norms norms

      Returns:
        Returns a `Norms` enum defining whether the norms should be stored in the index or not. Defaults to `Norms.YES`
      Default:
        org.hibernate.search.annotations.Norms.YES

  - - #### termVector

          public abstract TermVector termVector

      Returns:
        Returns an instance of the `TermVector` enum defining how and if term vectors should be stored. Default is `TermVector.NO`
      Default:
        org.hibernate.search.annotations.TermVector.NO

  - - #### analyzer

          public abstract Analyzer analyzer

      Returns:
        Returns the analyzer to be used. Defaults to none. Must be empty if `normalizer()` is used.
      Default:
        @org.hibernate.search.annotations.Analyzer

  - - #### normalizer

          public abstract Normalizer normalizer

      Returns:
        Returns the normalizer to be used. Defaults to none. Must be empty if `analyzer()` is used.
      Default:
        @org.hibernate.search.annotations.Normalizer

  - - #### boost

          public abstract Boost boost

      Returns:
        Returns a `Boost` annotation defining a float index time boost value
      Default:
        @org.hibernate.search.annotations.Boost(1.0f)

  - - #### params

          public abstract Parameter[] params

      Returns:
        Array of `Parameter` instances passed to the class specified by `impl()` to initialize the class bridge
      Default:
        {}

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