Skip to content

Commit 288705c

Browse files
authored
Support field exclusion from source.
Original Pull Request #1962 Closes #769
1 parent 59fdbbe commit 288705c

File tree

4 files changed

+441
-319
lines changed

4 files changed

+441
-319
lines changed

Diff for: src/main/java/org/springframework/data/elasticsearch/annotations/Field.java

+9-1
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,16 @@
199199
/**
200200
* Controls how Elasticsearch dynamically adds fields to the inner object within the document.<br>
201201
* To be used in combination with {@link FieldType#Object} or {@link FieldType#Nested}
202-
*
202+
*
203203
* @since 4.3
204204
*/
205205
Dynamic dynamic() default Dynamic.INHERIT;
206+
207+
/**
208+
* marks this field to be excluded from the _source in Elasticsearch
209+
* (https://www.elastic.co/guide/en/elasticsearch/reference/7.15.0/mapping-source-field.html#include-exclude)
210+
*
211+
* @since 4.3
212+
*/
213+
boolean excludeFromSource() default false;
206214
}

0 commit comments

Comments
 (0)