public void AnIndexCanBeDeleted() { Assert.AreEqual(2000, indexer.Count()); indexer.DeleteAll(true); Assert.AreEqual(0, indexer.Count()); }
public void AnIndexCanBeDeleted() { TestDataGenerator tdg = new TestDataGenerator(); Directory directory = new RAMDirectory(); Analyzer analyzer = new StandardAnalyzer(Lucene.Net.Util.LuceneVersion.LUCENE_48); _indexer = new LuceneIndexer(directory, analyzer); _indexer.CreateIndex(tdg.AllData); Assert.Equal(2000, _indexer.Count()); _indexer.DeleteAll(); Assert.Equal(0, _indexer.Count()); directory.ClearLock("write.lock"); analyzer.Dispose(); directory.Dispose(); }