Skip to content

Commit 03992ba

Browse files
committed
Polishing
1 parent 06de217 commit 03992ba

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

src/main/antora/modules/ROOT/pages/elasticsearch/elasticsearch-new.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
== New in Spring Data Elasticsearch 5.4
66

77
* Upgrade to Elasticsearch 8.14.3.
8+
* Allow to customize the mapped type name for @InnerField and @Field annotations.
89

910
[[new-features.5-3-0]]
1011
== New in Spring Data Elasticsearch 5.3

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@
241241
* @since 5.1
242242
*/
243243
boolean storeEmptyValue() default true;
244-
244+
245245
/**
246246
* overrides the field type in the mapping which otherwise will be taken from corresponding {@link FieldType}
247247
*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
* @since 5.4
173173
*/
174174
KnnIndexOptions[] knnIndexOptions() default {};
175-
175+
176176
/**
177177
* overrides the field type in the mapping which otherwise will be taken from corresponding {@link FieldType}
178178
*

src/main/java/org/springframework/data/elasticsearch/core/index/MappingBuilder.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ protected String buildPropertyMapping(ElasticsearchPersistentEntity<?> entity,
177177
var dynamicMapping = docAnnotation != null ? docAnnotation.dynamic() : null;
178178

179179
final FieldType fieldType = FieldType.Auto;
180-
mapEntity(objectNode, entity, true, "", false, fieldType, fieldType.getMappedName(), null, dynamicMapping, runtimeFields);
180+
mapEntity(objectNode, entity, true, "", false, fieldType, fieldType.getMappedName(), null, dynamicMapping,
181+
runtimeFields);
181182

182183
if (!excludeFromSource.isEmpty()) {
183184
ObjectNode sourceNode = objectNode.putObject(SOURCE);
@@ -212,7 +213,8 @@ private void writeTypeHintMapping(ObjectNode propertiesNode) throws IOException
212213
}
213214

214215
private void mapEntity(ObjectNode objectNode, @Nullable ElasticsearchPersistentEntity<?> entity,
215-
boolean isRootObject, String nestedObjectFieldName, boolean nestedOrObjectField, FieldType fieldType, String fieldTypeMappedName,
216+
boolean isRootObject, String nestedObjectFieldName, boolean nestedOrObjectField, FieldType fieldType,
217+
String fieldTypeMappedName,
216218
@Nullable Field parentFieldAnnotation, @Nullable Dynamic dynamicMapping, @Nullable Document runtimeFields)
217219
throws IOException {
218220

@@ -486,6 +488,7 @@ private void applyDisabledPropertyMapping(ObjectNode propertiesNode, Elasticsear
486488

487489
/**
488490
* Return the mapping type name to be used for the {@link Field}
491+
*
489492
* @param field field to return the mapping type name for
490493
* @return the mapping type name
491494
*/

0 commit comments

Comments
 (0)