"index_analyzer" and "search_analyzer" should override "analyzer", closes #2052.
This commit is contained in:
parent
11ca3ea0ec
commit
c39a27a328
|
@ -68,6 +68,13 @@ public class TypeParsers {
|
|||
builder.omitNorms(nodeBooleanValue(propNode));
|
||||
} else if (propName.equals("omit_term_freq_and_positions")) {
|
||||
builder.omitTermFreqAndPositions(nodeBooleanValue(propNode));
|
||||
} else if (propName.equals("analyzer")) {
|
||||
NamedAnalyzer analyzer = parserContext.analysisService().analyzer(propNode.toString());
|
||||
if (analyzer == null) {
|
||||
throw new MapperParsingException("Analyzer [" + propNode.toString() + "] not found for field [" + name + "]");
|
||||
}
|
||||
builder.indexAnalyzer(analyzer);
|
||||
builder.searchAnalyzer(analyzer);
|
||||
} else if (propName.equals("index_analyzer")) {
|
||||
NamedAnalyzer analyzer = parserContext.analysisService().analyzer(propNode.toString());
|
||||
if (analyzer == null) {
|
||||
|
@ -80,13 +87,6 @@ public class TypeParsers {
|
|||
throw new MapperParsingException("Analyzer [" + propNode.toString() + "] not found for field [" + name + "]");
|
||||
}
|
||||
builder.searchAnalyzer(analyzer);
|
||||
} else if (propName.equals("analyzer")) {
|
||||
NamedAnalyzer analyzer = parserContext.analysisService().analyzer(propNode.toString());
|
||||
if (analyzer == null) {
|
||||
throw new MapperParsingException("Analyzer [" + propNode.toString() + "] not found for field [" + name + "]");
|
||||
}
|
||||
builder.indexAnalyzer(analyzer);
|
||||
builder.searchAnalyzer(analyzer);
|
||||
} else if (propName.equals("include_in_all")) {
|
||||
builder.includeInAll(nodeBooleanValue(propNode));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue