Autocomplete
On this page
Instant Results
When using the instant results pattern, you fetch actual results with each keystroke and display them on the results page. This approach is most effective either when the dataset is limited or the user might have a pretty defined idea of what they’re looking for.
For this instant results strategy to provide a good user experience, very fast response time is required to allow the results to be refreshed “instantly” on each keystroke.
For more info, checkout our blog post on instant results.
Usage
With InstantSearch Android, you get instant results by default: you can specify searchMode=SearchMode.OnSubmit
on the SearchBox
to disable it.
1
2
3
4
5
// For an Instant Results experience:
searchBoxViewModel.connectSearcher(searcher)
// Alternatively, for a Search on Submit experience:
searchBoxViewModel.connectSearcher(searcher, SearchMode.OnSubmit)