Documentation
¶
Index ¶
- func HashQuery(req *qry.VectorSearchRequest) uint64
- type CacheStats
- type QueryCache
- func (c *QueryCache[T]) Clear()
- func (c *QueryCache[T]) Get(key string) (T, bool)
- func (c *QueryCache[T]) GetInt(key int) (T, bool)
- func (c *QueryCache[T]) GetUint64(key uint64) (T, bool)
- func (c *QueryCache[T]) Put(key string, val T)
- func (c *QueryCache[T]) PutInt(key int, val T)
- func (c *QueryCache[T]) PutUint64(key uint64, val T)
- func (c *QueryCache[T]) Set(key string, val T)
- func (c *QueryCache[T]) SetInt(key int, val T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashQuery ¶
func HashQuery(req *qry.VectorSearchRequest) uint64
HashQuery computes a unique 64-bit hash for a VectorSearchRequest. It considers all fields that affect the search result: - Dataset - Vector (elements) - K - Filters (recursively) - TextQuery (Hybrid) - Alpha - GraphAlpha - LocalOnly (maybe? usually same result regardless of where it runs, but context matters)
Types ¶
type CacheStats ¶
type QueryCache ¶
type QueryCache[T any] struct { // contains filtered or unexported fields }
func NewQueryCache ¶
func (*QueryCache[T]) Clear ¶
func (c *QueryCache[T]) Clear()
func (*QueryCache[T]) Get ¶
func (c *QueryCache[T]) Get(key string) (T, bool)
func (*QueryCache[T]) GetInt ¶
func (c *QueryCache[T]) GetInt(key int) (T, bool)
func (*QueryCache[T]) GetUint64 ¶
func (c *QueryCache[T]) GetUint64(key uint64) (T, bool)
func (*QueryCache[T]) Put ¶
func (c *QueryCache[T]) Put(key string, val T)
func (*QueryCache[T]) PutInt ¶
func (c *QueryCache[T]) PutInt(key int, val T)
func (*QueryCache[T]) PutUint64 ¶
func (c *QueryCache[T]) PutUint64(key uint64, val T)
func (*QueryCache[T]) Set ¶
func (c *QueryCache[T]) Set(key string, val T)
func (*QueryCache[T]) SetInt ¶
func (c *QueryCache[T]) SetInt(key int, val T)