diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/mapping/Indexed.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/mapping/Indexed.java index f98e348ba..60d7ecd52 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/mapping/Indexed.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/mapping/Indexed.java @@ -21,9 +21,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * Identifies a secondary index in the table. Usually it is a field with common duplicate values within the table. - * - * Using unique fields is not recommended. + * Identifies a secondary index in the table on a single, non-key column. * * @author Alex Shvid * @author Matthew T. Adams @@ -31,4 +29,10 @@ import java.lang.annotation.Target; @Retention(value = RetentionPolicy.RUNTIME) @Target(value = { ElementType.FIELD, ElementType.METHOD, ElementType.ANNOTATION_TYPE }) public @interface Indexed { + + /** + * The name of the index. If {@literal null} or empty, then the index name will be generated by Cassandra and will be + * unknown unless column metadata is used to discover the generated index name. + */ + String value() default ""; }