make sure we use the default index analyzer for _all field, even though it works well without it now because the _analyzer field comes before it and sets the context.analyzer

This commit is contained in:
Shay Banon 2011-11-17 15:37:51 +02:00
parent b0880e114e
commit 835dc33d45
1 changed files with 5 additions and 1 deletions

View File

@ -181,7 +181,11 @@ public class AllFieldMapper extends AbstractFieldMapper<Void> implements Interna
if (analyzer == null) {
analyzer = context.analyzer();
if (analyzer == null) {
analyzer = Lucene.STANDARD_ANALYZER;
analyzer = context.docMapper().indexAnalyzer();
if (analyzer == null) {
// This should not happen, should we log warn it?
analyzer = Lucene.STANDARD_ANALYZER;
}
}
}
return analyzer;