Text Query does not use search_analyzer on field that is prefixed with the type name, closes #1390.

This commit is contained in:
Shay Banon 2011-10-12 22:14:03 +02:00
parent 1012f6a3ea
commit 0367103423
1 changed files with 3 additions and 0 deletions

View File

@ -130,6 +130,9 @@ public class TextQueryParser {
if (mapper != null) { if (mapper != null) {
analyzer = mapper.searchAnalyzer(); analyzer = mapper.searchAnalyzer();
} }
if (analyzer == null && smartNameFieldMappers != null && smartNameFieldMappers.docMapper() != null) {
analyzer = smartNameFieldMappers.docMapper().searchAnalyzer();
}
if (analyzer == null) { if (analyzer == null) {
analyzer = parseContext.mapperService().searchAnalyzer(); analyzer = parseContext.mapperService().searchAnalyzer();
} }