schema

package
v2.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DataType_name = map[int32]string{
		0:   "None",
		1:   "Bool",
		2:   "Int8",
		3:   "Int16",
		4:   "Int32",
		5:   "Int64",
		10:  "Float",
		11:  "Double",
		20:  "String",
		21:  "VarChar",
		100: "BinaryVector",
		101: "FloatVector",
	}
	DataType_value = map[string]int32{
		"None":         0,
		"Bool":         1,
		"Int8":         2,
		"Int16":        3,
		"Int32":        4,
		"Int64":        5,
		"Float":        10,
		"Double":       11,
		"String":       20,
		"VarChar":      21,
		"BinaryVector": 100,
		"FloatVector":  101,
	}
)

Enum value maps for DataType.

View Source
var File_schema_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BoolArray

type BoolArray struct {
	Data []bool `protobuf:"varint,1,rep,packed,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*BoolArray) Descriptor deprecated

func (*BoolArray) Descriptor() ([]byte, []int)

Deprecated: Use BoolArray.ProtoReflect.Descriptor instead.

func (*BoolArray) GetData

func (x *BoolArray) GetData() []bool

func (*BoolArray) ProtoMessage

func (*BoolArray) ProtoMessage()

func (*BoolArray) ProtoReflect added in v2.1.0

func (x *BoolArray) ProtoReflect() protoreflect.Message

func (*BoolArray) Reset

func (x *BoolArray) Reset()

func (*BoolArray) String

func (x *BoolArray) String() string

type BytesArray

type BytesArray struct {
	Data [][]byte `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

For special fields such as bigdecimal, array...

func (*BytesArray) Descriptor deprecated

func (*BytesArray) Descriptor() ([]byte, []int)

Deprecated: Use BytesArray.ProtoReflect.Descriptor instead.

func (*BytesArray) GetData

func (x *BytesArray) GetData() [][]byte

func (*BytesArray) ProtoMessage

func (*BytesArray) ProtoMessage()

func (*BytesArray) ProtoReflect added in v2.1.0

func (x *BytesArray) ProtoReflect() protoreflect.Message

func (*BytesArray) Reset

func (x *BytesArray) Reset()

func (*BytesArray) String

func (x *BytesArray) String() string

type CollectionSchema

type CollectionSchema struct {
	Name        string         `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description string         `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	AutoID      bool           `protobuf:"varint,3,opt,name=autoID,proto3" json:"autoID,omitempty"` // deprecated later, keep compatible with c++ part now
	Fields      []*FieldSchema `protobuf:"bytes,4,rep,name=fields,proto3" json:"fields,omitempty"`
	// contains filtered or unexported fields
}

* @brief Collection schema

func (*CollectionSchema) Descriptor deprecated

func (*CollectionSchema) Descriptor() ([]byte, []int)

Deprecated: Use CollectionSchema.ProtoReflect.Descriptor instead.

func (*CollectionSchema) GetAutoID

func (x *CollectionSchema) GetAutoID() bool

func (*CollectionSchema) GetDescription

func (x *CollectionSchema) GetDescription() string

func (*CollectionSchema) GetFields

func (x *CollectionSchema) GetFields() []*FieldSchema

func (*CollectionSchema) GetName

func (x *CollectionSchema) GetName() string

func (*CollectionSchema) ProtoMessage

func (*CollectionSchema) ProtoMessage()

func (*CollectionSchema) ProtoReflect added in v2.1.0

func (x *CollectionSchema) ProtoReflect() protoreflect.Message

func (*CollectionSchema) Reset

func (x *CollectionSchema) Reset()

func (*CollectionSchema) String

func (x *CollectionSchema) String() string

type DataType

type DataType int32

* @brief Field data type

const (
	DataType_None         DataType = 0
	DataType_Bool         DataType = 1
	DataType_Int8         DataType = 2
	DataType_Int16        DataType = 3
	DataType_Int32        DataType = 4
	DataType_Int64        DataType = 5
	DataType_Float        DataType = 10
	DataType_Double       DataType = 11
	DataType_String       DataType = 20
	DataType_VarChar      DataType = 21 // variable-length strings with a specified maximum length
	DataType_BinaryVector DataType = 100
	DataType_FloatVector  DataType = 101
)

func (DataType) Descriptor added in v2.1.0

func (DataType) Descriptor() protoreflect.EnumDescriptor

func (DataType) Enum added in v2.1.0

func (x DataType) Enum() *DataType

func (DataType) EnumDescriptor deprecated

func (DataType) EnumDescriptor() ([]byte, []int)

Deprecated: Use DataType.Descriptor instead.

func (DataType) Number added in v2.1.0

func (x DataType) Number() protoreflect.EnumNumber

func (DataType) String

func (x DataType) String() string

func (DataType) Type added in v2.1.0

type DoubleArray

type DoubleArray struct {
	Data []float64 `protobuf:"fixed64,1,rep,packed,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*DoubleArray) Descriptor deprecated

func (*DoubleArray) Descriptor() ([]byte, []int)

Deprecated: Use DoubleArray.ProtoReflect.Descriptor instead.

func (*DoubleArray) GetData

func (x *DoubleArray) GetData() []float64

func (*DoubleArray) ProtoMessage

func (*DoubleArray) ProtoMessage()

func (*DoubleArray) ProtoReflect added in v2.1.0

func (x *DoubleArray) ProtoReflect() protoreflect.Message

func (*DoubleArray) Reset

func (x *DoubleArray) Reset()

func (*DoubleArray) String

func (x *DoubleArray) String() string

type FieldData

type FieldData struct {
	Type      DataType `protobuf:"varint,1,opt,name=type,proto3,enum=milvus.proto.schema.DataType" json:"type,omitempty"`
	FieldName string   `protobuf:"bytes,2,opt,name=field_name,json=fieldName,proto3" json:"field_name,omitempty"`
	// Types that are assignable to Field:
	//	*FieldData_Scalars
	//	*FieldData_Vectors
	Field   isFieldData_Field `protobuf_oneof:"field"`
	FieldId int64             `protobuf:"varint,5,opt,name=field_id,json=fieldId,proto3" json:"field_id,omitempty"`
	// contains filtered or unexported fields
}

func (*FieldData) Descriptor deprecated

func (*FieldData) Descriptor() ([]byte, []int)

Deprecated: Use FieldData.ProtoReflect.Descriptor instead.

func (*FieldData) GetField

func (m *FieldData) GetField() isFieldData_Field

func (*FieldData) GetFieldId

func (x *FieldData) GetFieldId() int64

func (*FieldData) GetFieldName

func (x *FieldData) GetFieldName() string

func (*FieldData) GetScalars

func (x *FieldData) GetScalars() *ScalarField

func (*FieldData) GetType

func (x *FieldData) GetType() DataType

func (*FieldData) GetVectors

func (x *FieldData) GetVectors() *VectorField

func (*FieldData) ProtoMessage

func (*FieldData) ProtoMessage()

func (*FieldData) ProtoReflect added in v2.1.0

func (x *FieldData) ProtoReflect() protoreflect.Message

func (*FieldData) Reset

func (x *FieldData) Reset()

func (*FieldData) String

func (x *FieldData) String() string

type FieldData_Scalars

type FieldData_Scalars struct {
	Scalars *ScalarField `protobuf:"bytes,3,opt,name=scalars,proto3,oneof"`
}

type FieldData_Vectors

type FieldData_Vectors struct {
	Vectors *VectorField `protobuf:"bytes,4,opt,name=vectors,proto3,oneof"`
}

type FieldSchema

type FieldSchema struct {
	FieldID      int64                  `protobuf:"varint,1,opt,name=fieldID,proto3" json:"fieldID,omitempty"`
	Name         string                 `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	IsPrimaryKey bool                   `protobuf:"varint,3,opt,name=is_primary_key,json=isPrimaryKey,proto3" json:"is_primary_key,omitempty"`
	Description  string                 `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	DataType     DataType               `protobuf:"varint,5,opt,name=data_type,json=dataType,proto3,enum=milvus.proto.schema.DataType" json:"data_type,omitempty"`
	TypeParams   []*common.KeyValuePair `protobuf:"bytes,6,rep,name=type_params,json=typeParams,proto3" json:"type_params,omitempty"`
	IndexParams  []*common.KeyValuePair `protobuf:"bytes,7,rep,name=index_params,json=indexParams,proto3" json:"index_params,omitempty"`
	AutoID       bool                   `protobuf:"varint,8,opt,name=autoID,proto3" json:"autoID,omitempty"`
	// contains filtered or unexported fields
}

* @brief Field schema

func (*FieldSchema) Descriptor deprecated

func (*FieldSchema) Descriptor() ([]byte, []int)

Deprecated: Use FieldSchema.ProtoReflect.Descriptor instead.

func (*FieldSchema) GetAutoID

func (x *FieldSchema) GetAutoID() bool

func (*FieldSchema) GetDataType

func (x *FieldSchema) GetDataType() DataType

func (*FieldSchema) GetDescription

func (x *FieldSchema) GetDescription() string

func (*FieldSchema) GetFieldID

func (x *FieldSchema) GetFieldID() int64

func (*FieldSchema) GetIndexParams

func (x *FieldSchema) GetIndexParams() []*common.KeyValuePair

func (*FieldSchema) GetIsPrimaryKey

func (x *FieldSchema) GetIsPrimaryKey() bool

func (*FieldSchema) GetName

func (x *FieldSchema) GetName() string

func (*FieldSchema) GetTypeParams

func (x *FieldSchema) GetTypeParams() []*common.KeyValuePair

func (*FieldSchema) ProtoMessage

func (*FieldSchema) ProtoMessage()

func (*FieldSchema) ProtoReflect added in v2.1.0

func (x *FieldSchema) ProtoReflect() protoreflect.Message

func (*FieldSchema) Reset

func (x *FieldSchema) Reset()

func (*FieldSchema) String

func (x *FieldSchema) String() string

type FloatArray

type FloatArray struct {
	Data []float32 `protobuf:"fixed32,1,rep,packed,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*FloatArray) Descriptor deprecated

func (*FloatArray) Descriptor() ([]byte, []int)

Deprecated: Use FloatArray.ProtoReflect.Descriptor instead.

func (*FloatArray) GetData

func (x *FloatArray) GetData() []float32

func (*FloatArray) ProtoMessage

func (*FloatArray) ProtoMessage()

func (*FloatArray) ProtoReflect added in v2.1.0

func (x *FloatArray) ProtoReflect() protoreflect.Message

func (*FloatArray) Reset

func (x *FloatArray) Reset()

func (*FloatArray) String

func (x *FloatArray) String() string

type IDs

type IDs struct {

	// Types that are assignable to IdField:
	//	*IDs_IntId
	//	*IDs_StrId
	IdField isIDs_IdField `protobuf_oneof:"id_field"`
	// contains filtered or unexported fields
}

func (*IDs) Descriptor deprecated

func (*IDs) Descriptor() ([]byte, []int)

Deprecated: Use IDs.ProtoReflect.Descriptor instead.

func (*IDs) GetIdField

func (m *IDs) GetIdField() isIDs_IdField

func (*IDs) GetIntId

func (x *IDs) GetIntId() *LongArray

func (*IDs) GetStrId

func (x *IDs) GetStrId() *StringArray

func (*IDs) ProtoMessage

func (*IDs) ProtoMessage()

func (*IDs) ProtoReflect added in v2.1.0

func (x *IDs) ProtoReflect() protoreflect.Message

func (*IDs) Reset

func (x *IDs) Reset()

func (*IDs) String

func (x *IDs) String() string

type IDs_IntId

type IDs_IntId struct {
	IntId *LongArray `protobuf:"bytes,1,opt,name=int_id,json=intId,proto3,oneof"`
}

type IDs_StrId

type IDs_StrId struct {
	StrId *StringArray `protobuf:"bytes,2,opt,name=str_id,json=strId,proto3,oneof"`
}

type IntArray

type IntArray struct {
	Data []int32 `protobuf:"varint,1,rep,packed,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*IntArray) Descriptor deprecated

func (*IntArray) Descriptor() ([]byte, []int)

Deprecated: Use IntArray.ProtoReflect.Descriptor instead.

func (*IntArray) GetData

func (x *IntArray) GetData() []int32

func (*IntArray) ProtoMessage

func (*IntArray) ProtoMessage()

func (*IntArray) ProtoReflect added in v2.1.0

func (x *IntArray) ProtoReflect() protoreflect.Message

func (*IntArray) Reset

func (x *IntArray) Reset()

func (*IntArray) String

func (x *IntArray) String() string

type LongArray

type LongArray struct {
	Data []int64 `protobuf:"varint,1,rep,packed,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*LongArray) Descriptor deprecated

func (*LongArray) Descriptor() ([]byte, []int)

Deprecated: Use LongArray.ProtoReflect.Descriptor instead.

func (*LongArray) GetData

func (x *LongArray) GetData() []int64

func (*LongArray) ProtoMessage

func (*LongArray) ProtoMessage()

func (*LongArray) ProtoReflect added in v2.1.0

func (x *LongArray) ProtoReflect() protoreflect.Message

func (*LongArray) Reset

func (x *LongArray) Reset()

func (*LongArray) String

func (x *LongArray) String() string

type ScalarField

type ScalarField struct {

	// Types that are assignable to Data:
	//	*ScalarField_BoolData
	//	*ScalarField_IntData
	//	*ScalarField_LongData
	//	*ScalarField_FloatData
	//	*ScalarField_DoubleData
	//	*ScalarField_StringData
	//	*ScalarField_BytesData
	Data isScalarField_Data `protobuf_oneof:"data"`
	// contains filtered or unexported fields
}

func (*ScalarField) Descriptor deprecated

func (*ScalarField) Descriptor() ([]byte, []int)

Deprecated: Use ScalarField.ProtoReflect.Descriptor instead.

func (*ScalarField) GetBoolData

func (x *ScalarField) GetBoolData() *BoolArray

func (*ScalarField) GetBytesData

func (x *ScalarField) GetBytesData() *BytesArray

func (*ScalarField) GetData

func (m *ScalarField) GetData() isScalarField_Data

func (*ScalarField) GetDoubleData

func (x *ScalarField) GetDoubleData() *DoubleArray

func (*ScalarField) GetFloatData

func (x *ScalarField) GetFloatData() *FloatArray

func (*ScalarField) GetIntData

func (x *ScalarField) GetIntData() *IntArray

func (*ScalarField) GetLongData

func (x *ScalarField) GetLongData() *LongArray

func (*ScalarField) GetStringData

func (x *ScalarField) GetStringData() *StringArray

func (*ScalarField) ProtoMessage

func (*ScalarField) ProtoMessage()

func (*ScalarField) ProtoReflect added in v2.1.0

func (x *ScalarField) ProtoReflect() protoreflect.Message

func (*ScalarField) Reset

func (x *ScalarField) Reset()

func (*ScalarField) String

func (x *ScalarField) String() string

type ScalarField_BoolData

type ScalarField_BoolData struct {
	BoolData *BoolArray `protobuf:"bytes,1,opt,name=bool_data,json=boolData,proto3,oneof"`
}

type ScalarField_BytesData

type ScalarField_BytesData struct {
	BytesData *BytesArray `protobuf:"bytes,7,opt,name=bytes_data,json=bytesData,proto3,oneof"`
}

type ScalarField_DoubleData

type ScalarField_DoubleData struct {
	DoubleData *DoubleArray `protobuf:"bytes,5,opt,name=double_data,json=doubleData,proto3,oneof"`
}

type ScalarField_FloatData

type ScalarField_FloatData struct {
	FloatData *FloatArray `protobuf:"bytes,4,opt,name=float_data,json=floatData,proto3,oneof"`
}

type ScalarField_IntData

type ScalarField_IntData struct {
	IntData *IntArray `protobuf:"bytes,2,opt,name=int_data,json=intData,proto3,oneof"`
}

type ScalarField_LongData

type ScalarField_LongData struct {
	LongData *LongArray `protobuf:"bytes,3,opt,name=long_data,json=longData,proto3,oneof"`
}

type ScalarField_StringData

type ScalarField_StringData struct {
	StringData *StringArray `protobuf:"bytes,6,opt,name=string_data,json=stringData,proto3,oneof"`
}

type SearchResultData

type SearchResultData struct {
	NumQueries int64        `protobuf:"varint,1,opt,name=num_queries,json=numQueries,proto3" json:"num_queries,omitempty"`
	TopK       int64        `protobuf:"varint,2,opt,name=top_k,json=topK,proto3" json:"top_k,omitempty"`
	FieldsData []*FieldData `protobuf:"bytes,3,rep,name=fields_data,json=fieldsData,proto3" json:"fields_data,omitempty"`
	Scores     []float32    `protobuf:"fixed32,4,rep,packed,name=scores,proto3" json:"scores,omitempty"`
	Ids        *IDs         `protobuf:"bytes,5,opt,name=ids,proto3" json:"ids,omitempty"`
	Topks      []int64      `protobuf:"varint,6,rep,packed,name=topks,proto3" json:"topks,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchResultData) Descriptor deprecated

func (*SearchResultData) Descriptor() ([]byte, []int)

Deprecated: Use SearchResultData.ProtoReflect.Descriptor instead.

func (*SearchResultData) GetFieldsData

func (x *SearchResultData) GetFieldsData() []*FieldData

func (*SearchResultData) GetIds

func (x *SearchResultData) GetIds() *IDs

func (*SearchResultData) GetNumQueries

func (x *SearchResultData) GetNumQueries() int64

func (*SearchResultData) GetScores

func (x *SearchResultData) GetScores() []float32

func (*SearchResultData) GetTopK

func (x *SearchResultData) GetTopK() int64

func (*SearchResultData) GetTopks

func (x *SearchResultData) GetTopks() []int64

func (*SearchResultData) ProtoMessage

func (*SearchResultData) ProtoMessage()

func (*SearchResultData) ProtoReflect added in v2.1.0

func (x *SearchResultData) ProtoReflect() protoreflect.Message

func (*SearchResultData) Reset

func (x *SearchResultData) Reset()

func (*SearchResultData) String

func (x *SearchResultData) String() string

type StringArray

type StringArray struct {
	Data []string `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*StringArray) Descriptor deprecated

func (*StringArray) Descriptor() ([]byte, []int)

Deprecated: Use StringArray.ProtoReflect.Descriptor instead.

func (*StringArray) GetData

func (x *StringArray) GetData() []string

func (*StringArray) ProtoMessage

func (*StringArray) ProtoMessage()

func (*StringArray) ProtoReflect added in v2.1.0

func (x *StringArray) ProtoReflect() protoreflect.Message

func (*StringArray) Reset

func (x *StringArray) Reset()

func (*StringArray) String

func (x *StringArray) String() string

type VectorField

type VectorField struct {
	Dim int64 `protobuf:"varint,1,opt,name=dim,proto3" json:"dim,omitempty"`
	// Types that are assignable to Data:
	//	*VectorField_FloatVector
	//	*VectorField_BinaryVector
	Data isVectorField_Data `protobuf_oneof:"data"`
	// contains filtered or unexported fields
}

func (*VectorField) Descriptor deprecated

func (*VectorField) Descriptor() ([]byte, []int)

Deprecated: Use VectorField.ProtoReflect.Descriptor instead.

func (*VectorField) GetBinaryVector

func (x *VectorField) GetBinaryVector() []byte

func (*VectorField) GetData

func (m *VectorField) GetData() isVectorField_Data

func (*VectorField) GetDim

func (x *VectorField) GetDim() int64

func (*VectorField) GetFloatVector

func (x *VectorField) GetFloatVector() *FloatArray

func (*VectorField) ProtoMessage

func (*VectorField) ProtoMessage()

func (*VectorField) ProtoReflect added in v2.1.0

func (x *VectorField) ProtoReflect() protoreflect.Message

func (*VectorField) Reset

func (x *VectorField) Reset()

func (*VectorField) String

func (x *VectorField) String() string

type VectorField_BinaryVector

type VectorField_BinaryVector struct {
	BinaryVector []byte `protobuf:"bytes,3,opt,name=binary_vector,json=binaryVector,proto3,oneof"`
}

type VectorField_FloatVector

type VectorField_FloatVector struct {
	FloatVector *FloatArray `protobuf:"bytes,2,opt,name=float_vector,json=floatVector,proto3,oneof"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL