lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [1/7] .NETification
Date Tue, 16 Sep 2014 20:20:49 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master f8ab0de0b -> 8452d3099


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Index/TestStressIndexing2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestStressIndexing2.cs b/src/Lucene.Net.Tests/core/Index/TestStressIndexing2.cs
index f171ed6..cc9fc39 100644
--- a/src/Lucene.Net.Tests/core/Index/TestStressIndexing2.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestStressIndexing2.cs
@@ -316,13 +316,13 @@ namespace Lucene.Net.Index
 
         private static void PrintDocs(DirectoryReader r)
         {
-            foreach (AtomicReaderContext ctx in r.Leaves())
+            foreach (AtomicReaderContext ctx in r.Leaves)
             {
                 // TODO: improve this
-                AtomicReader sub = (AtomicReader)ctx.Reader();
+                AtomicReader sub = (AtomicReader)ctx.Reader;
                 Bits liveDocs = sub.LiveDocs;
                 Console.WriteLine("  " + ((SegmentReader)sub).SegmentInfo);
-                for (int docID = 0; docID < sub.MaxDoc(); docID++)
+                for (int docID = 0; docID < sub.MaxDoc; docID++)
                 {
                     Document doc = sub.Document(docID);
                     if (liveDocs == null || liveDocs.Get(docID))
@@ -346,13 +346,13 @@ namespace Lucene.Net.Index
                 Console.WriteLine("\nr2 docs:");
                 PrintDocs(r2);
             }
-            if (r1.NumDocs() != r2.NumDocs())
+            if (r1.NumDocs != r2.NumDocs)
             {
-                Debug.Assert(false, "r1.NumDocs()=" + r1.NumDocs() + " vs r2.NumDocs()=" + r2.NumDocs());
+                Debug.Assert(false, "r1.NumDocs=" + r1.NumDocs + " vs r2.NumDocs=" + r2.NumDocs);
             }
-            bool hasDeletes = !(r1.MaxDoc() == r2.MaxDoc() && r1.NumDocs() == r1.MaxDoc());
+            bool hasDeletes = !(r1.MaxDoc == r2.MaxDoc && r1.NumDocs == r1.MaxDoc);
 
-            int[] r2r1 = new int[r2.MaxDoc()]; // r2 id to r1 id mapping
+            int[] r2r1 = new int[r2.MaxDoc]; // r2 id to r1 id mapping
 
             // create mapping from id2 space to id2 based on idField
             Fields f1 = MultiFields.GetFields(r1);
@@ -549,8 +549,8 @@ namespace Lucene.Net.Index
             DocsEnum docs1 = null, docs2 = null;
 
             // pack both doc and freq into single element for easy sorting
-            long[] info1 = new long[r1.NumDocs()];
-            long[] info2 = new long[r2.NumDocs()];
+            long[] info1 = new long[r1.NumDocs];
+            long[] info2 = new long[r2.NumDocs];
 
             for (; ; )
             {
@@ -698,7 +698,7 @@ namespace Lucene.Net.Index
         {
             if (d1 == null)
             {
-                Assert.IsTrue(d2 == null || d2.Size() == 0);
+                Assert.IsTrue(d2 == null || d2.Size == 0);
                 return;
             }
             Assert.IsTrue(d2 != null);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Index/TestTermVectorsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestTermVectorsReader.cs b/src/Lucene.Net.Tests/core/Index/TestTermVectorsReader.cs
index 8c96879..24deec6 100644
--- a/src/Lucene.Net.Tests/core/Index/TestTermVectorsReader.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestTermVectorsReader.cs
@@ -239,9 +239,9 @@ namespace Lucene.Net.Index
         {
             //Check to see the files were created properly in setup
             DirectoryReader reader = DirectoryReader.Open(Dir);
-            foreach (AtomicReaderContext ctx in reader.Leaves())
+            foreach (AtomicReaderContext ctx in reader.Leaves)
             {
-                SegmentReader sr = (SegmentReader)ctx.Reader();
+                SegmentReader sr = (SegmentReader)ctx.Reader;
                 Assert.IsTrue(sr.FieldInfos.HasVectors());
             }
             reader.Dispose();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Index/TestTermVectorsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestTermVectorsWriter.cs b/src/Lucene.Net.Tests/core/Index/TestTermVectorsWriter.cs
index 0e4056d..4f9fee0 100644
--- a/src/Lucene.Net.Tests/core/Index/TestTermVectorsWriter.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestTermVectorsWriter.cs
@@ -433,7 +433,7 @@ namespace Lucene.Net.Index
                 writer.Dispose();
 
                 IndexReader reader = DirectoryReader.Open(dir);
-                for (int i = 0; i < reader.NumDocs(); i++)
+                for (int i = 0; i < reader.NumDocs; i++)
                 {
                     reader.Document(i);
                     reader.GetTermVectors(i);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Index/TestTermsEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestTermsEnum.cs b/src/Lucene.Net.Tests/core/Index/TestTermsEnum.cs
index 95a6dcb..d2f4b8c 100644
--- a/src/Lucene.Net.Tests/core/Index/TestTermsEnum.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestTermsEnum.cs
@@ -605,8 +605,8 @@ namespace Lucene.Net.Index
             w.ForceMerge(1);
             IndexReader r = w.Reader;
             w.Dispose();
-            Assert.AreEqual(1, r.NumDocs());
-            Assert.AreEqual(1, r.MaxDoc());
+            Assert.AreEqual(1, r.NumDocs);
+            Assert.AreEqual(1, r.MaxDoc);
             Terms terms = MultiFields.GetTerms(r, "field");
             if (terms != null)
             {
@@ -902,7 +902,7 @@ namespace Lucene.Net.Index
             DirectoryReader r = w.Reader;
             w.Dispose();
             AtomicReader sub = GetOnlySegmentReader(r);
-            Terms terms = sub.Fields().Terms("field");
+            Terms terms = sub.Fields.Terms("field");
             Automaton automaton = (new RegExp(".*", RegExp.NONE)).ToAutomaton();
             CompiledAutomaton ca = new CompiledAutomaton(automaton, false, false);
             TermsEnum te = terms.Intersect(ca, null);
@@ -959,7 +959,7 @@ namespace Lucene.Net.Index
             DirectoryReader r = w.Reader;
             w.Dispose();
             AtomicReader sub = GetOnlySegmentReader(r);
-            Terms terms = sub.Fields().Terms("field");
+            Terms terms = sub.Fields.Terms("field");
 
             Automaton automaton = (new RegExp(".*d", RegExp.NONE)).ToAutomaton();
             CompiledAutomaton ca = new CompiledAutomaton(automaton, false, false);
@@ -1015,7 +1015,7 @@ namespace Lucene.Net.Index
             DirectoryReader r = w.Reader;
             w.Dispose();
             AtomicReader sub = GetOnlySegmentReader(r);
-            Terms terms = sub.Fields().Terms("field");
+            Terms terms = sub.Fields.Terms("field");
 
             Automaton automaton = (new RegExp(".*", RegExp.NONE)).ToAutomaton(); // accept ALL
             CompiledAutomaton ca = new CompiledAutomaton(automaton, false, false);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Index/TestThreadedForceMerge.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestThreadedForceMerge.cs b/src/Lucene.Net.Tests/core/Index/TestThreadedForceMerge.cs
index eee3f5b..7fddf19 100644
--- a/src/Lucene.Net.Tests/core/Index/TestThreadedForceMerge.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestThreadedForceMerge.cs
@@ -106,15 +106,15 @@ namespace Lucene.Net.Index
 
                 int expectedDocCount = (int)((1 + iter) * (200 + 8 * NUM_ITER2 * (NUM_THREADS / 2.0) * (1 + NUM_THREADS)));
 
-                Assert.AreEqual(expectedDocCount, writer.NumDocs(), "index=" + writer.SegString() + " numDocs=" + writer.NumDocs() + " maxDoc=" + writer.MaxDoc() + " config=" + writer.Config);
-                Assert.AreEqual(expectedDocCount, writer.MaxDoc(), "index=" + writer.SegString() + " numDocs=" + writer.NumDocs() + " maxDoc=" + writer.MaxDoc() + " config=" + writer.Config);
+                Assert.AreEqual(expectedDocCount, writer.NumDocs(), "index=" + writer.SegString() + " numDocs=" + writer.NumDocs() + " maxDoc=" + writer.MaxDoc + " config=" + writer.Config);
+                Assert.AreEqual(expectedDocCount, writer.MaxDoc, "index=" + writer.SegString() + " numDocs=" + writer.NumDocs() + " maxDoc=" + writer.MaxDoc + " config=" + writer.Config);
 
                 writer.Dispose();
                 writer = new IndexWriter(directory, (IndexWriterConfig)NewIndexWriterConfig(TEST_VERSION_CURRENT, ANALYZER).SetOpenMode(OpenMode_e.APPEND).SetMaxBufferedDocs(2));
 
                 DirectoryReader reader = DirectoryReader.Open(directory);
-                Assert.AreEqual(1, reader.Leaves().Count, "reader=" + reader);
-                Assert.AreEqual(expectedDocCount, reader.NumDocs());
+                Assert.AreEqual(1, reader.Leaves.Count, "reader=" + reader);
+                Assert.AreEqual(expectedDocCount, reader.NumDocs);
                 reader.Dispose();
             }
             writer.Dispose();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Index/TestTieredMergePolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestTieredMergePolicy.cs b/src/Lucene.Net.Tests/core/Index/TestTieredMergePolicy.cs
index 9d58ca1..efeb08b 100644
--- a/src/Lucene.Net.Tests/core/Index/TestTieredMergePolicy.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestTieredMergePolicy.cs
@@ -59,7 +59,7 @@ namespace Lucene.Net.Index
                 w.AddDocument(doc);
             }
 
-            Assert.AreEqual(numDocs, w.MaxDoc());
+            Assert.AreEqual(numDocs, w.MaxDoc);
             Assert.AreEqual(numDocs, w.NumDocs());
         }
 
@@ -81,7 +81,7 @@ namespace Lucene.Net.Index
                 doc.Add(NewTextField("content", "aaa " + (i % 4), Field.Store.NO));
                 w.AddDocument(doc);
             }
-            Assert.AreEqual(80, w.MaxDoc());
+            Assert.AreEqual(80, w.MaxDoc);
             Assert.AreEqual(80, w.NumDocs());
 
             if (VERBOSE)
@@ -91,7 +91,7 @@ namespace Lucene.Net.Index
             w.DeleteDocuments(new Term("content", "0"));
             w.ForceMergeDeletes();
 
-            Assert.AreEqual(80, w.MaxDoc());
+            Assert.AreEqual(80, w.MaxDoc);
             Assert.AreEqual(60, w.NumDocs());
 
             if (VERBOSE)
@@ -101,7 +101,7 @@ namespace Lucene.Net.Index
             ((TieredMergePolicy)w.Config.MergePolicy).ForceMergeDeletesPctAllowed = 10.0;
             w.ForceMergeDeletes();
             Assert.AreEqual(60, w.NumDocs());
-            Assert.AreEqual(60, w.MaxDoc());
+            Assert.AreEqual(60, w.MaxDoc);
             w.Dispose();
             dir.Dispose();
         }
@@ -178,8 +178,8 @@ namespace Lucene.Net.Index
 
             w.ForceMerge(1);
             IndexReader r = w.Reader;
-            Assert.AreEqual(numDocs, r.MaxDoc());
-            Assert.AreEqual(numDocs, r.NumDocs());
+            Assert.AreEqual(numDocs, r.MaxDoc);
+            Assert.AreEqual(numDocs, r.NumDocs);
             r.Dispose();
 
             if (VERBOSE)
@@ -190,15 +190,15 @@ namespace Lucene.Net.Index
             w.DeleteDocuments(new Term("id", "" + (42 + 17)));
 
             r = w.Reader;
-            Assert.AreEqual(numDocs, r.MaxDoc());
-            Assert.AreEqual(numDocs - 1, r.NumDocs());
+            Assert.AreEqual(numDocs, r.MaxDoc);
+            Assert.AreEqual(numDocs - 1, r.NumDocs);
             r.Dispose();
 
             w.ForceMergeDeletes();
 
             r = w.Reader;
-            Assert.AreEqual(numDocs - 1, r.MaxDoc());
-            Assert.AreEqual(numDocs - 1, r.NumDocs());
+            Assert.AreEqual(numDocs - 1, r.MaxDoc);
+            Assert.AreEqual(numDocs - 1, r.NumDocs);
             r.Dispose();
 
             w.Dispose();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Index/TestTransactionRollback.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestTransactionRollback.cs b/src/Lucene.Net.Tests/core/Index/TestTransactionRollback.cs
index 6851290..6a74c49 100644
--- a/src/Lucene.Net.Tests/core/Index/TestTransactionRollback.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestTransactionRollback.cs
@@ -99,7 +99,7 @@ namespace Lucene.Net.Index
             //Perhaps not the most efficient approach but meets our
             //needs here.
             Bits liveDocs = MultiFields.GetLiveDocs(r);
-            for (int i = 0; i < r.MaxDoc(); i++)
+            for (int i = 0; i < r.MaxDoc; i++)
             {
                 if (liveDocs == null || liveDocs.Get(i))
                 {
@@ -246,7 +246,7 @@ namespace Lucene.Net.Index
                 // should not work:
                 (new IndexWriter(Dir, NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random())).SetIndexDeletionPolicy(new DeleteLastCommitPolicy<IndexCommit>(this)))).Dispose();
                 IndexReader r = DirectoryReader.Open(Dir);
-                Assert.AreEqual(100, r.NumDocs());
+                Assert.AreEqual(100, r.NumDocs);
                 r.Dispose();
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Index/TestTransactions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestTransactions.cs b/src/Lucene.Net.Tests/core/Index/TestTransactions.cs
index c56ffb9..488472a 100644
--- a/src/Lucene.Net.Tests/core/Index/TestTransactions.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestTransactions.cs
@@ -243,9 +243,9 @@ namespace Lucene.Net.Index
                         return;
                     }
                 }
