request

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectionCollectInfo

type CollectionCollectInfo struct {
	CollectionName string `json:"-"`
}

func (*CollectionCollectInfo) ContentType

func (c *CollectionCollectInfo) ContentType() string

func (*CollectionCollectInfo) Encode

func (c *CollectionCollectInfo) Encode() (io.Reader, error)

func (*CollectionCollectInfo) Path

func (c *CollectionCollectInfo) Path() (string, error)

type CollectionCreate

type CollectionCreate struct {
	CollectionName         string            `json:"-"`
	Vectors                VectorsParams     `json:"vectors"`
	ShardNumber            *int              `json:"shard_number,omitempty"`
	ReplicationFactor      *int              `json:"replication_factor,omitempty"`
	WriteConsistencyFactor *int              `json:"write_consistency_factor,omitempty"`
	OnDiskPayload          *bool             `json:"on_disk_payload,omitempty"`
	HNSWConfig             *HNSWConfig       `json:"hnsw_config,omitempty"`
	WALConfig              *WALConfig        `json:"wal_config,omitempty"`
	OptimizersConfig       *OptimizersConfig `json:"optimizers_config,omitempty"`
	InitFrom               interface{}       `json:"init_from,omitempty"`
	QuantizationConfig     interface{}       `json:"quantization_config,omitempty"`
}

func (*CollectionCreate) ContentType

func (c *CollectionCreate) ContentType() string

func (*CollectionCreate) Encode

func (c *CollectionCreate) Encode() (io.Reader, error)

func (*CollectionCreate) Path

func (c *CollectionCreate) Path() (string, error)

type CollectionDelete added in v1.1.0

type CollectionDelete struct {
	CollectionName string `json:"-"`
	Timeout        *int   `json:"-"`
}

func (*CollectionDelete) ContentType added in v1.1.0

func (c *CollectionDelete) ContentType() string

func (*CollectionDelete) Encode added in v1.1.0

func (c *CollectionDelete) Encode() (io.Reader, error)

func (*CollectionDelete) Path added in v1.1.0

func (c *CollectionDelete) Path() (string, error)

type CollectionList

type CollectionList struct {
}

func (*CollectionList) ContentType

func (c *CollectionList) ContentType() string

func (*CollectionList) Encode

func (c *CollectionList) Encode() (io.Reader, error)

func (*CollectionList) Path

func (c *CollectionList) Path() (string, error)

type CollectionUpdate added in v1.1.0

type CollectionUpdate struct {
	CollectionName     string               `json:"-"`
	Timeout            *int                 `json:"timeout,omitempty"`
	Vectors            *UpdateVectorsParams `json:"vectors,omitempty"`
	OptimizersConfig   *OptimizersConfig    `json:"optimizers_config,omitempty"`
	Params             *UpdateParams        `json:"params,omitempty"`
	HNSWConfig         *HNSWConfig          `json:"hnsw_config,omitempty"`
	QuantizationConfig any                  `json:"quantization_config,omitempty"`
}

func (*CollectionUpdate) ContentType added in v1.1.0

func (c *CollectionUpdate) ContentType() string

func (*CollectionUpdate) Encode added in v1.1.0

func (c *CollectionUpdate) Encode() (io.Reader, error)

func (*CollectionUpdate) Path added in v1.1.0

func (c *CollectionUpdate) Path() (string, error)

type Distance

type Distance string
const (
	DistanceCosine    Distance = "Cosine"
	DistanceEuclidean Distance = "Euclid"
	DistanceDot       Distance = "Dot"
)

type Filter added in v1.0.1

type Filter struct {
	Should  []M `json:"should,omitempty"`
	Must    []M `json:"must,omitempty"`
	MustNot []M `json:"must_not,omitempty"`
}

type HNSWConfig

type HNSWConfig struct {
	M                  *uint `json:"m,omitempty"`
	EfConstruction     *uint `json:"ef_construction,omitempty"`
	FullScanThreshold  *uint `json:"full_scan_threshold,omitempty"`
	MaxIndexingThreads *uint `json:"max_indexing_threads,omitempty"`
	OnDisk             *bool `json:"on_disk,omitempty"`
	PayloadM           *uint `json:"payload_m,omitempty"`
}

type IndexCreate added in v1.1.0

type IndexCreate struct {
	CollectionName string    `json:"-"`
	Wait           *bool     `json:"-"`
	Ordering       *Ordering `json:"-"`
	FieldName      string    `json:"field_name"`
	FieldSchema    any       `json:"field_schema,omitempty"`
}

