Skip to content

Enable exclude_source_vectors by default for new indices #131907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Jul 25, 2025

This commit sets index.mapping.exclude_source_vectors to true by default for newly created indices. When enabled, vector fields (dense_vector, sparse_vector, rank_vector) are excluded from _source on disk and are not returned in API responses unless explicitly requested.

The change improves indexing performance, reduces storage size, and avoids unnecessary payload bloat in responses. Vector values continue to be rehydrated transparently for partial updates, reindex, and recovery.

Existing indices are not affected and continue to store vectors in _source by default.

This commit sets `index.mapping.exclude_source_vectors` to `true` by default
for newly created indices. When enabled, vector fields (`dense_vector`,
`sparse_vector`, `rank_vector`) are excluded from `_source` on disk and are
not returned in API responses unless explicitly requested.

The change improves indexing performance, reduces storage size, and avoids
unnecessary payload bloat in responses. Vector values continue to be rehydrated
transparently for partial updates, reindex, and recovery.

Existing indices are not affected and continue to store vectors in `_source`
by default.
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Jul 25, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @jimczi, I've created a changelog YAML for you. Note that since this PR is labelled >breaking, you need to update the changelog YAML to fill out the extended information sections.

Copy link
Contributor

github-actions bot commented Jul 25, 2025

@jimczi jimczi removed the request for review from a team July 25, 2025 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>breaking >enhancement :Search Relevance/Vectors Vector search Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants