@maschinenlesbar.org/openka-cli
    Preparing search index...

    Function indexRecord

    • Add or replace a record's postings and catalog row.

      Idempotent per shard: a posting this record already has is replaced, not added twice. That matters after an interrupted sync, which wrote a record's postings but never its catalog row — unindexRecord finds nothing to remove for a record the catalog does not know, and re-indexing it used to double every posting.

      previous is the record whose postings are in the index now, when the caller has already replaced the file: a re-extraction writes the new record first, and reading the token set back from disk then found the new text, so the words only the old document had kept pointing at the record.

      Parameters

      Returns void