Skip to content

Adds support for 7-bit quantization in BBQ index#143611

Merged
ah89 merged 3 commits intoelastic:mainfrom
ah89:feature/expose-bbq-bits-7-index-settings
Mar 6, 2026
Merged

Adds support for 7-bit quantization in BBQ index#143611
ah89 merged 3 commits intoelastic:mainfrom
ah89:feature/expose-bbq-bits-7-index-settings

Conversation

@ah89
Copy link
Copy Markdown
Contributor

@ah89 ah89 commented Mar 4, 2026

Enables the use of 7-bit quantization for indexed vectors in BBQ (based on received comment), improving flexibility for disk-based vector fields. Updates validation, documentation, and tests to accommodate the new option and ensures correct parameter handling throughout the codebase.

Relates to #141183

Enables the use of 7-bit quantization for indexed vectors in BBQ,
improving flexibility for disk-based vector fields. Updates validation,
documentation, and tests to accommodate the new option and ensures
correct parameter handling throughout the codebase.

Relates to elastic#141183
@ah89 ah89 requested a review from a team as a code owner March 4, 2026 18:44
@ah89 ah89 requested review from benwtrent and removed request for a team March 4, 2026 18:44
@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label v9.4.0 labels Mar 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 4, 2026

🔍 Preview links for changed docs

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 4, 2026

ℹ️ Important: Docs version tagging

👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version.

We use applies_to tags to mark version-specific features and changes.

Expand for a quick overview

When to use applies_to tags:

✅ At the page level to indicate which products/deployments the content applies to (mandatory)
✅ When features change state (e.g. preview, ga) in a specific version
✅ When availability differs across deployments and environments

What NOT to do:

❌ Don't remove or replace information that applies to an older version
❌ Don't add new information that applies to a specific version without an applies_to tag
❌ Don't forget that applies_to tags can be used at the page, section, and inline level

🤔 Need help?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 4, 2026

✅ Vale Linting Results

No issues found on modified lines!


The Vale linter checks documentation changes against the Elastic Docs style guide.

To use Vale locally or report issues, refer to Elastic style guide for Vale.

@ah89 ah89 added the :Search Relevance/Vectors Vector search label Mar 4, 2026
@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Mar 4, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

@elasticsearchmachine elasticsearchmachine removed the needs:triage Requires assignment of a team area label label Mar 4, 2026
@ah89 ah89 added the >feature label Mar 4, 2026
if (Build.current().isSnapshot()) {
return new ESNextDiskBBQVectorsFormat(
ESNextDiskBBQVectorsFormat.QuantEncoding.ONE_BIT_4BIT_QUERY,
ESNextDiskBBQVectorsFormat.QuantEncoding.fromId(diskbbq.getBits() >> 1),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot do the id like this. It makes an assumption we just cannot keep. WE should either send the ID directly, or have a direct mapping.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Since the pattern used in DenseVectorFieldMapper.java was followed, that file has been updated as well.

Switches from using a shifted ID to directly interpreting bits
for quantization encoding selection, improving accuracy and
consistency in vector format initialization.
@ah89 ah89 enabled auto-merge (squash) March 6, 2026 02:01
@elastic elastic deleted a comment from coderabbitai bot Mar 6, 2026
@ah89 ah89 merged commit 194133b into elastic:main Mar 6, 2026
36 checks passed
spinscale pushed a commit to spinscale/elasticsearch that referenced this pull request Mar 6, 2026
* Adds support for 7-bit quantization in BBQ index

Enables the use of 7-bit quantization for indexed vectors in BBQ,
improving flexibility for disk-based vector fields. Updates validation,
documentation, and tests to accommodate the new option and ensures
correct parameter handling throughout the codebase.

Relates to elastic#141183

* Updates quantization encoding selection logic

Switches from using a shifted ID to directly interpreting bits
for quantization encoding selection, improving accuracy and
consistency in vector format initialization.
sidosera pushed a commit to sidosera/elasticsearch that referenced this pull request Mar 6, 2026
* Adds support for 7-bit quantization in BBQ index

Enables the use of 7-bit quantization for indexed vectors in BBQ,
improving flexibility for disk-based vector fields. Updates validation,
documentation, and tests to accommodate the new option and ensures
correct parameter handling throughout the codebase.

Relates to elastic#141183

* Updates quantization encoding selection logic

Switches from using a shifted ID to directly interpreting bits
for quantization encoding selection, improving accuracy and
consistency in vector format initialization.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>feature :Search Relevance/Vectors Vector search Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants