File tree Expand file tree Collapse file tree 5 files changed +23
-5
lines changed Expand file tree Collapse file tree 5 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 1
1
## [ Unreleased]
2
2
3
+ ## [ 0.10.4] - 2024-11-14
4
+ - ` client.entities.search() ` now accepts ` search_params: {} `
5
+
3
6
## [ 0.10.3] - 2024-10-01
4
7
- Milvus::Client constructor accepts customer logger: to be passed in
5
8
- Added Alias management
Original file line number Diff line number Diff line change 1
1
PATH
2
2
remote: .
3
3
specs:
4
- milvus (0.10.3 )
4
+ milvus (0.10.4 )
5
5
faraday (>= 2.0.1 , < 3 )
6
6
7
7
GEM
Original file line number Diff line number Diff line change @@ -187,7 +187,15 @@ client.entities.search(
187
187
collection_name: " example_collection" ,
188
188
anns_field: " vectors" ,
189
189
data: [embedding],
190
- filter: " id in [450847466900987454]"
190
+ # filter: "id in [450847466900987454]",
191
+ search_params: {
192
+ # Other accepted values: "COSINE" or "IP"
193
+ # NOTE: metric_type must be the same as metric type used when index was created
194
+ metric_type: " L2" ,
195
+ params: {
196
+ radius: 0.1 , range_filter: 0.8
197
+ }
198
+ },
191
199
)
192
200
```
193
201
``` ruby
Original file line number Diff line number Diff line change @@ -123,10 +123,13 @@ def search(
123
123
collection_name :,
124
124
data :,
125
125
anns_field :,
126
+ filter : nil ,
126
127
limit : nil ,
127
- output_fields : [ ] ,
128
128
offset : nil ,
129
- filter : nil
129
+ grouping_field : nil ,
130
+ output_fields : [ ] ,
131
+ search_params : { } ,
132
+ partition_names : [ ]
130
133
)
131
134
response = client . connection . post ( "#{ PATH } /search" ) do |req |
132
135
params = {
@@ -138,6 +141,10 @@ def search(
138
141
params [ :outputFields ] = output_fields if output_fields . any?
139
142
params [ :offset ] = offset if offset
140
143
params [ :filter ] = filter if filter
144
+ params [ :searchParams ] = search_params if search_params . any?
145
+ params [ :partitionNames ] = partition_names if partition_names . any?
146
+ params [ :groupingField ] = groupingField if grouping_field
147
+
141
148
req . body = params
142
149
end
143
150
response . body . empty? ? true : response . body
Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
3
module Milvus
4
- VERSION = "0.10.3 "
4
+ VERSION = "0.10.4 "
5
5
end
You can’t perform that action at this time.
0 commit comments