func (*IndexCreate) ContentType added in v1.1.0

func (c *IndexCreate) ContentType() string

func (*IndexCreate) Encode added in v1.1.0

func (c *IndexCreate) Encode() (io.Reader, error)

func (*IndexCreate) Path added in v1.1.0

func (c *IndexCreate) Path() (string, error)

type IndexDelete added in v1.1.0

type IndexDelete struct {
	CollectionName string    `json:"-"`
	FieldName      string    `json:"-"`
	Wait           *bool     `json:"-"`
	Ordering       *Ordering `json:"-"`
}

func (*IndexDelete) ContentType added in v1.1.0

func (c *IndexDelete) ContentType() string

func (*IndexDelete) Encode added in v1.1.0

func (c *IndexDelete) Encode() (io.Reader, error)

func (*IndexDelete) Path added in v1.1.0

func (c *IndexDelete) Path() (string, error)

type InitFrom

type InitFrom struct {
	Collection string `json:"collection"`
}

type M added in v1.0.1

type M map[string]interface{}

type OptimizersConfig

type OptimizersConfig struct {
	DeletedThreshold       *float32 `json:"deleted_threshold,omitempty"`
	VacuumMinVectorNumber  *uint    `json:"vacuum_min_vector_number,omitempty"`
	DefaultSegmentNumber   *uint    `json:"default_segment_number,omitempty"`
	MaxSegmentSize         *uint    `json:"max_segment_size,omitempty"`
	MemMapThreshold        *uint    `json:"memmap_threshold,omitempty"`
	IndexingThreshold      *uint    `json:"indexing_threshold,omitempty"`
	FlushIntervalSec       *uint64  `json:"flush_interval_sec,omitempty"`
	MaxOptimizationThreads *uint    `json:"max_optimization_threads,omitempty"`
}

type Ordering

type Ordering string
const (
	OrderingWeak   Ordering = "weak"
	OrderingMedium Ordering = "medium"
	OrderingStrong Ordering = "strong"
)

type Point

type Point struct {
	ID      string                 `json:"id"`
	Vector  []float64              `json:"vector"`
	Payload map[string]interface{} `json:"payload,omitempty"`
}

type PointGet added in v1.1.0

type PointGet struct {
	CollectionName string  `json:"-"`
	ID             string  `json:"-"`
	Consistency    *string `json:"-"`
}

func (*PointGet) ContentType added in v1.1.0

func (p *PointGet) ContentType() string

func (*PointGet) Encode added in v1.1.0

func (p *PointGet) Encode() (io.Reader, error)

func (*PointGet) Path added in v1.1.0

func (p *PointGet) Path() (string, error)

type PointVectors added in v1.1.0

type PointVectors struct {
	ID     string    `json:"id"`
	Vector []float64 `json:"vector"`
}

type PointsDelete added in v1.1.0

type PointsDelete struct {
	CollectionName string    `json:"-"`
	Ordering       *Ordering `json:"-"`
	Wait           *bool     `json:"-"`
	Filter         Filter    `json:"filter,omitempty"`
	Points         []string  `json:"points,omitempty"`
}

func (*PointsDelete) ContentType added in v1.1.0

func (p *PointsDelete) ContentType() string

func (*PointsDelete) Encode added in v1.1.0

func (p *PointsDelete) Encode() (io.Reader, error)

func (*PointsDelete) Path added in v1.1.0

func (p *PointsDelete) Path() (string, error)

type PointsGet added in v1.1.0

type PointsGet struct {
	CollectionName string   `json:"-"`
	Consistency    *string  `json:"-"`
	IDs            []string `json:"ids,omitempty"`
	WithPayload    *bool    `json:"with_payload,omitempty"`
	WithVector     *bool    `json:"with_vector,omitempty"`
}

func (*PointsGet) ContentType added in v1.1.0

func (p *PointsGet) ContentType() string

func (*PointsGet) Encode added in v1.1.0

func (p *PointsGet) Encode() (io.Reader, error)

func (*PointsGet) Path added in v1.1.0

func (p *PointsGet) Path() (string, error)

type PointsSearch added in v1.1.0

