Skip to content

fix(es,opensearch): add CLI controls and OpenSearch version compatibility fixes - #916

Open
jamesgao-jpg wants to merge 5 commits into
zilliztech:mainfrom
jamesgao-jpg:fix/es-os-cli-compat
Open

jamesgao-jpg wants to merge 5 commits into
zilliztech:mainfrom
jamesgao-jpg:fix/es-os-cli-compat

Conversation

@jamesgao-jpg

Copy link
Copy Markdown
Collaborator

Summary

  • OSSOpenSearch CLI controls:
    • Expose --knn-derived-source-enabled/--no-knn-derived-source-enabled (default False) on the OSSOpenSearch CLI command and propagate it to OSSOpenSearchIndexConfig.
    • Expose --id-col-name (default _id) through OSSOpenSearchConfig and the OSSOpenSearch CLI command.
  • OSSOpenSearch compatibility and bug fixes:
    • Fix BulkInsertManager.prepare_bulk_data() to always use "_id" in the OpenSearch bulk action header while writing [id_col_name] into the document body when id_col_name != "_id" (supporting custom integer ID fields used by filtered workloads).
    • Gate method_parameters in SearchQueryBuilder.build_knn_query() on OpenSearch >= 2.16.0 (earlier versions reject method_parameters at query time) and gate knn.advanced.approximate_threshold in _do_force_merge() on OpenSearch >= 3.0.
    • Keep knn.advanced.approximate_threshold at "0" rather than "-1" during index creation on OpenSearch >= 3.0 when force_merge_enabled is False, so HNSW graphs are built on flush/merge instead of falling back to exact scans.
  • ElasticCloud CLI control:
    • Add --index-name (default vdb_bench_indice) to ElasticCloudConfig and all ElasticCloud* CLI commands via a shared _build_elastic_config() helper, and pop index_name in ElasticCloud.__init__ so vector and FTS runs can target separate indices without dropping prior indices.

Testing

  • Unit tests (tests/test_oss_opensearch_fts.py, tests/test_fts_cli_user_control.py): 35 passed.
  • Lint (ruff check on vectordb_bench/backend/clients/elastic_cloud/ and vectordb_bench/backend/clients/oss_opensearch/): all checks passed.

Expose knn_derived_source_enabled on the OSSOpenSearch CLI command so
OpenSearch 3.0+ runs can toggle k-NN derived source from CLI.

Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>
…dices

Expose --index-name (default vdb_bench_indice) on ElasticCloudConfig and
the ElasticCloud CLI commands so vector and FTS workloads can use separate
indices on the same server without dropping prior indices.

Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>
…l_name

Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>
…rge is disabled

Keep knn.advanced.approximate_threshold at "0" when force_merge_enabled is False on OpenSearch 3.0+ so HNSW graphs are built instead of falling back to exact scans.

Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>
Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>
@sre-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jamesgao-jpg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants