elasticsearch/elasticsearch — pull request #5223 by javanna (2014-02-21 19:01:26+00:00)
Title: Made SearchContextHighlight.Field class immutable to prevent from unwanted updates

A Field instance can map to multiple actual fields when using wildcard expressions. Each actual field should use the proper highlighter depending on the available data structure (e.g. term_vectors), while we currently select the highlighter for the first field and we keep using the same for all the fields that match the wildcard expression.

Modified also how the PercolateContext sets the forceSource option, in a global manner now rather than per field.

Closes #5175