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); }
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)); } }