SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
vector: VectorService gRPC contract (P1) (#12101)
Chris Lud771a915718b
diff --git a/weed/pb/Makefile b/weed/pb/Makefileindex b58f914dd9..326401b298 100644--- a/weed/pb/Makefile+++ b/weed/pb/Makefile@@ -17,6 +17,7 @@ gen:protoc mq_broker.proto --go_out=./mq_pb --go-grpc_out=./mq_pb --go_opt=paths=source_relative --go-grpc_opt=paths=source_relativeprotoc mq_schema.proto --go_out=./schema_pb --go-grpc_out=./schema_pb --go_opt=paths=source_relative --go-grpc_opt=paths=source_relativeprotoc mq_agent.proto --go_out=./mq_agent_pb --go-grpc_out=./mq_agent_pb --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative+ protoc vector.proto --go_out=./vector_pb --go-grpc_out=./vector_pb --go_opt=paths=source_relative --go-grpc_opt=paths=source_relativeprotoc worker.proto --go_out=./worker_pb --go-grpc_out=./worker_pb --go_opt=paths=source_relative --go-grpc_opt=paths=source_relativemkdir -p ./plugin_pbprotoc plugin.proto --go_out=./plugin_pb --go-grpc_out=./plugin_pb --go_opt=paths=source_relative --go-grpc_opt=paths=source_relativediff --git a/weed/pb/vector.proto b/weed/pb/vector.protonew file mode 100644index 0000000000..723aefed90--- /dev/null+++ b/weed/pb/vector.proto@@ -0,0 +1,127 @@+syntax = "proto3";++package vector_pb;++option go_package = "github.com/seaweedfs/seaweedfs/weed/pb/vector_pb";++import "google/protobuf/struct.proto";++// The shared contract between the Go S3 gateway and the vector query engine.+// The public S3 Vectors API stays an AWS contract; this RPC is the internal+// boundary the design doc gives both editions.+service VectorService {+ rpc CreateIndex(CreateIndexRequest) returns (CreateIndexResponse);+ rpc DropIndex(DropIndexRequest) returns (DropIndexResponse);+ rpc PutVectors(PutVectorsRequest) returns (PutVectorsResponse);+ rpc GetVectors(GetVectorsRequest) returns (GetVectorsResponse);+ rpc DeleteVectors(DeleteVectorsRequest) returns (DeleteVectorsResponse);+ rpc ListVectors(ListVectorsRequest) returns (ListVectorsResponse);+ rpc QueryVectors(QueryVectorsRequest) returns (QueryVectorsResponse);+}++enum DistanceMetric {+ DISTANCE_METRIC_UNSPECIFIED = 0;+ L2 = 1;+ COSINE = 2;+ DOT_PRODUCT = 3;+}++// Table addresses a Lance table through the namespace: the id parts as the+// namespace catalog joins them.+message Table {+ repeated string id = 1;+ // Dataset version to pin reads to; 0 means latest.+ uint64 version = 2;+}++message CreateIndexRequest {+ Table table = 1;+ uint32 dimension = 2;+ DistanceMetric distance_metric = 3;+ repeated string non_filterable_metadata_keys = 4;+}++message CreateIndexResponse {+ uint64 version = 1;+}++message DropIndexRequest {+ Table table = 1;+}++message DropIndexResponse {}++message Vector {+ string key = 1;+ repeated float data = 2;+ // JSON-typed metadata: numbers carry double precision, as on the wire.+ google.protobuf.Struct metadata = 3;+}++message PutVectorsRequest {+ Table table = 1;+ repeated Vector vectors = 2;+}++message PutVectorsResponse {+ uint64 version = 1;+}++message GetVectorsRequest {+ Table table = 1;+ repeated string keys = 2;+ bool return_data = 3;+ bool return_metadata = 4;+}++message GetVectorsResponse {+ repeated Vector vectors = 1;+}++message DeleteVectorsRequest {+ Table table = 1;+ repeated string keys = 2;+}++message DeleteVectorsResponse {+ uint64 version = 1;+}++message ListVectorsRequest {+ Table table = 1;+ uint32 max_results = 2;+ string next_token = 3;+ bool return_data = 4;+ bool return_metadata = 5;+}++message ListVectorsResponse {+ repeated Vector vectors = 1;+ string next_token = 2;+}++message QueryVectorsRequest {+ Table table = 1;+ repeated float query_vector = 2;+ uint32 top_k = 3;+ // Lance SQL filter; empty means unfiltered. Metadata is one JSON+ // `metadata` column, so the gateway translates S3 Vectors filter+ // expressions onto it before they land here.+ string filter = 4;+ // Lance's post-filter escape hatch; off prefilters, matching S3 Vectors.+ bool postfilter = 5;+ bool return_metadata = 6;+ bool return_distance = 7;+ bool return_data = 8;+}++message QueryResult {+ string key = 1;+ float distance = 2;+ google.protobuf.Struct metadata = 3;+ repeated float data = 4;+}++message QueryVectorsResponse {+ repeated QueryResult vectors = 1;+}diff --git a/weed/pb/vector_pb/vector.pb.go b/weed/pb/vector_pb/vector.pb.gonew file mode 100644index 0000000000..83b69c70d0--- /dev/null+++ b/weed/pb/vector_pb/vector.pb.go@@ -0,0 +1,1216 @@+// Code generated by protoc-gen-go. DO NOT EDIT.+// versions:+// protoc-gen-go v1.36.6+// protoc v3.21.12+// source: vector.proto++package vector_pb++import (+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"+ structpb "google.golang.org/protobuf/types/known/structpb"+ reflect "reflect"+ sync "sync"+ unsafe "unsafe"+)++const (+ // Verify that this generated code is sufficiently up-to-date.+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)+ // Verify that runtime/protoimpl is sufficiently up-to-date.+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)+)++type DistanceMetric int32++const (+ DistanceMetric_DISTANCE_METRIC_UNSPECIFIED DistanceMetric = 0+ DistanceMetric_L2 DistanceMetric = 1+ DistanceMetric_COSINE DistanceMetric = 2+ DistanceMetric_DOT_PRODUCT DistanceMetric = 3+)++// Enum value maps for DistanceMetric.+var (+ DistanceMetric_name = map[int32]string{+ 0: "DISTANCE_METRIC_UNSPECIFIED",+ 1: "L2",+ 2: "COSINE",+ 3: "DOT_PRODUCT",+ }+ DistanceMetric_value = map[string]int32{+ "DISTANCE_METRIC_UNSPECIFIED": 0,+ "L2": 1,+ "COSINE": 2,+ "DOT_PRODUCT": 3,+ }+)++func (x DistanceMetric) Enum() *DistanceMetric {+ p := new(DistanceMetric)+ *p = x+ return p+}++func (x DistanceMetric) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (DistanceMetric) Descriptor() protoreflect.EnumDescriptor {+ return file_vector_proto_enumTypes[0].Descriptor()+}++func (DistanceMetric) Type() protoreflect.EnumType {+ return &file_vector_proto_enumTypes[0]+}++func (x DistanceMetric) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use DistanceMetric.Descriptor instead.+func (DistanceMetric) EnumDescriptor() ([]byte, []int) {+ return file_vector_proto_rawDescGZIP(), []int{0}+}++// Table addresses a Lance table through the namespace: the id parts as the+// namespace catalog joins them.+type Table struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Id []string `protobuf:"bytes,1,rep,name=id,proto3" json:"id,omitempty"`+ // Dataset version to pin reads to; 0 means latest.+ Version uint64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *Table) Reset() {+ *x = Table{}+ mi := &file_vector_proto_msgTypes[0]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *Table) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*Table) ProtoMessage() {}++func (x *Table) ProtoReflect() protoreflect.Message {+ mi := &file_vector_proto_msgTypes[0]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use Table.ProtoReflect.Descriptor instead.+func (*Table) Descriptor() ([]byte, []int) {+ return file_vector_proto_rawDescGZIP(), []int{0}+}++func (x *Table) GetId() []string {+ if x != nil {+ return x.Id+ }+ return nil+}++func (x *Table) GetVersion() uint64 {+ if x != nil {+ return x.Version+ }+ return 0+}++type CreateIndexRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Table *Table `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"`+ Dimension uint32 `protobuf:"varint,2,opt,name=dimension,proto3" json:"dimension,omitempty"`+ DistanceMetric DistanceMetric `protobuf:"varint,3,opt,name=distance_metric,json=distanceMetric,proto3,enum=vector_pb.DistanceMetric" json:"distance_metric,omitempty"`+ NonFilterableMetadataKeys []string `protobuf:"bytes,4,rep,name=non_filterable_metadata_keys,json=nonFilterableMetadataKeys,proto3" json:"non_filterable_metadata_keys,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *CreateIndexRequest) Reset() {+ *x = CreateIndexRequest{}+ mi := &file_vector_proto_msgTypes[1]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *CreateIndexRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*CreateIndexRequest) ProtoMessage() {}++func (x *CreateIndexRequest) ProtoReflect() protoreflect.Message {+ mi := &file_vector_proto_msgTypes[1]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use CreateIndexRequest.ProtoReflect.Descriptor instead.+func (*CreateIndexRequest) Descriptor() ([]byte, []int) {+ return file_vector_proto_rawDescGZIP(), []int{1}+}++func (x *CreateIndexRequest) GetTable() *Table {+ if x != nil {+ return x.Table+ }+ return nil+}++func (x *CreateIndexRequest) GetDimension() uint32 {+ if x != nil {+ return x.Dimension+ }+ return 0+}++func (x *CreateIndexRequest) GetDistanceMetric() DistanceMetric {+ if x != nil {+ return x.DistanceMetric+ }+ return DistanceMetric_DISTANCE_METRIC_UNSPECIFIED+}++func (x *CreateIndexRequest) GetNonFilterableMetadataKeys() []string {+ if x != nil {+ return x.NonFilterableMetadataKeys+ }+ return nil+}++type CreateIndexResponse struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *CreateIndexResponse) Reset() {+ *x = CreateIndexResponse{}+ mi := &file_vector_proto_msgTypes[2]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *CreateIndexResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*CreateIndexResponse) ProtoMessage() {}++func (x *CreateIndexResponse) ProtoReflect() protoreflect.Message {+ mi := &file_vector_proto_msgTypes[2]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use CreateIndexResponse.ProtoReflect.Descriptor instead.+func (*CreateIndexResponse) Descriptor() ([]byte, []int) {+ return file_vector_proto_rawDescGZIP(), []int{2}+}++func (x *CreateIndexResponse) GetVersion() uint64 {+ if x != nil {+ return x.Version+ }+ return 0+}++type DropIndexRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Table *Table `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *DropIndexRequest) Reset() {+ *x = DropIndexRequest{}+ mi := &file_vector_proto_msgTypes[3]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *DropIndexRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*DropIndexRequest) ProtoMessage() {}++func (x *DropIndexRequest) ProtoReflect() protoreflect.Message {+ mi := &file_vector_proto_msgTypes[3]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use DropIndexRequest.ProtoReflect.Descriptor instead.+func (*DropIndexRequest) Descriptor() ([]byte, []int) {+ return file_vector_proto_rawDescGZIP(), []int{3}+}++func (x *DropIndexRequest) GetTable() *Table {+ if x != nil {+ return x.Table+ }+ return nil+}++type DropIndexResponse struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *DropIndexResponse) Reset() {+ *x = DropIndexResponse{}+ mi := &file_vector_proto_msgTypes[4]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *DropIndexResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*DropIndexResponse) ProtoMessage() {}++func (x *DropIndexResponse) ProtoReflect() protoreflect.Message {+ mi := &file_vector_proto_msgTypes[4]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use DropIndexResponse.ProtoReflect.Descriptor instead.+func (*DropIndexResponse) Descriptor() ([]byte, []int) {+ return file_vector_proto_rawDescGZIP(), []int{4}+}++type Vector struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`+ Data []float32 `protobuf:"fixed32,2,rep,packed,name=data,proto3" json:"data,omitempty"`+ // JSON-typed metadata: numbers carry double precision, as on the wire.+ Metadata *structpb.Struct `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *Vector) Reset() {+ *x = Vector{}+ mi := &file_vector_proto_msgTypes[5]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *Vector) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*Vector) ProtoMessage() {}++func (x *Vector) ProtoReflect() protoreflect.Message {+ mi := &file_vector_proto_msgTypes[5]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use Vector.ProtoReflect.Descriptor instead.+func (*Vector) Descriptor() ([]byte, []int) {+ return file_vector_proto_rawDescGZIP(), []int{5}+}++func (x *Vector) GetKey() string {+ if x != nil {+ return x.Key+ }+ return ""+}++func (x *Vector) GetData() []float32 {+ if x != nil {+ return x.Data+ }+ return nil+}++func (x *Vector) GetMetadata() *structpb.Struct {+ if x != nil {+ return x.Metadata+ }+ return nil+}++type PutVectorsRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Table *Table `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"`+ Vectors []*Vector `protobuf:"bytes,2,rep,name=vectors,proto3" json:"vectors,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *PutVectorsRequest) Reset() {+ *x = PutVectorsRequest{}+ mi := &file_vector_proto_msgTypes[6]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *PutVectorsRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*PutVectorsRequest) ProtoMessage() {}++func (x *PutVectorsRequest) ProtoReflect() protoreflect.Message {+ mi := &file_vector_proto_msgTypes[6]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use PutVectorsRequest.ProtoReflect.Descriptor instead.+func (*PutVectorsRequest) Descriptor() ([]byte, []int) {+ return file_vector_proto_rawDescGZIP(), []int{6}+}++func (x *PutVectorsRequest) GetTable() *Table {+ if x != nil {+ return x.Table+ }+ return nil+}++func (x *PutVectorsRequest) GetVectors() []*Vector {+ if x != nil {+ return x.Vectors+ }+ return nil+}++type PutVectorsResponse struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *PutVectorsResponse) Reset() {+ *x = PutVectorsResponse{}+ mi := &file_vector_proto_msgTypes[7]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *PutVectorsResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*PutVectorsResponse) ProtoMessage() {}++func (x *PutVectorsResponse) ProtoReflect() protoreflect.Message {+ mi := &file_vector_proto_msgTypes[7]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use PutVectorsResponse.ProtoReflect.Descriptor instead.+func (*PutVectorsResponse) Descriptor() ([]byte, []int) {+ return file_vector_proto_rawDescGZIP(), []int{7}+}++func (x *PutVectorsResponse) GetVersion() uint64 {+ if x != nil {+ return x.Version+ }+ return 0+}++type GetVectorsRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Table *Table `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"`+ Keys []string `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"`+ ReturnData bool `protobuf:"varint,3,opt,name=return_data,json=returnData,proto3" json:"return_data,omitempty"`+ ReturnMetadata bool `protobuf:"varint,4,opt,name=return_metadata,json=returnMetadata,proto3" json:"return_metadata,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *GetVectorsRequest) Reset() {+ *x = GetVectorsRequest{}+ mi := &file_vector_proto_msgTypes[8]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *GetVectorsRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*GetVectorsRequest) ProtoMessage() {}++func (x *GetVectorsRequest) ProtoReflect() protoreflect.Message {+ mi := &file_vector_proto_msgTypes[8]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use GetVectorsRequest.ProtoReflect.Descriptor instead.+func (*GetVectorsRequest) Descriptor() ([]byte, []int) {+ return file_vector_proto_rawDescGZIP(), []int{8}+}++func (x *GetVectorsRequest) GetTable() *Table {+ if x != nil {+ return x.Table+ }+ return nil+}++func (x *GetVectorsRequest) GetKeys() []string {+ if x != nil {+ return x.Keys+ }+ return nil+}++func (x *GetVectorsRequest) GetReturnData() bool {+ if x != nil {+ return x.ReturnData+ }+ return false+}++func (x *GetVectorsRequest) GetReturnMetadata() bool {+ if x != nil {+ return x.ReturnMetadata+ }+ return false+}++type GetVectorsResponse struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Vectors []*Vector `protobuf:"bytes,1,rep,name=vectors,proto3" json:"vectors,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *GetVectorsResponse) Reset() {+ *x = GetVectorsResponse{}+ mi := &file_vector_proto_msgTypes[9]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *GetVectorsResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*GetVectorsResponse) ProtoMessage() {}++func (x *GetVectorsResponse) ProtoReflect() protoreflect.Message {+ mi := &file_vector_proto_msgTypes[9]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use GetVectorsResponse.ProtoReflect.Descriptor instead.+func (*GetVectorsResponse) Descriptor() ([]byte, []int) {+ return file_vector_proto_rawDescGZIP(), []int{9}+}++func (x *GetVectorsResponse) GetVectors() []*Vector {+ if x != nil {+ return x.Vectors+ }+ return nil+}++type DeleteVectorsRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Table *Table `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"`+ Keys []string `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *DeleteVectorsRequest) Reset() {+ *x = DeleteVectorsRequest{}+ mi := &file_vector_proto_msgTypes[10]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *DeleteVectorsRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*DeleteVectorsRequest) ProtoMessage() {}++func (x *DeleteVectorsRequest) ProtoReflect() protoreflect.Message {+ mi := &file_vector_proto_msgTypes[10]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use DeleteVectorsRequest.ProtoReflect.Descriptor instead.+func (*DeleteVectorsRequest) Descriptor() ([]byte, []int) {+ return file_vector_proto_rawDescGZIP(), []int{10}+}++func (x *DeleteVectorsRequest) GetTable() *Table {+ if x != nil {+ return x.Table+ }+ return nil+}++func (x *DeleteVectorsRequest) GetKeys() []string {+ if x != nil {+ return x.Keys+ }+ return nil+}++type DeleteVectorsResponse struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *DeleteVectorsResponse) Reset() {+ *x = DeleteVectorsResponse{}+ mi := &file_vector_proto_msgTypes[11]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *DeleteVectorsResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*DeleteVectorsResponse) ProtoMessage() {}++func (x *DeleteVectorsResponse) ProtoReflect() protoreflect.Message {+ mi := &file_vector_proto_msgTypes[11]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use DeleteVectorsResponse.ProtoReflect.Descriptor instead.+func (*DeleteVectorsResponse) Descriptor() ([]byte, []int) {+ return file_vector_proto_rawDescGZIP(), []int{11}+}++func (x *DeleteVectorsResponse) GetVersion() uint64 {+ if x != nil {+ return x.Version+ }+ return 0+}++type ListVectorsRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Table *Table `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"`+ MaxResults uint32 `protobuf:"varint,2,opt,name=max_results,json=maxResults,proto3" json:"max_results,omitempty"`+ NextToken string `protobuf:"bytes,3,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"`+ ReturnData bool `protobuf:"varint,4,opt,name=return_data,json=returnData,proto3" json:"return_data,omitempty"`+ ReturnMetadata bool `protobuf:"varint,5,opt,name=return_metadata,json=returnMetadata,proto3" json:"return_metadata,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *ListVectorsRequest) Reset() {+ *x = ListVectorsRequest{}+ mi := &file_vector_proto_msgTypes[12]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *ListVectorsRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*ListVectorsRequest) ProtoMessage() {}++func (x *ListVectorsRequest) ProtoReflect() protoreflect.Message {+ mi := &file_vector_proto_msgTypes[12]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use ListVectorsRequest.ProtoReflect.Descriptor instead.+func (*ListVectorsRequest) Descriptor() ([]byte, []int) {+ return file_vector_proto_rawDescGZIP(), []int{12}+}++func (x *ListVectorsRequest) GetTable() *Table {+ if x != nil {+ return x.Table+ }+ return nil+}++func (x *ListVectorsRequest) GetMaxResults() uint32 {+ if x != nil {+ return x.MaxResults+ }+ return 0+}++func (x *ListVectorsRequest) GetNextToken() string {+ if x != nil {+ return x.NextToken+ }+ return ""+}++func (x *ListVectorsRequest) GetReturnData() bool {+ if x != nil {+ return x.ReturnData+ }+ return false+}++func (x *ListVectorsRequest) GetReturnMetadata() bool {+ if x != nil {+ return x.ReturnMetadata+ }+ return false+}++type ListVectorsResponse struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Vectors []*Vector `protobuf:"bytes,1,rep,name=vectors,proto3" json:"vectors,omitempty"`+ NextToken string `protobuf:"bytes,2,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *ListVectorsResponse) Reset() {+ *x = ListVectorsResponse{}+ mi := &file_vector_proto_msgTypes[13]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *ListVectorsResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*ListVectorsResponse) ProtoMessage() {}++func (x *ListVectorsResponse) ProtoReflect() protoreflect.Message {+ mi := &file_vector_proto_msgTypes[13]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use ListVectorsResponse.ProtoReflect.Descriptor instead.+func (*ListVectorsResponse) Descriptor() ([]byte, []int) {+ return file_vector_proto_rawDescGZIP(), []int{13}+}++func (x *ListVectorsResponse) GetVectors() []*Vector {+ if x != nil {+ return x.Vectors+ }+ return nil+}++func (x *ListVectorsResponse) GetNextToken() string {+ if x != nil {+ return x.NextToken+ }+ return ""+}++type QueryVectorsRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Table *Table `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"`+ QueryVector []float32 `protobuf:"fixed32,2,rep,packed,name=query_vector,json=queryVector,proto3" json:"query_vector,omitempty"`+ TopK uint32 `protobuf:"varint,3,opt,name=top_k,json=topK,proto3" json:"top_k,omitempty"`+ // Lance SQL filter; empty means unfiltered. Metadata is one JSON+ // `metadata` column, so the gateway translates S3 Vectors filter+ // expressions onto it before they land here.+ Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"`+ // Lance's post-filter escape hatch; off prefilters, matching S3 Vectors.+ Postfilter bool `protobuf:"varint,5,opt,name=postfilter,proto3" json:"postfilter,omitempty"`+ ReturnMetadata bool `protobuf:"varint,6,opt,name=return_metadata,json=returnMetadata,proto3" json:"return_metadata,omitempty"`+ ReturnDistance bool `protobuf:"varint,7,opt,name=return_distance,json=returnDistance,proto3" json:"return_distance,omitempty"`+ ReturnData bool `protobuf:"varint,8,opt,name=return_data,json=returnData,proto3" json:"return_data,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *QueryVectorsRequest) Reset() {+ *x = QueryVectorsRequest{}+ mi := &file_vector_proto_msgTypes[14]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *QueryVectorsRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*QueryVectorsRequest) ProtoMessage() {}++func (x *QueryVectorsRequest) ProtoReflect() protoreflect.Message {+ mi := &file_vector_proto_msgTypes[14]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use QueryVectorsRequest.ProtoReflect.Descriptor instead.+func (*QueryVectorsRequest) Descriptor() ([]byte, []int) {+ return file_vector_proto_rawDescGZIP(), []int{14}+}++func (x *QueryVectorsRequest) GetTable() *Table {+ if x != nil {+ return x.Table+ }+ return nil+}++func (x *QueryVectorsRequest) GetQueryVector() []float32 {+ if x != nil {+ return x.QueryVector+ }+ return nil+}++func (x *QueryVectorsRequest) GetTopK() uint32 {+ if x != nil {+ return x.TopK+ }+ return 0+}++func (x *QueryVectorsRequest) GetFilter() string {+ if x != nil {+ return x.Filter+ }+ return ""+}++func (x *QueryVectorsRequest) GetPostfilter() bool {+ if x != nil {+ return x.Postfilter+ }+ return false+}++func (x *QueryVectorsRequest) GetReturnMetadata() bool {+ if x != nil {+ return x.ReturnMetadata+ }+ return false+}++func (x *QueryVectorsRequest) GetReturnDistance() bool {+ if x != nil {+ return x.ReturnDistance+ }+ return false+}++func (x *QueryVectorsRequest) GetReturnData() bool {+ if x != nil {+ return x.ReturnData+ }+ return false+}++type QueryResult struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`+ Distance float32 `protobuf:"fixed32,2,opt,name=distance,proto3" json:"distance,omitempty"`+ Metadata *structpb.Struct `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`+ Data []float32 `protobuf:"fixed32,4,rep,packed,name=data,proto3" json:"data,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *QueryResult) Reset() {+ *x = QueryResult{}+ mi := &file_vector_proto_msgTypes[15]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *QueryResult) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*QueryResult) ProtoMessage() {}++func (x *QueryResult) ProtoReflect() protoreflect.Message {+ mi := &file_vector_proto_msgTypes[15]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use QueryResult.ProtoReflect.Descriptor instead.+func (*QueryResult) Descriptor() ([]byte, []int) {+ return file_vector_proto_rawDescGZIP(), []int{15}+}++func (x *QueryResult) GetKey() string {+ if x != nil {+ return x.Key+ }+ return ""+}++func (x *QueryResult) GetDistance() float32 {+ if x != nil {+ return x.Distance+ }+ return 0+}++func (x *QueryResult) GetMetadata() *structpb.Struct {+ if x != nil {+ return x.Metadata+ }+ return nil+}++func (x *QueryResult) GetData() []float32 {+ if x != nil {+ return x.Data+ }+ return nil+}++type QueryVectorsResponse struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Vectors []*QueryResult `protobuf:"bytes,1,rep,name=vectors,proto3" json:"vectors,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *QueryVectorsResponse) Reset() {+ *x = QueryVectorsResponse{}+ mi := &file_vector_proto_msgTypes[16]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *QueryVectorsResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*QueryVectorsResponse) ProtoMessage() {}++func (x *QueryVectorsResponse) ProtoReflect() protoreflect.Message {+ mi := &file_vector_proto_msgTypes[16]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use QueryVectorsResponse.ProtoReflect.Descriptor instead.+func (*QueryVectorsResponse) Descriptor() ([]byte, []int) {+ return file_vector_proto_rawDescGZIP(), []int{16}+}++func (x *QueryVectorsResponse) GetVectors() []*QueryResult {+ if x != nil {+ return x.Vectors+ }+ return nil+}++var File_vector_proto protoreflect.FileDescriptor++const file_vector_proto_rawDesc = "" ++ "\n" ++ "\fvector.proto\x12\tvector_pb\x1a\x1cgoogle/protobuf/struct.proto\"1\n" ++ "\x05Table\x12\x0e\n" ++ "\x02id\x18\x01 \x03(\tR\x02id\x12\x18\n" ++ "\aversion\x18\x02 \x01(\x04R\aversion\"\xdf\x01\n" ++ "\x12CreateIndexRequest\x12&\n" ++ "\x05table\x18\x01 \x01(\v2\x10.vector_pb.TableR\x05table\x12\x1c\n" ++ "\tdimension\x18\x02 \x01(\rR\tdimension\x12B\n" ++ "\x0fdistance_metric\x18\x03 \x01(\x0e2\x19.vector_pb.DistanceMetricR\x0edistanceMetric\x12?\n" ++ "\x1cnon_filterable_metadata_keys\x18\x04 \x03(\tR\x19nonFilterableMetadataKeys\"/\n" ++ "\x13CreateIndexResponse\x12\x18\n" ++ "\aversion\x18\x01 \x01(\x04R\aversion\":\n" ++ "\x10DropIndexRequest\x12&\n" ++ "\x05table\x18\x01 \x01(\v2\x10.vector_pb.TableR\x05table\"\x13\n" ++ "\x11DropIndexResponse\"c\n" ++ "\x06Vector\x12\x10\n" ++ "\x03key\x18\x01 \x01(\tR\x03key\x12\x12\n" ++ "\x04data\x18\x02 \x03(\x02R\x04data\x123\n" ++ "\bmetadata\x18\x03 \x01(\v2\x17.google.protobuf.StructR\bmetadata\"h\n" ++ "\x11PutVectorsRequest\x12&\n" ++ "\x05table\x18\x01 \x01(\v2\x10.vector_pb.TableR\x05table\x12+\n" ++ "\avectors\x18\x02 \x03(\v2\x11.vector_pb.VectorR\avectors\".\n" ++ "\x12PutVectorsResponse\x12\x18\n" ++ "\aversion\x18\x01 \x01(\x04R\aversion\"\x99\x01\n" ++ "\x11GetVectorsRequest\x12&\n" ++ "\x05table\x18\x01 \x01(\v2\x10.vector_pb.TableR\x05table\x12\x12\n" ++ "\x04keys\x18\x02 \x03(\tR\x04keys\x12\x1f\n" ++ "\vreturn_data\x18\x03 \x01(\bR\n" ++ "returnData\x12'\n" ++ "\x0freturn_metadata\x18\x04 \x01(\bR\x0ereturnMetadata\"A\n" ++ "\x12GetVectorsResponse\x12+\n" ++ "\avectors\x18\x01 \x03(\v2\x11.vector_pb.VectorR\avectors\"R\n" ++ "\x14DeleteVectorsRequest\x12&\n" ++ "\x05table\x18\x01 \x01(\v2\x10.vector_pb.TableR\x05table\x12\x12\n" ++ "\x04keys\x18\x02 \x03(\tR\x04keys\"1\n" ++ "\x15DeleteVectorsResponse\x12\x18\n" ++ "\aversion\x18\x01 \x01(\x04R\aversion\"\xc6\x01\n" ++ "\x12ListVectorsRequest\x12&\n" ++ "\x05table\x18\x01 \x01(\v2\x10.vector_pb.TableR\x05table\x12\x1f\n" ++ "\vmax_results\x18\x02 \x01(\rR\n" ++ "maxResults\x12\x1d\n" ++ "\n" ++ "next_token\x18\x03 \x01(\tR\tnextToken\x12\x1f\n" ++ "\vreturn_data\x18\x04 \x01(\bR\n" ++ "returnData\x12'\n" ++ "\x0freturn_metadata\x18\x05 \x01(\bR\x0ereturnMetadata\"a\n" ++ "\x13ListVectorsResponse\x12+\n" ++ "\avectors\x18\x01 \x03(\v2\x11.vector_pb.VectorR\avectors\x12\x1d\n" ++ "\n" ++ "next_token\x18\x02 \x01(\tR\tnextToken\"\xa0\x02\n" ++ "\x13QueryVectorsRequest\x12&\n" ++ "\x05table\x18\x01 \x01(\v2\x10.vector_pb.TableR\x05table\x12!\n" ++ "\fquery_vector\x18\x02 \x03(\x02R\vqueryVector\x12\x13\n" ++ "\x05top_k\x18\x03 \x01(\rR\x04topK\x12\x16\n" ++ "\x06filter\x18\x04 \x01(\tR\x06filter\x12\x1e\n" ++ "\n" ++ "postfilter\x18\x05 \x01(\bR\n" ++ "postfilter\x12'\n" ++ "\x0freturn_metadata\x18\x06 \x01(\bR\x0ereturnMetadata\x12'\n" ++ "\x0freturn_distance\x18\a \x01(\bR\x0ereturnDistance\x12\x1f\n" ++ "\vreturn_data\x18\b \x01(\bR\n" ++ "returnData\"\x84\x01\n" ++ "\vQueryResult\x12\x10\n" ++ "\x03key\x18\x01 \x01(\tR\x03key\x12\x1a\n" ++ "\bdistance\x18\x02 \x01(\x02R\bdistance\x123\n" ++ "\bmetadata\x18\x03 \x01(\v2\x17.google.protobuf.StructR\bmetadata\x12\x12\n" ++ "\x04data\x18\x04 \x03(\x02R\x04data\"H\n" ++ "\x14QueryVectorsResponse\x120\n" ++ "\avectors\x18\x01 \x03(\v2\x16.vector_pb.QueryResultR\avectors*V\n" ++ "\x0eDistanceMetric\x12\x1f\n" ++ "\x1bDISTANCE_METRIC_UNSPECIFIED\x10\x00\x12\x06\n" ++ "\x02L2\x10\x01\x12\n" ++ "\n" ++ "\x06COSINE\x10\x02\x12\x0f\n" ++ "\vDOT_PRODUCT\x10\x032\xae\x04\n" ++ "\rVectorService\x12L\n" ++ "\vCreateIndex\x12\x1d.vector_pb.CreateIndexRequest\x1a\x1e.vector_pb.CreateIndexResponse\x12F\n" ++ "\tDropIndex\x12\x1b.vector_pb.DropIndexRequest\x1a\x1c.vector_pb.DropIndexResponse\x12I\n" ++ "\n" ++ "PutVectors\x12\x1c.vector_pb.PutVectorsRequest\x1a\x1d.vector_pb.PutVectorsResponse\x12I\n" ++ "\n" ++ "GetVectors\x12\x1c.vector_pb.GetVectorsRequest\x1a\x1d.vector_pb.GetVectorsResponse\x12R\n" ++ "\rDeleteVectors\x12\x1f.vector_pb.DeleteVectorsRequest\x1a .vector_pb.DeleteVectorsResponse\x12L\n" ++ "\vListVectors\x12\x1d.vector_pb.ListVectorsRequest\x1a\x1e.vector_pb.ListVectorsResponse\x12O\n" ++ "\fQueryVectors\x12\x1e.vector_pb.QueryVectorsRequest\x1a\x1f.vector_pb.QueryVectorsResponseB2Z0github.com/seaweedfs/seaweedfs/weed/pb/vector_pbb\x06proto3"++var (+ file_vector_proto_rawDescOnce sync.Once+ file_vector_proto_rawDescData []byte+)++func file_vector_proto_rawDescGZIP() []byte {+ file_vector_proto_rawDescOnce.Do(func() {+ file_vector_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_vector_proto_rawDesc), len(file_vector_proto_rawDesc)))+ })+ return file_vector_proto_rawDescData+}++var file_vector_proto_enumTypes = make([]protoimpl.EnumInfo, 1)+var file_vector_proto_msgTypes = make([]protoimpl.MessageInfo, 17)+var file_vector_proto_goTypes = []any{+ (DistanceMetric)(0), // 0: vector_pb.DistanceMetric+ (*Table)(nil), // 1: vector_pb.Table+ (*CreateIndexRequest)(nil), // 2: vector_pb.CreateIndexRequest+ (*CreateIndexResponse)(nil), // 3: vector_pb.CreateIndexResponse+ (*DropIndexRequest)(nil), // 4: vector_pb.DropIndexRequest+ (*DropIndexResponse)(nil), // 5: vector_pb.DropIndexResponse+ (*Vector)(nil), // 6: vector_pb.Vector+ (*PutVectorsRequest)(nil), // 7: vector_pb.PutVectorsRequest+ (*PutVectorsResponse)(nil), // 8: vector_pb.PutVectorsResponse+ (*GetVectorsRequest)(nil), // 9: vector_pb.GetVectorsRequest+ (*GetVectorsResponse)(nil), // 10: vector_pb.GetVectorsResponse+ (*DeleteVectorsRequest)(nil), // 11: vector_pb.DeleteVectorsRequest+ (*DeleteVectorsResponse)(nil), // 12: vector_pb.DeleteVectorsResponse+ (*ListVectorsRequest)(nil), // 13: vector_pb.ListVectorsRequest+ (*ListVectorsResponse)(nil), // 14: vector_pb.ListVectorsResponse+ (*QueryVectorsRequest)(nil), // 15: vector_pb.QueryVectorsRequest+ (*QueryResult)(nil), // 16: vector_pb.QueryResult+ (*QueryVectorsResponse)(nil), // 17: vector_pb.QueryVectorsResponse+ (*structpb.Struct)(nil), // 18: google.protobuf.Struct+}+var file_vector_proto_depIdxs = []int32{+ 1, // 0: vector_pb.CreateIndexRequest.table:type_name -> vector_pb.Table+ 0, // 1: vector_pb.CreateIndexRequest.distance_metric:type_name -> vector_pb.DistanceMetric+ 1, // 2: vector_pb.DropIndexRequest.table:type_name -> vector_pb.Table+ 18, // 3: vector_pb.Vector.metadata:type_name -> google.protobuf.Struct+ 1, // 4: vector_pb.PutVectorsRequest.table:type_name -> vector_pb.Table+ 6, // 5: vector_pb.PutVectorsRequest.vectors:type_name -> vector_pb.Vector+ 1, // 6: vector_pb.GetVectorsRequest.table:type_name -> vector_pb.Table+ 6, // 7: vector_pb.GetVectorsResponse.vectors:type_name -> vector_pb.Vector+ 1, // 8: vector_pb.DeleteVectorsRequest.table:type_name -> vector_pb.Table+ 1, // 9: vector_pb.ListVectorsRequest.table:type_name -> vector_pb.Table+ 6, // 10: vector_pb.ListVectorsResponse.vectors:type_name -> vector_pb.Vector+ 1, // 11: vector_pb.QueryVectorsRequest.table:type_name -> vector_pb.Table+ 18, // 12: vector_pb.QueryResult.metadata:type_name -> google.protobuf.Struct+ 16, // 13: vector_pb.QueryVectorsResponse.vectors:type_name -> vector_pb.QueryResult+ 2, // 14: vector_pb.VectorService.CreateIndex:input_type -> vector_pb.CreateIndexRequest+ 4, // 15: vector_pb.VectorService.DropIndex:input_type -> vector_pb.DropIndexRequest+ 7, // 16: vector_pb.VectorService.PutVectors:input_type -> vector_pb.PutVectorsRequest+ 9, // 17: vector_pb.VectorService.GetVectors:input_type -> vector_pb.GetVectorsRequest+ 11, // 18: vector_pb.VectorService.DeleteVectors:input_type -> vector_pb.DeleteVectorsRequest+ 13, // 19: vector_pb.VectorService.ListVectors:input_type -> vector_pb.ListVectorsRequest+ 15, // 20: vector_pb.VectorService.QueryVectors:input_type -> vector_pb.QueryVectorsRequest+ 3, // 21: vector_pb.VectorService.CreateIndex:output_type -> vector_pb.CreateIndexResponse+ 5, // 22: vector_pb.VectorService.DropIndex:output_type -> vector_pb.DropIndexResponse+ 8, // 23: vector_pb.VectorService.PutVectors:output_type -> vector_pb.PutVectorsResponse+ 10, // 24: vector_pb.VectorService.GetVectors:output_type -> vector_pb.GetVectorsResponse+ 12, // 25: vector_pb.VectorService.DeleteVectors:output_type -> vector_pb.DeleteVectorsResponse+ 14, // 26: vector_pb.VectorService.ListVectors:output_type -> vector_pb.ListVectorsResponse+ 17, // 27: vector_pb.VectorService.QueryVectors:output_type -> vector_pb.QueryVectorsResponse+ 21, // [21:28] is the sub-list for method output_type+ 14, // [14:21] is the sub-list for method input_type+ 14, // [14:14] is the sub-list for extension type_name+ 14, // [14:14] is the sub-list for extension extendee+ 0, // [0:14] is the sub-list for field type_name+}++func init() { file_vector_proto_init() }+func file_vector_proto_init() {+ if File_vector_proto != nil {+ return+ }+ type x struct{}+ out := protoimpl.TypeBuilder{+ File: protoimpl.DescBuilder{+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_vector_proto_rawDesc), len(file_vector_proto_rawDesc)),+ NumEnums: 1,+ NumMessages: 17,+ NumExtensions: 0,+ NumServices: 1,+ },+ GoTypes: file_vector_proto_goTypes,+ DependencyIndexes: file_vector_proto_depIdxs,+ EnumInfos: file_vector_proto_enumTypes,+ MessageInfos: file_vector_proto_msgTypes,+ }.Build()+ File_vector_proto = out.File+ file_vector_proto_goTypes = nil+ file_vector_proto_depIdxs = nil+}diff --git a/weed/pb/vector_pb/vector_grpc.pb.go b/weed/pb/vector_pb/vector_grpc.pb.gonew file mode 100644index 0000000000..1eaf64fe5f--- /dev/null+++ b/weed/pb/vector_pb/vector_grpc.pb.go@@ -0,0 +1,357 @@+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.+// versions:+// - protoc-gen-go-grpc v1.6.2+// - protoc v3.21.12+// source: vector.proto++package vector_pb++import (+ context "context"+ grpc "google.golang.org/grpc"+ codes "google.golang.org/grpc/codes"+ status "google.golang.org/grpc/status"+)++// This is a compile-time assertion to ensure that this generated file+// is compatible with the grpc package it is being compiled against.+// Requires gRPC-Go v1.64.0 or later.+const _ = grpc.SupportPackageIsVersion9++const (+ VectorService_CreateIndex_FullMethodName = "/vector_pb.VectorService/CreateIndex"+ VectorService_DropIndex_FullMethodName = "/vector_pb.VectorService/DropIndex"+ VectorService_PutVectors_FullMethodName = "/vector_pb.VectorService/PutVectors"+ VectorService_GetVectors_FullMethodName = "/vector_pb.VectorService/GetVectors"+ VectorService_DeleteVectors_FullMethodName = "/vector_pb.VectorService/DeleteVectors"+ VectorService_ListVectors_FullMethodName = "/vector_pb.VectorService/ListVectors"+ VectorService_QueryVectors_FullMethodName = "/vector_pb.VectorService/QueryVectors"+)++// VectorServiceClient is the client API for VectorService service.+//+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.+//+// The shared contract between the Go S3 gateway and the vector query engine.+// The public S3 Vectors API stays an AWS contract; this RPC is the internal+// boundary the design doc gives both editions.+type VectorServiceClient interface {+ CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...grpc.CallOption) (*CreateIndexResponse, error)+ DropIndex(ctx context.Context, in *DropIndexRequest, opts ...grpc.CallOption) (*DropIndexResponse, error)+ PutVectors(ctx context.Context, in *PutVectorsRequest, opts ...grpc.CallOption) (*PutVectorsResponse, error)+ GetVectors(ctx context.Context, in *GetVectorsRequest, opts ...grpc.CallOption) (*GetVectorsResponse, error)+ DeleteVectors(ctx context.Context, in *DeleteVectorsRequest, opts ...grpc.CallOption) (*DeleteVectorsResponse, error)+ ListVectors(ctx context.Context, in *ListVectorsRequest, opts ...grpc.CallOption) (*ListVectorsResponse, error)+ QueryVectors(ctx context.Context, in *QueryVectorsRequest, opts ...grpc.CallOption) (*QueryVectorsResponse, error)+}++type vectorServiceClient struct {+ cc grpc.ClientConnInterface+}++func NewVectorServiceClient(cc grpc.ClientConnInterface) VectorServiceClient {+ return &vectorServiceClient{cc}+}++func (c *vectorServiceClient) CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...grpc.CallOption) (*CreateIndexResponse, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(CreateIndexResponse)+ err := c.cc.Invoke(ctx, VectorService_CreateIndex_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *vectorServiceClient) DropIndex(ctx context.Context, in *DropIndexRequest, opts ...grpc.CallOption) (*DropIndexResponse, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(DropIndexResponse)+ err := c.cc.Invoke(ctx, VectorService_DropIndex_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *vectorServiceClient) PutVectors(ctx context.Context, in *PutVectorsRequest, opts ...grpc.CallOption) (*PutVectorsResponse, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(PutVectorsResponse)+ err := c.cc.Invoke(ctx, VectorService_PutVectors_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *vectorServiceClient) GetVectors(ctx context.Context, in *GetVectorsRequest, opts ...grpc.CallOption) (*GetVectorsResponse, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(GetVectorsResponse)+ err := c.cc.Invoke(ctx, VectorService_GetVectors_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *vectorServiceClient) DeleteVectors(ctx context.Context, in *DeleteVectorsRequest, opts ...grpc.CallOption) (*DeleteVectorsResponse, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(DeleteVectorsResponse)+ err := c.cc.Invoke(ctx, VectorService_DeleteVectors_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *vectorServiceClient) ListVectors(ctx context.Context, in *ListVectorsRequest, opts ...grpc.CallOption) (*ListVectorsResponse, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(ListVectorsResponse)+ err := c.cc.Invoke(ctx, VectorService_ListVectors_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *vectorServiceClient) QueryVectors(ctx context.Context, in *QueryVectorsRequest, opts ...grpc.CallOption) (*QueryVectorsResponse, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(QueryVectorsResponse)+ err := c.cc.Invoke(ctx, VectorService_QueryVectors_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++// VectorServiceServer is the server API for VectorService service.+// All implementations must embed UnimplementedVectorServiceServer+// for forward compatibility.+//+// The shared contract between the Go S3 gateway and the vector query engine.+// The public S3 Vectors API stays an AWS contract; this RPC is the internal+// boundary the design doc gives both editions.+type VectorServiceServer interface {+ CreateIndex(context.Context, *CreateIndexRequest) (*CreateIndexResponse, error)+ DropIndex(context.Context, *DropIndexRequest) (*DropIndexResponse, error)+ PutVectors(context.Context, *PutVectorsRequest) (*PutVectorsResponse, error)+ GetVectors(context.Context, *GetVectorsRequest) (*GetVectorsResponse, error)+ DeleteVectors(context.Context, *DeleteVectorsRequest) (*DeleteVectorsResponse, error)+ ListVectors(context.Context, *ListVectorsRequest) (*ListVectorsResponse, error)+ QueryVectors(context.Context, *QueryVectorsRequest) (*QueryVectorsResponse, error)+ mustEmbedUnimplementedVectorServiceServer()+}++// UnimplementedVectorServiceServer must be embedded to have+// forward compatible implementations.+//+// NOTE: this should be embedded by value instead of pointer to avoid a nil+// pointer dereference when methods are called.+type UnimplementedVectorServiceServer struct{}++func (UnimplementedVectorServiceServer) CreateIndex(context.Context, *CreateIndexRequest) (*CreateIndexResponse, error) {+ return nil, status.Error(codes.Unimplemented, "method CreateIndex not implemented")+}+func (UnimplementedVectorServiceServer) DropIndex(context.Context, *DropIndexRequest) (*DropIndexResponse, error) {+ return nil, status.Error(codes.Unimplemented, "method DropIndex not implemented")+}+func (UnimplementedVectorServiceServer) PutVectors(context.Context, *PutVectorsRequest) (*PutVectorsResponse, error) {+ return nil, status.Error(codes.Unimplemented, "method PutVectors not implemented")+}+func (UnimplementedVectorServiceServer) GetVectors(context.Context, *GetVectorsRequest) (*GetVectorsResponse, error) {+ return nil, status.Error(codes.Unimplemented, "method GetVectors not implemented")+}+func (UnimplementedVectorServiceServer) DeleteVectors(context.Context, *DeleteVectorsRequest) (*DeleteVectorsResponse, error) {+ return nil, status.Error(codes.Unimplemented, "method DeleteVectors not implemented")+}+func (UnimplementedVectorServiceServer) ListVectors(context.Context, *ListVectorsRequest) (*ListVectorsResponse, error) {+ return nil, status.Error(codes.Unimplemented, "method ListVectors not implemented")+}+func (UnimplementedVectorServiceServer) QueryVectors(context.Context, *QueryVectorsRequest) (*QueryVectorsResponse, error) {+ return nil, status.Error(codes.Unimplemented, "method QueryVectors not implemented")+}+func (UnimplementedVectorServiceServer) mustEmbedUnimplementedVectorServiceServer() {}+func (UnimplementedVectorServiceServer) testEmbeddedByValue() {}++// UnsafeVectorServiceServer may be embedded to opt out of forward compatibility for this service.+// Use of this interface is not recommended, as added methods to VectorServiceServer will+// result in compilation errors.+type UnsafeVectorServiceServer interface {+ mustEmbedUnimplementedVectorServiceServer()+}++func RegisterVectorServiceServer(s grpc.ServiceRegistrar, srv VectorServiceServer) {+ // If the following call panics, it indicates UnimplementedVectorServiceServer was+ // embedded by pointer and is nil. This will cause panics if an+ // unimplemented method is ever invoked, so we test this at initialization+ // time to prevent it from happening at runtime later due to I/O.+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {+ t.testEmbeddedByValue()+ }+ s.RegisterService(&VectorService_ServiceDesc, srv)+}++func _VectorService_CreateIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(CreateIndexRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(VectorServiceServer).CreateIndex(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: VectorService_CreateIndex_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(VectorServiceServer).CreateIndex(ctx, req.(*CreateIndexRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _VectorService_DropIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(DropIndexRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(VectorServiceServer).DropIndex(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: VectorService_DropIndex_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(VectorServiceServer).DropIndex(ctx, req.(*DropIndexRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _VectorService_PutVectors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(PutVectorsRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(VectorServiceServer).PutVectors(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: VectorService_PutVectors_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(VectorServiceServer).PutVectors(ctx, req.(*PutVectorsRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _VectorService_GetVectors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(GetVectorsRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(VectorServiceServer).GetVectors(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: VectorService_GetVectors_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(VectorServiceServer).GetVectors(ctx, req.(*GetVectorsRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _VectorService_DeleteVectors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(DeleteVectorsRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(VectorServiceServer).DeleteVectors(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: VectorService_DeleteVectors_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(VectorServiceServer).DeleteVectors(ctx, req.(*DeleteVectorsRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _VectorService_ListVectors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(ListVectorsRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(VectorServiceServer).ListVectors(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: VectorService_ListVectors_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(VectorServiceServer).ListVectors(ctx, req.(*ListVectorsRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _VectorService_QueryVectors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(QueryVectorsRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(VectorServiceServer).QueryVectors(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: VectorService_QueryVectors_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(VectorServiceServer).QueryVectors(ctx, req.(*QueryVectorsRequest))+ }+ return interceptor(ctx, in, info, handler)+}++// VectorService_ServiceDesc is the grpc.ServiceDesc for VectorService service.+// It's only intended for direct use with grpc.RegisterService,+// and not to be introspected or modified (even as a copy)+var VectorService_ServiceDesc = grpc.ServiceDesc{+ ServiceName: "vector_pb.VectorService",+ HandlerType: (*VectorServiceServer)(nil),+ Methods: []grpc.MethodDesc{+ {+ MethodName: "CreateIndex",+ Handler: _VectorService_CreateIndex_Handler,+ },+ {+ MethodName: "DropIndex",+ Handler: _VectorService_DropIndex_Handler,+ },+ {+ MethodName: "PutVectors",+ Handler: _VectorService_PutVectors_Handler,+ },+ {+ MethodName: "GetVectors",+ Handler: _VectorService_GetVectors_Handler,+ },+ {+ MethodName: "DeleteVectors",+ Handler: _VectorService_DeleteVectors_Handler,+ },+ {+ MethodName: "ListVectors",+ Handler: _VectorService_ListVectors_Handler,+ },+ {+ MethodName: "QueryVectors",+ Handler: _VectorService_QueryVectors_Handler,+ },+ },+ Streams: []grpc.StreamDesc{},+ Metadata: "vector.proto",+}