Extensive writeup: http://project-a.github.io/on-site-search-design-patterns-for-e-commerce/
How can customers find the products that are relevant to what they are searching for? We will show in quite some detail how to set up Elasticsearch and how to represent documents so that:
* a customer can easily find what he wants by clicking through the category tree and applying filters (faceted navigation)
* relevant products can be found through a full text search (with optionally more filters applied to drill down the results)
* the right search results show up as suggestions when text is entered into the search box (completion)
* an alternative search result is shown when a term is misspelled (spell-checking)
Furthermore, we will introduce a technique for sorting search results that ranks products higher:
that are most relevant for the search
* with better past performance (revenue, clicks, click trough rate, etc.)
* with better expected customer experience (delivery speed, product quality)
And finally, we will illustrate how to personalize search experience along the example of dynamic pricing and discuss some other best practices.
The examples will come from Contorion, an online store for industrial and trade supply that sees on-site search as a major driver of its business. Please note that all the examples work in Elasticsearch 1.x and that some queries will look different in Elasticsearch 2.x, but the main concepts will still hold.