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

vectorstores/milvus: add WithMetricType #674

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions vectorstores/milvus/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ func WithSearchParameters(sp entity.SearchParam) Option {
}
}

// WithMetricType sets the metric type for the collection.
func WithMetricType(metricType entity.MetricType) Option {
return func(p *Store) {
p.metricType = metricType
}
}

func applyClientOptions(opts ...Option) (Store, error) {
s := Store{
metricType: entity.L2,
Expand Down
Loading