Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@
import java.util.List;
import java.util.function.Function;

import io.weaviate.client6.v1.api.collections.query.Hybrid;
import io.weaviate.client6.v1.api.collections.query.NearAudio;
import io.weaviate.client6.v1.api.collections.query.NearDepth;
import io.weaviate.client6.v1.api.collections.query.NearImage;
import io.weaviate.client6.v1.api.collections.query.NearImu;
import io.weaviate.client6.v1.api.collections.query.NearObject;
import io.weaviate.client6.v1.api.collections.query.NearText;
import io.weaviate.client6.v1.api.collections.query.NearThermal;
import io.weaviate.client6.v1.api.collections.query.NearVector;
import io.weaviate.client6.v1.api.collections.query.NearVideo;
import io.weaviate.client6.v1.internal.ObjectBuilder;
import io.weaviate.client6.v1.internal.grpc.GrpcTransport;
import io.weaviate.client6.v1.internal.orm.CollectionDescriptor;
Expand Down Expand Up @@ -33,6 +40,36 @@ public GroupedResponseT overAll(Function<Aggregation.Builder, ObjectBuilder<Aggr
return performRequest(Aggregation.of(fn), groupBy);
}

// Hybrid -------------------------------------------------------------------

public ResponseT hybrid(String query, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return hybrid(Hybrid.of(query), fn);
}

public ResponseT hybrid(String query, Function<Hybrid.Builder, ObjectBuilder<Hybrid>> nv,
Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return hybrid(Hybrid.of(query, nv), fn);
}

public ResponseT hybrid(Hybrid filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return performRequest(Aggregation.of(filter, fn));
}

public GroupedResponseT hybrid(String query, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn,
GroupBy groupBy) {
return hybrid(Hybrid.of(query), fn, groupBy);
}

public GroupedResponseT hybrid(String query, Function<Hybrid.Builder, ObjectBuilder<Hybrid>> nv,
Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, GroupBy groupBy) {
return hybrid(Hybrid.of(query, nv), fn, groupBy);
}

public GroupedResponseT hybrid(Hybrid filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn,
GroupBy groupBy) {
return performRequest(Aggregation.of(filter, fn), groupBy);
}

// NearVector ---------------------------------------------------------------

