Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Overview

The Modified Query component is rendered when the spellchecker detects a spelling error and searches for the correctly-spelled query instead.

This component is only visible for new searches. If the spellchecker revises a query and the user then performs an action such as applying facet or moving to another page of results, it is implied that the user accepts the correction.

Selector

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

Data Model

The following data model is exposed to the Handlebars template:

{
  query: string;
  modifiedQuery: string;
}

Event Binding Attributes

Attribute Name

Attribute Value

hawksearch-query

string (query to execute)

When an element with this attribute is clicked, a new search will be executed with the specified query and spellcheck functionality disabled. This is useful when the spellchecker mistakes a valid entry for another term.

Default Template

<div class='modified-query'>
    <p>
        Showing results for
        <span class='modified-query__modified'>{{modifiedQuery}}</span>. Search instead for
        <a class='modified-query__original' hawksearch-query='{{query}}'>{{query}}</a>.
    </p>
</div>
  • No labels