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

void IndexModifier::setMaxBufferedDocs ( int32_t  maxBufferedDocs  ) 

The maximum number of terms that will be indexed for a single field in a document. This limits the amount of memory required for indexing, so that collections with very large files will not crash the indexing process by running out of memory.

Note that this effectively truncates large documents, excluding from the index terms that occur further in the document. If you know your source documents are large, be sure to set this value high enough to accomodate the expected size. If you set it to Integer.MAX_VALUE, then the only limit is your memory, but you should anticipate an OutOfMemoryError.

By default, no more than 10,000 terms will be indexed for a field.

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

Definition at line 159 of file IndexModifier.cpp.

References assureOpen(), and IndexWriter::setMaxBufferedDocs().

                                                              {
      SCOPED_LOCK_MUTEX(directory->THIS_LOCK)
      assureOpen();
      if (indexWriter != NULL)
            indexWriter->setMaxBufferedDocs(maxBufferedDocs);
      this->maxBufferedDocs = maxBufferedDocs;
}


Generated by  Doxygen 1.6.0   Back to index