public ResponseT nearVector(Float[] vector, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
Expand Down Expand Up @@ -63,6 +100,36 @@ public GroupedResponseT nearVector(NearVector filter, Function<Aggregation.Build
return performRequest(Aggregation.of(filter, fn), groupBy);
}

// NearObject ---------------------------------------------------------------

public ResponseT nearObject(String uuid, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return nearObject(NearObject.of(uuid), fn);
}

public ResponseT nearObject(String uuid, Function<NearObject.Builder, ObjectBuilder<NearObject>> nv,
Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return nearObject(NearObject.of(uuid, nv), fn);
}

public ResponseT nearObject(NearObject filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return performRequest(Aggregation.of(filter, fn));
}

public GroupedResponseT nearObject(String uuid, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn,
GroupBy groupBy) {
return nearObject(NearObject.of(uuid), fn, groupBy);
}

public GroupedResponseT nearObject(String uuid, Function<NearObject.Builder, ObjectBuilder<NearObject>> nv,
Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, GroupBy groupBy) {
return nearObject(NearObject.of(uuid, nv), fn, groupBy);
}

public GroupedResponseT nearObject(NearObject filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn,
GroupBy groupBy) {
return performRequest(Aggregation.of(filter, fn), groupBy);
}

// NearText -----------------------------------------------------------------

public ResponseT nearText(String text, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
Expand Down Expand Up @@ -141,4 +208,154 @@ public GroupedResponseT nearImage(NearImage filter, Function<Aggregation.Builder
GroupBy groupBy) {
return performRequest(Aggregation.of(filter, fn), groupBy);
}

// NearAudio ----------------------------------------------------------------

public ResponseT nearAudio(String audio, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return nearAudio(NearAudio.of(audio), fn);
}

public ResponseT nearAudio(String audio, Function<NearAudio.Builder, ObjectBuilder<NearAudio>> nv,
Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return nearAudio(NearAudio.of(audio, nv), fn);
}

public ResponseT nearAudio(NearAudio filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return performRequest(Aggregation.of(filter, fn));
}

public GroupedResponseT nearAudio(String audio, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn,
GroupBy groupBy) {
return nearAudio(NearAudio.of(audio), fn, groupBy);
}

public GroupedResponseT nearAudio(String audio, Function<NearAudio.Builder, ObjectBuilder<NearAudio>> nv,
Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, GroupBy groupBy) {
return nearAudio(NearAudio.of(audio, nv), fn, groupBy);
}

public GroupedResponseT nearAudio(NearAudio filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn,
GroupBy groupBy) {
return performRequest(Aggregation.of(filter, fn), groupBy);
}

// NearVideo ----------------------------------------------------------------

public ResponseT nearVideo(String video, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return nearVideo(NearVideo.of(video), fn);
}

public ResponseT nearVideo(String video, Function<NearVideo.Builder, ObjectBuilder<NearVideo>> nv,
Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return nearVideo(NearVideo.of(video, nv), fn);
}

public ResponseT nearVideo(NearVideo filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return performRequest(Aggregation.of(filter, fn));
}

public GroupedResponseT nearVideo(String video, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn,
GroupBy groupBy) {
return nearVideo(NearVideo.of(video), fn, groupBy);
}

public GroupedResponseT nearVideo(String video, Function<NearVideo.Builder, ObjectBuilder<NearVideo>> nv,
Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, GroupBy groupBy) {
return nearVideo(NearVideo.of(video, nv), fn, groupBy);
}

public GroupedResponseT nearVideo(NearVideo filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn,
GroupBy groupBy) {
return performRequest(Aggregation.of(filter, fn), groupBy);
}

// NearThermal --------------------------------------------------------------

public ResponseT nearThermal(String thermal, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return nearThermal(NearThermal.of(thermal), fn);
}

public ResponseT nearThermal(String thermal, Function<NearThermal.Builder, ObjectBuilder<NearThermal>> nv,
Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return nearThermal(NearThermal.of(thermal, nv), fn);
}

public ResponseT nearThermal(NearThermal filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return performRequest(Aggregation.of(filter, fn));
}

public GroupedResponseT nearThermal(String thermal, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn,
GroupBy groupBy) {
return nearThermal(NearThermal.of(thermal), fn, groupBy);
}

public GroupedResponseT nearThermal(String thermal, Function<NearThermal.Builder, ObjectBuilder<NearThermal>> nv,
Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, GroupBy groupBy) {
return nearThermal(NearThermal.of(thermal, nv), fn, groupBy);
}

public GroupedResponseT nearThermal(NearThermal filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn,
GroupBy groupBy) {
return performRequest(Aggregation.of(filter, fn), groupBy);
}

// NearDepth --------------------------------------------------------------

public ResponseT nearDepth(String depth, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return nearDepth(NearDepth.of(depth), fn);
}

public ResponseT nearDepth(String depth, Function<NearDepth.Builder, ObjectBuilder<NearDepth>> nv,
Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return nearDepth(NearDepth.of(depth, nv), fn);
}

public ResponseT nearDepth(NearDepth filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return performRequest(Aggregation.of(filter, fn));
}

public GroupedResponseT nearDepth(String depth, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn,
GroupBy groupBy) {
return nearDepth(NearDepth.of(depth), fn, groupBy);
}

public GroupedResponseT nearDepth(String depth, Function<NearDepth.Builder, ObjectBuilder<NearDepth>> nv,
Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, GroupBy groupBy) {
return nearDepth(NearDepth.of(depth, nv), fn, groupBy);
}

public GroupedResponseT nearDepth(NearDepth filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn,
GroupBy groupBy) {
return performRequest(Aggregation.of(filter, fn), groupBy);
}

// NearImu ------------------------------------------------------------------

public ResponseT nearImu(String imu, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return nearImu(NearImu.of(imu), fn);
}

public ResponseT nearImu(String imu, Function<NearImu.Builder, ObjectBuilder<NearImu>> nv,
Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return nearImu(NearImu.of(imu, nv), fn);
}

public ResponseT nearImu(NearImu filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) {
return performRequest(Aggregation.of(filter, fn));
}

public GroupedResponseT nearImu(String imu, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn,
GroupBy groupBy) {
return nearImu(NearImu.of(imu), fn, groupBy);
}

public GroupedResponseT nearImu(String imu, Function<NearImu.Builder, ObjectBuilder<NearImu>> nv,
Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn, GroupBy groupBy) {
return nearImu(NearImu.of(imu, nv), fn, groupBy);
}

public GroupedResponseT nearImu(NearImu filter, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn,
GroupBy groupBy) {
return performRequest(Aggregation.of(filter, fn), groupBy);
}
}
Loading