Setting index_analyzer incorrectly sets analyzer

fixes #2329
This commit is contained in:
Shay Banon 2012-10-16 09:19:47 -04:00
parent c2073c343d
commit a963bc1dc9
1 changed files with 15 additions and 18 deletions

View File

@ -167,9 +167,6 @@ public abstract class AbstractFieldMapper<T> implements FieldMapper<T>, Mapper {
protected T indexAnalyzer(NamedAnalyzer indexAnalyzer) {
this.indexAnalyzer = indexAnalyzer;
if (this.searchAnalyzer == null) {
this.searchAnalyzer = indexAnalyzer;
}
return builder;
}
@ -483,14 +480,14 @@ public abstract class AbstractFieldMapper<T> implements FieldMapper<T>, Mapper {
protected static String indexOptionToString(IndexOptions indexOption) {
switch (indexOption) {
case DOCS_AND_FREQS:
return TypeParsers.INDEX_OPTIONS_FREQS;
case DOCS_AND_FREQS_AND_POSITIONS:
return TypeParsers.INDEX_OPTIONS_POSITIONS;
case DOCS_ONLY:
return TypeParsers.INDEX_OPTIONS_DOCS;
default:
throw new ElasticSearchIllegalArgumentException("Unknown IndexOptions [" + indexOption + "]");
case DOCS_AND_FREQS:
return TypeParsers.INDEX_OPTIONS_FREQS;
case DOCS_AND_FREQS_AND_POSITIONS:
return TypeParsers.INDEX_OPTIONS_POSITIONS;
case DOCS_ONLY:
return TypeParsers.INDEX_OPTIONS_DOCS;
default:
throw new ElasticSearchIllegalArgumentException("Unknown IndexOptions [" + indexOption + "]");
}
}