Skip to content
Last update: May 8, 2024

Configuration

This section explains the basic configuration for the indexed search logic via the appsettings.json file.

This node configures full text search for the VirtoCommerce.Search module.

Node Default or sample value Descript
Provider "Lucene"
"ElasticSearch"
"ElasticAppSearch"
"ElasticSearch8"
"AzureSearch"
"AlgoliaSearch"
This required setting specifies the current search provider.
Scope "default" This setting determines the scope to use and is required.

Examples

Configure the search provider modules and activate them in the Search.Provider section, providing connection parameters as specified in the module documentation:

appsettings.json
"Search": {
        "Provider": "ElasticAppSearch",
        "Scope": "default",
        "ElasticAppSearch": {
      "Endpoint": "https://localhost:3002",
            "PrivateApiKey": "private-key",
          "KibanaBaseUrl": "https://localhost:5601"
        }
    }

Tailor the search provider per document type to optimize search performance and functionality:

appsettings.json
{
  "Search": {
    "Provider": "ElasticAppSearch",
    "DocumentScopes": [
      {
        "DocumentType": "Category",
        "Provider": "ElasticSearch8"
      }
    ]
  }
}