Annotation Interface HashIndexed

@Target({ANNOTATION_TYPE,FIELD}) @Retention(RUNTIME) public @interface HashIndexed
Annotation for a property that should be used as key for a Hashed Index. If used on a simple property, the index uses a hashing function to compute the hash of the value of the index field. Added to a property of complex type the embedded document is collapsed and the hash computed for the entire object.
 public class DomainType {

        @HashIndexed @Id String id;
HashIndexed can also be used as meta Annotation to create composed annotations:
 public @interface IndexAndHash {

        @AliasFor(annotation = Indexed.class, attribute = "name")
        String name() default "";

 public class DomainType {

        @ComposedHashIndexed(name = "idx-name") String value;
Christoph Strobl
See Also: