Skip to content
Last update: May 8, 2024

Elastic Search 8

The Virto Commerce Elastic Search 8 module implements the ISearchProvider defined in the Virto Commerce Search module. It leverages the Elasticsearch engine to store indexed documents.

The module supports the following deployment options:

  • Elastic Cloud 8.x
  • Standalone Elasticsearch 8.x

Source code

Features

Known Limitations

The known limitations are:

  • The Catalog object serialization via Store serialized catalog objects in the index platform settings is not implemented. Document field __object will not be indexed.
  • Blue-Green indexation is not implemented.
  • Partial indexation is not implemented.

Configuration

Configure the Elastic Search 8 provider using the following schema:

Node Default or Sample Value Description
Search.Provider "ElasticSearch8" Specifies the search provider name, which must be set to "ElasticSearch8".
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. Its default value is default.
Search.ElasticSearch8.Server Specifies the network address and the port of the Elasticsearch8 server.
Search.ElasticSearch8.User "elastic" Specifies the username for the Elasticsearch8 server.
Search.ElasticSearch8.Key (Optional) Specifies the password for the Elasticsearch8 server.
Search.ElasticSearch8.CertificateFingerprint (Optional) During development, you can provide the server certificate fingerprint. When present, it is used to validate the certificate sent by the server. The fingerprint is expected to be the hex string representing the SHA256 public key fingerprint.

Examples

Configure local v8.x server:

appsettings.json
"Search": {
    "Provider": "ElasticSearch8",
    "Scope": "default",
    "ElasticSearch8": {
        "Server": "https://localhost:9200",
        "User": "elastic",
        "Key": "{PASSWORD}"
    }
}

Configure Elastic Cloud v8.x:

appsettings.json
"Search": {
    "Provider": "ElasticSearch8",
    "Scope": "default",
    "ElasticSearch8": {
        "Server": "https://vcdemo.es.eastus2.azure.elastic-cloud.com",
        "User": "elastic",
        "Key": "{SECRET_KEY}"
    }
}

The provider performs full-text keyword searches on a documents, optionally with filters and aggregations.