Skip to content

Conversation

@benwtrent
Copy link
Member

this is a small refactor, laying ground work for more generalized bulk writing.

I did some benchmarking and there was no significant performance difference (as expected).

@elasticsearchmachine elasticsearchmachine added v9.2.0 needs:triage Requires assignment of a team area label labels Jun 30, 2025
Copy link
Contributor

@john-wagster john-wagster left a comment

Choose a reason for hiding this comment

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

lgtm

Comment on lines -155 to -162
writeQuantizedValue(postingsOutput, binaryValue, correction);
binarizedByteVectorValues.getCorrectiveTerms(ord);
postingsOutput.writeBytes(binaryValue, 0, binaryValue.length);
postingsOutput.writeInt(Float.floatToIntBits(correction.lowerInterval()));
postingsOutput.writeInt(Float.floatToIntBits(correction.upperInterval()));
postingsOutput.writeInt(Float.floatToIntBits(correction.additionalCorrection()));
assert correction.quantizedComponentSum() >= 0 && correction.quantizedComponentSum() <= 0xffff;
postingsOutput.writeShort((short) correction.quantizedComponentSum());
Copy link
Member Author

Choose a reason for hiding this comment

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

We were actually writing all vectors TWICE in the tail of postings. This (just a tad) negatively impacted recall. This is also why the skew index test started failing as the testing value there apparently relied on this :/

@benwtrent benwtrent added auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :Search Relevance/Vectors Vector search >non-issue and removed needs:triage Requires assignment of a team area label labels Jul 1, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Jul 1, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine elasticsearchmachine merged commit 044f34b into elastic:main Jul 1, 2025
32 checks passed
@benwtrent benwtrent deleted the ivf-bulk-writer-refactor branch July 1, 2025 20:54
mridula-s109 pushed a commit to mridula-s109/elasticsearch that referenced this pull request Jul 2, 2025
this is a small refactor, laying ground work for more generalized bulk
writing.

I did some benchmarking and there was no significant performance
difference (as expected).
mridula-s109 pushed a commit to mridula-s109/elasticsearch that referenced this pull request Jul 3, 2025
this is a small refactor, laying ground work for more generalized bulk
writing.

I did some benchmarking and there was no significant performance
difference (as expected).
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!) >non-issue :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.

4 participants