Elasticsearch allows you to emphasize the match terms in your query by means of the highlighting feature to improve the user experience. If the store parameter is not specified for the relevant fields in the mappings, then the highlighting fields are extracted from the _source parameter. All matching words will be rendered in a small portion of the original text in the highlight object field of the response body. Three highlighters are supported—unified, plain, and Fast Vector Highlighter (fvh). There are several parameters that can be passed in the search request to control the highlighting process, as shown in the following table. These settings can be declared in the global scope or in the local scope (field ...
The highlighting parameter
Get Advanced Elasticsearch 7.0 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.