elastic/elasticsearch

Highlighting array field - Also return non-matching entries

Open

#7416 opened on Aug 22, 2014

View on GitHub
 (31 comments) (27 reactions) (0 assignees)Java (76,700 stars) (25,882 forks)batch import
:Search Relevance/Highlighting>enhancementTeam:Search Relevancegood first issuehelp wanted

Description

I have an array field with the entries [foo, foobar, bar] and search for foo. The highlighting then returns for that field

[<em>foo</em>, <em>foo</em>bar]

I would like it to return

[<em>foo</em>, <em>foo</em>bar, bar]

I did try to set no_match_size as described on http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-highlighting.html but that didn't work. Is there any way to make elasticsearch behave the way I want?

Contributor guide