Skip to content

feat(vectordb): add OceanBase HNSW quantization (HNSW_SQ/HNSW_BQ)#6348

Merged
c121914yu merged 1 commit into
labring:ob-testfrom
yixin-zh:feat/issue#6202
Jan 30, 2026
Merged

feat(vectordb): add OceanBase HNSW quantization (HNSW_SQ/HNSW_BQ)#6348
c121914yu merged 1 commit into
labring:ob-testfrom
yixin-zh:feat/issue#6202

Conversation

@yixin-zh

Copy link
Copy Markdown
Contributor

Support OceanBase vector index quantization via VECTOR_VQ_LEVEL:
32 (default): hnsw + inner_product
8: hnsw_sq + inner_product (2-3x memory savings)
1: hnsw_bq + cosine (~15x memory savings)

HNSW_BQ requires cosine distance per OceanBase docs. Tested on OceanBase 4.3.5-lts.

Tests passed.
pnpm run test gives:
Test Files 75 passed (75) Tests 1061 passed (1061)

Closes #6202

Support OceanBase vector index quantization via VECTOR_VQ_LEVEL:
- 32 (default): hnsw + inner_product
- 8: hnsw_sq + inner_product (2-3x memory savings)
- 1: hnsw_bq + cosine (~15x memory savings)

HNSW_BQ requires cosine distance per OceanBase docs.
Tested on OceanBase 4.3.5.5 (BP5).

Closes labring#6202
@gru-agent

gru-agent Bot commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

TestGru Assignment

Summary

Link CommitId Status Reason
Detail 2486916 🚫 Skipped No files need to be tested {"packages/service/common/vectorDB/constants.ts":"File path does not match include patterns.","packages/service/common/vectorDB/oceanbase/index.ts":"File path does not match include patterns.","projects/app/.env.template":"File path does not match include patterns."}

History Assignment

Tip

You can @gru-agent and leave your feedback. TestGru will make adjustments based on your input

@cla-assistant

cla-assistant Bot commented Jan 30, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

Copy link
Copy Markdown

Preview mcp_server Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_mcp_server_24869162c1e14115ab622f7fa793fe326cf869f5

@github-actions

Copy link
Copy Markdown

Preview sandbox Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_sandbox_24869162c1e14115ab622f7fa793fe326cf869f5

@github-actions

Copy link
Copy Markdown

Preview fastgpt Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_24869162c1e14115ab622f7fa793fe326cf869f5

@c121914yu c121914yu changed the base branch from main to ob-test January 30, 2026 07:16
@c121914yu c121914yu merged commit 58f20e5 into labring:ob-test Jan 30, 2026
4 checks passed
c121914yu pushed a commit that referenced this pull request Jan 31, 2026
)

Support OceanBase vector index quantization via VECTOR_VQ_LEVEL:
- 32 (default): hnsw + inner_product
- 8: hnsw_sq + inner_product (2-3x memory savings)
- 1: hnsw_bq + cosine (~15x memory savings)

HNSW_BQ requires cosine distance per OceanBase docs.
Tested on OceanBase 4.3.5.5 (BP5).

Closes #6202
c121914yu added a commit that referenced this pull request Feb 2, 2026
* feat(vectordb): add OceanBase HNSW quantization (HNSW_SQ/HNSW_BQ) (#6348)

Support OceanBase vector index quantization via VECTOR_VQ_LEVEL:
- 32 (default): hnsw + inner_product
- 8: hnsw_sq + inner_product (2-3x memory savings)
- 1: hnsw_bq + cosine (~15x memory savings)

HNSW_BQ requires cosine distance per OceanBase docs.
Tested on OceanBase 4.3.5.5 (BP5).

Closes #6202

* feat: add test inclusion for vectorDB tests in vitest configuration (#6358)

* feat: add test inclusion for vectorDB tests in vitest configuration

* refactor: update vectorDB README and setup for environment configuration

- Enhanced README to clarify the use of factory pattern for vectorDB integration tests.
- Updated instructions for setting up environment variables from a local file.
- Removed obsolete PG integration test file and adjusted test execution instructions.
- Improved structure explanation for shared test data and factory functions.

* perf: integrationTest

* feat: vector integration

---------

Co-authored-by: ZHANG Yixin <hi.yixinz@gmail.com>
Co-authored-by: Jingchao <alswlx@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Oceanbase 支持不同量化等级

2 participants