spillToOffline(); offlinePointWriter.append(packedValue, pointCount, docID); } else {
/** If the current segment has too many points then we spill over to temp files / offline sort. */ private void spillToOffline() throws IOException { // For each .add we just append to this input file, then in .finish we sort this input and resursively build the tree: offlinePointWriter = new OfflinePointWriter(tempDir, tempFileNamePrefix, packedBytesLength, longOrds, "spill", 0, singleValuePerDoc); tempInput = offlinePointWriter.out; PointReader reader = heapPointWriter.getReader(0, pointCount); for(int i=0;i<pointCount;i++) { boolean hasNext = reader.next(); assert hasNext; offlinePointWriter.append(reader.packedValue(), i, heapPointWriter.docIDs[i]); } heapPointWriter = null; }
spillToOffline(); offlinePointWriter.append(packedValue, pointCount, docID); } else {
spillToOffline(); offlinePointWriter.append(packedValue, pointCount, docID); } else {
/** If the current segment has too many points then we spill over to temp files / offline sort. */ private void spillToOffline() throws IOException { // For each .add we just append to this input file, then in .finish we sort this input and resursively build the tree: offlinePointWriter = new OfflinePointWriter(tempDir, tempFileNamePrefix, packedBytesLength, longOrds, "spill", 0, singleValuePerDoc); tempInput = offlinePointWriter.out; PointReader reader = heapPointWriter.getReader(0, pointCount); for(int i=0;i<pointCount;i++) { boolean hasNext = reader.next(); assert hasNext; offlinePointWriter.append(reader.packedValue(), i, heapPointWriter.docIDs[i]); } heapPointWriter = null; }
/** If the current segment has too many points then we spill over to temp files / offline sort. */ private void spillToOffline() throws IOException { // For each .add we just append to this input file, then in .finish we sort this input and resursively build the tree: offlinePointWriter = new OfflinePointWriter(tempDir, tempFileNamePrefix, packedBytesLength, longOrds, "spill", 0, singleValuePerDoc); tempInput = offlinePointWriter.out; PointReader reader = heapPointWriter.getReader(0, pointCount); for(int i=0;i<pointCount;i++) { boolean hasNext = reader.next(); assert hasNext; offlinePointWriter.append(reader.packedValue(), i, heapPointWriter.docIDs[i]); } heapPointWriter = null; }