milvus-io/milvus-sdk-java

set vector less than 1024 error

Closed this issue · 5 comments

milvus:v2.2.9
milvus-sdk-java:v2.2.5

my vector size is 384,i can init the db, but i can't insert data

image


2023-11-06 18:57:22 [INFO ] [qtp1052536203-38] [http://localhost:8080/console/server] i.m.c.AbstractMilvusGrpcClient - InsertParam{collectionName='zsd_v8', partitionName='_default', row_count=56, fields=[Field{fieldName='doc_title', row_count=56}, Field{fieldName='doc_url', row_count=56}, Field{fieldName='title', row_count=56}, Field{fieldName='text', row_count=56}, Field{fieldName='vector', row_count=56}, Field{fieldName='page_num', row_count=56}, Field{fieldName='type', row_count=56}, Field{fieldName='position', row_count=56}, Field{fieldName='page_size', row_count=56}]}
2023-11-06 18:57:22 [INFO ] [qtp1052536203-38] [http://localhost:8080/console/server] i.m.c.AbstractMilvusGrpcClient - DescribeCollectionParam{collectionName='zsd_v8'}
2023-11-06 18:57:22 [ERROR] [qtp1052536203-38] [http://localhost:8080/console/server] i.m.c.AbstractMilvusGrpcClient - InsertRequest failed! Collection name:zsd_v8

Incorrect dimension for field 'vector': the no.0 vector's dimension: 1024 is not equal to field's dimension: 384

Incorrect dimension for field 'vector': the no.0 vector's dimension: 1024 is not equal to field's dimension: 384
what's the no.0 ? i can't find it. and i don't know how to set vector size is 384, have a example or what show i do?

your vector is under 1024 dimenssion and you are trying to claim it as 384 dim

your vector is under 1024 dimenssion and you are trying to claim it as 384 dim

I successfully initialized a length of 384. But I don't know where the 1024 limit is?

i found why i has the error, my insert data vector length is 1024

@james-z-repo How did you solve it? I also encountered this problem

@james-z-repo How did you solve it? I also encountered this problem

you have to make sure your insertion dimension is same as your schema defined