Quick Search Component quick-search-component

The Quick Search Component provides search capabilities to a website and presents search results so that visitors can easily find matching content and view results.

TIP
Have you considered Edge Delivery Services for AEM?
You can continue using the methods described in this document for existing projects. However for new projects, Adobe recommends leveraging Edge Delivery Services.

Usage usage

The Quick Search component offers site visitors the ability to search for content, view the results in-place, and easily navigate to the matching pages. New results are fetched dynamically as the user scrolls the search results.

The edit dialog allows the content author to define where in the content tree the search should start and optionally to hide the Semantic Search toggle. Using the design dialog, the template author can set the default value for where in the content tree the search should begin, the maximum result set size, the minimum search term length, and whether the Semantic Search toggle is shown to visitors by default.

Version and Compatibility version-and-compatibility

The current version of the Quick Search Component is v3, which was introduced with release 2.32.0 of the Core Components adding an optional Semantic Search toggle, and is described in this document.

The following table details all supported versions of the component, the AEM versions with which the versions of the component is compatible, and links to documentation for previous versions.

Component Version
AEM 6.4
AEM 6.5
AEM 6.5 LTS
AEM as a Cloud Service
v3
-
Compatible
Compatible
Compatible
v2
-
Compatible
Compatible
Compatible
v1
Compatible with
release 2.17.4 and prior
Compatible
-
Compatible

For more information about Core Component versions and releases, see the document Core Components Versions.

Technical Details technical-details

NOTE
Protecting the Search Component or any AEM based application against DOS attacks should be implemented at a higher level, for example by using mod_security on the dispatcher.

The latest technical documentation about the Quick Search Component can be found on GitHub.

Further details about developing Core Components can be found in the Core Components developer documentation.

Edit Dialog edit-dialog

The edit dialog allows the content author to define where in the content tree the search should start and to optionally hide the Semantic Search toggle.

Quick Search Component's edit dialog

Search Root - The root page from where to start the search. The Search Root can be a blueprint master, language master or regular page.

  • ID - This option allows control of the unique identifier of the component in the HTML and in the Data Layer.

    • If left blank, a unique ID is automatically generated for you and can be found by inspecting the resulting page.
    • If an ID is specified, it is the responsibility of the author to make sure that it is unique.
    • Changing the ID can have an impact on CSS, JS and Data Layer tracking.
  • Hide Semantic Search toggle on this instance - When checked, the Semantic Search toggle is hidden, regardless of what the design dialog is configured to show.

    • Leave unchecked to use the template’s default.
    • This option can not force the toggle to show on a placement where the design dialog hides it.
NOTE
If the Search Root is not configured or can not be resolved, the Quick Search defaults to searching beneath the current page.
NOTE
The Semantic Search toggle only returns AI-powered results when the environment is configured with AEM Content AI. On AEM 6.5 and AEM 6.5 LTS environments that are not configured with Content AI, hide the toggle using the design dialog so visitors aren’t offered a search mode that isn’t functional.

Design Dialog design-dialog

Using the design dialog, the template author can set the default value for where in the content tree the search should begin as well as a maximum result set size, minimum search term length, and whether the Semantic Search toggle is shown to visitors by default.

Properties Tab properties-tab

Quick Search Component's design dialog

  • Search Root - The default value of search root when a content author places the Quick Search Component on a content page

  • Results Size - The maximum number of results fetched by a search request

  • Search Term Minimum Length - Minimum length of the search term to start the search

  • Hide Semantic Search Toggle - When checked, the Semantic Search toggle described in Usage isn’t shown to site visitors by default, and the component behaves like the v2 (full-text search only) component.

    • Unchecked by default.
    • Content authors can also override this for an individual Quick Search Component in the edit dialog.
NOTE
The Semantic Search toggle only returns AI-powered results when the environment is configured with AEM Content AI. On AEM 6.5 and AEM 6.5 LTS environments that are not configured with Content AI, hide the toggle using the design dialog so visitors aren’t offered a search mode that isn’t functional.
NOTE
Results Size and Search Term Minimum Length can only be set in design mode and therefore only at the template level, meaning content authors are not able to modify these values.
CAUTION
Results Size and Search Term Minimum Length can have performance impacts if they are set too high or too low, respectively.

Styles Tab styles-tab

The Quick Search Component supports the AEM Style System.

recommendation-more-help
experience-manager-core-components-help-main-toc