fix: support self-hosted Elasticsearch via --host/--port in elasticcloud commands#761
Merged
XuanYang-cn merged 2 commits intomainfrom Apr 20, 2026
Merged
Conversation
…oud commands ElasticCloudConfig previously required cloud_id, so the elasticcloudhnsw* subcommands could only target Elastic Cloud. Users benchmarking self-hosted stock Elasticsearch had no working path: tencentelasticsearch accepts host/port but forces Tencent's vsearch index_options type, which stock ES rejects with "Unknown vector index options type [vsearch]". Extend ElasticCloudConfig with scheme/host/port/user fields (mutually exclusive with cloud_id) and expose them on all four ElasticCloudHNSW* CLI subcommands. Existing cloud_id callers are unchanged. Refs #758 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
XuanYang-cn
approved these changes
Apr 20, 2026
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: xiaofan-luan, XuanYang-cn The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ElasticCloudConfigto accept eithercloud_idor a self-hosted connection (scheme/host/port/user).--host / --port / --scheme / --userflags (and make--cloud-idoptional) on all fourelasticcloudhnsw*subcommands.--cloud-idbased usage is unchanged —cloud_idstill takes precedence when both are supplied.Motivation (#758)
Users running stock Elasticsearch 8.x (self-hosted, on-prem, or Tencent/Aliyun-hosted stock ES) had no working VectorDBBench entrypoint:
elasticcloudhnsw*required--cloud-id— no way to point at a host/port.tencentelasticsearchaccepts--host/--portbut hardcodesindex_options.type = "vsearch"(Tencent-specific), which stock ES rejects withUnknown vector index options type [vsearch] for field [vector].With this change, the correct mapping (
hnsw,int8_hnsw,int4_hnsw,bbq_hnsw) can finally be used against self-hosted ES clusters:vectordbbench elasticcloudhnsw \ --scheme http --host rw-xxxxx --port 9204 \ --user elastic --password 'pw' \ --case-type Performance768D1M --m 16 --ef-construction 200 --k 10Test plan
elasticcloudhnsw --cloud-id ... --password ... --dry-run— builds{"cloud_id": ..., "basic_auth": (...)}(backward compatible).elasticcloudhnsw --host rw-test --port 9204 --scheme http --password ... --dry-run— builds{"hosts": [{...}], "basic_auth": (...)}.elasticcloudhnsw --password ... --dry-run(neither flag) — rejected withElasticCloudConfig requires either cloud_id or host to be set.ruff check vectordb_bench/backend/clients/elastic_cloud/— passes.Closes #758
🤖 Generated with Claude Code