Logo Search packages:      
Sourcecode: qt4-x11 version File versions

void IndexModifier::optimize (  ) 

Merges all segments together into a single segment, optimizing an index for search.

See also:
IndexWriter::optimize()
Exceptions:
IllegalStateException if the index is closed

Definition at line 122 of file IndexModifier.cpp.

References assureOpen(), createIndexWriter(), and IndexWriter::optimize().

                             {
      SCOPED_LOCK_MUTEX(directory->THIS_LOCK)
      assureOpen();
      createIndexWriter();
      indexWriter->optimize();
}


Generated by  Doxygen 1.6.0   Back to index