Skip to main content

Instant Search

This demo skips search suggestions and shows full search results while the searcher types. Start typing chocolate to try it. View the ss360Config to check the configuration.

  • suggestions.triggersSearch: true turns instant search on.
  • suggestions.minChars sets how many characters trigger results (default: 3).
  • suggestions.throttleTime sets how long to wait after the last keystroke, in milliseconds (default: 300).

With instant search, every query triggers full search results and counts against your monthly search quota, including unfinished ones. In the default setup, the suggestions shown while typing are separate from the full results shown after the searcher presses Enter.

In Design & Publish: Advanced → Configuration → Plugin Configuration. See Search suggestions vs. search results for the difference.

window.ss360Config = {
siteId: '83460', /* Replace with your site id */
searchBox: {
selector: '#searchBox' /* Replace with the css selector of your search box */
},
suggestions: {
triggersSearch: true,
minChars: 3,
throttleTime: 300
},
results: {
embedConfig: {
contentBlock: '.example__page-content-block' /* Replace with the css selector of the element the results go into */
}
}
};
{"siteId":"83460","searchBox":{"selector":"#searchBox"},"suggestions":{"triggersSearch":true,"minChars":3,"throttleTime":300},"results":{"embedConfig":{"contentBlock":".example__page-content-block"}}}