


What you really want is a combination – you’d like to suggest the more popular searches at the top of the list, but eliminate those that find no results.īut wouldn’t it be best of all if you went further? What is really the best is to suggest popular keywords that actually help searchers find what they are looking for.īut that begs a question: how do you know which searches are successful? Identifying Successful Searches

This makes sense, but if a popular word gets no results, it will still be suggested using this method. Suggests the most popular words that searchers enter. You can imagine that when the search box suggests a word to search for and you get no results, that is a frustrating user experience. This is a good idea, because it ensures that you will never get a “not found” – at least one of the pages has the word. Suggests words that are found in the search index. While there are many variations in how each of these components decide which keywords to suggest, there are typically two basic approaches: Your site search engine probably does, too. Many Solr installations take a simple approach with Solr Suggester, but there are also other ways to implement keyword suggestion in Solr.Įlasticsearch also offers Completion Suggester with similar results. Now you can show them in frontend and when user hits search button you could search in possibly different index with that category and product info.Fortunately, just about every site search engine supports that function, and open source search engines (such as Solr and Elasticsearch) have multiple ways to implement autosuggest – and can allow you some control over how it works. I created this sample index PUT suggest_index/product/_mapping ] If you know categories in advance, you could pass them as payload using completion suggester.
