@Target(value={ANNOTATION_TYPE,FIELD}) @Retention(value=RUNTIME) public @interface HashIndexed
@Document
public class DomainType {
@HashIndexed @Id String id;
}
HashIndexed can also be used as meta Annotation to create composed annotations:
@Indexed
@HashIndexed
@Retention(RetentionPolicy.RUNTIME)
public @interface IndexAndHash {
@AliasFor(annotation = Indexed.class, attribute = "name")
String name() default "";
}
@Document
public class DomainType {
@ComposedHashIndexed(name = "idx-name") String value;
}
HashedIndexCopyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.