1
0
mirror of synced 2026-07-07 10:40:02 +00:00

DATAES-140 add value "no" in Enum FieldIndex.

This commit is contained in:
avolz
2014-12-11 13:49:59 +01:00
parent 5e3a50c85c
commit 1b867cf3cf
2 changed files with 6 additions and 2 deletions
@@ -18,7 +18,9 @@ package org.springframework.data.elasticsearch.annotations;
/**
* @author Artur Konczak
* @author Mohsin Husen
* @author Alexander Volz
* @author Dennis Maaß
*/
public enum FieldIndex {
not_analyzed, analyzed
not_analyzed, analyzed, no
}
@@ -41,6 +41,8 @@ import org.springframework.data.util.TypeInformation;
* @author Mohsin Husen
* @author Artur Konczak
* @author Kevin Leturc
* @author Alexander Volz
* @author Dennis Maaß
*/
class MappingBuilder {
@@ -208,7 +210,7 @@ class MappingBuilder {
? fieldAnnotation.pattern() : fieldAnnotation.format());
}
}
if (FieldIndex.not_analyzed == fieldAnnotation.index()) {
if (FieldIndex.not_analyzed == fieldAnnotation.index() || FieldIndex.no == fieldAnnotation.index()) {
xContentBuilder.field(FIELD_INDEX, fieldAnnotation.index().name().toLowerCase());
}
if (isNotBlank(fieldAnnotation.searchAnalyzer())) {