attach
Loads the registry and the sidecars, builds whatever is missing, and starts maintaining them.
Idempotent and cheap to repeat: a segment already covered by every defined index is skipped without being read. Segments that are not are read once, in key order, exactly as a compaction would read them — see DocumentStore.backfill.
Parameters
whether to build sidecars for segments that have none. Passing false attaches to whatever is already on disk and returns immediately, which is what a caller who does not want a blocking scan of a large store wants — the segments left uncovered are scanned by queries in the meantime, and a later attach finishes the job. Coverage reports the state honestly either way.
Throws
if a sidecar will not decode and IndexOptions.damagedSidecars is DamagedIndexPolicy.REPORT.