Example #1
0
        public IndexResult Rebuild(hOOt.Document document, bool deleteOld, DocumentIndexOptimizeSetup setup)
        {
            if (!_isAlive)
            {
                return(new IndexResult());
            }
            UpdateLastUsedToken();
            if (document.DocNumber > _hoot.DocumentCount - 1)
            {
                return(new IndexResult());
            }
            var indexResult = _hoot.UpdateIndex(document, deleteOld);

            Optimize(setup);
            return(indexResult);
        }
Example #2
0
 public IndexResult Rebuild(hOOt.Document document, bool deleteOld = false)
 {
     lock (_gate)
     {
         if (!_isAlive)
         {
             return(new IndexResult());
         }
         UpdateToken();
         return(document.DocNumber > _hoot.DocumentCount - 1 ? new IndexResult() : _hoot.UpdateIndex(document, deleteOld));
     }
 }