Help us shape the future of Go! Take the 2026 Go Developer Survey

meilisearch

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultEmbedder is the Meilisearch embedder holding a record's dense
	// vector.
	DefaultEmbedder = "default"
)

Variables

This section is empty.

Functions

func NewMeilisearch

func NewMeilisearch(logger logger.Logger) vector.Vector

NewMeilisearch creates a Meilisearch vector component.

Types

type Meilisearch

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

Meilisearch implements the Dapr Vector building block with Meilisearch.

Meilisearch stores user-provided embeddings in a document's `_vectors` field, so a vector collection is a Meilisearch index with one `userProvided` embedder. Meilisearch only supports cosine similarity for those embeddings.

func (*Meilisearch) BatchQuery

BatchQuery evaluates each query independently against the same collection and returns one result per query in request order. A query that fails validation, is rejected by Meilisearch or names a record that does not exist produces an error result; a request-wide failure (a closed component, a missing collection, invalid credentials, transport, a provider outage) fails the call, whichever query meets it.

func (*Meilisearch) Close

func (m *Meilisearch) Close() error

Close closes the component and stops its shared task-change stream.

func (*Meilisearch) CreateCollection

func (m *Meilisearch) CreateCollection(ctx context.Context, req *vector.CreateCollectionRequest) error

CreateCollection creates a Meilisearch index configured for user-provided embeddings of the requested dimensions. Record metadata is filterable by default; additional Meilisearch settings travel in the request metadata. An existing collection is ALREADY_EXISTS.

func (*Meilisearch) Delete

Delete deletes records by ID. It is a write: the deletion task is acknowledged with the same mode and wait semantics as Upsert. IDs that do not exist are not an error; a missing collection is NOT_FOUND.

func (*Meilisearch) DeleteCollection

func (m *Meilisearch) DeleteCollection(ctx context.Context, req *vector.DeleteCollectionRequest) error

DeleteCollection deletes a collection. An index that is not configured for vectors is FAILED_PRECONDITION: plain search indexes share the instance, and the vector API must not delete one it reports as not being a collection.

func (*Meilisearch) Get

Get fetches records by ID. Found records are returned in request order; records that are not found are omitted.

func (*Meilisearch) GetCollection

GetCollection returns the record count, dimensions, metric and settings of a collection. An index that is not configured for vectors is FAILED_PRECONDITION.

func (*Meilisearch) GetComponentMetadata

func (m *Meilisearch) GetComponentMetadata() (metadataInfo metadata.MetadataMap)

GetComponentMetadata returns the metadata of the component.

func (*Meilisearch) Init

func (m *Meilisearch) Init(ctx context.Context, meta vector.Metadata) error

Init initializes the Meilisearch vector component.

func (*Meilisearch) ListCollections

ListCollections lists the collections of the store: the indexes of the instance that are configured for vectors.

func (*Meilisearch) Query

Query runs a single nearest-neighbour query.

func (*Meilisearch) Upsert

Upsert is a keyed upsert of dense vector records into an existing collection. A missing collection is NOT_FOUND.

Jump to

Keyboard shortcuts

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