Skip to content
Last update: April 11, 2024

Azure Search

The Virto Commerce Azure Search module enables integrating Azure Cognitive Search as a search engine.

AzureSearch implements ISearchProvider defined within the Virto Commerce Search module and uses Azure Cognitive Search Engine, which stores indexed documents.

Source code

Configuration

To configure the Azure Search provider, use the following schema:

Node Default or Sample Value Description
Search.Provider "AzureSearch" Name of the search provider, which must be set to AzureSearch.
Search.AzureSearch.SearchServiceName The name of the search service instance in your Azure account.
Example: SERVICENAME.search.windows.net.
Search.AzureSearch.AccessKey The primary or secondary admin key for this search service.
Search.AzureSearch.QueryParserType Simple
Full
Type of Query Languages. Simple (default) or Full.
Search.Scope "default" (Optional) Specifies the common name (prefix) for all indexes.
Each document type is stored in a separate index,
and the full index name is scope-{documenttype}.
This allows one search service to serve multiple indexes.

Example

appsettings.json
"Search": {
    "Provider": "AzureSearch",
    "Scope": "default",
    "AzureSearch": {
        "SearchServiceName": "YOUR_SEARCH_SERVICE_NAME.search.windows.net",
        "AccessKey": "YOUR_SEARCH_SERVICE_ACCESS_KEY",
        "QueryParserType": "Simple"
    }
}