Returning text snippet containing highlighted hits

Hi,

we're indexing tables from a relational database where some fields have a
rather large amount of text. What i'm trying to implement is some sort of
"snippet preview" to show part of the text which contains the highlighted
match.

Is there some way to retrieve this kind of result directly from
elasticsearch?

regards

-robert

Hi Robert

just use the highlight option, it has neat options like the tags to
use, the size of the fragment and the number of fragments to return

~M

On Nov 14, 7:28 am, Robert Gründler r.gruend...@gmail.com wrote:

Hi,

we're indexing tables from a relational database where some fields have a
rather large amount of text. What i'm trying to implement is some sort of
"snippet preview" to show part of the text which contains the highlighted
match.

Is there some way to retrieve this kind of result directly from
elasticsearch?

regards

-robert