Search Box

Search Box modules let users search. You might only need one Search Box module for all searches. On the other hand, you might want more than one Search Box module, for example, ones to search over different topics or in different languages.

Results that Site Search obtains in a search appear in a Results module.

In addition to searching, you can configure a Search Box module to show suggested query completions or suggested documents.

Example

The pointer in this screenshot points to a Search Box module.

Search Box module

Configuration options

Location Option Description

Edit Module

Show Suggestions?

Show suggestions below the Search Box while users type queries. Choose among showing Documents, Query Completion, and No Suggestions. Site Search finds suggestions by autocompleting what the user types and using those terms as queries.

Edit Module

Default Search Language

Default language in which to search if no search language is specified in a Search Box embedded module

Edit Module

Action

URL of page on which to display search results (if a different page). When an embedded Search Box module obtains results, Site Search redirects to this page.

Embed Module

UI language

UI language for the Search Box. To specify a different UI language for an embedded module (or to explicitly specify English), add a language URL parameter in the loader.js URL in the embed snippet that you copy to the <head> element. For example:

<!-- Lucidworks.cloud embed script -->
<script async="false" src="https://mycorp.lucidworks.cloud/search/embed/v1/ui/loader.js?language=fr"></script>

Embed Module

Search language

For a specific Search Box module, override the default search language. In the snippet for the Search Box, include a language attribute in the <cloud-search-box> element, for example:

<cloud-search-box language="fr"></cloud-search-box>`

Embed Module

Topics

Limit search results to specific topics.

To configure a Search Box module

See Configure modules.

Style Search Box modules with CSS

You can use cascading style sheets (CSS) to style Search Box modules.