-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Add option to store sparse_vector
outside _source
#117917
Conversation
This PR introduces an option for `sparse_vector` to store its values separately from `_source` by using term vectors. This capability is primarly needed by the semantic text field.
Documentation preview: |
Pinging @elastic/es-search-foundations (Team:Search Foundations) |
Hi @jimczi, I've created a changelog YAML for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
server/src/main/java/org/elasticsearch/index/mapper/vectors/XFeatureField.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/mapper/vectors/SparseVectorFieldMapper.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackFeatures.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/index/mapper/vectors/SparseVectorFieldMapperTests.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/mapper/vectors/SparseVectorFieldMapper.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Jim, nice addition!
Not related to your PR, but I've noticed I am getting an error message during index metadata validation when trying to create an index with sparse_vector field: " Failed to parse mapping: The [sparse_vector] field type is not supported on indices created on versions 8.0 to 8.10." |
In which context? Are you testing with any of these versions? |
server/src/main/java/org/elasticsearch/index/mapper/MapperFeatures.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/mapper/vectors/SparseVectorFieldMapper.java
Outdated
Show resolved
Hide resolved
💔 Backport failed
You can use sqren/backport to manually backport by running |
This PR introduces an option for `sparse_vector` to store its values separately from `_source` by using term vectors. This capability is primarly needed by the semantic text field.
This PR introduces an option for
sparse_vector
to store its values separately from_source
by using term vectors.This capability is primarily needed by the semantic text field.