Docs
/
adapter system

search

Universal search adapter system: run a query across one or many pluggable back-ends (in-memory array, injected search clients, HTTP JSON endpoints) and merge/rank the hits. Back-ends are injected so...

search (adapter system)

Universal query runner. Ported from leumas-middleware/lib/a.search, whose whole point (per its goal.txt) is the runAdapter helper that dispatches a query into one back-end or many — fs, mongodb, a google engine, any third party. The empty per-provider stubs and tests were stripped.

Back-ends are injected as { name, search(query, opts) -> hit[] } (or a plain fn), so the engine carries no credentials. A built-in "memory" back-end (substring-scored array search) makes it useful with zero external deps.

Tools (adapters)

toolargsresult
runAdapter{ query, backend?, options? }{ backend, results }
runAdapters{ query, backends[], options? }{ query, count, results, sources } (merged + ranked)
memory{ query, records[], fields? }{ results }
Source shared/engines/adapters/domain/search/README.md (no-git)markdownjson
Generated from the Leumas repository. Every page cites the file it came from.leumas.techllms.txt