|
3 | 3 | import java.util.List; |
4 | 4 | import java.util.function.Function; |
5 | 5 |
|
| 6 | +import io.weaviate.client6.v1.api.collections.query.Hybrid; |
| 7 | +import io.weaviate.client6.v1.api.collections.query.NearAudio; |
| 8 | +import io.weaviate.client6.v1.api.collections.query.NearDepth; |
6 | 9 | import io.weaviate.client6.v1.api.collections.query.NearImage; |
| 10 | +import io.weaviate.client6.v1.api.collections.query.NearImu; |
| 11 | +import io.weaviate.client6.v1.api.collections.query.NearObject; |
7 | 12 | import io.weaviate.client6.v1.api.collections.query.NearText; |
| 13 | +import io.weaviate.client6.v1.api.collections.query.NearThermal; |
8 | 14 | import io.weaviate.client6.v1.api.collections.query.NearVector; |
| 15 | +import io.weaviate.client6.v1.api.collections.query.NearVideo; |
9 | 16 | import io.weaviate.client6.v1.internal.ObjectBuilder; |
10 | 17 | import io.weaviate.client6.v1.internal.grpc.GrpcTransport; |
11 | 18 | import io.weaviate.client6.v1.internal.orm.CollectionDescriptor; |
@@ -33,6 +40,36 @@ public GroupedResponseT overAll(Function<Aggregation.Builder, ObjectBuilder<Aggr |
33 | 40 | return performRequest(Aggregation.of(fn), groupBy); |
34 | 41 | } |
35 | 42 |
|
| 43 | + // Hybrid ------------------------------------------------------------------- |
| 44 | + |
| 45 | + public ResponseT hybrid(String query, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 46 | + return hybrid(Hybrid.of(query), fn); |
| 47 | + } |
| 48 | + |
| 49 | + public ResponseT hybrid(String query, Function<Hybrid.Builder, ObjectBuilder<Hybrid>> nv, |
| 50 | + Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 51 | + return hybrid(Hybrid.of(query, nv), fn); |
| 52 | + } |
| 53 | + |
| 54 | + public ResponseT hybrid(Hybrid filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 55 | + return performRequest(Aggregation.of(filter, fn)); |
| 56 | + } |
| 57 | + |
| 58 | + public GroupedResponseT hybrid(String query, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, |
| 59 | + GroupBy groupBy) { |
| 60 | + return hybrid(Hybrid.of(query), fn, groupBy); |
| 61 | + } |
| 62 | + |
| 63 | + public GroupedResponseT hybrid(String query, Function<Hybrid.Builder, ObjectBuilder<Hybrid>> nv, |
| 64 | + Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, GroupBy groupBy) { |
| 65 | + return hybrid(Hybrid.of(query, nv), fn, groupBy); |
| 66 | + } |
| 67 | + |
| 68 | + public GroupedResponseT hybrid(Hybrid filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, |
| 69 | + GroupBy groupBy) { |
| 70 | + return performRequest(Aggregation.of(filter, fn), groupBy); |
| 71 | + } |
| 72 | + |
36 | 73 | // NearVector --------------------------------------------------------------- |
37 | 74 |
|
38 | 75 | public ResponseT nearVector(Float[] vector, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
@@ -63,6 +100,36 @@ public GroupedResponseT nearVector(NearVector filter, Function<Aggregation.Build |
63 | 100 | return performRequest(Aggregation.of(filter, fn), groupBy); |
64 | 101 | } |
65 | 102 |
|
| 103 | + // NearObject --------------------------------------------------------------- |
| 104 | + |
| 105 | + public ResponseT nearObject(String uuid, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 106 | + return nearObject(NearObject.of(uuid), fn); |
| 107 | + } |
| 108 | + |
| 109 | + public ResponseT nearObject(String uuid, Function<NearObject.Builder, ObjectBuilder<NearObject>> nv, |
| 110 | + Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 111 | + return nearObject(NearObject.of(uuid, nv), fn); |
| 112 | + } |
| 113 | + |
| 114 | + public ResponseT nearObject(NearObject filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 115 | + return performRequest(Aggregation.of(filter, fn)); |
| 116 | + } |
| 117 | + |
| 118 | + public GroupedResponseT nearObject(String uuid, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, |
| 119 | + GroupBy groupBy) { |
| 120 | + return nearObject(NearObject.of(uuid), fn, groupBy); |
| 121 | + } |
| 122 | + |
| 123 | + public GroupedResponseT nearObject(String uuid, Function<NearObject.Builder, ObjectBuilder<NearObject>> nv, |
| 124 | + Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, GroupBy groupBy) { |
| 125 | + return nearObject(NearObject.of(uuid, nv), fn, groupBy); |
| 126 | + } |
| 127 | + |
| 128 | + public GroupedResponseT nearObject(NearObject filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, |
| 129 | + GroupBy groupBy) { |
| 130 | + return performRequest(Aggregation.of(filter, fn), groupBy); |
| 131 | + } |
| 132 | + |
66 | 133 | // NearText ----------------------------------------------------------------- |
67 | 134 |
|
68 | 135 | public ResponseT nearText(String text, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
@@ -141,4 +208,154 @@ public GroupedResponseT nearImage(NearImage filter, Function<Aggregation.Builder |
141 | 208 | GroupBy groupBy) { |
142 | 209 | return performRequest(Aggregation.of(filter, fn), groupBy); |
143 | 210 | } |
| 211 | + |
| 212 | + // NearAudio ---------------------------------------------------------------- |
| 213 | + |
| 214 | + public ResponseT nearAudio(String audio, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 215 | + return nearAudio(NearAudio.of(audio), fn); |
| 216 | + } |
| 217 | + |
| 218 | + public ResponseT nearAudio(String audio, Function<NearAudio.Builder, ObjectBuilder<NearAudio>> nv, |
| 219 | + Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 220 | + return nearAudio(NearAudio.of(audio, nv), fn); |
| 221 | + } |
| 222 | + |
| 223 | + public ResponseT nearAudio(NearAudio filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 224 | + return performRequest(Aggregation.of(filter, fn)); |
| 225 | + } |
| 226 | + |
| 227 | + public GroupedResponseT nearAudio(String audio, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, |
| 228 | + GroupBy groupBy) { |
| 229 | + return nearAudio(NearAudio.of(audio), fn, groupBy); |
| 230 | + } |
| 231 | + |
| 232 | + public GroupedResponseT nearAudio(String audio, Function<NearAudio.Builder, ObjectBuilder<NearAudio>> nv, |
| 233 | + Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, GroupBy groupBy) { |
| 234 | + return nearAudio(NearAudio.of(audio, nv), fn, groupBy); |
| 235 | + } |
| 236 | + |
| 237 | + public GroupedResponseT nearAudio(NearAudio filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, |
| 238 | + GroupBy groupBy) { |
| 239 | + return performRequest(Aggregation.of(filter, fn), groupBy); |
| 240 | + } |
| 241 | + |
| 242 | + // NearVideo ---------------------------------------------------------------- |
| 243 | + |
| 244 | + public ResponseT nearVideo(String video, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 245 | + return nearVideo(NearVideo.of(video), fn); |
| 246 | + } |
| 247 | + |
| 248 | + public ResponseT nearVideo(String video, Function<NearVideo.Builder, ObjectBuilder<NearVideo>> nv, |
| 249 | + Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 250 | + return nearVideo(NearVideo.of(video, nv), fn); |
| 251 | + } |
| 252 | + |
| 253 | + public ResponseT nearVideo(NearVideo filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 254 | + return performRequest(Aggregation.of(filter, fn)); |
| 255 | + } |
| 256 | + |
| 257 | + public GroupedResponseT nearVideo(String video, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, |
| 258 | + GroupBy groupBy) { |
| 259 | + return nearVideo(NearVideo.of(video), fn, groupBy); |
| 260 | + } |
| 261 | + |
| 262 | + public GroupedResponseT nearVideo(String video, Function<NearVideo.Builder, ObjectBuilder<NearVideo>> nv, |
| 263 | + Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, GroupBy groupBy) { |
| 264 | + return nearVideo(NearVideo.of(video, nv), fn, groupBy); |
| 265 | + } |
| 266 | + |
| 267 | + public GroupedResponseT nearVideo(NearVideo filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, |
| 268 | + GroupBy groupBy) { |
| 269 | + return performRequest(Aggregation.of(filter, fn), groupBy); |
| 270 | + } |
| 271 | + |
| 272 | + // NearThermal -------------------------------------------------------------- |
| 273 | + |
| 274 | + public ResponseT nearThermal(String thermal, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 275 | + return nearThermal(NearThermal.of(thermal), fn); |
| 276 | + } |
| 277 | + |
| 278 | + public ResponseT nearThermal(String thermal, Function<NearThermal.Builder, ObjectBuilder<NearThermal>> nv, |
| 279 | + Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 280 | + return nearThermal(NearThermal.of(thermal, nv), fn); |
| 281 | + } |
| 282 | + |
| 283 | + public ResponseT nearThermal(NearThermal filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 284 | + return performRequest(Aggregation.of(filter, fn)); |
| 285 | + } |
| 286 | + |
| 287 | + public GroupedResponseT nearThermal(String thermal, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, |
| 288 | + GroupBy groupBy) { |
| 289 | + return nearThermal(NearThermal.of(thermal), fn, groupBy); |
| 290 | + } |
| 291 | + |
| 292 | + public GroupedResponseT nearThermal(String thermal, Function<NearThermal.Builder, ObjectBuilder<NearThermal>> nv, |
| 293 | + Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, GroupBy groupBy) { |
| 294 | + return nearThermal(NearThermal.of(thermal, nv), fn, groupBy); |
| 295 | + } |
| 296 | + |
| 297 | + public GroupedResponseT nearThermal(NearThermal filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, |
| 298 | + GroupBy groupBy) { |
| 299 | + return performRequest(Aggregation.of(filter, fn), groupBy); |
| 300 | + } |
| 301 | + |
| 302 | + // NearDepth -------------------------------------------------------------- |
| 303 | + |
| 304 | + public ResponseT nearDepth(String depth, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 305 | + return nearDepth(NearDepth.of(depth), fn); |
| 306 | + } |
| 307 | + |
| 308 | + public ResponseT nearDepth(String depth, Function<NearDepth.Builder, ObjectBuilder<NearDepth>> nv, |
| 309 | + Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 310 | + return nearDepth(NearDepth.of(depth, nv), fn); |
| 311 | + } |
| 312 | + |
| 313 | + public ResponseT nearDepth(NearDepth filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 314 | + return performRequest(Aggregation.of(filter, fn)); |
| 315 | + } |
| 316 | + |
| 317 | + public GroupedResponseT nearDepth(String depth, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, |
| 318 | + GroupBy groupBy) { |
| 319 | + return nearDepth(NearDepth.of(depth), fn, groupBy); |
| 320 | + } |
| 321 | + |
| 322 | + public GroupedResponseT nearDepth(String depth, Function<NearDepth.Builder, ObjectBuilder<NearDepth>> nv, |
| 323 | + Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, GroupBy groupBy) { |
| 324 | + return nearDepth(NearDepth.of(depth, nv), fn, groupBy); |
| 325 | + } |
| 326 | + |
| 327 | + public GroupedResponseT nearDepth(NearDepth filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, |
| 328 | + GroupBy groupBy) { |
| 329 | + return performRequest(Aggregation.of(filter, fn), groupBy); |
| 330 | + } |
| 331 | + |
| 332 | + // NearImu ------------------------------------------------------------------ |
| 333 | + |
| 334 | + public ResponseT nearImu(String imu, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 335 | + return nearImu(NearImu.of(imu), fn); |
| 336 | + } |
| 337 | + |
| 338 | + public ResponseT nearImu(String imu, Function<NearImu.Builder, ObjectBuilder<NearImu>> nv, |
| 339 | + Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 340 | + return nearImu(NearImu.of(imu, nv), fn); |
| 341 | + } |
| 342 | + |
| 343 | + public ResponseT nearImu(NearImu filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) { |
| 344 | + return performRequest(Aggregation.of(filter, fn)); |
| 345 | + } |
| 346 | + |
| 347 | + public GroupedResponseT nearImu(String imu, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, |
| 348 | + GroupBy groupBy) { |
| 349 | + return nearImu(NearImu.of(imu), fn, groupBy); |
| 350 | + } |
| 351 | + |
| 352 | + public GroupedResponseT nearImu(String imu, Function<NearImu.Builder, ObjectBuilder<NearImu>> nv, |
| 353 | + Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, GroupBy groupBy) { |
| 354 | + return nearImu(NearImu.of(imu, nv), fn, groupBy); |
| 355 | + } |
| 356 | + |
| 357 | + public GroupedResponseT nearImu(NearImu filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, |
| 358 | + GroupBy groupBy) { |
| 359 | + return performRequest(Aggregation.of(filter, fn), groupBy); |
| 360 | + } |
144 | 361 | } |
0 commit comments