Example #1
0
        /// <summary>Returns true if this single info is optimized (has no
        /// pending norms or deletes, is in the same dir as the
        /// writer, and matches the current compound file setting
        /// </summary>
        private bool IsOptimized(SegmentInfo info)
        {
            bool hasDeletions = writer.NumDeletedDocs(info) > 0;

            return(!hasDeletions && !info.HasSeparateNorms() && info.dir == writer.GetDirectory() &&
                   (info.GetUseCompoundFile() == useCompoundFile || noCFSRatio < 1.0));
        }
Example #2
0
		/// <summary>Returns true if this single info is optimized (has no
		/// pending norms or deletes, is in the same dir as the
		/// writer, and matches the current compound file setting 
		/// </summary>
		private bool IsOptimized(SegmentInfo info)
		{
			bool hasDeletions = writer.NumDeletedDocs(info) > 0;
			return !hasDeletions && !info.HasSeparateNorms() && info.dir == writer.GetDirectory() &&
                (info.GetUseCompoundFile() == useCompoundFile || noCFSRatio < 1.0);
		}
Example #3
0
		internal static bool HasSeparateNorms(SegmentInfo si)
		{
			return si.HasSeparateNorms();
		}