
In order to configure AI Search, you need a catalog that contains feed, so the search returns items after a customer types in a query. 

## Requirements
---
The list of requirements is available [here](/docs/ai-hub/ai-search/introduction-to-ai-search#prerequisites).

## Create an index
---
1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/ai-hub-icon.svg" alt="AI Hub icon" class="icon" > **AI Hub > Indexes**.
2. Click **Add index**.  
  **Result**: The index creation wizard opens. 
3. From the **Choose feed** dropdown list, select an [item feed](/docs/settings/configuration/ai-engine-configuration/engine-configuration-for-search#adding-item-feed) based on which you would like to create an index. The list includes only [feeds with the search engine option enabled](/docs/settings/configuration/ai-engine-configuration/engine-configuration-for-search#enabling-ai-search-for-the-feed).
  
   <div class="admonition admonition-warning"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   Remember that the value of an item attribute in the item catalog cannot be longer than 1000 characters. It applies both for creating a new index and updating it.

   </div></div></div>

4. From the **Choose search language** dropdown list, select the language of the search. 
    <!-- 
   <details class="accordion"><summary>Click for video tutorial</summary><div class="accordion-content"><div class="youtube-embed youtube-facade not-prose" data-youtube-id="Ck-YTxInc7k" role="button" tabindex="0" aria-label="Play YouTube video"><img src="https://img.youtube.com/vi/Ck-YTxInc7k/hq720.jpg" alt="YouTube video" class="youtube-facade-thumb" loading="lazy" /><span class="youtube-facade-play" aria-hidden="true"><svg viewBox="0 0 68 48" width="68" height="48"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.64 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="red"/><path d="M45 24 27 14v20" fill="white"/></svg></span></div></div></details>

    ---> 

5. Click **Next step**.
6. Select one of the search methods:  
    - **Keyword** - searching for information using specific words or phrases that are relevant to the desired topic or subject. To take full advantage of it, request full access.
    - **Semantic** - connects words and phrases to interpret digital content similarly to human comprehension, offering personalized, accurate results. Governed by search intent and semantic meaning, it aims to decode content contextually for precision. By taking a holistic approach, it assesses word meanings and relationships, similar to human language interpretation. The goal is to eliminate irrelevant results for an enhanced user experience. To take full advantage of it, request full access.
    - **Hybrid** - combines the two approaches, with a weighting ratio of 70% for keyword-based and 30% for semantic search. In practice, this involves the weighted average of two normalized scores. We highly recommend opting for the Hybrid search method as semantic search proves invaluable in situations where keyword-based searches fail to yield satisfactory results. To take full advantage of it, request full access.

    
   <div class="admonition admonition-tip"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   These methods are available in the public preview mode.

   </div></div></div>
 

7. Regardless of the search method type, select the searchable attributes and assign importance to each of them (assigning importance is available only for attributes for keyword method).  
    **Searchable attributes** are used by the search engine to calculate the item's relevance to the query phrase provided by the customer.  Attributes can be assigned to three importance levels: high, medium and low. When a word from the phrase matches an attribute, the score amount is assigned depending on importance assigned to the attribute.  
      
   <div class="admonition admonition-important"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   It is important to select as searchable attribute those which contain the most descriptive information about the item. Usually these are the `title` or `description` attributes from the item feed. We recommend that on average, the combined length of the selected attribute values to be longer than 50 words.

   </div></div></div>

8. If you want to display unavailable items in the search results, enable the **Include out of stock items** toggle.
8. Click **Next step**.  
9. Optionally, you can select item attributes which will be used as response, filterable, facetable, and sortable attributes. 
    - **Filterable attributes** - Attributes for use in item filters for including or excluding results. Including an attribute value narrows down the search results to items with that attribute value. Excluding values of an attribute displays results with items that have different values of these attributes.  
    - **Facetable attributes** - Attributes that can be use as facets. Facets allow customers to sort search results by attributes and their values. For example, you can use the `color` attribute as facetable to let the customers select which colors they're interested in.
    - **Response attributes** - Attributes which will be included in the search response. For each item returned, only attributes defined in this section will be available in the search response such as price, item description, color, size, so you can show them to the customers. We recommend choosing only those attributes that are strictly necessary for intended purposes.
    - **Sorting attributes** - You can enable sorting the results by the chosen attributes. You can add both range and text attributes. Sorting by range attributes allows you to arrange the returned items from the highest to the lowest value of the specified attribute. Sorting by text attributes allows you to order the results in an alphabetic order, ascending or descending.
    - **Disabled prefix search** - You can disable the prefix search for specific attributes. This will prevent the search engine from trying to auto-complete the phrase for these attributes. Keep in mind that if the search engine will not find any items for the phrase it will still try to check for typos.
10. In the **Item ranking** section, define the criteria for sorting items in search results. This can be managed using the following three options:
    - **AI Personalization** - Use the slider to boost search results based on user preferences.
    - **Page Views** - Use the slider to boost items which were frequently viewed by customers.
    - **Item Purchase** - Use the slider to boost items which were frequently purchased.
11. Click **Finish**.  
  **Result**: The index has been created. You can additionally configure the [additional index settings](/docs/ai-hub/ai-search).

