Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Describe index on a vector field but lists indexes on all vector fields #689

Closed
1 task done
ThreadDao opened this issue Mar 29, 2024 · 2 comments
Closed
1 task done
Assignees

Comments

@ThreadDao
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

  1. create collection with 4 vector fields: float32, fp16, bf16, vector
  2. insert data and flush
  3. create index on all vector fields
  4. describe index on float32 vector field, but return all vector fields's index
16:30:34 milvus_client.go:14: (ApiRequest): func [DescribeIndex], args: [context.Background.WithDeadline(2024-03-29 16:34:18.036644095 +0800 CST m=+240.003684713 [3m43.604197212s]) aFfC floatVec []]
2024/03/29 16:30:34 milvus_client.go:21: (ApiResponse): func [DescribeIndex], results: [[{{HNSW floatVec} map[index_type:HNSW metric_type:L2 params:{"M":"8","efConstruction":"96"}]} {{BIN_IVF_FLAT binaryVec} map[index_type:BIN_IVF_FLAT metric_type:JACCARD params:{"nlist":"64"}]} {{HNSW fp16Vec} map[index_type:HNSW metric_type:L2 params:{"M":"8","efConstruction":"96"}]} {{HNSW bf16Vec} map[index_type:HNSW metric_type:L2 params:{"M":"8","efConstruction":"96"}]}]]
2024/03/29 16:30:34 index_test.go:124: map[index_type:HNSW metric_type:L2 params:{"M":"8","efConstruction":"96"}] HNSW
2024/03/29 16:30:34 index_test.go:124: map[index_type:BIN_IVF_FLAT metric_type:JACCARD params:{"nlist":"64"}] BIN_IVF_FLAT
2024/03/29 16:30:34 index_test.go:124: map[index_type:HNSW metric_type:L2 params:{"M":"8","efConstruction":"96"}] HNSW
2024/03/29 16:30:34 index_test.go:124: map[index_type:HNSW metric_type:L2 params:{"M":"8","efConstruction":"96"}] HNSW
  • case:
func TestDescribeIndexMultiVectors(t *testing.T) {
	ctx := createContext(t, time.Second*common.DefaultTimeout*2)
	// connect
	mc := createMilvusClient(ctx, t)
	// create -> insert [0, 3000) -> flush -> index -> load
	cp := CollectionParams{CollectionFieldsType: AllFields, AutoID: false, EnableDynamicField: true,
		ShardsNum: common.DefaultShards, Dim: common.DefaultDim}

	dp := DataParams{DoInsert: true, CollectionFieldsType: AllFields, start: 0, nb: common.DefaultNb * 2,
		dim: common.DefaultDim, EnableDynamicField: true}

	// create index for all vector fields
	ips := GenDefaultIndexParamsForAllVectors()

	collName := prepareCollection(ctx, t, mc, cp, WithDataParams(dp), WithIndexParams(ips), WithCreateOption(client.WithConsistencyLevel(entity.ClStrong)))
	indexes, err := mc.DescribeIndex(ctx, collName, common.DefaultFloatVecFieldName)
	common.CheckErr(t, err, true)
	for _, idx := range indexes {
		log.Println(idx.Params(), idx.IndexType())
	}
}

Expected Behavior

No response

Steps To Reproduce

No response

Environment

4am pods:

zong-go-master-2-etcd-0                                           1/1     Running                           0               24h
zong-go-master-2-kafka-0                                          1/1     Running                           0               24h
zong-go-master-2-kafka-1                                          1/1     Running                           0               24h
zong-go-master-2-kafka-2                                          1/1     Running                           0               24h
zong-go-master-2-kafka-zookeeper-0                                1/1     Running                           0               24h
zong-go-master-2-kafka-zookeeper-1                                1/1     Running                           0               24h
zong-go-master-2-kafka-zookeeper-2                                1/1     Running                           0               24h
zong-go-master-2-milvus-standalone-dbc9cf5b4-6k222                1/1     Running                           3 (45m ago)     24h
zong-go-master-2-minio-669b58dcd8-gw7zz                           1/1     Running                           0               24h


### Anything else?

_No response_
@ThreadDao
Copy link
Contributor Author

/assign @congqixia

congqixia added a commit to congqixia/milvus-sdk-go that referenced this issue Apr 1, 2024
See also milvus-io#689

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
sre-ci-robot pushed a commit that referenced this issue Apr 1, 2024
See also #689

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
@ThreadDao
Copy link
Contributor Author

fixed

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

No branches or pull requests

2 participants