> ## Documentation Index
> Fetch the complete documentation index at: https://docs.curator.interworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search

> Enable and configure search functionality to help users discover and locate content across the Curator portal.

The frontend search functionality helps explore your Curator content or access specific content directly without
navigating through the menus.

## Enabling Search

1. Navigate to the backend of the system (e.g. `http://curatorexample.com/backend`) and log in if prompted.
2. Navigate to *Settings > Curator > Portal Settings > Features > Usability*
3. Switch the toggle *Search* on to enable search

*Note:* The search toggle enables the search prompt shown in the menu. You can also
[add a search element directly to a page](#adding-a-search-element-to-a-page) using Page Builder.

### Adding a Search Element to a Page

In addition to the menu search prompt, you can add a dedicated search bar to any page using Page Builder.

1. Navigate to **Content** > **Pages** in the backend of your Curator instance.
2. Click **New Page** or edit an existing page.
3. Add a new row element and/or click the **Edit Content** button (pencil icon) on a row element.
4. In the element popup, select **Search** under the Web Elements tab.
5. Optionally, set the **Element Title** field in the Element Styles section to display a heading above the search bar.
6. Optionally, set the **Search Placeholder Text** field in the Search Settings section to customize the placeholder
   text shown inside the search input.

> [!NOTE]
>
> The search element on a page only works when the global Search toggle is enabled under
> *Settings > Curator > Portal Settings > Features > Usability*. If the toggle is off, the search element will not
> function.

### Beta Search

An optional **Beta Search** mode is now available for portals that need faster or more reliable search. To enable it,
follow the steps above to turn on Search, then switch on the *Enable Beta Search* toggle directly beneath it.

Beta Search uses a more powerful search system behind the scenes to deliver quicker and more consistent results than
the default experience. You may want to try it if:

* Your portal has many dashboards, pages, or files and search feels slow
* You need search to scale reliably as your content library grows
* You prefer more precise results that exactly match what you type

> [!NOTE]
>
> Beta Search is less forgiving of typos or vague terms, so queries should closely match titles, descriptions or
> keywords. As this feature is still experimental, behavior may change in future updates.

When [Favorites](https://docs.curator.interworks.com/site_content_design/content_discovery/favorites.md) are also enabled, each Beta Search result shows
a star. Click the star to favorite or unfavorite that Dashboard or page without leaving the search window.

### Search Analytics

With Beta Search enabled, you can also switch on **Search Analytics**, the toggle directly beneath *Enable Beta
Search* on the Features tab of Portal Settings. It is off by default and works with every Beta Search setup, SaaS
and On-Prem alike; nothing beyond Beta Search itself is required.

When it is on, Curator records each search a signed-in user settles on: the search term, the term it replaced,
how many results were shown, and the result that was clicked, if any. Typing is not recorded keystroke by
keystroke. One search is stored when the user clicks a result, closes the search window, replaces the term with a
different one, or leaves the page. A search is not stored directly with the user who ran it.

> [!NOTE]
>
> The stored data is not fully anonymous. A clicked result is stored with its content type, id and time, and the page
> view that follows is recorded with the user. Anyone with access to both records could connect them. Check this
> against your data protection or works council requirements before you turn the setting on.

Stored searches are kept for as long as the *Usage Log Retention* setting on the General tab allows. At the default
of 1 month, the search panels on the Activity page show at most one month of history.

#### Reading the results

The **What are they searching for?** section of the
[Activity page](https://docs.curator.interworks.com/site_administration/activity/activity_overview.md#what-are-they-searching-for) has two panels:

* **Top search terms** shows each term with its number of searches, click-through rate, and average result count.
  For a term that is searched often but rarely clicked, add keywords to the content people are looking for.
* **Zero-result terms** shows the terms that returned nothing. Add content for them, or add the term as a keyword
  to existing content.

### Content that is searched

The search considers the following components to generate the search results:

1. Titles
2. Descriptions
3. Keywords
4. From version 2023.02.15 onwards: Text content on pages
5. Extracted text content from directly-browsable Files (e.g. uploaded HTML files)
6. Text content of HTML files embedded on a page via the **Upload HTML** page source type

*Note:* Keywords set to **Hidden** or **Hidden from Search** are skipped, so they no longer match the content
tagged with them. That content is still found by its own title, description, and text. See
[Hidden Content](https://docs.curator.interworks.com/site_content_design/content_discovery/hidden_content.md).

*Note:* For pages with unrestricted HTML content blocks, only static text present directly in HTML elements is
used for search. Content inside `<style>` and `<script>` tags is excluded. If you want text to be searchable, it must
exist in the HTML markup itself.

*Note:* Extracted HTML file text is sanitized before indexing -- scripts, styles, and other executable markup are
stripped, and the text is capped at 10,000 characters. Exactly one item owns that text in search: an HTML file
created through the **Upload HTML** page flow is a hidden backing file, so its text belongs to the page and
surfaces under the page's own permissions; a directly-browsable (non-hidden) file is its own search result and
follows its own [Restrict Access](https://docs.curator.interworks.com/site_content_design/menus/restrict_access.md) instead -- its text is never
surfaced through pages embedding it. A hidden backing file with Restrict Access enabled is excluded from search
entirely. Portals using an external search engine keep these results current automatically -- including after
upgrading, and whenever an embedded file's content, Restrict Access, or visibility changes -- so a manual search
reindex is only needed if the search engine was unreachable while such a change was made.

*Note:* Search results reflect all permissions set on the BI Platforms or by using [Restrict Access](https://docs.curator.interworks.com/site_content_design/menus/restrict_access.md).
In case you have added dashboards or built content that should not be visible in search results, enable the *Hidden*
toggle. To hide dashboards navigate to the *Misc* tab and then in the *Discovery* section you find the toggle.
To hide other types of content, the toggle is in the details pane.

## Changing Search Result Display

Search results show the following components:

* Thumbnail (default if none was created/ set)
* Title
* Description (if existing)
* Keywords (if existing and matching the search term; max. 2 - more are indicated by an ellipsis)
* If the result content is favorited or not (in Beta Search, click the star to change it)

**From release 2023.02.15 onwards**: The description is only shown for Pages if there is a match in it. Otherwise, Pages
will always show a preview of their content (with or without a match).

Files uploaded as HTML behave the same way: where a file's text has been made searchable, its result shows a preview
of that text instead of the file's description. Files without searchable text, and every other type of file, continue
to show their description.

All occurrences of your search term within the title, description, and keywords are highlighted in bold using the portal's highlight color.

## Styling Search

Brand your search with the following settings

* Add a custom search icon (Available since 2022.11.30)
* Navigate to *Settings > Curator > Themes > Styles > Logo and Icons* to add your own search icon
* Style the colors of your search results
* Navigate to *Settings > Curator > Themes > Search Options* (in versions until 2022.09.28: *Settings > Curator > Portal
  Settings > Styles > Search Options*) to set the background and text color
* Navigate to *Settings > Curator > Themes > Styles > Miscellaneous > Navigation Highlight Color* (in versions until
  2022.09.28: *Settings > Curator > Portal Settings > Styles > Miscellaneous > Navigation Highlight Color*) to set the
  text color on hover

## Algorithm Details

Our search applies a fuzzy search algorithm, so search results are intentionally loose so as to help users find the
content regardless of minor typos or alternate spellings.

![search result example!](https://mintcdn.com/interworks/3RotvmSfKD9xBISI/assets/images/site_content_design/content_discovery/search_results.png?fit=max\&auto=format\&n=3RotvmSfKD9xBISI\&q=85\&s=6ca03a4f356d011ad0b5ac43bc273331)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.