Documentation ¶
Index ¶
- Variables
- type Option
- func WithCollectionName(name string) Option
- func WithConsistencyLevel(level entity.ConsistencyLevel) Option
- func WithDropOld() Option
- func WithEF(ef int) Option
- func WithEmbedder(embedder embeddings.Embedder) Option
- func WithIndex(idx entity.Index) Option
- func WithMaxTextLength(num int) Option
- func WithMetaField(str string) Option
- func WithMetricType(metricType entity.MetricType) Option
- func WithPartitionName(name string) Option
- func WithPrimaryField(str string) Option
- func WithSearchParameters(sp entity.SearchParam) Option
- func WithShards(num int32) Option
- func WithSkipFlushOnWrite() Option
- func WithTextField(str string) Option
- func WithVectorField(str string) Option
- type Store
Constants ¶
This section is empty.
Variables ¶
var ( ErrEmbedderWrongNumberVectors = errors.New( "number of vectors from embedder does not match number of documents", ) ErrColumnNotFound = errors.New("invalid field") ErrInvalidFilters = errors.New("invalid filters") )
var ErrInvalidOptions = errors.New("invalid options")
ErrInvalidOptions is returned when the options given are invalid.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(p *Store)
Option is a function type that can be used to modify the client.
func WithCollectionName ¶
WithCollectionName sets the collection for the milvus store.
func WithConsistencyLevel ¶
func WithConsistencyLevel(level entity.ConsistencyLevel) Option
WithConsistencyLevel sets the consistency level for seaarch.
func WithDropOld ¶
func WithDropOld() Option
WithDropOld store will drop and recreate collection on initialization.
func WithEmbedder ¶
func WithEmbedder(embedder embeddings.Embedder) Option
WithEmbedder sets the embedder to use.
func WithMaxTextLength ¶
WithMaxTextLength sets the maximum length of the text field in the collection.
func WithMetaField ¶
WithMetaField sets te name of the meta field in the collection schema. default is 'meta'.
func WithMetricType ¶ added in v0.1.13
func WithMetricType(metricType entity.MetricType) Option
WithMetricType sets the metric type for the collection.
func WithPartitionName ¶
WithPartitionName sets the milvus partition for the collection.
func WithPrimaryField ¶
WithPrimaryField name of the primary field in the collection.
func WithSearchParameters ¶
func WithSearchParameters(sp entity.SearchParam) Option
WithSearchParameters sets the search parameters.
func WithShards ¶
WithShards number of shards to create for a collection.
func WithSkipFlushOnWrite ¶ added in v0.1.19
func WithSkipFlushOnWrite() Option
WithSkipFlushOnWrite disables flushing on write.
func WithTextField ¶
WithTextField sets the name of the text field in the collection schema.
func WithVectorField ¶
WithVectorField sets the name of the vector field in the collection.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a wrapper around the milvus client.
func New ¶
New creates an active client connection to the (specified, or default) collection in the Milvus server and returns the `Store` object needed by the other accessors.