Documentation
¶
Overview ¶
Package search defines an interface for a search index management structure
Index ¶
Constants ¶
View Source
const (
// QueryKeySearch is the query param key to find search queries in requests.
QueryKeySearch = "q"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index[T any] interface { IndexSearcher[T] IndexManager }
Index is our wrapper interface for a text search index.
type IndexManager ¶
type IndexManager interface {
Index(ctx context.Context, id string, value any) error
Delete(ctx context.Context, id string) (err error)
Wipe(ctx context.Context) error
}
IndexManager is our wrapper interface for a text search index.
type IndexRequest ¶
type IndexSearcher ¶
type NoopIndexManager ¶
type NoopIndexManager[T any] struct{}
NoopIndexManager is a noop Index.
func (*NoopIndexManager[T]) Delete ¶
func (*NoopIndexManager[T]) Delete(context.Context, string) error
Delete is a no-op method.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package algolia provides an interface-compatible wrapper around the algolia indexer
|
Package algolia provides an interface-compatible wrapper around the algolia indexer |
|
Package elasticsearch provides an interface-compatible wrapper around the elasticsearch indexer
|
Package elasticsearch provides an interface-compatible wrapper around the elasticsearch indexer |
|
Package mocksearch provides an interface-compatible search index mock
|
Package mocksearch provides an interface-compatible search index mock |
Click to show internal directories.
Click to hide internal directories.