mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-07 12:37:41 +01:00
* lance catalog: in-process DescribeTable for trusted callers DescribeTable and DescribeTableInternal resolve a table's location and storage options without the HTTP layer; the internal form runs the lookup through a trusted manager so the caller's catalog grants do not gate a resolution its own permission already authorized. Same code as the Enterprise repository. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * vector.proto: Table carries its location and storage options The gateway resolves the table it addresses, so the engine can open it without a describe round trip of its own. Both fields are optional; an empty location means the engine looks the table up as before. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * lance catalog: test the in-process describe Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * s3vectors: resolve the table before calling the engine The gateway describes the table in process, through the trusted catalog manager, and sends its location and storage options with every engine call. Storage options are vended for the caller's principal, as the Enterprise router does for queries. A catalog failure answers with the code the engine would have given. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * weed-vector: open a table at the location the gateway sent A request whose table carries a location is opened there, with the storage options the gateway vended over the engine's fallback; the catalog is described only for a table that comes without one, as from an older gateway. dataset::open_at and dataset::drop_at take a description the caller already holds. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * s3vectors e2e: run the engine without a catalog VECTOR_ENGINE_NO_CATALOG=1 gives the engine an unreachable catalog URL; every CI leg sets it, so the suite proves the gateway resolves each table it sends. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * lance catalog: an internal describe may write a vector index With credential vending on, the options vended to the engine followed the caller's s3tables grants, which never allow writing the vector namespace, so every write the gateway sent would have run with read-only credentials and reads would have lost their version lease. The engine is that namespace's writer and the caller's vector permission authorized the operation, so an internal describe of a vector table vends write-capable options; other namespaces keep the UpdateTable check. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * s3: resolve tables for the engine only while the catalog runs With -port.lance=0 the gateway has no catalog to resolve through; the engine then keeps looking tables up itself, as before. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * lance catalog: a deregistered table describes as NoSuchTable So the gateway answers NotFoundException for it, not InternalFailure. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * weed-vector: trust a sent location only for a colocated vector index A caller that reaches the engine could otherwise name any storage the engine's credentials cover. A location is taken from the request only when the id names a vector index and the location is its colocated path, which the engine writes already; anything else is described through the catalog as before. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * weed-vector: scope the read cache by storage endpoint The cache was keyed by bucket and path alone, so the same path reached through another endpoint would have shared entries. Each open wraps the store with the cache scoped to the endpoint its options name. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * weed-vector: keep a configured endpoint over one a request names A caller that reaches the engine could otherwise send its fallback credentials to an endpoint of the caller's choosing. When the engine's --storage-option names an aws_endpoint, a table whose request names another one is described through the catalog instead. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * weed-vector: use request options only where credentials cannot leave A request's storage options are taken only when they hold the keys a gateway's describe produces, so a proxy or an endpoint alias cannot route the engine's credentials elsewhere, and an endpoint only when it is the configured one or the engine holds no credentials to send. Anything else sends the table to the catalog. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * s3vectors e2e: give the engine its endpoint with its credentials Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * weed-vector: a drop checks the request's options like an open Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * weed-vector: an unpinned endpoint needs the request to sign for itself Without configured credentials the S3 store still signs with the AWS default chain, so an endpoint from a request is taken only when the request skips signing or brings its own credentials. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * weed-vector: a trailing slash does not unpin the endpoint, and say so A configured aws_endpoint written with a trailing slash matched nothing the gateway sends, so every table fell back to the catalog in silence. The comparison ignores the slash, and a fallback for a resolved table is logged at debug. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * weed-vector: resolved by the gateway, or refused The engine no longer has a catalog: --namespace and --filer-signing-key are gone, a request whose table names no location is InvalidArgument, and one whose location is not the index's own or whose storage options the engine's credentials must not be used with is PermissionDenied. A drop removes the colocated path it was given. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * s3: the catalog resolves vector tables whether or not its port is served newLanceServer builds the Lance catalog for the S3 Vectors API; the listener on -port.lance is optional. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * s3vectors tests: start the engine without a catalog Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * s3: the aux listener test builds the catalog before serving it Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * weed-vector: an unpinned endpoint takes only credentials the request signs with alone Lance fills an option a request leaves out from the engine's environment, under any of object_store's names for it (TOKEN, SESSION_TOKEN, ...), and asks the AWS default chain when the key pair is incomplete. A request that named its own endpoint with only an access key id, or a key pair while the engine's environment held a session token, would have sent the engine's credentials there. Such a request now needs a full key pair, and its own session token whenever the environment would supply one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * weed-vector: accept --namespace and --filer-signing-key, ignored Both flags shipped in 4.52 and are documented, so dropping them made an existing command line exit at startup with an unexpected-argument error. They are kept hidden and ignored, with a warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3vectors design: the engine is started without a catalog Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * weed-vector: the trust check takes the environment it reads The options test read the process environment through signs_alone, so a host exporting AWS_SESSION_TOKEN or TOKEN failed it. The caller now passes the variable names in; describe passes the engine's own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * weed-vector: log both endpoints when a request's options are refused The gateway turns the PermissionDenied into a bare AccessDenied and logs nothing, so a pinned aws_endpoint written in another form than the one the gateway sends (host case, a default port, an IP for a name) failed every call with no trace of which value differed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3: the Lance catalog sets the credential role whether or not Iceberg runs -iceberg.credentialRole reached the S3 server only while the Iceberg listener started, so with -port.iceberg=0 the Lance catalog installed its vendor but vending stayed off, and the vector engine got no credentials for the tables the gateway resolves. Both catalogs now set the role through one helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3: set the credential role once, before either catalog serves Both catalogs wrote the role as they were built; the second write landed while the first was already serving requests that read it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
1273 lines
39 KiB
Go
1273 lines
39 KiB
Go
// 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. The gateway resolves the table before it
|
|
// calls, so the engine opens it without a catalog round trip of its own.
|
|
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"`
|
|
// The table's Lance location, as the catalog describes it.
|
|
Location string `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"`
|
|
// object_store options from describe_table (vended creds / endpoint).
|
|
StorageOptions map[string]string `protobuf:"bytes,4,rep,name=storage_options,json=storageOptions,proto3" json:"storage_options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
|
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
|
|
}
|
|
|
|
func (x *Table) GetLocation() string {
|
|
if x != nil {
|
|
return x.Location
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Table) GetStorageOptions() map[string]string {
|
|
if x != nil {
|
|
return x.StorageOptions
|
|
}
|
|
return nil
|
|
}
|
|
|
|
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"`
|
|
// A nonzero segment_count lists only the rows whose position modulo
|
|
// segment_count is segment_index; next_token stays a row position.
|
|
SegmentCount uint32 `protobuf:"varint,6,opt,name=segment_count,json=segmentCount,proto3" json:"segment_count,omitempty"`
|
|
SegmentIndex uint32 `protobuf:"varint,7,opt,name=segment_index,json=segmentIndex,proto3" json:"segment_index,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
|
|
}
|
|
|
|
func (x *ListVectorsRequest) GetSegmentCount() uint32 {
|
|
if x != nil {
|
|
return x.SegmentCount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *ListVectorsRequest) GetSegmentIndex() uint32 {
|
|
if x != nil {
|
|
return x.SegmentIndex
|
|
}
|
|
return 0
|
|
}
|
|
|
|
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"`
|
|
// Set when segment_count was applied; an older engine ignores it.
|
|
Segmented bool `protobuf:"varint,3,opt,name=segmented,proto3" json:"segmented,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 ""
|
|
}
|
|
|
|
func (x *ListVectorsResponse) GetSegmented() bool {
|
|
if x != nil {
|
|
return x.Segmented
|
|
}
|
|
return false
|
|
}
|
|
|
|
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\"\xdf\x01\n" +
|
|
"\x05Table\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x03(\tR\x02id\x12\x18\n" +
|
|
"\aversion\x18\x02 \x01(\x04R\aversion\x12\x1a\n" +
|
|
"\blocation\x18\x03 \x01(\tR\blocation\x12M\n" +
|
|
"\x0fstorage_options\x18\x04 \x03(\v2$.vector_pb.Table.StorageOptionsEntryR\x0estorageOptions\x1aA\n" +
|
|
"\x13StorageOptionsEntry\x12\x10\n" +
|
|
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
|
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\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\"\x90\x02\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\x12#\n" +
|
|
"\rsegment_count\x18\x06 \x01(\rR\fsegmentCount\x12#\n" +
|
|
"\rsegment_index\x18\a \x01(\rR\fsegmentIndex\"\x7f\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\x12\x1c\n" +
|
|
"\tsegmented\x18\x03 \x01(\bR\tsegmented\"\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, 18)
|
|
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
|
|
nil, // 18: vector_pb.Table.StorageOptionsEntry
|
|
(*structpb.Struct)(nil), // 19: google.protobuf.Struct
|
|
}
|
|
var file_vector_proto_depIdxs = []int32{
|
|
18, // 0: vector_pb.Table.storage_options:type_name -> vector_pb.Table.StorageOptionsEntry
|
|
1, // 1: vector_pb.CreateIndexRequest.table:type_name -> vector_pb.Table
|
|
0, // 2: vector_pb.CreateIndexRequest.distance_metric:type_name -> vector_pb.DistanceMetric
|
|
1, // 3: vector_pb.DropIndexRequest.table:type_name -> vector_pb.Table
|
|
19, // 4: vector_pb.Vector.metadata:type_name -> google.protobuf.Struct
|
|
1, // 5: vector_pb.PutVectorsRequest.table:type_name -> vector_pb.Table
|
|
6, // 6: vector_pb.PutVectorsRequest.vectors:type_name -> vector_pb.Vector
|
|
1, // 7: vector_pb.GetVectorsRequest.table:type_name -> vector_pb.Table
|
|
6, // 8: vector_pb.GetVectorsResponse.vectors:type_name -> vector_pb.Vector
|
|
1, // 9: vector_pb.DeleteVectorsRequest.table:type_name -> vector_pb.Table
|
|
1, // 10: vector_pb.ListVectorsRequest.table:type_name -> vector_pb.Table
|
|
6, // 11: vector_pb.ListVectorsResponse.vectors:type_name -> vector_pb.Vector
|
|
1, // 12: vector_pb.QueryVectorsRequest.table:type_name -> vector_pb.Table
|
|
19, // 13: vector_pb.QueryResult.metadata:type_name -> google.protobuf.Struct
|
|
16, // 14: vector_pb.QueryVectorsResponse.vectors:type_name -> vector_pb.QueryResult
|
|
2, // 15: vector_pb.VectorService.CreateIndex:input_type -> vector_pb.CreateIndexRequest
|
|
4, // 16: vector_pb.VectorService.DropIndex:input_type -> vector_pb.DropIndexRequest
|
|
7, // 17: vector_pb.VectorService.PutVectors:input_type -> vector_pb.PutVectorsRequest
|
|
9, // 18: vector_pb.VectorService.GetVectors:input_type -> vector_pb.GetVectorsRequest
|
|
11, // 19: vector_pb.VectorService.DeleteVectors:input_type -> vector_pb.DeleteVectorsRequest
|
|
13, // 20: vector_pb.VectorService.ListVectors:input_type -> vector_pb.ListVectorsRequest
|
|
15, // 21: vector_pb.VectorService.QueryVectors:input_type -> vector_pb.QueryVectorsRequest
|
|
3, // 22: vector_pb.VectorService.CreateIndex:output_type -> vector_pb.CreateIndexResponse
|
|
5, // 23: vector_pb.VectorService.DropIndex:output_type -> vector_pb.DropIndexResponse
|
|
8, // 24: vector_pb.VectorService.PutVectors:output_type -> vector_pb.PutVectorsResponse
|
|
10, // 25: vector_pb.VectorService.GetVectors:output_type -> vector_pb.GetVectorsResponse
|
|
12, // 26: vector_pb.VectorService.DeleteVectors:output_type -> vector_pb.DeleteVectorsResponse
|
|
14, // 27: vector_pb.VectorService.ListVectors:output_type -> vector_pb.ListVectorsResponse
|
|
17, // 28: vector_pb.VectorService.QueryVectors:output_type -> vector_pb.QueryVectorsResponse
|
|
22, // [22:29] is the sub-list for method output_type
|
|
15, // [15:22] is the sub-list for method input_type
|
|
15, // [15:15] is the sub-list for extension type_name
|
|
15, // [15:15] is the sub-list for extension extendee
|
|
0, // [0:15] 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: 18,
|
|
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
|
|
}
|