This integration enables you to create AzureSearch search indexes to index content of pages (content types with the 'Page' feature enabled) from the Xperience content tree using a code-first approach. To provide a search interface for the indexed content, developers can use the .NET API, JavaScript API library.
Xperience Version | Library Version |
---|---|
>= 29.5.0 | >= 4.0.0 |
>= 29.0.0 | >= 2.1.0 |
>= 28.2.0 | >= 1.0.0 |
Add the package to your application using the .NET CLI
dotnet add package Kentico.Xperience.AzureSearch
-
Add configuration from your Azure portal to the ASP.NET Core
appsettings.json
file:"CMSAzureSearch": { "SearchServiceEndPoint": "<your application url>", "SearchServiceAdminApiKey": "<your application admin key>", "SearchServiceQueryApiKey": "<your application query key>", // Opotionally add delay between indexing items. // This is useful if there are a lot of pages and items on your web which when crawled would increase the performance requirements. "IndexItemDelay" : 0 }
-
Define a custom
BaseAzureSearchIndexingStrategy<TSearchModel>
implementation to customize how content pages/content items are processed for the index. SeeCustom-index-strategy.md
-
Add this library to the application services, registering your custom
BaseAzureSearchIndexingStrategy
with type parameterGlobalSearchModel
and Azure search services// Program.cs services.AddKenticoAzureSearch(builder => { builder.RegisterStrategy<GlobalAzureSearchStrategy, GlobalSearchModel>("DefaultStrategy"); }, configuration);
-
Create an index in Xperience's Administration within the Search application added by this library.
-
Rebuild the index in Xperience's Administration within the Search application added by this library.
-
Display the results on your site with a Razor View đź‘Ť.
You can restore database with configured samples. View DancingGoat Sample Database.
View the Usage Guide for more detailed instructions.
To see the guidelines for Contributing to Kentico open source software, please see Kentico's CONTRIBUTING.md
for more information and follow the Kentico's CODE_OF_CONDUCT
.
Instructions and technical details for contributing to this project can be found in Contributing Setup.
Distributed under the MIT License. See LICENSE.md
for more information.
This project has Full support by 7-day bug-fix policy.
See SUPPORT.md
for more information.
For any security issues see SECURITY.md
.