Repository navigation
Raise Elasticsearch dense_vector dims limit to 4096 - #359
Open
inamdarmihir wants to merge 1 commit into
Open
inamdarmihir wants to merge 1 commit into
inamdarmihir wants to merge 1 commit into
Conversation
dense_vector supports up to 4096 dims since Elasticsearch 8.11 (the pinned server image is 9.5.1), but the configurator rejected datasets above 2048. Use a named constant for the limit and update the docs link. Add unit tests for the boundary values. Fixes qdrant#113
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
engine/clients/elasticsearch/configure.pyrefuses any dataset withvector_size > 2048by raisingIncompatibilityError. That limit was the Elasticsearch 8.10dense_vectormaximum (the comment links the 8.10 docs). The benchmark's server image is nowelasticsearch:9.5.1, wheredense_vectoraccepts up to 4096 dimensions, so 3072/4096-dim datasets are skipped for no reason. The blocker noted on #113 ("need to update the ES version") no longer applies.This replaces the literal with a
MAX_DENSE_VECTOR_DIMS = 4096constant and updates the docs link.Checked against Elastic's source:
DenseVectorFieldMapper.MAX_DIMS_COUNTis 2048 at tag 8.10 and 4096 at 8.11, 8.12, 9.3.0 and main; the docs say it "can't exceed 4096". I did not check tag 9.5.1 itself. The OpenSearch client has its own, different limit (1024) and is untouched.Tests (
tests/engine/clients/elasticsearch/test_elasticsearch_configure.py, stubbed ES client, no server needed): 128, 2048, 2049 and 4096 dims are accepted; 4097 and 8192 raiseIncompatibilityErrorwithout callingindices.create; the existingDistance.DOTrejection still works.Fixes #113