models

package
v3.0.0-...-e1d3755 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition struct {
	Operator string      `json:"operator"`
	Field    string      `json:"field"`
	Value    interface{} `json:"value"`
}

type DB

type DB struct {
	Name string `json:"name"`
}

type DeleteRequest

type DeleteRequest struct {
	DBName    string   `json:"db_name"`
	SpaceName string   `json:"space_name"`
	Filters   *Filters `json:"filters,omitempty"`
	IDs       []string `json:"document_ids"`
}

type Docs

type Docs struct {
	DBName    string        `json:"db_name"`
	SpaceName string        `json:"space_name"`
	Documents []interface{} `json:"documents,omitempty"`
}

type Field

type Field struct {
	Name       string `json:"name"`
	Type       string `json:"type"`
	Dimension  int    `json:"dimension,omitempty"`
	StoreType  string `json:"store_type,omitempty"`
	Format     string `json:"format,omitempty"`
	Index      *Index `json:"index,omitempty"`
	StoreParam *struct {
		CacheSize string `json:"cache_size,omitempty"`
	} `json:"store_param,omitempty"`
}

type Filters

type Filters struct {
	Operator   string      `json:"operator"`
	Conditions []Condition `json:"conditions"`
}

type Index

type Index struct {
	Name   string       `json:"name"`
	Type   string       `json:"type"`
	Params *IndexParams `json:"params,omitempty"`
}

type IndexParams

type IndexParams struct {
	MetricType        string `json:"metric_type"`
	Nprobe            int    `json:"nprobe,omitempty"`
	Ncentroids        int    `json:"ncentroids,omitempty"`
	Nsubvector        int    `json:"nsubvector,omitempty"`
	EfConstruction    int    `json:"efConstruction,omitempty"`
	EfSearch          int    `json:"efSearch,omitempty"`
	TrainingThreshold int    `json:"training_threshold,omitempty"`
}

type QueryRequest

type QueryRequest struct {
	DBName    string   `json:"db_name"`
	SpaceName string   `json:"space_name"`
	Filters   *Filters `json:"filters,omitempty"`
	IDs       []string `json:"document_ids"`
}

type SearchRequest

type SearchRequest struct {
	DBName    string   `json:"db_name"`
	SpaceName string   `json:"space_name"`
	Limit     int      `json:"limit"`
	Vectors   []Vector `json:"vectors"`
	Filters   *Filters `json:"filters,omitempty"`
}

type Space

type Space struct {
	Name         string   `json:"name"`
	PartitionNum int      `json:"partition_num"`
	ReplicaNum   int      `json:"replica_num"`
	Fields       []*Field `json:"fields"`
}

type Vector

type Vector struct {
	Field   string    `json:"field"`
	Feature []float32 `json:"feature"`
}

Jump to

Keyboard shortcuts

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