org.hibernate.search.annotations

## Annotation Type SortableField

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

  Makes a property sortable.

  A field for that property must be declared via the `Field` annotation from which the field bridge configuration will be inherited. In the rare case that a property should be sortable but not searchable, declare a field which is not indexed nor stored. Then only the sort field will be added to the document, but no standard index field.

  Sorting on a field without a declared sort field will still work, but it will be slower and cause a higher memory consumption. Therefore it's strongly recommended to declare each required sort field.

  Author:
    Gunnar Morling

- - ### Optional Element Summary

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

- - ### Element Detail

    - #### forField

          public abstract String forField

      Returns:
        the name of the field whose field bridge to apply to obtain the value of this sort field. Can be omitted in case only a single field exists for the annotated property.
      Default:
        ""

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