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

void IndexModifier::createIndexWriter (  )  [protected]

Close the IndexReader and open an IndexWriter.

Exceptions:
IOException 

Definition at line 51 of file IndexModifier.cpp.

References IndexReader::close(), IndexWriter::setMaxFieldLength(), and IndexWriter::setUseCompoundFile().

Referenced by flush(), getMaxBufferedDocs(), getMaxFieldLength(), getMergeFactor(), getUseCompoundFile(), and optimize().

                                      {
      if (indexWriter == NULL) {
            if (indexReader != NULL) {
                  indexReader->close();
                  _CLDELETE(indexReader);
            }
            indexWriter = _CLNEW IndexWriter(directory, analyzer, false);
            indexWriter->setUseCompoundFile(useCompoundFile);
            //indexWriter->setMaxBufferedDocs(maxBufferedDocs);
            indexWriter->setMaxFieldLength(maxFieldLength);
            //indexWriter->setMergeFactor(mergeFactor);
      }
}


Generated by  Doxygen 1.6.0   Back to index