mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-07 20:52:10 +00:00
DATAES-140 add value "no" in Enum FieldIndex.
(cherry picked from commit 1b867cf)
This commit is contained in:
parent
5e3a50c85c
commit
acecc003cb
@ -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())) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user