diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/Score.java b/src/main/java/org/springframework/data/elasticsearch/annotations/Score.java index 1696626c6..f5cd57a21 100644 --- a/src/main/java/org/springframework/data/elasticsearch/annotations/Score.java +++ b/src/main/java/org/springframework/data/elasticsearch/annotations/Score.java @@ -8,16 +8,21 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import org.springframework.data.annotation.ReadOnlyProperty; +import org.springframework.data.elasticsearch.core.SearchHit; /** * Specifies that this field is used for storing the document score. * * @author Sascha Woo + * @author Peter-Josef Meisch * @since 3.1 + * @deprecated since 4.0, use {@link SearchHit#getScore()} instead */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) @Documented @Inherited @ReadOnlyProperty -public @interface Score {} +@Deprecated +public @interface Score { +} diff --git a/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchPersistentEntity.java b/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchPersistentEntity.java index 8b08f321b..6d2ab20cd 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchPersistentEntity.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchPersistentEntity.java @@ -63,7 +63,9 @@ public interface ElasticsearchPersistentEntity extends PersistentEntity extends PersistentEntity