index

package
v2.0.0-...-b3791a6 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	IndexTypeKey  = `index_type`
	MetricTypeKey = `metric_type`
	ParamsKey     = `params`
)

index param field tag

Variables

This section is empty.

Functions

func NewAutoAnnParam

func NewAutoAnnParam(level int) autoAnnParam

func NewDiskAnnParam

func NewDiskAnnParam(searchList int) diskANNParam

func NewHNSWAnnParam

func NewHNSWAnnParam(ef int) hsnwAnnParam

func NewIvfAnnParam

func NewIvfAnnParam(nprobe int) ivfAnnParam

func NewSCANNAnnParam

func NewSCANNAnnParam(nprobe int, reorderK int) scannAnnParam

Types

type AnnParam

type AnnParam interface {
	Params() map[string]any
}

type CustomAnnParam

type CustomAnnParam struct {
	// contains filtered or unexported fields
}

func NewCustomAnnParam

func NewCustomAnnParam() CustomAnnParam

func (CustomAnnParam) Params

func (b CustomAnnParam) Params() map[string]any

func (CustomAnnParam) WithExtraParam

func (b CustomAnnParam) WithExtraParam(key string, value any)

type GenericIndex

type GenericIndex struct {
	// contains filtered or unexported fields
}

func (GenericIndex) IndexType

func (idx GenericIndex) IndexType() IndexType

func (GenericIndex) Name

func (idx GenericIndex) Name() string

func (GenericIndex) Params

func (gi GenericIndex) Params() map[string]string

Params implements Index

type Index

type Index interface {
	Name() string
	IndexType() IndexType
	Params() map[string]string
}

Index represent index definition in milvus.

func NewAutoIndex

func NewAutoIndex(metricType MetricType) Index

func NewBinFlatIndex

func NewBinFlatIndex(metricType MetricType) Index

func NewBinIvfFlatIndex

func NewBinIvfFlatIndex(metricType MetricType, nlist int) Index

func NewBitmapIndex

func NewBitmapIndex() Index

func NewDiskANNIndex

func NewDiskANNIndex(metricType MetricType) Index

func NewFlatIndex

func NewFlatIndex(metricType MetricType) Index

func NewGPUBruteForceIndex

func NewGPUBruteForceIndex(metricType MetricType) Index

func NewGPUCagraIndex

func NewGPUCagraIndex(metricType MetricType,
	intermediateGraphDegree,
	graphDegree int,
) Index

func NewGPUIVPFlatIndex

func NewGPUIVPFlatIndex(metricType MetricType) Index

func NewGPUIVPPQIndex

func NewGPUIVPPQIndex(metricType MetricType) Index

func NewGenericIndex

func NewGenericIndex(name string, params map[string]string) Index

NewGenericIndex create generic index instance

func NewHNSWIndex

func NewHNSWIndex(metricType MetricType, m int, efConstruction int) Index

func NewInvertedIndex

func NewInvertedIndex() Index

func NewIvfFlatIndex

func NewIvfFlatIndex(metricType MetricType, nlist int) Index

func NewIvfPQIndex

func NewIvfPQIndex(metricType MetricType, nlist int, m int, nbits int) Index

func NewIvfSQ8Index

func NewIvfSQ8Index(metricType MetricType, nlist int) Index

func NewSCANNIndex

func NewSCANNIndex(metricType MetricType, nlist int, withRawData bool) Index

func NewSortedIndex

func NewSortedIndex() Index

func NewSparseInvertedIndex

func NewSparseInvertedIndex(metricType MetricType, dropRatio float64) Index

func NewSparseWANDIndex

func NewSparseWANDIndex(metricType MetricType, dropRatio float64) Index

IndexSparseWAND index type for SPARSE_WAND, weak-and

func NewTrieIndex

func NewTrieIndex() Index

type IndexState

type IndexState commonpb.IndexState

IndexState export index state

type IndexType

type IndexType string

IndexType index type

const (
	Flat       IndexType = "FLAT" // faiss
	BinFlat    IndexType = "BIN_FLAT"
	IvfFlat    IndexType = "IVF_FLAT" // faiss
	BinIvfFlat IndexType = "BIN_IVF_FLAT"
	IvfPQ      IndexType = "IVF_PQ" // faiss
	IvfSQ8     IndexType = "IVF_SQ8"
	HNSW       IndexType = "HNSW"
	IvfHNSW    IndexType = "IVF_HNSW"
	AUTOINDEX  IndexType = "AUTOINDEX"
	DISKANN    IndexType = "DISKANN"
	SCANN      IndexType = "SCANN"

	// Sparse
	SparseInverted IndexType = "SPARSE_INVERTED_INDEX"
	SparseWAND     IndexType = "SPARSE_WAND"

	GPUIvfFlat IndexType = "GPU_IVF_FLAT"
	GPUIvfPQ   IndexType = "GPU_IVF_PQ"

	GPUCagra      IndexType = "GPU_CAGRA"
	GPUBruteForce IndexType = "GPU_BRUTE_FORCE"

	Trie     IndexType = "Trie"
	Sorted   IndexType = "STL_SORT"
	Inverted IndexType = "INVERTED"
	BITMAP   IndexType = "BITMAP"
)

Index Constants

type MetricType

type MetricType = entity.MetricType

MetricType alias for `entity.MetricsType`.

Jump to

Keyboard shortcuts

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