Skip to content

Commit 7cedc6b

Browse files
committed
Add Option to not store the id property in the document source.
Closes spring-projects#2364
1 parent cf9b106 commit 7cedc6b

File tree

1 file changed

+8
-0
lines changed
  • src/main/java/org/springframework/data/elasticsearch/annotations

1 file changed

+8
-0
lines changed

src/main/java/org/springframework/data/elasticsearch/annotations/Document.java

+8
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@
7777
*/
7878
Dynamic dynamic() default Dynamic.INHERIT;
7979

80+
/**
81+
* Specifies if the id property should also be stored in the Elasticsearch document source. Default value is
82+
* {@literal true}
83+
*
84+
* @since 5.1
85+
*/
86+
boolean storeIdInSource() default true;
87+
8088
/**
8189
* @since 4.3
8290
*/

0 commit comments

Comments
 (0)