Appendix C. Highlighting

Highlighting indicates why a document results from a query by emphasizing matching terms, giving the user an idea of what the document is about, and also showing its relationship to the query, as shown in figure C.1.

Figure C.1. Highlighting shows why a document matched a query.

Although figure C.1 is taken from DuckDuckGo, Elasticsearch offers highlighting functionality, too. For example, you can search for “elasticsearch” in get-together event titles and make that word stand out like this:

"title" : [ "Introduction to <em>Elasticsearch</em>" ],

To get such highlighting, you’ll need three things, and we’ll discuss them ...

Get Elasticsearch in Action now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.