Skip to content

Add dynamic mapping for knn_vector fields - #12938

Open
naykudev wants to merge 3 commits into
opensearch-project:mainfrom
naykudev:add-dynamic-knn-vector-mapping-docs
Open

Add dynamic mapping for knn_vector fields#12938
naykudev wants to merge 3 commits into
opensearch-project:mainfrom
naykudev:add-dynamic-knn-vector-mapping-docs

Conversation

@naykudev

Copy link
Copy Markdown

Description

Documents the two dynamic knn_vector mapping paths introduced in 3.9:

  • Dynamic templates — using knn_vector as a match_mapping_type, with dimension either specified or inferred from the first document.
  • Auto-inference — zero-configuration mapping of an unmapped flat numeric array as a knn_vector when its length is a multiple of 8 and within the [128, 16000] range.

The section also covers dimension locking after the first document, the shape-based nature of auto-inference (including the misclaim caveat for non-vector numeric arrays), and that an explicit mapping always takes precedence.

Added as a new "Dynamic mapping" section in _mappings/supported-field-types/knn-vector.md.

Related

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Document the two dynamic knn_vector mapping paths introduced in 3.9: a
dynamic template using match_mapping_type: knn_vector, and zero-config
auto-inference of a knn_vector from a flat numeric array. Includes the
inference gate (multiple of 8, within [128, 16000]), dimension locking,
and that explicit mappings take precedence.

Signed-off-by: ved naykude <vnaykude@amazon.com>
@github-actions

Copy link
Copy Markdown

Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Merged.

Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer.

When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference).

@github-actions github-actions Bot added the Tech review PR: Tech review in progress label Aug 18, 2026
@kolchfa-aws kolchfa-aws added release-notes PR: Include this PR in the automated release notes v3.9.0 labels Aug 19, 2026
@kolchfa-aws

Copy link
Copy Markdown
Collaborator

@kotwanikunal @Vikasht34 Could you review this PR please?

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

Labels

release-notes PR: Include this PR in the automated release notes Tech review PR: Tech review in progress v3.9.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants