elasticsearch/elasticsearch — pull request #6267 by mateuszkaczynski (2014-05-21 17:09:24+00:00)
Title: Plain highlighter to use analyzer defined on a document level 

At the moment plain highligher only uses an analyzer defined for on the type level. However, during the indexing stage it is possible to define analyzer on per document level, for example mapping '_analyzer' to another field, containing required name. This commit attempts to make sure that highlighting works correctly in this scenario.

Important: the field containing the document analyzer is hardcoded to 'language_analyzer' at the moment. This should use document mappings instead. I just could not figure out a way to do it without introducing too many changes on DocumentMapper.

Closes #5497