for( int j = frequency[ currIndex ]; j-- != 0; ) {
obs = indexWriter.newDocumentRecord();
currDoc = ii.nextDocument() + numPrevDocs;
indexWriter.writeDocumentPointer( obs, currDoc );
if ( i.hasPayloads ) indexWriter.writePayload( obs, ii.payload() );
if ( i.hasCounts ) {
count = ii.count();
if ( hasCounts ) indexWriter.writePositionCount( obs, count );
if ( hasPositions ) indexWriter.writeDocumentPositions( obs, ii.positionArray(), 0, count, size != null ? size[ currDoc ] : -1 );