Documentation
¶
Overview ¶
Package redisvector provides a Redis-backed VectorStore adapter using RediSearch.
Index ¶
- func ParseSearchResponse(resp, collection string) []storage.SearchResult
- type Store
- func (s *Store) Close() error
- func (s *Store) CreateCollection(_ context.Context, name string, dimension int) error
- func (s *Store) Delete(_ context.Context, collection string, ids []string) error
- func (s *Store) Search(_ context.Context, collection string, query []float32, topK int) ([]storage.SearchResult, error)
- func (s *Store) Upsert(_ context.Context, collection string, embeddings []storage.Embedding) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseSearchResponse ¶
func ParseSearchResponse(resp, collection string) []storage.SearchResult
ParseSearchResponse parses a RediSearch FT.SEARCH RESP response into SearchResults.
FT.SEARCH response format (RESP2):
*<N> — array header (1 + 2*num_results elements) :<total> — integer: total number of matches $<len> — bulk string: document key (e.g., "collection:id") *<fields> — array of field name-value pairs $<len> field_name $<len> field_value ... $<len> — next document key *<fields> — next document's fields ...
Types ¶
Click to show internal directories.
Click to hide internal directories.