Example #1
0
int32_t SegmentMerger::merge() {
	int32_t value = mergeFields();
	mergeTerms();
	mergeNorms();

	if (fieldInfos->hasVectors())
		mergeVectors();

	return value;
}
int32_t SegmentMerger::merge(bool mergeDocStores) {
  this->mergeDocStores = mergeDocStores;

  // NOTE: it's important to add calls to
  // checkAbort.work(...) if you make any changes to this
  // method that will spend alot of time.  The frequency
  // of this check impacts how long
  // IndexWriter.close(false) takes to actually stop the
  // threads.

  mergedDocs = mergeFields();

	mergeTerms();
	mergeNorms();

	if (mergeDocStores && fieldInfos->hasVectors())
		mergeVectors();

	return mergedDocs;
}