Fixed parsing bug in percolator, where everything after the `doc` object was skipped.

Closes #4325
This commit is contained in:
Martijn van Groningen 2013-12-04 01:11:24 +01:00
parent 346d8efeb5
commit eacbd8f88d
1 changed files with 2 additions and 0 deletions

View File

@ -263,6 +263,8 @@ public class PercolatorService extends AbstractComponent {
MapperService mapperService = documentIndexService.mapperService();
DocumentMapper docMapper = mapperService.documentMapperWithAutoCreate(request.documentType());
doc = docMapper.parse(source(parser).type(request.documentType()).flyweight(true));
// the document parsing exists the "doc" object, so we need to set the new current field.
currentFieldName = parser.currentName();
}
} else if (token == XContentParser.Token.START_OBJECT) {
SearchParseElement element = hlElements.get(currentFieldName);