You have probably heard of highlighting, or even if you are not familiar with the name, you've probably seen highlighted results on the usual web pages you visit. Highlighting is the process of showing which word or words from the query were matched in the resulting documents. For example, if we want to do a search on Google for the word
lucene, we will see it in bold in the list of results as shown in the following screenshot:
In this chapter, we will see how to use the Elasticsearch highlighting capabilities to enhance our application with highlighted results.
There is no better way of showing how highlighting ...