
The Synerise AI Search Engine is a powerful tool that can boost the search results relevancy on your website to the next level. There are numerous ways to improve your customers’ experience as well as shorten the path to conversion, from the basic search configuration, through synonyms, ending on query rules. The search engine can also detect typos and perform a search for the corrected query. By using our award-winning algorithms, personalization reranks search results to highlight products that interest your customers the most. Semantic search is better than traditional methods, because it analyzes complete queries to comprehend search intent and meaning. In Hybrid mode, which merges typical keyword approaches with semantic search, it improves overall metrics.

## Benefits
---
- Higher conversion
- Increased revenue
- Strengthened relationship with your customers
- Shortened customers' path to conversion
- Enhanced searching experience
- Gather more information about your customers' behavior
- No-code optimization
- Personalized search results
- Ability to monetize product boosting

## About search engine
---

The search engine is based on indices to speed up the search process. Indices are built from the provided item feeds or [catalogs](/docs/assets/catalogs). When creating an index, you can choose from three [search methods](#searching-methods): keyword searching, semantic searching, or a combination of both.

This is what happens after a user sends a search request:


1. Applying **predictive filtering** - if this option is enabled, it provides the most relevant categories based on the past `item.search.click` events.
1. Textual ranking, this includes: 
    - analyzing keyword frequency, semantic analysis, and natural language processing to determine the ordering of search results (depending on the selected [search method](/docs/ai-hub/ai-search/define-search-method-and-ranking)).
    - indexing - the process of locating relevant documents or data that match the search terms.
    - low match enhancement - if this option is enabled in the index settings, it adds more items to the search results if there are fewer than 5 items returned.  
        You can find more information how to enable and use this option in ["Matching words" section](/docs/ai-hub/ai-search/define-search-method-and-ranking#matching-words).
2. Item [ranking](/docs/ai-hub/ai-search/define-item-ranking) based on item visits and transactions.
3. The following operations happen at the same time:  
    - Executing [rules](/docs/ai-hub/ai-search/query-rules) condition: Boosting by attribute 
    - Personalization
    - Applying **dynamic re-ranker** - if this option is enabled, it prioritizes displaying the most popular results for the search query according to the ranking from the last 12 hours.
4. Executing [rules](/docs/ai-hub/ai-search/query-rules) condition: Filter query rules.
5. Executing [rules](/docs/ai-hub/ai-search/query-rules) condition: Promoting and/or hiding items.
6. Applying [query suggestions](/docs/ai-hub/ai-search/query-suggestions).



## Required user permissions

See [AI Hub permissions](/docs/settings/identity-access-management/permissions/ai-hub-permissions).

## Requirements
---  

### Minimum requirements 

- [Upload an item feed to Synerise](/use-cases/import-product-feed-to-catalog)
- [Configure AI engine for the item feed](/docs/settings/configuration/ai-engine-configuration/engine-configuration-for-search)

### Requirements for additional features

- To personalize search results, you must:
   - provide 5 0,000 unique profiles who visited a product page more than once (at least two different items),
   - provide 1,000,000 in total of `page.visit` events from item pages, `product.view` events from item views in a mobile application, and `transaction.charge` events,
   - make sure the `title` and `category` item attributes are selected as training attributes in the configuration of the AI engine (**Synerise > Settings > AI Engine Configuration**).
- To collect statistics for AI Search performance and A/B/X tests, you must generate an `item.search.click` event, which is triggered when a request is sent to the ["Item clicked in search" endpoint](https://developers.synerise.com/DataManagement/DataManagement.html#tag/AI-Events/operation/publishAiCompatBatchUsingPOST).
- To enable [predictive filtering](/docs/ai-hub/ai-search/predictive-filtering) for the [index](/docs/ai-hub/ai-search/create-index) on the basis of which search will work, see [Predictive filter requirements](/docs/ai-hub/ai-search/predictive-filtering#requirements).
- To enable [dynamic reranker](/docs/ai-hub/ai-search/dynamic-reranker) for the [index](/docs/ai-hub/ai-search/create-index) on the basis of which search will work, see [Dynamic reranker requirements](/docs/ai-hub/ai-search/dynamic-reranker#requirements).
- To enable [query suggestions](/docs/ai-hub/ai-search/query-suggestions), see [Query suggestion requirements](/docs/ai-hub/ai-search/query-suggestions#requirements)
- To use semantic or hybrid search methodology, become familiar with [best practices](/docs/ai-hub/ai-search/introduction-to-ai-search#best-practices-for-semantic-search-implementation).

## Search methodology
---

Searching involves different stages and elements, they can be divided in the following way:

1. Creating an index and choosing the [searching method](#searching-methods).
3. Making a [search request](#types-of-search-requests).
4. Presenting the results.  
    Use the data from the search response to show the results on your website or in an application.


### Searching methods

When [creating a search index](/docs/ai-hub/ai-search/create-index), you can choose 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>


### Types of search requests

- **Full-text search** - The search request is made when the user enters the entire phrase and confirms it.
- **Auto-complete search** - A new search request can be made after each keystroke, to offer suggestions while the user is typing.
- **Listing** - A search request without a query phrase. The results can be personalized, filtered, and so on, like with the other search types. This can be used, for example, to create a personalized page with items from a particular brand.
- **Visual search** - A user can search by providing an image. [Find out more about visual search](/docs/ai-hub/ai-search/visual-search)


  <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">

  Check the details in:
  - [AI Search configuration](/docs/ai-hub/ai-search/introduction-to-ai-search#prerequisites).
  - The [API Reference](https://developers.synerise.com/AISearch/AISearch.html#tag/Search) for search methods.

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


## Best practices for semantic search implementation

- Ensure every product in your item feed has a comprehensive and detailed description. Usually, a few sentences.
- Include relevant attributes such as size, color, material, product designation, and unique features.
- Use natural language to describe products, avoiding jargon and overly technical terms where possible.
- Use the hybrid search mode to combine the strengths of keyword and semantic search.  
    Example: A hybrid search for "summer dresses for beach vacation" returns results both for specific keywords, such as "summer dresses", and for semantically related items, like "lightweight sundresses."
- Conduct A/B tests on different search index configurations (for example, keyword vs. hybrid) to determine the best-performing setup. Use the integrated preview and comparison tools to analyze the results in a single view.  
    Example: Test the effectiveness of semantic search on queries like "laptops for graphic design" versus traditional keyword search and compare user engagement metrics.
- Regularly monitor the performance of your semantic search implementation. Use Decision Hub to track search success rates and user satisfaction.  
    Example: Track metrics such as click-through rates, conversion rates, and search abandonment rates to gauge the effectiveness of semantic search.

## Configuring AI Search 

This article describes the process of enabling the AI search engine on a website. First, the feature is configured, then the configuration is implemented so it can become operational. Learn more about capabilities of the feature [here](/docs/ai-hub/ai-search/introduction-to-ai-search).


<div class="admonition admonition-note"><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="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

AI Search Engine will work after delivering the item catalog, however, providing transactional data will improve the personalization of results.

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


### Terminology explained
---
- **Index** - A data structure created from a catalog of items. The index is used by the search engine to look for results that match a query. 
- **Score** - It is a value that indicates how relevant a search result is for a given query. 
- **Facets** - Used in search to let customers narrow down search results to items that have common features.   

### Prerequisites
---

2. [Import an item feed to **Data Modeling Hub > Catalogs** in the application](/use-cases/import-product-feed-to-catalog).  
    
   <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">

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

   </div></div></div>
  
3. [Configure the AI engine for your catalog](/docs/settings/configuration/ai-engine-configuration/engine-configuration-for-search).

### Implementation

The AI search can be implemented by using these endpoints:
- **Autocomplete** - When listening to the input, you can use the autocomplete endpoint in our API to send each keystroke of the customer to the search engine and receive autocomplete results as the customer types. The results need to be rendered in real time in the search box. 
- **Full-text search** - The search is only performed once, when the customer initiates it by clicking the search button or pressing `ENTER`. The results are usually displayed on a dedicated page.
- **Listing** - The search is made without any query. The results can still be personalized, filtered, boosted, and so on.
    
  <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 search endpoints are available as both GET and POST requests. For details, see the [API Reference](https://developers.synerise.com/AISearch/AISearch.html#tag/Search).

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


  The requests can be authorized with the same tracker key as used in the tracking code.


  <div class="admonition admonition-note"><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="M13 16h-1v-4h-1m1-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 possible to inject the search by using [Dynamic Content](/docs/campaign/dynamiccontent/introduction-to-dynamic-content).

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


  Example of a search request:


  <pre><code class="language-javascript">var xhttp = new XMLHttpRequest();
  xhttp.onreadystatechange = function () {
    if (this.readyState == 4 &amp;&amp; this.status == 200) {
        var result = JSON.parse(this.responseText);
        Console.log(result);
    }
  };
  xhttp.open("GET", "https://api.synerise.com/search/v2/indices/{indexId}/query?query={SEARCH_QUERY}&amp;clientUUID={USER_UUID}&amp;token={TRACKING_KEY}", true);</code></pre>


  You must send an `item.search.click` event. This enables monitoring the search statistics and preparing search analytics. 

  <div class="admonition admonition-note"><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="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

  You can find the documentation [here](https://developers.synerise.com/DataManagement/DataManagement.html#operation/publishAiCompatBatchUsingPOST).

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



  <pre><code class="language-java">{
     "clientUUID": String,
     "searchType": String,
     "correlationId": String,
     "position": Number,
     "item": String
  }</code></pre>


  where:
- `clientUUID` is the customer's UUID,
- `correlationId` must be have the same value as the `searchId` parameter value. You can source this value from the search response. Thanks to this, you can link a search result with information about which item from that result was clicked.
- `position`is the position of the clicked item.  
    **IMPORTANT**: the first position is 1, not 0,
- `item` is the ID of the clicked item,
- `searchType` is the type of search conducted: full-text search or autocomplete search.

### Limits

The following are the default limits per workspace, you can contact Customer Support to request changing them:

- Maximum number of search indices: 10
- Maximum number of searchable attributes per index: 40
- Maximum number of facetable attributes per index: 40
- Maximum number of filterable attributes per index: 40
- Maximum number of sortable attributes per index: 20
- Maximum number of rules per index: 1000
- Maximum number of synonyms per index: 1000
- Maximum number of suggestion indices: 10
- Maximum number of segmentations used in rules: 10  
    You can use up to 10 various segmentations in all rules in one index. Multiple occurrences of the same segmentation count as one towards the limit.
- Maximum number of dynamic analyses (aggregates and expressions) to be used in filters: 2  
    You can use two various aggregates or expressions, or one expression and one aggregate. Multiple occurrences of the same analysis count as one towards the limit.
