Skip to content

Commit

Permalink
Merge pull request #262 from weaviate/target_vectors_support
Browse files Browse the repository at this point in the history
Target vectors support
  • Loading branch information
aliszka authored Mar 4, 2024
2 parents 91e98a2 + 56a5b59 commit 8165097
Show file tree
Hide file tree
Showing 54 changed files with 26,988 additions and 10,179 deletions.
22 changes: 11 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,22 @@
<gson.version>2.10.1</gson.version>
<httpclient.version>4.5.14</httpclient.version>
<lang3.version>3.14.0</lang3.version>
<junit.version>5.10.1</junit.version>
<testcontainers.version>1.19.3</testcontainers.version>
<assertj-core.version>3.25.1</assertj-core.version>
<junit.version>5.10.2</junit.version>
<testcontainers.version>1.19.6</testcontainers.version>
<assertj-core.version>3.25.3</assertj-core.version>
<jparams.version>1.0.4</jparams.version>
<mockito.version>5.8.0</mockito.version>
<slf4j.version>2.0.10</slf4j.version>
<logback.version>1.4.14</logback.version>
<mockito.version>5.11.0</mockito.version>
<slf4j.version>2.0.12</slf4j.version>
<logback.version>1.5.2</logback.version>
<mock-server.version>5.14.0</mock-server.version>
<jackson.version>2.15.3</jackson.version>
<oauth2-oidc-sdk.version>11.9</oauth2-oidc-sdk.version>
<oauth2-oidc-sdk.version>11.10.1</oauth2-oidc-sdk.version>
<mock-server.version>5.15.0</mock-server.version>
<jackson.version>2.16.1</jackson.version>
<protobuf.java.version>3.25.1</protobuf.java.version>
<grpc-netty-shaded.version>1.60.1</grpc-netty-shaded.version>
<grpc-protobuf.version>1.60.1</grpc-protobuf.version>
<grpc-stub.version>1.60.1</grpc-stub.version>
<protobuf.java.version>3.25.3</protobuf.java.version>
<grpc-netty-shaded.version>1.62.2</grpc-netty-shaded.version>
<grpc-protobuf.version>1.62.2</grpc-protobuf.version>
<grpc-stub.version>1.62.2</grpc-stub.version>
<annotations-api.version>6.0.53</annotations-api.version>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,37 @@ io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatch.BatchObjectsReply> getBat
return getBatchObjectsMethod;
}

private static volatile io.grpc.MethodDescriptor<io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteRequest,
io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteReply> getBatchDeleteMethod;

@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "BatchDelete",
requestType = io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteRequest.class,
responseType = io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteReply.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteRequest,
io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteReply> getBatchDeleteMethod() {
io.grpc.MethodDescriptor<io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteRequest, io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteReply> getBatchDeleteMethod;
if ((getBatchDeleteMethod = WeaviateGrpc.getBatchDeleteMethod) == null) {
synchronized (WeaviateGrpc.class) {
if ((getBatchDeleteMethod = WeaviateGrpc.getBatchDeleteMethod) == null) {
WeaviateGrpc.getBatchDeleteMethod = getBatchDeleteMethod =
io.grpc.MethodDescriptor.<io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteRequest, io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteReply>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchDelete"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteReply.getDefaultInstance()))
.setSchemaDescriptor(new WeaviateMethodDescriptorSupplier("BatchDelete"))
.build();
}
}
}
return getBatchDeleteMethod;
}

/**
* Creates a new async stub that supports all call types for the service
*/
Expand Down Expand Up @@ -138,6 +169,13 @@ default void batchObjects(io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatch
io.grpc.stub.StreamObserver<io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatch.BatchObjectsReply> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchObjectsMethod(), responseObserver);
}

/**
*/
default void batchDelete(io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteRequest request,
io.grpc.stub.StreamObserver<io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteReply> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchDeleteMethod(), responseObserver);
}
}

/**
Expand Down Expand Up @@ -182,6 +220,14 @@ public void batchObjects(io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatch.
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getBatchObjectsMethod(), getCallOptions()), request, responseObserver);
}

/**
*/
public void batchDelete(io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteRequest request,
io.grpc.stub.StreamObserver<io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteReply> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getBatchDeleteMethod(), getCallOptions()), request, responseObserver);
}
}

/**
Expand Down Expand Up @@ -213,6 +259,13 @@ public io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatch.BatchObjectsReply
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getBatchObjectsMethod(), getCallOptions(), request);
}

/**
*/
public io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteReply batchDelete(io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getBatchDeleteMethod(), getCallOptions(), request);
}
}

/**
Expand Down Expand Up @@ -246,10 +299,19 @@ public com.google.common.util.concurrent.ListenableFuture<io.weaviate.client.grp
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getBatchObjectsMethod(), getCallOptions()), request);
}

/**
*/
public com.google.common.util.concurrent.ListenableFuture<io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteReply> batchDelete(
io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getBatchDeleteMethod(), getCallOptions()), request);
}
}

private static final int METHODID_SEARCH = 0;
private static final int METHODID_BATCH_OBJECTS = 1;
private static final int METHODID_BATCH_DELETE = 2;

private static final class MethodHandlers<Req, Resp> implements
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
Expand All @@ -276,6 +338,10 @@ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserv
serviceImpl.batchObjects((io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatch.BatchObjectsRequest) request,
(io.grpc.stub.StreamObserver<io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatch.BatchObjectsReply>) responseObserver);
break;
case METHODID_BATCH_DELETE:
serviceImpl.batchDelete((io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteRequest) request,
(io.grpc.stub.StreamObserver<io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteReply>) responseObserver);
break;
default:
throw new AssertionError();
}
Expand Down Expand Up @@ -308,6 +374,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser
io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatch.BatchObjectsRequest,
io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatch.BatchObjectsReply>(
service, METHODID_BATCH_OBJECTS)))
.addMethod(
getBatchDeleteMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteRequest,
io.weaviate.client.grpc.protocol.v1.WeaviateProtoBatchDelete.BatchDeleteReply>(
service, METHODID_BATCH_DELETE)))
.build();
}

Expand Down Expand Up @@ -358,6 +431,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
.setSchemaDescriptor(new WeaviateFileDescriptorSupplier())
.addMethod(getSearchMethod())
.addMethod(getBatchObjectsMethod())
.addMethod(getBatchDeleteMethod())
.build();
}
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8165097

Please sign in to comment.