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

(cherry picked from commit 1b867cf)
This commit is contained in:
avolz 2014-12-17 08:05:16 +00:00 committed by Artur Konczak
parent 5e3a50c85c
commit acecc003cb
2 changed files with 6 additions and 2 deletions

View File

@ -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
}

View File

@ -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())) {