meilisearch

package
v1.22.3 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter interface {
	Statement() string
}

Filter represents a filter for meilisearch queries. It's just a simple wrapper around a string. DO NOT assume that it is a complete implementation.

type FilterAnd

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

func (*FilterAnd) And

func (f *FilterAnd) And(filter Filter) *FilterAnd

func (*FilterAnd) Statement

func (f *FilterAnd) Statement() string

type FilterEq

type FilterEq string

func NewFilterEq

func NewFilterEq[T bool | int64](field string, value T) FilterEq

NewFilterEq creates a new FilterEq. It supports int64 and bool only, to avoid extra works to handle strings with special characters.

func (FilterEq) Statement

func (f FilterEq) Statement() string

type FilterGte

type FilterGte string

func NewFilterGte

func NewFilterGte[T int64](field string, value T) FilterGte

NewFilterGte creates a new FilterGte. It supports int64 only, to avoid extra works to handle strings with special characters.

func (FilterGte) Statement

func (f FilterGte) Statement() string

type FilterIn

type FilterIn string

func NewFilterIn

func NewFilterIn[T int64](field string, values ...T) FilterIn

NewFilterIn creates a new FilterIn. It supports int64 only, to avoid extra works to handle strings with special characters.

func (FilterIn) Statement

func (f FilterIn) Statement() string

type FilterLte

type FilterLte string

func NewFilterLte

func NewFilterLte[T int64](field string, value T) FilterLte

NewFilterLte creates a new FilterLte. It supports int64 only, to avoid extra works to handle strings with special characters.

func (FilterLte) Statement

func (f FilterLte) Statement() string

type FilterNot

type FilterNot string

func NewFilterNot

func NewFilterNot(filter Filter) FilterNot

func (FilterNot) Statement

func (f FilterNot) Statement() string

type FilterOr

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

func (*FilterOr) Or

func (f *FilterOr) Or(filter Filter) *FilterOr

func (*FilterOr) Statement

func (f *FilterOr) Statement() string

type Indexer

type Indexer struct {
	Client *meilisearch.Client
	// contains filtered or unexported fields
}

Indexer represents a basic meilisearch indexer implementation

func NewIndexer

func NewIndexer(url, apiKey, indexName string, version int, settings *meilisearch.Settings) *Indexer

func (*Indexer) Close

func (i *Indexer) Close()

Close closes the indexer

func (*Indexer) Init

func (i *Indexer) Init(_ context.Context) (bool, error)

Init initializes the indexer

func (*Indexer) Ping

func (i *Indexer) Ping(ctx context.Context) error

Ping checks if the indexer is available

func (*Indexer) VersionedIndexName

func (i *Indexer) VersionedIndexName() string

VersionedIndexName returns the full index name with version

Jump to

Keyboard shortcuts

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