Concepts / Building Search UI / Query suggestions
Aug. 20, 2019

Query Suggestions

Overview

When your user interacts with a SearchBox, you can help them discover what they could search for by providing Query suggestions.

This is a specific kind of multi-index interface: your main search interface will be using a regular index, while you will display suggestions as the user types from your Query Suggestions index.

To display the suggestions in your iOS app, you can do it by using the power of viewModels with our MultiHitsViewModel component. See below for a full example on how to display a search bar with a tableView with 2 sections, the first one containing the query suggestions and the second one containing the instant results.

Usage

To display the suggestions:

Did you find this page helpful?