/** * Triggers the writing of the postings in memory to disk. * Uses the default RunWriter, writing to the specified files. * @param file name of the file to write the postings. * @throws IOException if an I/O error occurs. */ public void finish(String[] file) throws IOException{ finish(new RunWriter(file[0], file[1])); }
@edu.umd.cs.findbugs.annotations.SuppressWarnings( value="DM_GC", justification="Forcing GC is an essential part of releasing" + "memory for further indexing") /** causes the posting lists built up in memory to be flushed out */ protected void forceFlush() throws IOException { mp.finish(finishMemoryPosting()); System.gc(); createMemoryPostings(); memoryCheck.reset(); numberOfDocsSinceFlush = 0; }