type PointsSearch struct {
	CollectionName string              `json:"-"`
	Consistency    *string             `json:"-"`
	Vector         []float64           `json:"vector"`
	Filter         Filter              `json:"filter,omitempty"`
	Params         *PointsSearchParams `json:"params,omitempty"`
	Limit          int                 `json:"limit"`
	Offset         int                 `json:"offset"`
	WithPayload    *bool               `json:"with_payload"`
	WithVector     *bool               `json:"with_vector,omitempty"`
	ScoreThreshold *float64            `json:"score_threshold,omitempty"`
}

func (*PointsSearch) ContentType added in v1.1.0

func (p *PointsSearch) ContentType() string

func (*PointsSearch) Encode added in v1.1.0

func (p *PointsSearch) Encode() (io.Reader, error)

func (*PointsSearch) Path added in v1.1.0

func (p *PointsSearch) Path() (string, error)

type PointsSearchParams added in v1.1.0

type PointsSearchParams struct {
	HNSWEF       *int                            `json:"hnsw_ef,omitempty"`
	Exact        bool                            `json:"exact"`
	Quantization *PointsSearchParamsQuantization `json:"quantization,omitempty"`
}

type PointsSearchParamsQuantization added in v1.1.0

type PointsSearchParamsQuantization struct {
	Ignore  bool `json:"ignore"`
	Rescore bool `json:"rescore"`
}

type PointsUpsert added in v1.1.0

type PointsUpsert struct {
	CollectionName string    `json:"-"`
	Wait           *bool     `json:"-"`
	Ordering       *Ordering `json:"-"`
	Points         []Point   `json:"points"`
}

func (*PointsUpsert) ContentType added in v1.1.0

func (p *PointsUpsert) ContentType() string

func (*PointsUpsert) Encode added in v1.1.0

func (p *PointsUpsert) Encode() (io.Reader, error)

func (*PointsUpsert) Path added in v1.1.0

func (p *PointsUpsert) Path() (string, error)

type UpdateParams added in v1.1.0

type UpdateParams struct {
	ReplicationFactor      *int  `json:"replication_factor,omitempty"`
	WriteConsistencyFactor *int  `json:"write_consistency_factor,omitempty"`
	OnDiskPayload          *bool `json:"on_disk_payload,omitempty"`
}

type UpdateVectorsParams added in v1.1.0

type UpdateVectorsParams struct {
	HNSWConfig         *HNSWConfig `json:"hnsw_config,omitempty"`
	QuantizationConfig any         `json:"quantization_config,omitempty"`
	OnDisk             *bool       `json:"on_disk,omitempty"`
}

type VectorsDelete added in v1.1.0

type VectorsDelete struct {
	CollectionName string    `json:"-"`
	Points         []string  `json:"points,omitempty"`
	Filter         Filter    `json:"filter,omitempty"`
	Vector         []string  `json:"vector"`
	Wait           *bool     `json:"-"`
	Ordering       *Ordering `json:"-"`
}

func (*VectorsDelete) ContentType added in v1.1.0

func (p *VectorsDelete) ContentType() string

func (*VectorsDelete) Encode added in v1.1.0

func (p *VectorsDelete) Encode() (io.Reader, error)

func (*VectorsDelete) Path added in v1.1.0

func (p *VectorsDelete) Path() (string, error)

type VectorsParams

type VectorsParams struct {
	Size               uint64      `json:"size"`
	Distance           Distance    `json:"distance"`
	HNSWConfig         *HNSWConfig `json:"hnsw_config,omitempty"`
	QuantizationConfig interface{} `json:"quantization_config,omitempty"`
	OnDisk             *bool       `json:"on_disk,omitempty"`
}

type VectorsUpdate added in v1.1.0

type VectorsUpdate struct {
	CollectionName string         `json:"-"`
	Points         []PointVectors `json:"points"`
	Wait           *bool          `json:"-"`
	Ordering       *Ordering      `json:"-"`
}

func (*VectorsUpdate) ContentType added in v1.1.0

func (p *VectorsUpdate) ContentType() string

func (*VectorsUpdate) Encode added in v1.1.0

func (p *VectorsUpdate) Encode() (io.Reader, error)

func (*VectorsUpdate) Path added in v1.1.0

func (p *VectorsUpdate) Path() (string, error)

type WALConfig

type WALConfig struct {
	WalCapacityMB    *uint `json:"wal_capacity_mb,omitempty"`
	WalSegmentsAhead *uint `json:"wal_segments_ahead,omitempty"`
}

Jump to

Keyboard shortcuts

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