Setting up search with AI (vector search)

Edited

Our vector search is designed to be more powerful and easy to use than a traditional search. To enable AI search, follow the instructions below to add the AI search bar to your header, as well as to pages created in the Code editor.

See here for more information on how to use the AI search effectively.

In the header

To add the search button to your header's menu (Portal > Style, then select the Header tab) by adding the placeholder ##quick-find## to your header HTML code.

See it placed in the example below, in bold:

##skip-to-content-link##
<nav class="ods-front-header" ods-responsive-menu breakpoint="1000">
    <ods-responsive-menu-placeholder>
        <a class="ods-front-header__portal-brand" href="/"> ##logo## </a>
    </ods-responsive-menu-placeholder>
    <ods-responsive-menu-collapsible>
        ##language##
        <a class="ods-front-header__portal-brand" href="/">
            ##logo##
            ##brand##
        </a>
        ##menu##
        ##quick-find##
        ##secondary-menu##
    </ods-responsive-menu-collapsible>
</nav>

Note that if you have a customized header, vector search may disrupt its appearance. If you need help, don't hesitate to reach out to our support or your customer success contact.

On a Code editor page

For pages created using the Code editor, embedding the search bar is seamless with the use of the ods-catalog-search widget. Here's an example:

Step 1: Add the code snippet to the HTML code of the page

<ods-catalog-search
    class-name="'my-search-box'"
    label="'your-label-here'">
</ods-catalog-search>

For this widget, two parameters are available:

  • class-name allows you to add a class to the search bar in order to customize it

  • label allows you to add a custom label to the search bar

Step 2: Add CSS to the widget

Paste this code at the end of the CSS file of the page, or in the dedicated section should you have any.

.my-search-box {
    text-align: left;
    z-index: 2;
}

If the page is available in multiple languages, remember to repeat this process for each language.

Keyboard shortcut

There is a keyboard shortcut for quick access to the search.

By clicking Ctrl + K on a PC or Cmd + K on a Mac, you can display the quick find window on any page of your portal.

Your AI provider settings

If your workspace is based in Europe, by default your AI provider is Mistral, a European company. Outside of Europe, your provider is OpenAI, which is based in the United States.

You are nevertheless free to choose one or the other if you like. Note that this will reindex your catalog, so you may wish to make this change when your data is least used.

The setting is found in your back office by going to Portal > Data processing, and making the change under "Artificial Intelligence provider." Don't forget to Save to record the change.