long[] ids;
TermFrequencyList.TermFreq[] ids;
		public void flush() {			final int wordsCount = words[0].size() + words[1].size();			if (doc == null || wordsCount == 0)				return;			final ProgressIndicator progress = new ProgressIndicator(					wordsCount, 100);			final short collectionId = doc.getCollection().getId();			int count = 1, len;			Map.Entry entry;			String word;			TermFrequencyList idList;			TermFrequencyList.TermFreq id;			long[] ids;			byte[] data;			long prevId;			long delta;			for (int k = 0; k < 2; k++) {				for (Iterator i = words[k].entrySet().iterator(); i.hasNext(); count++) {					entry = (Map.Entry) i.next();					word = (String) entry.getKey();					idList = (TermFrequencyList) entry.getValue();					os.clear();					len = idList.getSize();					os.writeInt(doc.getDocId());					os.writeByte(k == 0 ? TEXT_SECTION : ATTRIBUTE_SECTION);					os.writeInt(len);					prevId = 0;					for (Iterator j = idList.iterator(); j.hasNext();) {						id = ((TermFrequencyList.TermFreq) j.next());						delta = id.l - prevId;						if (delta < 0) {							LOG.debug("neg. delta: " + delta + " for " + word);							LOG.debug("id = " + id + "; prev = " + prevId);						}						os.writeLong(delta);						if(termFreq)							os.writeInt(id.count);						prevId = id.l;					}					flushWord(collectionId, word, os.data());					progress.setValue(count);					if (progress.changed()) {						setChanged();						notifyObservers(progress);					}				}				if (wordsCount > 100) {					progress.finish();					setChanged();					notifyObservers(progress);				}				words[k].clear();			}		}