Documentation
¶
Index ¶
- Constants
- func ValidateUSearchRuntimeRoot(context.Context, string, string, string, string, int, int64, int64, string, ...) error
- type Capability
- type CapabilityState
- type Exact
- type Filters
- type HNSWHit
- type HNSWNode
- type Hit
- type ReadyStore
- type SearchOptions
- type Searcher
- type Status
- type StatusReason
- type StatusState
Constants ¶
const ( BackendUSearch = "usearch" USearchVersion = "2.26.0" )
const BackendExact = "exact"
Variables ¶
This section is empty.
Functions ¶
func ValidateUSearchRuntimeRoot ¶
func ValidateUSearchRuntimeRoot(context.Context, string, string, string, string, int, int64, int64, string, string) error
ValidateUSearchRuntimeRoot is unavailable in builds without the optional native backend. Untagged status stays unsupported before this can be called.
Types ¶
type Capability ¶
type Capability struct {
State CapabilityState `json:"state"`
Backend string `json:"backend,omitempty"`
Version string `json:"version,omitempty"`
Reason string `json:"reason,omitempty"`
}
Capability describes whether this build can safely open a persisted native backend generation.
func RuntimeCapability ¶
func RuntimeCapability() Capability
type CapabilityState ¶
type CapabilityState string
const ( CapabilityUnsupported CapabilityState = "unsupported" CapabilitySupportedReady CapabilityState = "supported_ready" CapabilitySupportedBroken CapabilityState = "supported_broken" )
type Exact ¶
type Exact struct {
// contains filtered or unexported fields
}
func NewExact ¶
func NewExact(st ReadyStore) *Exact
type HNSWHit ¶
HNSWHit is an approximate graph candidate. Callers must exactly rerank and validate it against authoritative SQLite state before it becomes evidence.
type HNSWNode ¶
HNSWNode identifies one graph vector by its dense, segment-local ordinal. The legacy name is shared by the rejected HNSW bakeoff and the optional USearch candidate so their content-free test harness uses one contract.
type Hit ¶
type Hit struct {
ChunkID string `json:"chunk_id"`
Rank int `json:"rank"`
Distance float64 `json:"distance"`
ParentKind string `json:"parent_kind,omitempty"`
ParentSourceKey string `json:"parent_source_key,omitempty"`
SourceType string `json:"source_type,omitempty"`
SectionOrdinal int `json:"section_ordinal,omitempty"`
}
type ReadyStore ¶
type SearchOptions ¶
type Status ¶
type Status struct {
State StatusState `json:"state"`
Reason StatusReason `json:"reason,omitempty"`
Backend string `json:"backend,omitempty"`
ProfileID string `json:"profile_id,omitempty"`
GenerationID string `json:"generation_id,omitempty"`
Scanned int `json:"scanned"`
}
type StatusReason ¶
type StatusReason string
const ( ReasonNone StatusReason = "" ReasonProfileMismatch StatusReason = "profile_mismatch" ReasonDimensionMismatch StatusReason = "dimension_mismatch" ReasonTooLarge StatusReason = "too_large" ReasonIndexCorrupt StatusReason = "index_corrupt" ReasonCanceled StatusReason = "canceled" ReasonSearchError StatusReason = "search_error" ReasonQueryEmbeddingFailed StatusReason = "query_embedding_failed" ReasonGenerationBusy StatusReason = "generation_busy" ReasonRootLoadTimeout StatusReason = "root_load_timeout" )