gamma

package
v3.2.7+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOrUpdateDoc

func AddOrUpdateDoc(engine unsafe.Pointer, buffer []byte) int

func BuildIndex

func BuildIndex(engine unsafe.Pointer) int

func Close

func Close(engine unsafe.Pointer) int

func CreateTable

func CreateTable(engine unsafe.Pointer, table *Table) int

func DeSerialize

func DeSerialize(buffer []byte, resp *vearchpb.SearchResponse)

func DelDocByQuery

func DelDocByQuery(engine unsafe.Pointer, request *Request) int

func DeleteDoc

func DeleteDoc(engine unsafe.Pointer, docID []byte) int

func Dump

func Dump(engine unsafe.Pointer) int

func GetDocByID

func GetDocByID(engine unsafe.Pointer, docID []byte, doc *Doc) int

func GetEngineCfg

func GetEngineCfg(engine unsafe.Pointer, config *Config)

func GetEngineStatus

func GetEngineStatus(engine unsafe.Pointer, status *EngineStatus)

func Init

func Init(config *Config) unsafe.Pointer

func Load

func Load(engine unsafe.Pointer) int
func Search(engine unsafe.Pointer, reqByte []byte) (int, []byte)

func SearchRequestSerialize

func SearchRequestSerialize(request *vearchpb.SearchRequest) []byte

func SetEngineCfg

func SetEngineCfg(engine unsafe.Pointer, config *Config) int

Types

type Attribute

type Attribute struct {
	Name  string
	Value []byte
}

type BatchResult

type BatchResult struct {
	Codes []int32
	Msgs  []string
	// contains filtered or unexported fields
}

func AddOrUpdateDocs

func AddOrUpdateDocs(engine unsafe.Pointer, buffer [][]byte) BatchResult

func (*BatchResult) DeSerialize

func (batch_result *BatchResult) DeSerialize(buffer []byte)

type CacheInfo

type CacheInfo struct {
	Name      string
	CacheSize int32
}

type Config

type Config struct {
	Path       string
	LogDir     string
	CacheInfos []*CacheInfo
	// contains filtered or unexported fields
}

func (*Config) DeSerialize

func (conf *Config) DeSerialize(buffer []byte)

func (*Config) Serialize

func (conf *Config) Serialize(buffer *[]byte) int

type DataType

type DataType int8
const (
	INT    DataType = 0
	LONG   DataType = 1
	FLOAT  DataType = 2
	DOUBLE DataType = 3
	STRING DataType = 4
	VECTOR DataType = 5
)

type DistanceMetricType

type DistanceMetricType uint8

type Doc

type Doc struct {
	Fields []*vearchpb.Field
	// contains filtered or unexported fields
}

func (*Doc) DeSerialize

func (doc *Doc) DeSerialize(buffer []byte)

func (*Doc) Serialize

func (doc *Doc) Serialize() []byte

type EngineStatus

type EngineStatus struct {
	IndexStatus   int32
	TableMem      int64
	VectorMem     int64
	FieldRangeMem int64
	BitmapMem     int64
	DocNum        int32
	MaxDocid      int32
	MinIndexedNum int32
	// contains filtered or unexported fields
}

func (*EngineStatus) DeSerialize

func (status *EngineStatus) DeSerialize(buffer []byte)

func (*EngineStatus) Serialize

func (status *EngineStatus) Serialize(buffer *[]byte) int

type Field

type Field struct {
	Name     string
	Value    []byte
	Source   string
	Datatype DataType
}

type FieldInfo

type FieldInfo struct {
	Name     string
	DataType DataType
	IsIndex  bool
}

type RangeFilter

type RangeFilter struct {
	Field        string
	LowerValue   []byte
	UpperValue   []byte
	IncludeLower bool
	IncludeUpper bool
}

type Request

type Request struct {
	ReqNum               int32
	TopN                 int32
	BruteForceSearch     int32
	VecFields            []VectorQuery
	Fields               []string
	RangeFilters         []RangeFilter
	TermFilters          []TermFilter
	OnlineLogLevel       string
	RetrievalParams      string
	HasRank              bool
	MultiVectorRank      int32
	ParallelBasedOnQuery bool
	L2Sqrt               bool
	IvfFlat              bool
	// contains filtered or unexported fields
}

func (*Request) Serialize

func (request *Request) Serialize(buffer *[]byte) int

type Response

type Response struct {
	Results          []SearchResult
	OnlineLogMessage string
	// contains filtered or unexported fields
}

func (*Response) DeSerialize

func (response *Response) DeSerialize(buffer []byte)

func (*Response) Serialize

func (response *Response) Serialize(buffer *[]byte) int

type ResultItem

type ResultItem struct {
	Score      float64
	Attributes []Attribute
	Extra      string
}

type SearchResult

type SearchResult struct {
	Total       int32
	ResultCode  SearchResultCode
	Msg         string
	ResultItems []ResultItem
}

type SearchResultCode

type SearchResultCode uint8
const (
	SUCCESS           SearchResultCode = 0
	INDEX_NOT_TRAINED SearchResultCode = 1
	SEARCH_ERROR      SearchResultCode = 2
)

type Table

type Table struct {
	Name            string
	Fields          []FieldInfo
	VectorsInfos    []VectorInfo
	IndexingSize    int32
	RetrievalType   string
	RetrievalParam  string
	RetrievalTypes  []string
	RetrievalParams []string
	// contains filtered or unexported fields
}

func (*Table) DeSerialize

func (table *Table) DeSerialize(buffer []byte)

func (*Table) Serialize

func (table *Table) Serialize(out *[]byte) int

type TermFilter

type TermFilter struct {
	Field   string
	Value   []byte
	IsUnion int32
}

type VectorInfo

type VectorInfo struct {
	Name       string
	DataType   DataType
	IsIndex    bool
	Dimension  int32
	ModelId    string
	StoreType  string
	StoreParam string
	HasSource  bool
}

type VectorQuery

type VectorQuery struct {
	Name          string
	Value         []byte
	MinScore      float64
	MaxScore      float64
	Boost         float64
	HasBoost      int32
	RetrievalType string
}

Jump to

Keyboard shortcuts

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