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 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.