The Search API Spellcheck module provides spelling suggestions for Search API searches. This can be especially handy when there are no results for a searched term. In this video, I will show you how to enable this feature for the Search view.
First, let's install and enable the Search API Spellcheck module.
Install module
Enable module
- Go to "Modules" (admin/modules) and enable:
- Search spellcheck
- (Save Configuration)
Now that we have installed and enabled the Search API Spellcheck module, let's add the spellcheck field to our Search View. We'll have it show spelling suggestions when there are no results for the searched term.
Edit Search View
- Go to "Structure => Views => Search View" (admin/structure/views/view/search_view)
No Results Behavior
- Click "Add"
- [x] Search: Spellcheck
- (Apply(all displays))
- (Apply(all displays))
- (Save) (Save view)
Let's go back to our home page, enter a keyword in the search box and intentionally misspell the word. When we do that, we'll see a spelling suggestion on the results page with "Did you mean: text?" below the "No results text".