Documentation
¶
Overview ¶
Package memory provides MemoryIndex, the zero-dependency in-process retrieval.Index implementation.
Index ¶
- type Index
- func (m *Index) Capabilities() retrieval.Capabilities
- func (m *Index) Close() error
- func (m *Index) Delete(_ context.Context, namespace string, ids []string) error
- func (m *Index) DeleteByFilter(_ context.Context, namespace string, f retrieval.Filter) (int64, error)
- func (m *Index) Drop(_ context.Context, namespace string) error
- func (m *Index) Get(_ context.Context, namespace, id string) (retrieval.Doc, bool, error)
- func (m *Index) Iterate(_ context.Context, namespace string, cursor string, batch int) ([]retrieval.Doc, string, error)
- func (m *Index) List(_ context.Context, namespace string, req retrieval.ListRequest) (*retrieval.ListResponse, error)
- func (m *Index) Search(_ context.Context, namespace string, req retrieval.SearchRequest) (*retrieval.SearchResponse, error)
- func (m *Index) Upsert(_ context.Context, namespace string, docs []retrieval.Doc) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index is an in-process retrieval.Index with BM25 (textsearch) + cosine vector scoring.
func (*Index) Capabilities ¶
func (m *Index) Capabilities() retrieval.Capabilities
Capabilities implements retrieval.Index.
func (*Index) DeleteByFilter ¶
func (m *Index) DeleteByFilter(_ context.Context, namespace string, f retrieval.Filter) (int64, error)
DeleteByFilter implements retrieval.DeletableByFilter.
func (*Index) Iterate ¶
func (m *Index) Iterate(_ context.Context, namespace string, cursor string, batch int) ([]retrieval.Doc, string, error)
Iterate implements retrieval.Iterable.
func (*Index) List ¶
func (m *Index) List(_ context.Context, namespace string, req retrieval.ListRequest) (*retrieval.ListResponse, error)
List implements retrieval.Index.
Click to show internal directories.
Click to hide internal directories.