Azure Cognitive Search (opens in a new tab) is a cloud-based search solution with a wide range of features, including advanced support for faceted navigation (opens in a new tab).
Xperience provides integration functionality that allows you to store website content and other data within Azure Search indexes. The system creates indexes under a designated Azure Search service, populates them with data, and automatically keeps them up-to-date. Developers can then use the indexes to implement search solutions for websites.
To use Azure Cognitive Search on your website, perform the following steps:
Set up an Azure Cognitive Search service (see the Create an Azure Cognitive Search service in the portal (opens in a new tab) article).
Azure Search pricing tier
Select the Pricing tier (opens in a new tab) of your Azure Search service according to the volume of data that you plan to index and your performance requirements. See the Service limits in Azure Search (opens in a new tab) article for details.
Note: The Basic pricing tier has a limit of 100 fields per index, which is not sufficient for Xperience page indexes in many cases. Page indexes contain general page and product fields, combined with the fields of all included page types. If using the Basic pricing tier, you need to strictly limit the number of page types covered by your indexes, as well as the set of included fields.
Enable search indexing in Xperience.
Create Azure Search indexes. Assign the indexes to your site and define their exact content.
Build a search interface according to your website's requirements. For more information and an example, see Integrating Azure Search.
(Optional) Customize the Azure Search according to the requirements of your search scenario.
The system stores searchable content within persistent cloud-based indexes. To learn about Azure Search indexes and their structure, refer to the Create an Azure Search index (opens in a new tab) article.
Pages and other Xperience objects are represented as documents within the index. The documents contain the same fields as the corresponding Xperience objects, based on the search settings of individual page and object types. When Xperience objects covered by an index are created, updated, or removed, the system automatically logs indexing tasks.
Tip
You can find a list of all Azure Search indexing tasks that are waiting to be processed in the Smart search application on the Azure tasks tab. Here you can:
See also: Monitoring search indexing tasks
The search functionality automatically processes the indexing tasks, which updates the content of the related indexes by sending requests to the appropriate Azure Search service.
Because Azure Search indexes are cloud-based and hosted outside of the Xperience application, requests that interact with indexes may fail due to network errors, service unavailability, etc. To deal with such issues, the system uses a retry policy for all indexing requests. Requests that fail are automatically repeated several times.
Searching is done by sending query requests to indexes on the appropriate Azure Search service. The service returns a response containing the corresponding search results. Typically, the query requests are sent by the custom-built search interface, which also displays the returned results.
When you perform content updates or index rebuilds in Xperience, the changes may not be reflected immediately by the Azure Search. You may experience delays and/or receive outdated results due to the required network communication and the distributed nature of cloud-based services. The service only guarantees eventual consistency, which means that it may take a certain amount of time before all changes are reconciled.
If you share a single Azure index across multiple environments, all changes to content are automatically reflected in the search functionality of the other environments. For example, if you modify an indexed page in a testing environment sharing an index with a production environment, the changes will also appear in search results on the production environment.
Indexed pages with a limited publishing window stay indexed even after being unpublished. The system does NOT remove them from the corresponding Azure index – the pages will keep appearing in search results. If you wish to remove unpublished documents from the search results, filter the retrieved result set using the DocumentPublishFrom and DocumentPublishTo columns.
The following model scenario explains the life cycle of a page in an Azure Search index: