GetFlushDeletesCount() 개인적인 메소드

private GetFlushDeletesCount ( ) : int
리턴 int
예제 #1
0
        public virtual void TestMaxBufferedDeletes()
        {
            Directory   dir    = new MockRAMDirectory();
            IndexWriter writer = new IndexWriter(dir, new WhitespaceAnalyzer(), true,
                                                 IndexWriter.MaxFieldLength.UNLIMITED, null);

            writer.SetMaxBufferedDeleteTerms(1);
            writer.DeleteDocuments(null, new Term("foobar", "1"));
            writer.DeleteDocuments(null, new Term("foobar", "1"));
            writer.DeleteDocuments(null, new Term("foobar", "1"));
            Assert.AreEqual(3, writer.GetFlushDeletesCount());
            writer.Close();
            dir.Close();
        }
예제 #2
0
 public virtual void  TestMaxBufferedDeletes()
 {
     for (int pass = 0; pass < 2; pass++)
     {
         bool        autoCommit = (0 == pass);
         Directory   dir        = new MockRAMDirectory();
         IndexWriter writer     = new IndexWriter(dir, autoCommit, new WhitespaceAnalyzer(), true);
         writer.SetMaxBufferedDeleteTerms(1);
         writer.DeleteDocuments(new Term("foobar", "1"));
         writer.DeleteDocuments(new Term("foobar", "1"));
         writer.DeleteDocuments(new Term("foobar", "1"));
         Assert.AreEqual(3, writer.GetFlushDeletesCount());
         writer.Close();
         dir.Close();
     }
 }
예제 #3
0
		public virtual void  TestMaxBufferedDeletes()
		{
			for (int pass = 0; pass < 2; pass++)
			{
				bool autoCommit = (0 == pass);
				Directory dir = new MockRAMDirectory();
				IndexWriter writer = new IndexWriter(dir, autoCommit, new WhitespaceAnalyzer(), true);
				writer.SetMaxBufferedDeleteTerms(1);
				writer.DeleteDocuments(new Term("foobar", "1"));
				writer.DeleteDocuments(new Term("foobar", "1"));
				writer.DeleteDocuments(new Term("foobar", "1"));
				Assert.AreEqual(3, writer.GetFlushDeletesCount());
				writer.Close();
				dir.Close();
			}
		}
 public virtual void TestMaxBufferedDeletes()
 {
     Directory dir = new MockRAMDirectory();
     IndexWriter writer = new IndexWriter(dir, new WhitespaceAnalyzer(), true,
                                          IndexWriter.MaxFieldLength.UNLIMITED);
     writer.SetMaxBufferedDeleteTerms(1);
     writer.DeleteDocuments(new Term("foobar", "1"));
     writer.DeleteDocuments(new Term("foobar", "1"));
     writer.DeleteDocuments(new Term("foobar", "1"));
     Assert.AreEqual(3, writer.GetFlushDeletesCount());
     writer.Close();
     dir.Close();
 }