elasticsearch/elasticsearch — pull request #5378 by nik9000 (2014-03-10 14:22:41+00:00)
Title: Add a char_filter cutting the field into sentences

Adds a char_filter that cuts the field down to the configured number of
sentences. Defaults to just the first sentence.

There is some impedence between the incoming Reader and the CharacterIterator
that has to be passed to the BreakIterator. We copy a configurable number
of characters into a character array and shove those into the BreakIterator
via Lucene's CharArrayIterator rather than try anything fancy. Hopefully
this is fine from a performance perspective.

Closes #5377