con un clic
index-lifecycle
// Understanding and modifying Searchlite’s storage/indexing pipeline (WAL → segment build → manifest/compaction) and storage backends; use when working on ingest, durability, fast fields, or segment layouts.
// Understanding and modifying Searchlite’s storage/indexing pipeline (WAL → segment build → manifest/compaction) and storage backends; use when working on ingest, durability, fast fields, or segment layouts.
Use when implementing or updating Searchlite features that need pre-review hardening via per-feature invariant matrix maintenance, adversarial/regression coverage updates, and full quality-gate verification.
Send local completion notifications to the Agent Notifications app via POST http://127.0.0.1:60766/agent/notify after finishing a task; include title, content, and agent details so the desktop app shows a system notification.
Send local completion notifications to the agent-notifier service via POST http://127.0.0.1:60766/agent/notify after finishing a task; include title, content, and agent details so the desktop app shows a system notification.
Structured workflow for discovering, reproducing, and fixing bugs in Searchlite by inspecting real code paths (CLI/HTTP/core), validating durability invariants, and producing regression tests; use when investigating incorrect results, crashes, data loss risks, or “it sometimes fails” reports.
Guardrails for keeping the Searchlite Rust workspace compliant with formatting, lint, build, test, and perf expectations; use when preparing or reviewing changes to ensure they meet project quality bars.
Playbook for diagnosing Searchlite issues across CLI/HTTP, storage, and indexing; use when triaging failures or odd search results.
| name | index-lifecycle |
| description | Understanding and modifying Searchlite’s storage/indexing pipeline (WAL → segment build → manifest/compaction) and storage backends; use when working on ingest, durability, fast fields, or segment layouts. |
Searchlite serves one index directory per instance (CLI path or HTTP --index). A single writer buffers operations, appends them to a WAL, and on commit writes a new immutable segment and atomically updates a manifest. Readers consult the manifest to know which segments exist; compaction merges segments and drops deleted/obsolete data.
doc_id_field, default _id)Commit is the “durable + visible” boundary:
Durability contract:
Crash window (expected behavior):
POST /refresh unless configured with --refresh-on-commit.Search uses:
Execution modes (perf/correctness relevant):
bm25 full evaluationwand exact pruning (default)bmw block-max WAND pruning (tunable block size)The exact file names are an implementation detail, but the directory contains:
vectors is enabledWhen changing segment layout, preserve:
doc_id_field is required and is the key for upsert/delete semantics.stored: true controls whether values can be returned/highlighted.fast: true controls filters + aggregations performance/feasibility.comment.author) while preserving stored nested structure in responses.Nested blocks so clauses bind to the same object instance.terms, significant_terms, rare_terms require a fast keyword field.If you modify fast-field encoding, bucket iteration, or numeric parsing:
vectors)Vector search is approximate ANN (HNSW):
candidate_size and ef_searchvector_filter can reduce candidate selection setIf you touch vector integration:
vector_score when vector search runssearchlite-coresearchlite-clisearchlite-http (and/or the CLI http subcommand)searchlite-wasmsearchlite-ffiKeep boundaries clean:
searchlite-core should remain the source of truth for correctness; CLI/HTTP adapt surfaces around it.