Skip to content

Conversation

@miguelgrinberg
Copy link
Contributor

@miguelgrinberg miguelgrinberg commented Dec 22, 2025

Elastic\Elasticsearch\Helper\Vectors::packDenseVector() function to pack dense vectors for efficient bulk uploading to Elasticsearch. Also included in this PR is a benchmark for this feature.

@miguelgrinberg miguelgrinberg force-pushed the base64-dense-vector-packing branch 3 times, most recently from be47e77 to aa4b389 Compare December 23, 2025 10:06
@miguelgrinberg miguelgrinberg force-pushed the base64-dense-vector-packing branch from aa4b389 to 34a8090 Compare December 23, 2025 10:35
@miguelgrinberg miguelgrinberg marked this pull request as ready for review December 23, 2025 10:56
$doc = $dataset[($i - 1) % $len];
$params['body'][] = ['index' => ['_index' => $index]];
$params['body'][] = [
'docid' => $doc['docid'],
Copy link
Member

Choose a reason for hiding this comment

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

I think we're supposed to leave out the docid in the benchmark.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe that refers to not using the docid as the document id. This puts it as a regular field, which I saw others do as well. I don't think it will make any significant difference with or without this field, anyway.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants