Skip to content

max dims of dense_vector field type should be increased #2911

Closed
@snurf198

Description

@snurf198

spring-data-elasticsearch version: 5.2.5

Hi. I found a bug in the code while creating mapping for the index using indexOps.
The target file path is as below

src/main/java/org/springframework/data/elasticsearch/core/index/MappingParameters.java:173

if (type == FieldType.Dense_Vector) {
	Assert.isTrue(dims >= 1 && dims <= 2048,
			"Invalid required parameter! Dense_Vector value \"dims\" must be between 1 and 2048.");
}

When I create mapping with dense_vector field having dimension 3072, the following error occurs
Invalid required parameter! Dense_Vector value "dims" must be between 1 and 2048

Since in elasticsearch 8.11, the max value of dimension of dense_vector field has increased to 4096, the part of the code should be changed.
elastic/elasticsearch#99682

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions