Chapter 10. Query suggestions

 

This chapter covers

  • Spell-checking
  • Suggesting query terms
  • Implementing a predictive instant search experience
  • Suggesting queries based on past user activity

In this chapter, we introduce two simple features to help improve the usability of your search solution. Specifically, we cover spell-checking and autosuggest. Spell-checking addresses the problem of misspelled query terms, leading to poor search results. You’ve probably seen an incarnation of spell-checking when using your favorite web search engine and it asks, Did you mean ...? Spell-checking is a crucial feature for helping users who don’t take the time to craft perfect queries, especially in mobile environments.

Autosuggest helps users as they type by providing instant suggestions from terms in your index; it allows users to quickly hone in on query terms as they formulate their query. Autosuggest gives immediate feedback to users by showing valid query terms available in the index as they type. Let’s begin by learning how Solr’s spell-check search component works, as that provides the foundation for autosuggest.

10.1. Spell-check

In this section, you’ll learn how to use Solr’s spell-check search component. Automated spell-checking is a core search feature that most users expect to just work without having to think. When it comes to spell-checking, there are four general scenarios you need to consider:

10.2. Autosuggesting query terms

 
 
 

10.3. Suggesting document field values

 

10.4. Suggesting queries based on user activity

 
 

10.5. Summary

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest