// TODO: we could check w/ FreqProxTermsWriter: if the // term doesn't exist, don't bother buffering into the // per-DWPT map (but still must go into the global map) internal bool DeleteTerms(params Term[] terms) { lock (this) { // TODO why is this synchronized? DocumentsWriterDeleteQueue deleteQueue = this.deleteQueue; deleteQueue.AddDelete(terms); flushControl.DoOnDelete(); return(ApplyAllDeletes(deleteQueue)); } }
// TODO: we could check w/ FreqProxTermsWriter: if the // term doesn't exist, don't bother buffering into the // per-DWPT map (but still must go into the global map) internal bool DeleteTerms(params Term[] terms) { UninterruptableMonitor.Enter(this); try { // TODO why is this synchronized? DocumentsWriterDeleteQueue deleteQueue = this.deleteQueue; deleteQueue.AddDelete(terms); flushControl.DoOnDelete(); return(ApplyAllDeletes(deleteQueue)); } finally { UninterruptableMonitor.Exit(this); } }