/** Writes the current contents of TempLex temporary lexicon binary tree down to * a temporary disk lexicon. */ protected void writeTemporaryLexicon() { try{ final String tmpLexName = this.defaultStructureName+"-tmp"+ TempLexCount; LexiconOutputStream<String> los = getLexOutputStream(tmpLexName); TempLex.storeToStream(los, termCodes); los.close(); /* An alternative but deprecated method to store the temporary lexicons is: * TempLex.storeToFile(tmpLexName); */ //tempLexFiles.addLast(TempLexDirCount+""+TempLexCount); tempLexFiles.addLast(tmpLexName); }catch(IOException ioe){ logger.error("Indexing failed to write a lexicon to disk : ", ioe); } }
LexiconOutputStream<String> leOut = getLexOutputStream(index, structureName); while(le.hasNext())
LexiconOutputStream<String> los = getLexOutputStream(newMergedFile); newMergedFile = defaultStructureName + "-mergetmp"+ String.valueOf(progressiveNumber++); final LexiconOutputStream<String> los = getLexOutputStream(newMergedFile); mergeNLexicons(lis, los); for(String inputLexiconFileName : inputLexiconFileNames) final LexiconOutputStream<String> los = getLexOutputStream(defaultStructureName); mergeNLexicons(lis, los); for(int i=0;i<StartFileCount;i++)