---
name: "repack-file-index"
section: "1"
platform: "linux"
package: "framerd"
version: "2.4.1-1.1"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/repack-file-index"
---

# repack-file-index(1)

reorganize a FramerD file index

## NAME

repack-file-index - reorganize a FramerD file index

## SYNOPSIS

**repack-file-index \[-q\] \[-v\] \<** *file\_index* **\> \[** *output\_file* **\] \[--size** *new\_size* **\] \[--min** *min\_vals* **\] \[--max** *max\_vals* **\] \[--bsize** *block\_size* **\]** *filename* **\[** *new\_name* **\] \[** *min* **\] \[** *max* **\] \[** *block\_size* **\]**

## DESCRIPTION

**repack-file-index** reorganizes a FramerD file index by consolidating associations into continuous blocks on disk, possibly increasing the number of slots in the table, and reordering keys to prioritize keys with more values. It also removes duplicate associations and sorts large associations for more efficient processing upon retrieval.

FramerD file indices are designed to be updated incrementally, but such incremental additions can leave related data spread throughout the file. **repack-file-index** reorganizes this data to save space and can dramatically improve performance by reducing the number of file seeks required to retrieve the associations for a given key.

**repack-file-index** reads the file index stored in *file\_index* and writes a new file index to *output\_file.* If  *output\_file* is not provided, the new index is written into a temporary file and copied back into *file\_index* when it is completely generated.

## OPTIONS

- \-q

  Run quietly, without progress reports to the console.

- \-v

  Run verbosely, without progress reports to the console.

- \--size size

  Create the new index file with *size* slots.  If size is the literal **keep** , the current size of the index is maintained.  If the size specified is smaller than the number of slots, the minimum number of possible slots is chosen.

- \--min min\_vals

  Exclude keys associated with fewer than *min\_vals* values.

- \--max max\_vals

  Exclude keys associated with more than *max\_vals* values.

- \--bsize block\_size

  In order to improve performance,  **repack-file-index** reads blocks of values together and schedules its disk accesses within any particular.  This incurs a memory cost as the number of values in a block increases.  The *block\_size* parameter can control this cost by using the smallest feasible block size larger than *block\_size*

## DIAGNOSTICS

The program reports an error if *filename* does not exist or does not contain a valid file index.  It also reports an error if either *output\_file* cannot be written or *filename* cannot be overwritten (whichever it needs to do).

## BUGS

The trimming of keys by max and min do not correctly register repeated values.  If this is a problem, it can be worked around by first repacking the file index without value bounds (removing duplicate values) and then repacking with the desired bounds.

## Revision Info

**$Id: repack-file-index.1,v 1.4 2002/07/10 00:13:11 haase Exp $**

## AUTHOR

Ken Haase \< kh@beingmeta.com \>

## SEE ALSO

**framerd**(7) [**analyze-index**(1)](/analyze-index/1.md) [**make-file-index**(1)](/make-file-index/1.md)
