writeBitSet

Writes the docIDs from it to out, in logical blocks, one for each 65536 docIDs in monotonically increasing gap-less order. DENSE blocks uses .DEFAULT_DENSE_RANK_POWER of 9 (every 512 docIDs / 8 longs). The caller must keep track of the number of jump-table entries (returned by this method) as well as the denseRankPower (9 for this method) and provide them when constructing an IndexedDISI for reading.

Return

the number of jump-table entries following the blocks, -1 for no entries. This should be stored in meta and used when creating an instance of IndexedDISI.

Parameters

it

the document IDs.

out

destination for the blocks.

Throws

IOException

if there was an error writing to out.


fun writeBitSet(it: DocIdSetIterator, out: IndexOutput, denseRankPower: Byte): Short

Writes the docIDs from it to out, in logical blocks, one for each 65536 docIDs in monotonically increasing gap-less order. The caller must keep track of the number of jump-table entries (returned by this method) as well as the denseRankPower and provide them when constructing an IndexedDISI for reading.

Return

the number of jump-table entries following the blocks, -1 for no entries. This should be stored in meta and used when creating an instance of IndexedDISI.

Parameters

it

the document IDs.

out

destination for the blocks.

denseRankPower

for Method.DENSE blocks, a rank will be written every 2^denseRankPower docIDs. Values < 7 (every 128 docIDs) or > 15 (every 32768 docIDs) disables DENSE rank. Recommended values are 8-12: Every 256-4096 docIDs or 4-64 longs. .DEFAULT_DENSE_RANK_POWER is 9: Every 512 docIDs. This should be stored in meta and used when creating an instance of IndexedDISI.

Throws

IOException

if there was an error writing to out.