Example #1
0
 /// <summary>
 /// 合并索引可以迁入process内部实现
 /// </summary>
 /// <param name="tasks"></param>
 private static void MergeIndex(Task[] tasks = null)
 {
     try
     {
         //  if (CTS.IsCancellationRequested) return;
         ILuceneBulid builder = new LuceneBulid();
         builder.MergeIndex(PathSuffixList.ToArray());
     }
     catch (Exception ex)
     {
         //   CTS.Cancel();
         logger.Error("MergeIndex出现异常", ex);
     }
 }
Example #2
0
 private static void MergeIndex <T>(Task[] tasks) where T : class, new()
 {
     try
     {
         if (m_cts.IsCancellationRequested)
         {
             return;
         }
         ILuceneBulid <T> builder = new LuceneBulid <T>();
         builder.MergeIndex(m_pathSuffixList.ToArray());
     }
     catch (Exception ex)
     {
         m_cts.Cancel();
         m_logger.Error("MergeIndex出现异常", ex);
     }
 }