Expand description
Search, caching and verified evidence, independent of any concrete embedding backend.
With pdf, applications installing a log logger MUST filter pdf_extract
to Off. With pdf-render, also filter hayro_interpret, hayro_syntax and
hayro_font to Off: upstream diagnostics can contain document bytes. This crate installs
no logger. PDF panics become errors via catch_unwind. A permanent dispatcher is
installed lazily once; RAII guards suppress and record parser panics only on
the parsing thread, delegating other threads to the captured previous hook.
Later external hooks replace it and may print; Seyk never removes or overwrites them.
First installation is deferred during unwinding, so that parse may also print.
With audio, Symphonia probe, construction, packet reads and decode panics
likewise become payload-free UnsupportedAudio errors; applications must use
a payload-free panic hook for audio. ALAC frame allocations are checked before construction.
Unwinding does not contain aborts, OOM, hangs or excessive parser allocations.
Re-exports§
pub use pdf::PdfTextExtractor;pub use cache::CacheImportMapping;pub use cache::CacheImportReport;pub use cache::CacheStats;pub use cache::EmbeddingCache;pub use cache::MemoryCache;pub use cache::ResourceWrite;pub use cache::SegmentWrite;pub use cache::SqliteCache;pub use discovery::DiscoveryOptions;pub use provider::FsProvider;pub use provider::ProvidedResource;pub use provider::ResourceListing;pub use provider::ResourceProvider;pub use provider::ResourceScope;pub use provider::ResourceVersion;pub use extractor::ExtractedContent;pub use extractor::Extractor;pub use extractor::TextExtractor;pub use extractor::extract_resource;
Modules§
- audio
- Bounded audio decoding, presentation timing and deterministic 16 kHz windows.
- cache
- Embedding caches.
- discovery
- Finding searchable resources under the paths a caller passes in.
- embedder
- extractor
- On-demand readable evidence, independent of models and caches.
- index
- Nearest-neighbour search over normalised vectors.
- lexical
- Lexical (keyword) matching, the half of hybrid search that embeddings miss: exact names, identifiers and rare words.
- local_
content - Opt-in policy for automatic local-content collections on Unix.
- Bounded embedded-text extraction from PDF bytes.
- provider
- Resource access. Filesystem is the only supported production provider.
- segment
- Splitting resources into independently searchable segments.
- watch
- Keep the cache fresh while files change.
Structs§
- Dimension
- A nonzero embedding width, independent of any model’s supported dimensions.
- Embedding
- A vector with two explicit construction policies.
- Embedding
Request - One borrowed input and its embedding purpose.
- Index
Progress - Snapshot of a pass, not a durable inventory. Counts reset on rediscovery.
- Index
Report - Index
Request - Kind
Progress - Counts of discovered resources in the current (or last completed) pass.
A mixed PDF is one
pdfresource, regardless of its page locator kinds. - Match
Reason - Per-leg positions in the candidate lists used to rank a hit.
Ranks are one-based;
Nonemeans the leg did not contribute. These ranks precede fusion and the final result limit, so can exceed that limit. - Match
Signals - Which signals found a hit, with their raw scores.
- Model
Identity - Shared embedding-space configuration used by every modality.
Modality-specific weights/preprocessing additionally use
Embedder::input_identity. - Page
Diagnostic - A page omitted after a parse or preparation failure.
- Resource
Id - A canonical absolute URI identifying a resource, serialized as a string. File URIs preserve non-UTF-8 Unix path bytes through percent encoding.
- Resource
Metadata - Facts about a resource at the time it was embedded.
- Search
Degradation - Additive response metadata, shared by library, CLI JSON and MCP.
- Search
Engine - Search over provider resources; local files are the default.
- Search
Engine Builder - Search
Hit - One ranked match.
- Search
Request - Search
Results - Search
Stats - Skipped
Count - Number of resources skipped for one typed reason.
- Skipped
Resource - A resource that was found but could not be searched.
- Sync
Stats - What happened while bringing the cache up to date.
Enums§
- Degraded
Mode - Degraded
Reason - Why a response contains only keyword and filename matches.
- Embedding
Task - The purpose of an embedding. Each backend documents its supported mapping. These are embedding tasks, never instructions to generate answers or summaries.
- Error
- Errors produced by the search engine and its components.
- Image
Scan - Experimental image scan. Returned scores always use the retained exact f32 vectors.
- Lease
Event - Test-only observations at the indexing lease boundary.
- Modality
- The kind of content a resource holds.
- Progress
Event - Progress notifications for long operations.
- Resource
Input - A borrowed input to embed. The request selects its task independently.
- Resource
Locator - Where inside a resource a hit was found. Deliberately modality-independent.
- Search
Mode - How results are found and ranked.
- Skip
Code - Stable classification independent of dependency error messages.
Constants§
- PDF_
TEXT_ VERSION - Embedded PDF text format used by PageText locators, available without PDF extraction.
Traits§
- Embedder
- Synchronous, task-aware local embedding interface. Successful batches return one result per request, in input order. Async callers can use their executor’s blocking pool.
Functions§
- expand_
tilde - Expand a leading
~/to the home directory (the shell does not do this inside quotes). - make_
preview - Collapse whitespace, drop leading heading lines and cut at a word boundary.
Type Aliases§
- Progress
Fn - Called without the cache mutex held. Resource-count and embedding events
hold the indexing lease: callbacks may inspect the cache or search with
sync(false), but must not synchronously start another indexing pass or callscrub_cacheon the same engine, since either would reacquire the indexing lease. - Result