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

[Feature]:Does search vector support float64? #799

Open
1 task done
JiehangXie opened this issue Aug 9, 2024 · 0 comments
Open
1 task done

[Feature]:Does search vector support float64? #799

JiehangXie opened this issue Aug 9, 2024 · 0 comments
Labels
kind/feature Issues related to feature request from users

Comments

@JiehangXie
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe.

I use ZhipuAI embedding for my apps.
The embedding model returns a list of float64 vector and I store in Milvus with float64 type.
But my app use Go SDK for search vectors, and it is only support float32. This makes me to convert float64 data to float32, and it leads to loss of accuracy seriously.
So how can I use float64 data to search?

Describe the solution you'd like.

// search
v1 := make([]float32, 0, 768)
v2 := make([]float32, 0, 768)
for j := 0; j < 768; j++ {
   v1 = append(v1, rand.Float32())
   v2 = append(v2, rand.Float32())
}
sp, errSp := entity.NewIndexHNSWSearchParam(74)
if errSp != nil {
   log.Fatal("failed to new hnsw search params:", errSp.Error())
}
searchRes, errSearch := mc.Search(
   context.Background(),
   collectionName,
   []string{},
   "",
   []string{},
   []entity.Vector{entity.FloatVector(v1), entity.FloatVector(v2)},
   "vector",
   entity.COSINE,
   10,
   sp,
   client.WithSearchQueryConsistencyLevel(entity.ClBounded),
   )

Describe an alternate solution.

No

Anything else? (Additional Context)

No

@JiehangXie JiehangXie added the kind/feature Issues related to feature request from users label Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Issues related to feature request from users
Projects
None yet
Development

No branches or pull requests

1 participant