Skip to content
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

[8.15] Fix Synthetic Source Handling for bit Type in dense_vector Field (#114407) #114759

Merged
merged 9 commits into from
Oct 15, 2024

Conversation

benwtrent
Copy link
Member

Backport

This will backport the following commits from main to 8.15:

Questions ?

Please refer to the Backport tool documentation

…lastic#114407)

**Description:**

This PR addresses the issue described in [elastic#114402](elastic#114402), where the `synthetic_source` feature does not correctly handle the `bit` type in `dense_vector` fields when `index` is set to `false`. The root cause of the issue was that the `bit` type was not properly accounted for, leading to an array that is 8 times the size of the actual `dims` value of docvalue. This mismatch will causes an array out-of-bounds exception when reconstructing the document.

**Changes:**

- Adjusted the `synthetic_source` logic to correctly handle the `bit` type by ensuring the array size accounts for the 8x difference in dimensions.
- Added yaml test to cover the `bit` type scenario in `dense_vector` fields with `index` set to `false`.

**Related Issues:**

- Closes [elastic#114402](elastic#114402)
- Introduced in [elastic#110059](elastic#110059)

(cherry picked from commit 465c65c)
@benwtrent benwtrent added auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) >bug :Search Relevance/Vectors Vector search v8.15.4 labels Oct 14, 2024
@benwtrent benwtrent changed the title [8.15] Fix Synthetic Source Handling for `bit` Type in `dense_vector` Field (#114407) [8.15] Fix Synthetic Source Handling for bit Type in dense_vector Field (#114407) Oct 14, 2024
@elasticsearchmachine elasticsearchmachine merged commit f8386c3 into elastic:8.15 Oct 15, 2024
15 checks passed
@benwtrent benwtrent deleted the backport/8.15/pr-114407 branch October 15, 2024 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug :Search Relevance/Vectors Vector search v8.15.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants