Fixed parsing bug in percolator, where everything after the `doc` object was skipped.
Closes #4325
This commit is contained in:
parent
346d8efeb5
commit
eacbd8f88d
|
@ -263,6 +263,8 @@ public class PercolatorService extends AbstractComponent {
|
||||||
MapperService mapperService = documentIndexService.mapperService();
|
MapperService mapperService = documentIndexService.mapperService();
|
||||||
DocumentMapper docMapper = mapperService.documentMapperWithAutoCreate(request.documentType());
|
DocumentMapper docMapper = mapperService.documentMapperWithAutoCreate(request.documentType());
|
||||||
doc = docMapper.parse(source(parser).type(request.documentType()).flyweight(true));
|
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) {
|
} else if (token == XContentParser.Token.START_OBJECT) {
|
||||||
SearchParseElement element = hlElements.get(currentFieldName);
|
SearchParseElement element = hlElements.get(currentFieldName);
|
||||||
|
|
Loading…
Reference in New Issue