Skip to content

Commit 521cde1

Browse files
authored
Merge pull request #125 from weaviate/chore/complete-searches
Add autoCut and offset parameters to NearText methods
2 parents 7b0fb2a + 1371dc2 commit 521cde1

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

src/Weaviate.Client/QueryClient.cs

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,17 @@ await _client.GrpcClient.FetchObjects(
114114

115115
public async Task<WeaviateResult> NearText(
116116
OneOrManyOf<string> text,
117-
float? distance = null,
118117
float? certainty = null,
119-
uint? limit = null,
118+
float? distance = null,
120119
Move? moveTo = null,
121120
Move? moveAway = null,
122-
string? tenant = null,
121+
uint? limit = null,
122+
uint? offset = null,
123+
uint? autoCut = null,
123124
Filter? filter = null,
124125
Rerank? rerank = null,
126+
string[]? targetVector = null,
127+
string? tenant = null,
125128
OneOrManyOf<string>? returnProperties = null,
126129
IList<QueryReference>? returnReferences = null,
127130
MetadataQuery? returnMetadata = null
@@ -135,6 +138,9 @@ await _client.GrpcClient.SearchNearText(
135138
limit: limit,
136139
moveTo: moveTo,
137140
moveAway: moveAway,
141+
offset: offset,
142+
autoCut: autoCut,
143+
targetVector: targetVector,
138144
filters: filter,
139145
tenant: tenant ?? _collectionClient.Tenant,
140146
rerank: rerank,
@@ -146,7 +152,7 @@ await _client.GrpcClient.SearchNearText(
146152
).result;
147153

148154
public async Task<GroupByResult> NearText(
149-
OneOrManyOf<string> nearText,
155+
OneOrManyOf<string> text,
150156
GroupByRequest groupBy,
151157
float? certainty = null,
152158
float? distance = null,
@@ -158,14 +164,15 @@ public async Task<GroupByResult> NearText(
158164
Filter? filter = null,
159165
Rerank? rerank = null,
160166
string[]? targetVector = null,
167+
string? tenant = null,
161168
OneOrManyOf<string>? returnProperties = null,
162169
IList<QueryReference>? returnReferences = null,
163170
MetadataQuery? returnMetadata = null
164171
) =>
165172
(
166173
await _client.GrpcClient.SearchNearText(
167174
_collectionClient.Name,
168-
nearText,
175+
text,
169176
groupBy: groupBy,
170177
distance: distance,
171178
certainty: certainty,
@@ -190,7 +197,9 @@ public async Task<WeaviateResult> NearVector(
190197
Filter? filter = null,
191198
float? certainty = null,
192199
float? distance = null,
200+
uint? autoCut = null,
193201
uint? limit = null,
202+
uint? offset = null,
194203
string[]? targetVector = null,
195204
string? tenant = null,
196205
Rerank? rerank = null,
@@ -204,6 +213,8 @@ await _client.GrpcClient.SearchNearVector(
204213
vector,
205214
distance: distance,
206215
certainty: certainty,
216+
offset: offset,
217+
autoCut: autoCut,
207218
limit: limit,
208219
targetVector: targetVector,
209220
filters: filter,
@@ -222,7 +233,9 @@ public async Task<GroupByResult> NearVector(
222233
Filter? filter = null,
223234
float? distance = null,
224235
float? certainty = null,
236+
uint? autoCut = null,
225237
uint? limit = null,
238+
uint? offset = null,
226239
string[]? targetVector = null,
227240
string? tenant = null,
228241
Rerank? rerank = null,
@@ -238,6 +251,8 @@ await _client.GrpcClient.SearchNearVector(
238251
filters: filter,
239252
distance: distance,
240253
certainty: certainty,
254+
offset: offset,
255+
autoCut: autoCut,
241256
limit: limit,
242257
targetVector: targetVector,
243258
tenant: tenant ?? _collectionClient.Tenant,

src/Weaviate.Client/gRPC/Search.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,8 @@ bool isGroups
509509
float? certainty = null,
510510
string[]? targetVector = null,
511511
uint? limit = null,
512+
uint? autoCut = null,
513+
uint? offset = null,
512514
Filter? filters = null,
513515
string? tenant = null,
514516
ConsistencyLevels? consistencyLevel = null,
@@ -522,6 +524,8 @@ bool isGroups
522524
collection,
523525
filter: filters?.InternalFilter,
524526
sort: null,
527+
autoCut: autoCut,
528+
offset: offset,
525529
limit: limit,
526530
groupBy: groupBy,
527531
tenant: tenant,

0 commit comments

Comments
 (0)