mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-14 08:02:11 +00:00
DATAES-438 - get rid of deprecation warning because of invalid mapping for @Id
This commit is contained in:
parent
8c40bac9ab
commit
b949daadea
@ -50,6 +50,7 @@ import static org.springframework.util.StringUtils.*;
|
||||
* @author Dennis Maaß
|
||||
* @author Pavel Luhin
|
||||
* @author Mark Paluch
|
||||
* @author Sascha Woo
|
||||
*/
|
||||
class MappingBuilder {
|
||||
|
||||
@ -67,8 +68,7 @@ class MappingBuilder {
|
||||
public static final String COMPLETION_PRESERVE_POSITION_INCREMENTS = "preserve_position_increments";
|
||||
public static final String COMPLETION_MAX_INPUT_LENGTH = "max_input_length";
|
||||
|
||||
public static final String INDEX_VALUE_NOT_ANALYZED = "not_analyzed";
|
||||
public static final String TYPE_VALUE_STRING = "text";
|
||||
public static final String TYPE_VALUE_KEYWORD = "keyword";
|
||||
public static final String TYPE_VALUE_GEO_POINT = "geo_point";
|
||||
public static final String TYPE_VALUE_COMPLETION = "completion";
|
||||
public static final String TYPE_VALUE_GEO_HASH_PREFIX = "geohash_prefix";
|
||||
@ -215,8 +215,8 @@ class MappingBuilder {
|
||||
private static void applyDefaultIdFieldMapping(XContentBuilder xContentBuilder, java.lang.reflect.Field field)
|
||||
throws IOException {
|
||||
xContentBuilder.startObject(field.getName())
|
||||
.field(FIELD_TYPE, TYPE_VALUE_STRING)
|
||||
.field(FIELD_INDEX, INDEX_VALUE_NOT_ANALYZED);
|
||||
.field(FIELD_TYPE, TYPE_VALUE_KEYWORD)
|
||||
.field(FIELD_INDEX, true);
|
||||
xContentBuilder.endObject();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user