Esempio n. 1
0
        public void Rebuild_Index()
        {
            using (var d = new RandomIdRAMDirectory())
                using (var indexer = new TestIndex(d, new StandardAnalyzer(Version.LUCENE_30)))
                {
                    indexer.CreateIndex();
                    indexer.IndexItems(indexer.AllData());

                    var indexWriter = indexer.GetIndexWriter();
                    var reader      = indexWriter.GetReader();
                    Assert.AreEqual(100, reader.NumDocs());
                }
        }