concept specificity in category elasticsearch

This is an excerpt from Manning's book Relevant Search: With applications for Solr and Elasticsearch.
Wouldn’t it be nice if you could search for an item like “dog” and pull back documents that contain terms like poodle, terrier, and beagle, even if those documents happen to not use the word dog? And go a step further. Wouldn’t it be nice to do a search for “animal” and pull back results that contain dog, poodle, cat, and so forth, even if the word animal isn’t included in the document? Well, you can! By using asymmetric analysis techniques, you can encode a notion of specificity into the search application. Asymmetric analysis means that the analysis applied at query time is different from the analysis applied at index time.
To fully understand how asymmetric analysis may be used to encode specificity, let’s look at an approachable example. Here we could use the preceding dog example, but that’s boring. Let’s use a more interesting example like, I don’t know, fruit! Consider the fruit hierarchy shown in figure 4.5.