Help Center/ Cloud Search Service/ User Guide/ Vector Database/ CSS Vector Engine vs. OpenSearch Vector Engine
Updated on 2026-04-30 GMT+08:00

CSS Vector Engine vs. OpenSearch Vector Engine

To enable efficient retrieval of massive high-dimensional vector data for AI search systems, CSS provides two vector search engines: the CSS vector engine, built on Huawei's proprietary technologies, and the OpenSearch vector engine, which is fully compatible with OpenSearch community standards. This topic compares the two engines in terms of features, technical capabilities, APIs, and query syntax, helping you choose the most suitable engine for your needs.

Features

Table 1 A comparison of features

Dimension

CSS Vector Engine

OpenSearch Vector Engine

Positioning

Huawei's proprietary vector search engine, built on a deeply customized Elasticsearch/OpenSearch core, delivering high-performance, enterprise-grade vector search capabilities.

An open-source vector search engine provided by the OpenSearch community. Driven by the k-NN plugin, it leverages open-source libraries such as Faiss, NMSLib, and Lucene, and is fully compatible with the APIs and standards of the OpenSearch ecosystem.

Syntax

Provides proprietary indexing APIs and a custom query DSL.

Uses OpenSearch's k-NN (K-Nearest Neighbors) or ANN (Approximate Nearest Neighbor) syntax. ANN is recommended.

When to use

To enjoy the high performance, stability, and out-of-the-box experience that CSS delivers

To maintain full compatibility with the open-source community

Supported cluster versions

  • Elasticsearch: 7.6.2 and 7.10.2
  • OpenSearch: 1.3.6 and 2.19.0

All OpenSearch versions

Details

Procedure

Vector search

Similarities

  • Algorithm support: Both engines support mainstream vector indexing algorithms such as HNSW, IVF, PQ, and SQ.
  • Query support: Both engines support vector query, pre-filtering query, and hybrid query.
  • Performance requirements: Both engines implement core computational logic in C++ and require large memory configurations to deliver optimal performance.

Differences in Core Capabilities

Table 2 A comparison of core capabilities

Dimension

CSS Vector Engine

OpenSearch Vector Engine

Level of integration

Deep integration with CSS: eligible for full SLA assurance and technical support.

Runs as an OpenSearch plugin (k-NN plugin) and relies on community version release cycles for updates and maintenance.

Ease of use

Proprietary APIs, not directly compatible with open-source APIs.

Open-source OpenSearch ANN/k-NN query DSL and APIs.

Flexibility

CSS provides algorithm optimization policies, with relatively centralized optimization configuration options.

Open-source libraries such as Faiss and NMSLib can be flexibly combined, enabling more fine-grained parameter tuning.

Performance optimization

Supports dedicated index memory management, with simplified optimization and tuning.

Relies on the optimization of Faiss/NMSLib parameters and OpenSearch configurations.

Differences in APIs and Query Syntax

Table 3 A comparison of APIs and query syntax for key operations

Dimension

CSS Vector Engine

OpenSearch Vector Engine

Creating indexes

A proprietary vector index is created, and key parameters index.vector and type are required.

Example:

PUT /my_index 
{
  "settings": {
    "index": {
      "vector": true
    }
  },
  "mappings": {
    "properties": {
      "image_vector": {
        "type": "vector",
        "dimension": 2,
        "indexing": true,
        "metric": "euclidean"
      },
      "price":{"type": "float"}
    }
  }
}

An ANN index is created, and key parameters index.knn and type are required.

Example (OpenSearch 2.x or later):

PUT /my_index
{
  "settings": {
    "index": {
      "knn": true
    }
  },
  "mappings": {
    "properties": {
      "image_vector": {
        "type": "knn_vector",
        "dimension": 2,
        "method": {
          "name": "hnsw",
          "space_type": "l2",
          "engine": "faiss"}
      },
      "price":{"type": "float"}
    }
  }
}

Query DSL

Perform a vector query, using the key parameter query.vector.

Example:

GET /my_index/_search
{
  "query": {
    "vector": {
      "image_vector": {
        "vector": [1.0,2.0],
        "topk": 3,
        "filter": {"range": {"price": {"lte": 300}}}
      }
    }
  }
}

Perform a vector query, using the key parameter query.knn.

Example (OpenSearch 2.x or later):

GET /my_index/_search
{
  "query": {
    "knn": {
      "image_vector": {
        "vector": [1.0, 2.0],
        "k": 3,
        "filter": {"range":{"price":{"lte": 300 }}}
      }
    }
  }
}

Related Documents