Search
Understanding the native grep search and alternative search options.
Using the native “grep” search
Section titled “Using the native “grep” search”LoonFS comes with a built-in (optional) search capability called Grep.
Grep is an optional capability that can be enabled or disabled depending on the deployment. For enabled deployments, an index is built off of the changefeed that powers a fast “grep” search across all text based documents.
Query consistency
Section titled “Query consistency”Each grep request pins the namespace state it reads from. Candidate planning, index reads, unindexed-tail scanning, and result verification therefore use one internally consistent namespace head; the response reports that sequence as head_seq.
Pagination does not maintain that pin between HTTP requests.
Some limitations
Section titled “Some limitations”Due to the indexing strategy and implementation, an indexed search needs a run of at least three consecutive literal bytes (usually three ASCII characters). Use allow_scan to permit a capped exhaustive scan when a pattern cannot use the index. Use allow_stale to accept indexed-only results when the unindexed tail exceeds the scan budget.
loonfs grep 'TODO|FIXME' --path-prefix /projects -iSee Content search for more.
Powering alternative search methods
Section titled “Powering alternative search methods”The native grep search is an optional extension that follows the same durable changefeed architecture of the broader LoonFS platform. For that reason, it is included as a default “extension”.
That said, the pattern can serve as a useful template for other types of derivative indexes (e.g., semantic search) or document processing (e.g., OCR) that can be built using the LoonFS checkpointing and changefeed features.