/
Query Suggestions Component

Query Suggestions Component

Overview

The Query Suggestions component displays a list of possible queries that the search engine detects the user may be looking for.

Selector

The selector for this component is <hawksearch-query-suggestions>.

Data Model

The following data model is exposed to the Handlebars template:

{ querySuggestions: Array<string>; }

Handlebars Helpers

Name

Parameter

Name

Parameter

query-suggestions

Array<string>

This helper function creates a comma-separated list of links with the hawksearch-query attribute, using the word “or” before the last link.

Event Binding Attributes

Attribute Name

Attribute Value

Attribute Name

Attribute Value

hawksearch-query

string

When an element with this attribute is clicked, a new search will be formed for the specified query.

Default Template

<div class="query-suggestions"> <p>Did you mean to search for {{query-suggestions querySuggestions}}?</p> </div>

Related content

Popular Queries Content Component
Popular Queries Content Component
More like this
Search Field Component
Search Field Component
More like this
Autocomplete Component
Autocomplete Component
More like this
Search Results Component
Search Results Component
More like this
Search Within Facet Component
Search Within Facet Component
More like this
Related Searches Facet Component
Related Searches Facet Component
More like this