mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-08 21:22:12 +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 Artur Konczak
|
||||||
* @author Mohsin Husen
|
* @author Mohsin Husen
|
||||||
|
* @author Alexander Volz
|
||||||
|
* @author Dennis Maaß
|
||||||
*/
|
*/
|
||||||
public enum FieldIndex {
|
public enum FieldIndex {
|
||||||
not_analyzed, analyzed
|
not_analyzed, analyzed, no
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,8 @@ import org.springframework.data.util.TypeInformation;
|
|||||||
* @author Mohsin Husen
|
* @author Mohsin Husen
|
||||||
* @author Artur Konczak
|
* @author Artur Konczak
|
||||||
* @author Kevin Leturc
|
* @author Kevin Leturc
|
||||||
|
* @author Alexander Volz
|
||||||
|
* @author Dennis Maaß
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class MappingBuilder {
|
class MappingBuilder {
|
||||||
@ -208,7 +210,7 @@ class MappingBuilder {
|
|||||||
? fieldAnnotation.pattern() : fieldAnnotation.format());
|
? 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());
|
xContentBuilder.field(FIELD_INDEX, fieldAnnotation.index().name().toLowerCase());
|
||||||
}
|
}
|
||||||
if (isNotBlank(fieldAnnotation.searchAnalyzer())) {
|
if (isNotBlank(fieldAnnotation.searchAnalyzer())) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user