Achieving the autocomplete feature with a wildcard

The autocomplete feature in a search box will predict the words that users want to search for. For example, a user wants to buy Apple iPhone 6S from http://www.amazon.com/. So, when the user starts typing Apple, before the user finishes typing the first three characters, different products of apple get listed in autosuggest. This speeds up human-computer interactions.

In this recipe, you will learn how to use different index fields with an n-gram analyzer to achieve the autocomplete feature. Sitecore provides an out-of-the-box n-gram analyzer, but we will create our own analyzer based on Lucene to make it better and faster. After learning this recipe, you will also be able to use Sitecore's out-of-the-box ...

Get Sitecore Cookbook for Developers 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.