-                if (r1.NumDocs() != r2.NumDocs())
+                if (r1.NumDocs != r2.NumDocs)
                 {
-                    throw new Exception("doc counts differ: r1=" + r1.NumDocs() + " r2=" + r2.NumDocs());
+                    throw new Exception("doc counts differ: r1=" + r1.NumDocs + " r2=" + r2.NumDocs);
                 }
                 r1.Dispose();
                 r2.Dispose();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/MockFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/MockFilter.cs b/src/Lucene.Net.Tests/core/Search/MockFilter.cs
index 9ea51e0..a22148b 100644
--- a/src/Lucene.Net.Tests/core/Search/MockFilter.cs
+++ b/src/Lucene.Net.Tests/core/Search/MockFilter.cs
@@ -28,7 +28,7 @@ namespace Lucene.Net.Search
         public override DocIdSet GetDocIdSet(AtomicReaderContext context, Bits acceptDocs)
         {
             WasCalled_Renamed = true;
-            return new FixedBitSet(context.Reader().MaxDoc());
+            return new FixedBitSet(context.Reader.MaxDoc);
         }
 
         public virtual void Clear()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/SingleDocTestFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/SingleDocTestFilter.cs b/src/Lucene.Net.Tests/core/Search/SingleDocTestFilter.cs
index c051615..efc21ec 100644
--- a/src/Lucene.Net.Tests/core/Search/SingleDocTestFilter.cs
+++ b/src/Lucene.Net.Tests/core/Search/SingleDocTestFilter.cs
@@ -32,7 +32,7 @@ namespace Lucene.Net.Search
 
         public override DocIdSet GetDocIdSet(AtomicReaderContext context, Bits acceptDocs)
         {
-            FixedBitSet bits = new FixedBitSet(context.Reader().MaxDoc());
+            FixedBitSet bits = new FixedBitSet(context.Reader.MaxDoc);
             bits.Set(Doc);
             if (acceptDocs != null && !acceptDocs.Get(Doc))
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/Spans/MultiSpansWrapper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/Spans/MultiSpansWrapper.cs b/src/Lucene.Net.Tests/core/Search/Spans/MultiSpansWrapper.cs
index c9c2832..ad0f3e5 100644
--- a/src/Lucene.Net.Tests/core/Search/Spans/MultiSpansWrapper.cs
+++ b/src/Lucene.Net.Tests/core/Search/Spans/MultiSpansWrapper.cs
@@ -61,11 +61,11 @@ namespace Lucene.Net.Search.Spans
             {
                 termContexts[term] = TermContext.Build(topLevelReaderContext, term);
             }
-            IList<AtomicReaderContext> leaves = topLevelReaderContext.Leaves();
+            IList<AtomicReaderContext> leaves = topLevelReaderContext.Leaves;
             if (leaves.Count == 1)
             {
                 AtomicReaderContext ctx = leaves[0];
-                return query.GetSpans(ctx, ((AtomicReader)ctx.Reader()).LiveDocs, termContexts);
+                return query.GetSpans(ctx, ((AtomicReader)ctx.Reader).LiveDocs, termContexts);
             }
             return new MultiSpansWrapper(leaves, query, termContexts);
         }
