idx

ADR 0001: Adopt BM25 Per-Directory Inverted Index

Status

Accepted

Context

The idx index command originally generated .idx/index.idx as a plain text list of entries in each directory. That format was cheap to write, but it did not support ranked search and did not capture document content.

The CLI runs locally on the user’s machine and indexes source trees that can be large. Search quality and memory footprint both matter.

Decision

The project uses a BM25-based inverted index built from file contents.

The index follows these rules:

Rationale

Consequences

Positive

Negative

Implementation Notes