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]: service unavailable: CalcDistance deprecated #801

Open
1 task
littlePoBoy opened this issue Aug 13, 2024 · 1 comment
Open
1 task

[Bug]: service unavailable: CalcDistance deprecated #801

littlePoBoy opened this issue Aug 13, 2024 · 1 comment

Comments

@littlePoBoy
Copy link

littlePoBoy commented Aug 13, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

when i calculate distance between two vectors with sdk-go CalcDistance() function,An error has occurred:service unavailable: CalcDistance deprecated。
i use milvus-sdk-go version v2.4.1。
milvus stanlone version v2.4.6

Expected Behavior

Normal return The similarity between two vectors

Steps To Reproduce

v1 := make([][]float32, 0, 1)
	v1 = append(v1, param.Vector1)
	v2 := make([][]float32, 0, 1)
	v2 = append(v2, param.Vector2)

	vector1 := entity.NewColumnFloatVector("vector", 512, v1)
	vector2 := entity.NewColumnFloatVector("vector", 512, v2)

	distance, err := mc.CalcDistance(ctx, param.ColName, []string{}, entity.L2, vector1, vector2)
	if err != nil {
		slog.Error("calc distance error", slog.Any("err", err))
		return 0, err
	}

Environment

milvus-sdk-go version v2.4.1。
milvus stanlone version v2.4.6

Anything else?

No response

@littlePoBoy
Copy link
Author

if this function CalcDistance() is deprecated ,How to calculate the distance between two vectors with milvus-sdk-go?
thanks!!!

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

1 participant