@@ -79,7 +79,7 @@ namespace Lucene.Net.Search.Spans
             if (Current == null)
             {
                 AtomicReaderContext ctx = Leaves[LeafOrd];
-                Current = Query.GetSpans(ctx, ((AtomicReader)ctx.Reader()).LiveDocs, TermContexts);
+                Current = Query.GetSpans(ctx, ((AtomicReader)ctx.Reader).LiveDocs, TermContexts);
             }
             while (true)
             {
@@ -90,7 +90,7 @@ namespace Lucene.Net.Search.Spans
                 if (++LeafOrd < NumLeaves)
                 {
                     AtomicReaderContext ctx = Leaves[LeafOrd];
-                    Current = Query.GetSpans(ctx, ((AtomicReader)ctx.Reader()).LiveDocs, TermContexts);
+                    Current = Query.GetSpans(ctx, ((AtomicReader)ctx.Reader).LiveDocs, TermContexts);
                 }
                 else
                 {
@@ -113,13 +113,13 @@ namespace Lucene.Net.Search.Spans
             if (subIndex != LeafOrd)
             {
                 AtomicReaderContext ctx = Leaves[subIndex];
-                Current = Query.GetSpans(ctx, ((AtomicReader)ctx.Reader()).LiveDocs, TermContexts);
+                Current = Query.GetSpans(ctx, ((AtomicReader)ctx.Reader).LiveDocs, TermContexts);
                 LeafOrd = subIndex;
             }
             else if (Current == null)
             {
                 AtomicReaderContext ctx = Leaves[LeafOrd];
-                Current = Query.GetSpans(ctx, ((AtomicReader)ctx.Reader()).LiveDocs, TermContexts);
+                Current = Query.GetSpans(ctx, ((AtomicReader)ctx.Reader).LiveDocs, TermContexts);
             }
             while (true)
             {
@@ -138,7 +138,7 @@ namespace Lucene.Net.Search.Spans
                 if (++LeafOrd < NumLeaves)
                 {
                     AtomicReaderContext ctx = Leaves[LeafOrd];
-                    Current = Query.GetSpans(ctx, ((AtomicReader)ctx.Reader()).LiveDocs, TermContexts);
+                    Current = Query.GetSpans(ctx, ((AtomicReader)ctx.Reader).LiveDocs, TermContexts);
                 }
                 else
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/Spans/TestNearSpansOrdered.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/Spans/TestNearSpansOrdered.cs b/src/Lucene.Net.Tests/core/Search/Spans/TestNearSpansOrdered.cs
index 480e814..47d17f0 100644
--- a/src/Lucene.Net.Tests/core/Search/Spans/TestNearSpansOrdered.cs
+++ b/src/Lucene.Net.Tests/core/Search/Spans/TestNearSpansOrdered.cs
@@ -183,8 +183,8 @@ namespace Lucene.Net.Search.Spans
             SpanNearQuery q = MakeQuery();
             Weight w = Searcher.CreateNormalizedWeight(q);
             IndexReaderContext topReaderContext = Searcher.TopReaderContext;
-            AtomicReaderContext leave = topReaderContext.Leaves()[0];
-            Scorer s = w.Scorer(leave, ((AtomicReader)leave.Reader()).LiveDocs);
+            AtomicReaderContext leave = topReaderContext.Leaves[0];
+            Scorer s = w.Scorer(leave, ((AtomicReader)leave.Reader).LiveDocs);
             Assert.AreEqual(1, s.Advance(1));
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/Spans/TestSpans.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/Spans/TestSpans.cs b/src/Lucene.Net.Tests/core/Search/Spans/TestSpans.cs
index f0485b3..e4e7277 100644
--- a/src/Lucene.Net.Tests/core/Search/Spans/TestSpans.cs
+++ b/src/Lucene.Net.Tests/core/Search/Spans/TestSpans.cs
@@ -406,7 +406,7 @@ namespace Lucene.Net.Search.Spans
             bool ordered = true;
             int slop = 1;
             IndexReaderContext topReaderContext = Searcher.TopReaderContext;
-            IList<AtomicReaderContext> leaves = topReaderContext.Leaves();
+            IList<AtomicReaderContext> leaves = topReaderContext.Leaves;
             int subIndex = ReaderUtil.SubIndex(11, leaves);
             for (int i = 0, c = leaves.Count; i < c; i++)
             {
@@ -421,7 +421,7 @@ namespace Lucene.Net.Search.Spans
                     Searcher.Similarity = sim;
                     SpanNearQuery snq = new SpanNearQuery(new SpanQuery[] { MakeSpanTermQuery("t1"), MakeSpanTermQuery("t2") }, slop, ordered);
 
-                    spanScorer = Searcher.CreateNormalizedWeight(snq).Scorer(ctx, ((AtomicReader)ctx.Reader()).LiveDocs);
+                    spanScorer = Searcher.CreateNormalizedWeight(snq).Scorer(ctx, ((AtomicReader)ctx.Reader).LiveDocs);
                 }
                 finally
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/Spans/TestSpansAdvanced2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/Spans/TestSpansAdvanced2.cs b/src/Lucene.Net.Tests/core/Search/Spans/TestSpansAdvanced2.cs
index 1fdcaa7..69bee99 100644
--- a/src/Lucene.Net.Tests/core/Search/Spans/TestSpansAdvanced2.cs
+++ b/src/Lucene.Net.Tests/core/Search/Spans/TestSpansAdvanced2.cs
@@ -78,7 +78,7 @@ namespace Lucene.Net.Search.Spans
         public virtual void TestVerifyIndex()
         {
             IndexReader reader = DirectoryReader.Open(MDirectory);
-            Assert.AreEqual(8, reader.NumDocs());
+            Assert.AreEqual(8, reader.NumDocs);
             reader.Dispose();
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestBooleanOr.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestBooleanOr.cs b/src/Lucene.Net.Tests/core/Search/TestBooleanOr.cs
index f0373d6..778bb1b 100644
--- a/src/Lucene.Net.Tests/core/Search/TestBooleanOr.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestBooleanOr.cs
@@ -195,8 +195,8 @@ namespace Lucene.Net.Search
 
             Weight w = s.CreateNormalizedWeight(bq);
 
-            Assert.AreEqual(1, s.IndexReader.Leaves().Count);
-            BulkScorer scorer = w.BulkScorer(s.IndexReader.Leaves()[0], false, null);
+            Assert.AreEqual(1, s.IndexReader.Leaves.Count);
+            BulkScorer scorer = w.BulkScorer(s.IndexReader.Leaves[0], false, null);
 
             FixedBitSet hits = new FixedBitSet(docCount);
             AtomicInteger end = new AtomicInteger();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestCachingWrapperFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestCachingWrapperFilter.cs b/src/Lucene.Net.Tests/core/Search/TestCachingWrapperFilter.cs
index b4f2a4e..393ddab 100644
--- a/src/Lucene.Net.Tests/core/Search/TestCachingWrapperFilter.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestCachingWrapperFilter.cs
@@ -82,13 +82,13 @@ namespace Lucene.Net.Search
         private void AssertFilterEquals(Filter f1, Filter f2)
         {
             Query query = new MatchAllDocsQuery();
-            TopDocs hits1 = @is.Search(query, f1, Ir.MaxDoc());
-            TopDocs hits2 = @is.Search(query, f2, Ir.MaxDoc());
+            TopDocs hits1 = @is.Search(query, f1, Ir.MaxDoc);
+            TopDocs hits2 = @is.Search(query, f2, Ir.MaxDoc);
             Assert.AreEqual(hits1.TotalHits, hits2.TotalHits);
             CheckHits.CheckEqual(query, hits1.ScoreDocs, hits2.ScoreDocs);
             // now do it again to confirm caching works
-            TopDocs hits3 = @is.Search(query, f1, Ir.MaxDoc());
-            TopDocs hits4 = @is.Search(query, f2, Ir.MaxDoc());
+            TopDocs hits3 = @is.Search(query, f1, Ir.MaxDoc);
+            TopDocs hits4 = @is.Search(query, f2, Ir.MaxDoc);
             Assert.AreEqual(hits3.TotalHits, hits4.TotalHits);
             CheckHits.CheckEqual(query, hits3.ScoreDocs, hits4.ScoreDocs);
         }
@@ -134,7 +134,7 @@ namespace Lucene.Net.Search
         {
             for (int i = 0; i < 10; i++)
             {
-                int id = Random().Next(Ir.MaxDoc());
+                int id = Random().Next(Ir.MaxDoc);
                 Query query = new TermQuery(new Term("id", Convert.ToString(id)));
                 Filter expected = new QueryWrapperFilter(query);
                 Filter actual = new CachingWrapperFilter(expected);
@@ -149,7 +149,7 @@ namespace Lucene.Net.Search
         {
             for (int i = 0; i < 10; i++)
             {
-                int id_start = Random().Next(Ir.MaxDoc() - 1);
+                int id_start = Random().Next(Ir.MaxDoc - 1);
                 int id_end = id_start + 1;
                 Query query = TermRangeQuery.NewStringRange("id", Convert.ToString(id_start), Convert.ToString(id_end), true, true);
                 Filter expected = new QueryWrapperFilter(query);
@@ -182,15 +182,15 @@ namespace Lucene.Net.Search
             CachingWrapperFilter cacher = new CachingWrapperFilter(filter);
 
             // first time, nested filter is called
-            DocIdSet strongRef = cacher.GetDocIdSet(context, ((AtomicReader)context.Reader()).LiveDocs);
+            DocIdSet strongRef = cacher.GetDocIdSet(context, (context.AtomicReader).LiveDocs);
             Assert.IsTrue(filter.WasCalled(), "first time");
 
             // make sure no exception if cache is holding the wrong docIdSet
-            cacher.GetDocIdSet(context, ((AtomicReader)context.Reader()).LiveDocs);
+            cacher.GetDocIdSet(context, (context.AtomicReader).LiveDocs);
 
             // second time, nested filter should not be called
             filter.Clear();
-            cacher.GetDocIdSet(context, ((AtomicReader)context.Reader()).LiveDocs);
+            cacher.GetDocIdSet(context, (context.AtomicReader).LiveDocs);
             Assert.IsFalse(filter.WasCalled(), "second time");
 
             reader.Dispose();
@@ -211,8 +211,8 @@ namespace Lucene.Net.Search
             CachingWrapperFilter cacher = new CachingWrapperFilter(filter);
 
             // the caching filter should return the empty set constant
-            //Assert.IsNull(cacher.GetDocIdSet(context, "second time", ((AtomicReader)context.Reader()).LiveDocs));
-            Assert.IsNull(cacher.GetDocIdSet(context, ((AtomicReader)context.Reader()).LiveDocs));
+            //Assert.IsNull(cacher.GetDocIdSet(context, "second time", (context.AtomicReader).LiveDocs));
+            Assert.IsNull(cacher.GetDocIdSet(context, (context.AtomicReader).LiveDocs));
 
             reader.Dispose();
             dir.Dispose();
@@ -250,7 +250,7 @@ namespace Lucene.Net.Search
             CachingWrapperFilter cacher = new CachingWrapperFilter(filter);
 
             // the caching filter should return the empty set constant
-            Assert.IsNull(cacher.GetDocIdSet(context, ((AtomicReader)context.Reader()).LiveDocs));
+            Assert.IsNull(cacher.GetDocIdSet(context, (context.AtomicReader).LiveDocs));
 
             reader.Dispose();
             dir.Dispose();
@@ -294,8 +294,8 @@ namespace Lucene.Net.Search
             Assert.IsTrue(reader.Context is AtomicReaderContext);
             AtomicReaderContext context = (AtomicReaderContext)reader.Context;
             CachingWrapperFilter cacher = new CachingWrapperFilter(filter);
-            DocIdSet originalSet = filter.GetDocIdSet(context, ((AtomicReader)context.Reader()).LiveDocs);
-            DocIdSet cachedSet = cacher.GetDocIdSet(context, ((AtomicReader)context.Reader()).LiveDocs);
+            DocIdSet originalSet = filter.GetDocIdSet(context, (context.AtomicReader).LiveDocs);
+            DocIdSet cachedSet = cacher.GetDocIdSet(context, (context.AtomicReader).LiveDocs);
             if (originalSet == null)
             {
                 Assert.IsNull(cachedSet);
@@ -354,7 +354,7 @@ namespace Lucene.Net.Search
 
             public override DocIdSet GetDocIdSet(AtomicReaderContext context, Bits acceptDocs)
             {
-                return new FixedBitSet(context.Reader().MaxDoc());
+                return new FixedBitSet(context.Reader.MaxDoc);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestDisjunctionMaxQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestDisjunctionMaxQuery.cs b/src/Lucene.Net.Tests/core/Search/TestDisjunctionMaxQuery.cs
index 8e31fec..9225131 100644
--- a/src/Lucene.Net.Tests/core/Search/TestDisjunctionMaxQuery.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestDisjunctionMaxQuery.cs
@@ -189,7 +189,7 @@ namespace Lucene.Net.Search
             Assert.IsTrue(s.TopReaderContext is AtomicReaderContext);
             Weight dw = s.CreateNormalizedWeight(dq);
             AtomicReaderContext context = (AtomicReaderContext)s.TopReaderContext;
-            Scorer ds = dw.Scorer(context, ((AtomicReader)context.Reader()).LiveDocs);
+            Scorer ds = dw.Scorer(context, (context.AtomicReader).LiveDocs);
             bool skipOk = ds.Advance(3) != DocIdSetIterator.NO_MORE_DOCS;
             if (skipOk)
             {
@@ -207,7 +207,7 @@ namespace Lucene.Net.Search
             QueryUtils.Check(Random(), dq, s);
             Weight dw = s.CreateNormalizedWeight(dq);
             AtomicReaderContext context = (AtomicReaderContext)s.TopReaderContext;
-            Scorer ds = dw.Scorer(context, ((AtomicReader)context.Reader()).LiveDocs);
+            Scorer ds = dw.Scorer(context, (context.AtomicReader).LiveDocs);
             Assert.IsTrue(ds.Advance(3) != DocIdSetIterator.NO_MORE_DOCS, "firsttime skipTo found no match");
             Assert.AreEqual("d4", r.Document(ds.DocID()).Get("id"), "found wrong docid");
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestDocValuesScoring.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestDocValuesScoring.cs b/src/Lucene.Net.Tests/core/Search/TestDocValuesScoring.cs
index 009d91d..4bc33b2 100644
--- a/src/Lucene.Net.Tests/core/Search/TestDocValuesScoring.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestDocValuesScoring.cs
@@ -183,7 +183,7 @@ namespace Lucene.Net.Search
             public override SimScorer DoSimScorer(SimWeight stats, AtomicReaderContext context)
             {
                 SimScorer sub = Sim.DoSimScorer(stats, context);
-                FieldCache_Fields.Floats values = FieldCache_Fields.DEFAULT.GetFloats((AtomicReader)context.Reader(), BoostField, false);
+                FieldCache_Fields.Floats values = FieldCache_Fields.DEFAULT.GetFloats(context.AtomicReader, BoostField, false);
 
                 return new SimScorerAnonymousInnerClassHelper(this, sub, values);
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestElevationComparator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestElevationComparator.cs b/src/Lucene.Net.Tests/core/Search/TestElevationComparator.cs
index 7a016bb..d641ae7 100644
--- a/src/Lucene.Net.Tests/core/Search/TestElevationComparator.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestElevationComparator.cs
@@ -222,7 +222,7 @@ namespace Lucene.Net.Search
 
             public override FieldComparator SetNextReader(AtomicReaderContext context)
             {
-                idIndex = FieldCache_Fields.DEFAULT.GetTermsIndex((AtomicReader)context.Reader(), Fieldname);
+                idIndex = FieldCache_Fields.DEFAULT.GetTermsIndex(context.AtomicReader, Fieldname);
                 return this;
             }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs b/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs
index 1593605..1acffbd 100644
--- a/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestFieldCacheRangeFilter.cs
@@ -55,7 +55,7 @@ namespace Lucene.Net.Search
             string maxIP = Pad(MaxId);
             string medIP = Pad(medId);
 
-            int numDocs = reader.NumDocs();
+            int numDocs = reader.NumDocs;
 
             Assert.AreEqual(numDocs, 1 + MaxId - MinId, "num of docs");
 
@@ -136,7 +136,7 @@ namespace Lucene.Net.Search
             string minRP = Pad(SignedIndexDir.MinR);
             string maxRP = Pad(SignedIndexDir.MaxR);
 
-            int numDocs = reader.NumDocs();
+            int numDocs = reader.NumDocs;
 
             Assert.AreEqual(numDocs, 1 + MaxId - MinId, "num of docs");
 
@@ -197,7 +197,7 @@ namespace Lucene.Net.Search
             IndexReader reader = SignedIndexReader;
             IndexSearcher search = NewSearcher(reader);
 
-            int numDocs = reader.NumDocs();
+            int numDocs = reader.NumDocs;
             int medId = ((MaxId - MinId) / 2);
             short? minIdO = Convert.ToInt16((short)MinId);
             short? maxIdO = Convert.ToInt16((short)MaxId);
@@ -287,7 +287,7 @@ namespace Lucene.Net.Search
             IndexReader reader = SignedIndexReader;
             IndexSearcher search = NewSearcher(reader);
 
-            int numDocs = reader.NumDocs();
+            int numDocs = reader.NumDocs;
             int medId = ((MaxId - MinId) / 2);
             int? minIdO = Convert.ToInt32(MinId);
             int? maxIdO = Convert.ToInt32(MaxId);
@@ -378,7 +378,7 @@ namespace Lucene.Net.Search
             IndexReader reader = SignedIndexReader;
             IndexSearcher search = NewSearcher(reader);
 
-            int numDocs = reader.NumDocs();
+            int numDocs = reader.NumDocs;
             int medId = ((MaxId - MinId) / 2);
             long? minIdO = Convert.ToInt64(MinId);
             long? maxIdO = Convert.ToInt64(MaxId);
@@ -471,7 +471,7 @@ namespace Lucene.Net.Search
             IndexReader reader = SignedIndexReader;
             IndexSearcher search = NewSearcher(reader);
 
-            int numDocs = reader.NumDocs();
+            int numDocs = reader.NumDocs;
             float? minIdO = Convert.ToSingle(MinId + .5f);
             float? medIdO = Convert.ToSingle((float)minIdO + ((MaxId - MinId)) / 2.0f);
 
@@ -500,7 +500,7 @@ namespace Lucene.Net.Search
             IndexReader reader = SignedIndexReader;
             IndexSearcher search = NewSearcher(reader);
 
-            int numDocs = reader.NumDocs();
+            int numDocs = reader.NumDocs;
             double? minIdO = Convert.ToDouble(MinId + .5);
             double? medIdO = Convert.ToDouble((float)minIdO + ((MaxId - MinId)) / 2.0);
 
@@ -544,7 +544,7 @@ namespace Lucene.Net.Search
 
             IndexReader reader = DirectoryReader.Open(dir);
             IndexSearcher search = NewSearcher(reader);
-            Assert.IsTrue(reader.HasDeletions());
+            Assert.IsTrue(reader.HasDeletions);
 
             ScoreDoc[] result;
             Query q = new TermQuery(new Term("body", "body"));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestFieldCacheTermsFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestFieldCacheTermsFilter.cs b/src/Lucene.Net.Tests/core/Search/TestFieldCacheTermsFilter.cs
index b8f20ec..c6a10b6 100644
--- a/src/Lucene.Net.Tests/core/Search/TestFieldCacheTermsFilter.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestFieldCacheTermsFilter.cs
@@ -53,7 +53,7 @@ namespace Lucene.Net.Search
             w.Dispose();
 
             IndexSearcher searcher = NewSearcher(reader);
-            int numDocs = reader.NumDocs();
+            int numDocs = reader.NumDocs;
             ScoreDoc[] results;
             MatchAllDocsQuery q = new MatchAllDocsQuery();
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestFilteredQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestFilteredQuery.cs b/src/Lucene.Net.Tests/core/Search/TestFilteredQuery.cs
index 22cc51f..6aeb7fc 100644
--- a/src/Lucene.Net.Tests/core/Search/TestFilteredQuery.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestFilteredQuery.cs
@@ -516,13 +516,13 @@ namespace Lucene.Net.Search
             public override DocIdSet GetDocIdSet(AtomicReaderContext context, Bits acceptDocs)
             {
                 bool nullBitset = Random().Next(10) == 5;
-                AtomicReader reader = (AtomicReader)context.Reader();
+                AtomicReader reader = context.AtomicReader;
                 DocsEnum termDocsEnum = reader.TermDocsEnum(new Term("field", "0"));
                 if (termDocsEnum == null)
                 {
                     return null; // no docs -- return null
                 }
-                BitArray bitSet = new BitArray(reader.MaxDoc());
+                BitArray bitSet = new BitArray(reader.MaxDoc);
                 int d;
                 while ((d = termDocsEnum.NextDoc()) != DocsEnum.NO_MORE_DOCS)
                 {
@@ -656,7 +656,7 @@ namespace Lucene.Net.Search
 
                 public override DocIdSetIterator GetIterator()
                 {
-                    DocsEnum termDocsEnum = ((AtomicReader)Context.Reader()).TermDocsEnum(new Term("field", "0"));
+                    DocsEnum termDocsEnum = ((AtomicReader)Context.Reader).TermDocsEnum(new Term("field", "0"));
                     if (termDocsEnum == null)
                     {
                         return null;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestFilteredSearch.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestFilteredSearch.cs b/src/Lucene.Net.Tests/core/Search/TestFilteredSearch.cs
index a0ceb78..54364b6 100644
--- a/src/Lucene.Net.Tests/core/Search/TestFilteredSearch.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestFilteredSearch.cs
@@ -94,9 +94,9 @@ namespace Lucene.Net.Search
             public override DocIdSet GetDocIdSet(AtomicReaderContext context, Bits acceptDocs)
             {
                 Assert.IsNull(acceptDocs, "acceptDocs should be null, as we have an index without deletions");
-                FixedBitSet set = new FixedBitSet(context.Reader().MaxDoc());
+                FixedBitSet set = new FixedBitSet(context.Reader.MaxDoc);
                 int docBase = context.DocBase;
-                int limit = docBase + context.Reader().MaxDoc();
+                int limit = docBase + context.Reader.MaxDoc;
                 for (int index = 0; index < Docs.Length; index++)
                 {
                     int docId = Docs[index];

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestIndexSearcher.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestIndexSearcher.cs b/src/Lucene.Net.Tests/core/Search/TestIndexSearcher.cs
index 42ba59e..b14ccb3 100644
--- a/src/Lucene.Net.Tests/core/Search/TestIndexSearcher.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestIndexSearcher.cs
@@ -125,7 +125,7 @@ namespace Lucene.Net.Search
             IndexSearcher s = new IndexSearcher(r);
             try
             {
-                s.SearchAfter(new ScoreDoc(r.MaxDoc(), 0.54f), new MatchAllDocsQuery(), 10);
+                s.SearchAfter(new ScoreDoc(r.MaxDoc, 0.54f), new MatchAllDocsQuery(), 10);
                 Assert.Fail("should have hit IllegalArgumentException when searchAfter exceeds maxDoc");
             }
             catch (System.ArgumentException e)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestMinShouldMatch2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestMinShouldMatch2.cs b/src/Lucene.Net.Tests/core/Search/TestMinShouldMatch2.cs
index 794385f..b485737 100644
--- a/src/Lucene.Net.Tests/core/Search/TestMinShouldMatch2.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestMinShouldMatch2.cs
@@ -344,7 +344,7 @@ namespace Lucene.Net.Search
                 : base(weight)
             {
                 this.Dv = reader.GetSortedSetDocValues("dv");
-                this.MaxDoc = reader.MaxDoc();
+                this.MaxDoc = reader.MaxDoc;
                 BooleanQuery bq = (BooleanQuery)weight.Query;
                 this.MinNrShouldMatch = bq.MinimumNumberShouldMatch;
                 this.Sims = new SimScorer[(int)Dv.ValueCount];

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestMultiTermConstantScore.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestMultiTermConstantScore.cs b/src/Lucene.Net.Tests/core/Search/TestMultiTermConstantScore.cs
index 12bc29d..f120af5 100644
--- a/src/Lucene.Net.Tests/core/Search/TestMultiTermConstantScore.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestMultiTermConstantScore.cs
@@ -371,7 +371,7 @@ namespace Lucene.Net.Search
             string maxIP = Pad(MaxId);
             string medIP = Pad(medId);
 
-            int numDocs = reader.NumDocs();
+            int numDocs = reader.NumDocs;
 
             AssertEquals("num of docs", numDocs, 1 + MaxId - MinId);
 
@@ -497,7 +497,7 @@ namespace Lucene.Net.Search
             string minRP = Pad(SignedIndexDir.MinR);
             string maxRP = Pad(SignedIndexDir.MaxR);
 
-            int numDocs = reader.NumDocs();
+            int numDocs = reader.NumDocs;
 
             AssertEquals("num of docs", numDocs, 1 + MaxId - MinId);
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestMultiThreadTermVectors.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestMultiThreadTermVectors.cs b/src/Lucene.Net.Tests/core/Search/TestMultiThreadTermVectors.cs
index f2200ab..795b28a 100644
--- a/src/Lucene.Net.Tests/core/Search/TestMultiThreadTermVectors.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestMultiThreadTermVectors.cs
@@ -199,7 +199,7 @@ namespace Lucene.Net.Search
         private void TestTermVectors()
         {
             // check:
-            int numDocs = Reader.NumDocs();
+            int numDocs = Reader.NumDocs;
             long start = 0L;
             for (int docId = 0; docId < numDocs; docId++)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestNumericRangeQuery32.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestNumericRangeQuery32.cs b/src/Lucene.Net.Tests/core/Search/TestNumericRangeQuery32.cs
index 7c4508f..4975180 100644
--- a/src/Lucene.Net.Tests/core/Search/TestNumericRangeQuery32.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestNumericRangeQuery32.cs
@@ -217,11 +217,11 @@ namespace Lucene.Net.Search
         {
             AtomicReaderContext context = (AtomicReaderContext)SlowCompositeReaderWrapper.Wrap(Reader).Context;
             NumericRangeFilter<int> f = NumericRangeFilter.NewIntRange("field8", 8, 1000, -1000, true, true);
-            Assert.IsNull(f.GetDocIdSet(context, ((AtomicReader)context.Reader()).LiveDocs), "A inverse range should return the null instance");
+            Assert.IsNull(f.GetDocIdSet(context, (context.AtomicReader).LiveDocs), "A inverse range should return the null instance");
             f = NumericRangeFilter.NewIntRange("field8", 8, int.MaxValue, null, false, false);
-            Assert.IsNull(f.GetDocIdSet(context, ((AtomicReader)context.Reader()).LiveDocs), "A exclusive range starting with Integer.MAX_VALUE should return the null instance");
+            Assert.IsNull(f.GetDocIdSet(context, (context.AtomicReader).LiveDocs), "A exclusive range starting with Integer.MAX_VALUE should return the null instance");
             f = NumericRangeFilter.NewIntRange("field8", 8, null, int.MinValue, false, false);
-            Assert.IsNull(f.GetDocIdSet(context, ((AtomicReader)context.Reader()).LiveDocs), "A exclusive range ending with Integer.MIN_VALUE should return the null instance");
+            Assert.IsNull(f.GetDocIdSet(context, (context.AtomicReader).LiveDocs), "A exclusive range ending with Integer.MIN_VALUE should return the null instance");
         }
 
         [Test]

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestNumericRangeQuery64.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestNumericRangeQuery64.cs b/src/Lucene.Net.Tests/core/Search/TestNumericRangeQuery64.cs
index 26d7d5e..4d0ce31 100644
--- a/src/Lucene.Net.Tests/core/Search/TestNumericRangeQuery64.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestNumericRangeQuery64.cs
@@ -232,11 +232,11 @@ namespace Lucene.Net.Search
         {
             AtomicReaderContext context = (AtomicReaderContext)SlowCompositeReaderWrapper.Wrap(Searcher.IndexReader).Context;
             NumericRangeFilter<long> f = NumericRangeFilter.NewLongRange("field8", 8, 1000L, -1000L, true, true);
-            Assert.IsNull(f.GetDocIdSet(context, ((AtomicReader)context.Reader()).LiveDocs), "A inverse range should return the null instance");
+            Assert.IsNull(f.GetDocIdSet(context, (context.AtomicReader).LiveDocs), "A inverse range should return the null instance");
             f = NumericRangeFilter.NewLongRange("field8", 8, long.MaxValue, null, false, false);
-            Assert.IsNull(f.GetDocIdSet(context, ((AtomicReader)context.Reader()).LiveDocs), "A exclusive range starting with Long.MAX_VALUE should return the null instance");
+            Assert.IsNull(f.GetDocIdSet(context, (context.AtomicReader).LiveDocs), "A exclusive range starting with Long.MAX_VALUE should return the null instance");
             f = NumericRangeFilter.NewLongRange("field8", 8, null, long.MinValue, false, false);
-            Assert.IsNull(f.GetDocIdSet(context, ((AtomicReader)context.Reader()).LiveDocs), "A exclusive range ending with Long.MIN_VALUE should return the null instance");
+            Assert.IsNull(f.GetDocIdSet(context, (context.AtomicReader).LiveDocs), "A exclusive range ending with Long.MIN_VALUE should return the null instance");
         }
 
         [Test]

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestQueryRescorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestQueryRescorer.cs b/src/Lucene.Net.Tests/core/Search/TestQueryRescorer.cs
index 2f47533..6655e57 100644
--- a/src/Lucene.Net.Tests/core/Search/TestQueryRescorer.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestQueryRescorer.cs
@@ -538,7 +538,7 @@ namespace Lucene.Net.Search
                     public override int NextDoc()
                     {
                         docID++;
-                        if (docID >= Context.Reader().MaxDoc())
+                        if (docID >= Context.Reader.MaxDoc)
                         {
                             return NO_MORE_DOCS;
                         }
@@ -553,7 +553,7 @@ namespace Lucene.Net.Search
 
                     public override float Score()
                     {
-                        int num = OuterInstance.OuterInstance.IdToNum[Convert.ToInt32(Context.Reader().Document(docID).Get("id"))];
+                        int num = OuterInstance.OuterInstance.IdToNum[Convert.ToInt32(Context.Reader.Document(docID).Get("id"))];
                         if (OuterInstance.OuterInstance.Reverse)
                         {
                             //System.out.println("score doc=" + docID + " num=" + num);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestSameScoresWithThreads.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSameScoresWithThreads.cs b/src/Lucene.Net.Tests/core/Search/TestSameScoresWithThreads.cs
index cc737b0..4541437 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSameScoresWithThreads.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSameScoresWithThreads.cs
@@ -61,7 +61,7 @@ namespace Lucene.Net.Search
                 //System.out.println("  bytes=" + charsIndexed + " add: " + doc);
             }
             IndexReader r = w.Reader;
-            //System.out.println("numDocs=" + r.NumDocs());
+            //System.out.println("numDocs=" + r.NumDocs);
             w.Dispose();
 
             IndexSearcher s = NewSearcher(r);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestSearchAfter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSearchAfter.cs b/src/Lucene.Net.Tests/core/Search/TestSearchAfter.cs
index 40412e0..3094f51 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSearchAfter.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSearchAfter.cs
@@ -239,7 +239,7 @@ namespace Lucene.Net.Search
 
         internal virtual void AssertQuery(Query query, Filter filter, Sort sort)
         {
-            int maxDoc = Searcher.IndexReader.MaxDoc();
+            int maxDoc = Searcher.IndexReader.MaxDoc;
             TopDocs all;
             int pageSize = TestUtil.NextInt(Random(), 1, maxDoc * 2);
             if (VERBOSE)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestSearcherManager.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSearcherManager.cs b/src/Lucene.Net.Tests/core/Search/TestSearcherManager.cs
index db23ef7..9c249e2 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSearcherManager.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSearcherManager.cs
@@ -223,7 +223,7 @@ namespace Lucene.Net.Search
                 if (s == null)
                 {
                     s = Mgr.Acquire();
-                    if (s.IndexReader.NumDocs() != 0)
+                    if (s.IndexReader.NumDocs != 0)
                     {
                         long token = LifetimeMGR.Record(s);
                         lock (PastSearchers)
@@ -278,7 +278,7 @@ namespace Lucene.Net.Search
             IndexSearcher searcher = searcherManager.Acquire();
             try
             {
-                Assert.AreEqual(1, searcher.IndexReader.NumDocs());
+                Assert.AreEqual(1, searcher.IndexReader.NumDocs);
             }
             finally
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestShardSearching.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestShardSearching.cs b/src/Lucene.Net.Tests/core/Search/TestShardSearching.cs
index bf85011..67b31c3 100644
--- a/src/Lucene.Net.Tests/core/Search/TestShardSearching.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestShardSearching.cs
@@ -167,7 +167,7 @@ namespace Lucene.Net.Search
                                 throw new SearcherExpiredException("nodeID=" + nodeID + " version=" + subVersion);
                             }
                             subs[nodeID] = sub.IndexReader;
-                            docCount += subs[nodeID].MaxDoc();
+                            docCount += subs[nodeID].MaxDoc;
                         }
                     }
                     catch (SearcherExpiredException see)
@@ -215,7 +215,7 @@ namespace Lucene.Net.Search
 
                         if (VERBOSE)
                         {
-                            Console.WriteLine("  maxDoc=" + mockReader.MaxDoc());
+                            Console.WriteLine("  maxDoc=" + mockReader.MaxDoc);
                         }
 
                         if (terms != null)
@@ -387,7 +387,7 @@ namespace Lucene.Net.Search
 
             int numNodes = shardSearcher.NodeVersions.Length;
             int[] @base = new int[numNodes];
-            IList<IndexReaderContext> subs = mockSearcher.TopReaderContext.Children();
+            IList<IndexReaderContext> subs = mockSearcher.TopReaderContext.Children;
             Assert.AreEqual(numNodes, subs.Count);
 
             for (int nodeID = 0; nodeID < numNodes; nodeID++)
@@ -399,7 +399,7 @@ namespace Lucene.Net.Search
             {
                 /*
                 for(int shardID=0;shardID<shardSearchers.Length;shardID++) {
-                  System.out.println("  shard=" + shardID + " maxDoc=" + shardSearchers[shardID].searcher.getIndexReader().MaxDoc());
+                  System.out.println("  shard=" + shardID + " maxDoc=" + shardSearchers[shardID].searcher.getIndexReader().MaxDoc);
                 }
                 */
                 Console.WriteLine("  single searcher: " + hits.TotalHits + " totalHits maxScore=" + hits.MaxScore);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestSimilarityProvider.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSimilarityProvider.cs b/src/Lucene.Net.Tests/core/Search/TestSimilarityProvider.cs
index 0a3d4fa..4d6b603 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSimilarityProvider.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSimilarityProvider.cs
@@ -88,7 +88,7 @@ namespace Lucene.Net.Search
             AtomicReader slow = SlowCompositeReaderWrapper.Wrap(Reader);
             NumericDocValues fooNorms = slow.GetNormValues("foo");
             NumericDocValues barNorms = slow.GetNormValues("bar");
-            for (int i = 0; i < slow.MaxDoc(); i++)
+            for (int i = 0; i < slow.MaxDoc; i++)
             {
                 Assert.IsFalse(fooNorms.Get(i) == barNorms.Get(i));
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestSortRandom.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSortRandom.cs b/src/Lucene.Net.Tests/core/Search/TestSortRandom.cs
index 54f3a77..e8a8ed1 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSortRandom.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSortRandom.cs
@@ -186,7 +186,7 @@ namespace Lucene.Net.Search
                 {
                     sort = new Sort(sf, SortField.FIELD_DOC);
                 }
-                int hitCount = TestUtil.NextInt(random, 1, r.MaxDoc() + 20);
+                int hitCount = TestUtil.NextInt(random, 1, r.MaxDoc + 20);
                 RandomFilter f = new RandomFilter(random, (float)random.NextDouble(), docValues);
                 int queryType = random.Next(3);
                 if (queryType == 0)
@@ -345,8 +345,8 @@ namespace Lucene.Net.Search
 
             public override DocIdSet GetDocIdSet(AtomicReaderContext context, Bits acceptDocs)
             {
-                int maxDoc = context.Reader().MaxDoc();
-                FieldCache_Fields.Ints idSource = FieldCache_Fields.DEFAULT.GetInts((AtomicReader)context.Reader(), "id", false);
+                int maxDoc = context.Reader.MaxDoc;
+                FieldCache_Fields.Ints idSource = FieldCache_Fields.DEFAULT.GetInts(context.AtomicReader, "id", false);
                 Assert.IsNotNull(idSource);
                 FixedBitSet bits = new FixedBitSet(maxDoc);
                 for (int docID = 0; docID < maxDoc; docID++)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestSubScorerFreqs.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSubScorerFreqs.cs b/src/Lucene.Net.Tests/core/Search/TestSubScorerFreqs.cs
index fedd22a..ce857e3 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSubScorerFreqs.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSubScorerFreqs.cs
@@ -147,7 +147,7 @@ namespace Lucene.Net.Search
             TermQuery q = new TermQuery(new Term("f", "d"));
             CountingCollector c = new CountingCollector(TopScoreDocCollector.Create(10, true));
             s.Search(q, null, c);
-            int maxDocs = s.IndexReader.MaxDoc();
+            int maxDocs = s.IndexReader.MaxDoc;
             Assert.AreEqual(maxDocs, c.DocCounts.Count);
             for (int i = 0; i < maxDocs; i++)
             {
@@ -186,7 +186,7 @@ namespace Lucene.Net.Search
             {
                 CountingCollector c = new CountingCollector(TopScoreDocCollector.Create(10, true), occur);
                 s.Search(query, null, c);
-                int maxDocs = s.IndexReader.MaxDoc();
+                int maxDocs = s.IndexReader.MaxDoc;
                 Assert.AreEqual(maxDocs, c.DocCounts.Count);
                 bool includeOptional = occur.Contains("SHOULD");
                 for (int i = 0; i < maxDocs; i++)
@@ -220,7 +220,7 @@ namespace Lucene.Net.Search
             q.Add(new Term("f", "c"));
             CountingCollector c = new CountingCollector(TopScoreDocCollector.Create(10, true));
             s.Search(q, null, c);
-            int maxDocs = s.IndexReader.MaxDoc();
+            int maxDocs = s.IndexReader.MaxDoc;
             Assert.AreEqual(maxDocs, c.DocCounts.Count);
             for (int i = 0; i < maxDocs; i++)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs b/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs
index cf74384..bb1c4d0 100644
--- a/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestTermRangeFilter.cs
@@ -46,7 +46,7 @@ namespace Lucene.Net.Search
             string maxIP = Pad(MaxId);
             string medIP = Pad(medId);
 
-            int numDocs = reader.NumDocs();
+            int numDocs = reader.NumDocs;
 
             Assert.AreEqual(numDocs, 1 + MaxId - MinId, "num of docs");
 
@@ -125,7 +125,7 @@ namespace Lucene.Net.Search
             string minRP = Pad(SignedIndexDir.MinR);
             string maxRP = Pad(SignedIndexDir.MaxR);
 
-            int numDocs = reader.NumDocs();
+            int numDocs = reader.NumDocs;
 
             Assert.AreEqual(numDocs, 1 + MaxId - MinId, "num of docs");
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestTermScorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestTermScorer.cs b/src/Lucene.Net.Tests/core/Search/TestTermScorer.cs
index 1c3aafb..4334ee1 100644
--- a/src/Lucene.Net.Tests/core/Search/TestTermScorer.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestTermScorer.cs
@@ -81,7 +81,7 @@ namespace Lucene.Net.Search
             Weight weight = IndexSearcher.CreateNormalizedWeight(termQuery);
             Assert.IsTrue(IndexSearcher.TopReaderContext is AtomicReaderContext);
             AtomicReaderContext context = (AtomicReaderContext)IndexSearcher.TopReaderContext;
-            BulkScorer ts = weight.BulkScorer(context, true, ((AtomicReader)context.Reader()).LiveDocs);
+            BulkScorer ts = weight.BulkScorer(context, true, (context.AtomicReader).LiveDocs);
             // we have 2 documents with the term all in them, one document for all the
             // other values
             IList<TestHit> docs = new List<TestHit>();
@@ -163,7 +163,7 @@ namespace Lucene.Net.Search
             Weight weight = IndexSearcher.CreateNormalizedWeight(termQuery);
             Assert.IsTrue(IndexSearcher.TopReaderContext is AtomicReaderContext);
             AtomicReaderContext context = (AtomicReaderContext)IndexSearcher.TopReaderContext;
-            Scorer ts = weight.Scorer(context, ((AtomicReader)context.Reader()).LiveDocs);
+            Scorer ts = weight.Scorer(context, (context.AtomicReader).LiveDocs);
             Assert.IsTrue(ts.NextDoc() != DocIdSetIterator.NO_MORE_DOCS, "next did not return a doc");
             Assert.IsTrue(ts.Score() == 1.6931472f, "score is not correct");
             Assert.IsTrue(ts.NextDoc() != DocIdSetIterator.NO_MORE_DOCS, "next did not return a doc");
@@ -180,7 +180,7 @@ namespace Lucene.Net.Search
             Weight weight = IndexSearcher.CreateNormalizedWeight(termQuery);
             Assert.IsTrue(IndexSearcher.TopReaderContext is AtomicReaderContext);
             AtomicReaderContext context = (AtomicReaderContext)IndexSearcher.TopReaderContext;
-            Scorer ts = weight.Scorer(context, ((AtomicReader)context.Reader()).LiveDocs);
+            Scorer ts = weight.Scorer(context, (context.AtomicReader).LiveDocs);
             Assert.IsTrue(ts.Advance(3) != DocIdSetIterator.NO_MORE_DOCS, "Didn't skip");
             // The next doc should be doc 5
             Assert.IsTrue(ts.DocID() == 5, "doc should be number 5");

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestTermVectors.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestTermVectors.cs b/src/Lucene.Net.Tests/core/Search/TestTermVectors.cs
index f3db406..959b7c0 100644
--- a/src/Lucene.Net.Tests/core/Search/TestTermVectors.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestTermVectors.cs
@@ -139,7 +139,7 @@ namespace Lucene.Net.Search
 
             Fields vectors = searcher.IndexReader.GetTermVectors(hits[0].Doc);
             Assert.IsNotNull(vectors);
-            Assert.AreEqual(1, vectors.Size());
+            Assert.AreEqual(1, vectors.Size);
             Terms vector = vectors.Terms("field");
             Assert.IsNotNull(vector);
             Assert.AreEqual(1, vector.Size());
@@ -195,7 +195,7 @@ namespace Lucene.Net.Search
         private void VerifyIndex(Directory dir)
         {
             IndexReader r = DirectoryReader.Open(dir);
-            int numDocs = r.NumDocs();
+            int numDocs = r.NumDocs;
             for (int i = 0; i < numDocs; i++)
             {
                 Assert.IsNotNull(r.GetTermVectors(i).Terms("c"), "term vectors should not have been null for document " + i);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Search/TestTopDocsMerge.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestTopDocsMerge.cs b/src/Lucene.Net.Tests/core/Search/TestTopDocsMerge.cs
index 7a88def..d16efae 100644
--- a/src/Lucene.Net.Tests/core/Search/TestTopDocsMerge.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestTopDocsMerge.cs
@@ -165,16 +165,16 @@ namespace Lucene.Net.Search
             else
             {
                 CompositeReaderContext compCTX = (CompositeReaderContext)ctx;
-                int size = compCTX.Leaves().Count;
+                int size = compCTX.Leaves.Count;
                 subSearchers = new ShardSearcher[size];
                 docStarts = new int[size];
                 int docBase = 0;
                 for (int searcherIDX = 0; searcherIDX < subSearchers.Length; searcherIDX++)
                 {
-                    AtomicReaderContext leave = compCTX.Leaves()[searcherIDX];
+                    AtomicReaderContext leave = compCTX.Leaves[searcherIDX];
                     subSearchers[searcherIDX] = new ShardSearcher(leave, compCTX);
                     docStarts[searcherIDX] = docBase;
-                    docBase += leave.Reader().MaxDoc();
+                    docBase += leave.Reader.MaxDoc;
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Store/TestFileSwitchDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Store/TestFileSwitchDirectory.cs b/src/Lucene.Net.Tests/core/Store/TestFileSwitchDirectory.cs
index 73defb6..c55afba 100644
--- a/src/Lucene.Net.Tests/core/Store/TestFileSwitchDirectory.cs
+++ b/src/Lucene.Net.Tests/core/Store/TestFileSwitchDirectory.cs
@@ -59,7 +59,7 @@ namespace Lucene.Net.Store
             IndexWriter writer = new IndexWriter(fsd, (new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random()))).SetMergePolicy(NewLogMergePolicy(false)).SetCodec(Codec.ForName("Lucene40")).SetUseCompoundFile(false));
             TestIndexWriterReader.CreateIndexNoClose(true, "ram", writer);
             IndexReader reader = DirectoryReader.Open(writer, true);
-            Assert.AreEqual(100, reader.MaxDoc());
+            Assert.AreEqual(100, reader.MaxDoc);
             writer.Commit();
             // we should see only fdx,fdt files here
             string[] files = primaryDir.ListAll();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Store/TestNRTCachingDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Store/TestNRTCachingDirectory.cs b/src/Lucene.Net.Tests/core/Store/TestNRTCachingDirectory.cs
index d818e89..f74cb95 100644
--- a/src/Lucene.Net.Tests/core/Store/TestNRTCachingDirectory.cs
+++ b/src/Lucene.Net.Tests/core/Store/TestNRTCachingDirectory.cs
@@ -81,7 +81,7 @@ namespace Lucene.Net.Store
                             r = r2;
                         }
                     }
-                    Assert.AreEqual(1 + docCount, r.NumDocs());
+                    Assert.AreEqual(1 + docCount, r.NumDocs);
                     IndexSearcher s = NewSearcher(r);
                     // Just make sure search can run; we can't assert
                     // totHits since it could be 0

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e2f44e8e/src/Lucene.Net.Tests/core/Store/TestRAMDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Store/TestRAMDirectory.cs b/src/Lucene.Net.Tests/core/Store/TestRAMDirectory.cs
index 909b869..26c10fb 100644
--- a/src/Lucene.Net.Tests/core/Store/TestRAMDirectory.cs
+++ b/src/Lucene.Net.Tests/core/Store/TestRAMDirectory.cs
@@ -68,7 +68,7 @@ namespace Lucene.Net.Store
                 doc.Add(NewStringField("content", English.IntToEnglish(i).Trim(), Field.Store.YES));
                 writer.AddDocument(doc);
             }
-            Assert.AreEqual(DocsToAdd, writer.MaxDoc());
+            Assert.AreEqual(DocsToAdd, writer.MaxDoc);
             writer.Dispose();
             dir.Dispose();
         }
@@ -87,7 +87,7 @@ namespace Lucene.Net.Store
 
             // open reader to test document count
             IndexReader reader = DirectoryReader.Open(ramDir);
-            Assert.AreEqual(DocsToAdd, reader.NumDocs());
+            Assert.AreEqual(DocsToAdd, reader.NumDocs);
 
             // open search zo check if all doc's are there
             IndexSearcher searcher = NewSearcher(reader);


Mime
View raw message