You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rj...@apache.org on 2014/09/24 03:20:45 UTC

svn commit: r1627188 [2/13] - in /lucene/dev/branches/branch_5x: ./ dev-tools/ lucene/ lucene/analysis/ lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/ lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/std40/...

Modified: lucene/dev/branches/branch_5x/lucene/classification/src/java/org/apache/lucene/classification/SimpleNaiveBayesClassifier.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/classification/src/java/org/apache/lucene/classification/SimpleNaiveBayesClassifier.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/classification/src/java/org/apache/lucene/classification/SimpleNaiveBayesClassifier.java (original)
+++ lucene/dev/branches/branch_5x/lucene/classification/src/java/org/apache/lucene/classification/SimpleNaiveBayesClassifier.java Wed Sep 24 01:20:36 2014
@@ -26,7 +26,7 @@ import java.util.List;
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.TokenStream;
 import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
-import org.apache.lucene.index.AtomicReader;
+import org.apache.lucene.index.LeafReader;
 import org.apache.lucene.index.MultiFields;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.index.Terms;
@@ -48,10 +48,10 @@ import org.apache.lucene.util.BytesRef;
 public class SimpleNaiveBayesClassifier implements Classifier<BytesRef> {
 
   /**
-   * {@link org.apache.lucene.index.AtomicReader} used to access the {@link org.apache.lucene.classification.Classifier}'s
+   * {@link org.apache.lucene.index.LeafReader} used to access the {@link org.apache.lucene.classification.Classifier}'s
    * index
    */
-  protected AtomicReader atomicReader;
+  protected LeafReader leafReader;
 
   /**
    * names of the fields to be used as input text
@@ -80,7 +80,7 @@ public class SimpleNaiveBayesClassifier 
 
   /**
    * Creates a new NaiveBayes classifier.
-   * Note that you must call {@link #train(AtomicReader, String, String, Analyzer) train()} before you can
+   * Note that you must call {@link #train(org.apache.lucene.index.LeafReader, String, String, Analyzer) train()} before you can
    * classify any documents.
    */
   public SimpleNaiveBayesClassifier() {
@@ -90,27 +90,27 @@ public class SimpleNaiveBayesClassifier 
    * {@inheritDoc}
    */
   @Override
-  public void train(AtomicReader atomicReader, String textFieldName, String classFieldName, Analyzer analyzer) throws IOException {
-    train(atomicReader, textFieldName, classFieldName, analyzer, null);
+  public void train(LeafReader leafReader, String textFieldName, String classFieldName, Analyzer analyzer) throws IOException {
+    train(leafReader, textFieldName, classFieldName, analyzer, null);
   }
 
   /**
    * {@inheritDoc}
    */
   @Override
-  public void train(AtomicReader atomicReader, String textFieldName, String classFieldName, Analyzer analyzer, Query query)
+  public void train(LeafReader leafReader, String textFieldName, String classFieldName, Analyzer analyzer, Query query)
       throws IOException {
-    train(atomicReader, new String[]{textFieldName}, classFieldName, analyzer, query);
+    train(leafReader, new String[]{textFieldName}, classFieldName, analyzer, query);
   }
 
   /**
    * {@inheritDoc}
    */
   @Override
-  public void train(AtomicReader atomicReader, String[] textFieldNames, String classFieldName, Analyzer analyzer, Query query)
+  public void train(LeafReader leafReader, String[] textFieldNames, String classFieldName, Analyzer analyzer, Query query)
       throws IOException {
-    this.atomicReader = atomicReader;
-    this.indexSearcher = new IndexSearcher(this.atomicReader);
+    this.leafReader = leafReader;
+    this.indexSearcher = new IndexSearcher(this.leafReader);
     this.textFieldNames = textFieldNames;
     this.classFieldName = classFieldName;
     this.analyzer = analyzer;
@@ -155,12 +155,12 @@ public class SimpleNaiveBayesClassifier 
   }
 
   private List<ClassificationResult<BytesRef>> assignClassNormalizedList(String inputDocument) throws IOException {
-    if (atomicReader == null) {
+    if (leafReader == null) {
       throw new IOException("You must first call Classifier#train");
     }
     List<ClassificationResult<BytesRef>> dataList = new ArrayList<>();
 
-    Terms terms = MultiFields.getTerms(atomicReader, classFieldName);
+    Terms terms = MultiFields.getTerms(leafReader, classFieldName);
     TermsEnum termsEnum = terms.iterator(null);
     BytesRef next;
     String[] tokenizedDoc = tokenizeDoc(inputDocument);
@@ -203,7 +203,7 @@ public class SimpleNaiveBayesClassifier 
    * @throws IOException if accessing to term vectors or search fails
    */
   protected int countDocsWithClass() throws IOException {
-    int docCount = MultiFields.getTerms(this.atomicReader, this.classFieldName).getDocCount();
+    int docCount = MultiFields.getTerms(this.leafReader, this.classFieldName).getDocCount();
     if (docCount == -1) { // in case codec doesn't support getDocCount
       TotalHitCountCollector totalHitCountCollector = new TotalHitCountCollector();
       BooleanQuery q = new BooleanQuery();
@@ -265,11 +265,11 @@ public class SimpleNaiveBayesClassifier 
   private double getTextTermFreqForClass(BytesRef c) throws IOException {
     double avgNumberOfUniqueTerms = 0;
     for (String textFieldName : textFieldNames) {
-      Terms terms = MultiFields.getTerms(atomicReader, textFieldName);
+      Terms terms = MultiFields.getTerms(leafReader, textFieldName);
       long numPostings = terms.getSumDocFreq(); // number of term/doc pairs
       avgNumberOfUniqueTerms += numPostings / (double) terms.getDocCount(); // avg # of unique terms per doc
     }
-    int docsWithC = atomicReader.docFreq(new Term(classFieldName, c));
+    int docsWithC = leafReader.docFreq(new Term(classFieldName, c));
     return avgNumberOfUniqueTerms * docsWithC; // avg # of unique terms in text fields per doc * # docs with c
   }
 
@@ -294,6 +294,6 @@ public class SimpleNaiveBayesClassifier 
   }
 
   private int docCount(BytesRef countedClass) throws IOException {
-    return atomicReader.docFreq(new Term(classFieldName, countedClass));
+    return leafReader.docFreq(new Term(classFieldName, countedClass));
   }
 }

Modified: lucene/dev/branches/branch_5x/lucene/classification/src/java/org/apache/lucene/classification/utils/DatasetSplitter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/classification/src/java/org/apache/lucene/classification/utils/DatasetSplitter.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/classification/src/java/org/apache/lucene/classification/utils/DatasetSplitter.java (original)
+++ lucene/dev/branches/branch_5x/lucene/classification/src/java/org/apache/lucene/classification/utils/DatasetSplitter.java Wed Sep 24 01:20:36 2014
@@ -22,7 +22,7 @@ import org.apache.lucene.document.Docume
 import org.apache.lucene.document.Field;
 import org.apache.lucene.document.FieldType;
 import org.apache.lucene.document.TextField;
-import org.apache.lucene.index.AtomicReader;
+import org.apache.lucene.index.LeafReader;
 import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.index.IndexWriterConfig;
 import org.apache.lucene.index.IndexableField;
@@ -56,7 +56,7 @@ public class DatasetSplitter {
   /**
    * Split a given index into 3 indexes for training, test and cross validation tasks respectively
    *
-   * @param originalIndex        an {@link AtomicReader} on the source index
+   * @param originalIndex        an {@link org.apache.lucene.index.LeafReader} on the source index
    * @param trainingIndex        a {@link Directory} used to write the training index
    * @param testIndex            a {@link Directory} used to write the test index
    * @param crossValidationIndex a {@link Directory} used to write the cross validation index
@@ -64,7 +64,7 @@ public class DatasetSplitter {
    * @param fieldNames           names of fields that need to be put in the new indexes or <code>null</code> if all should be used
    * @throws IOException if any writing operation fails on any of the indexes
    */
-  public void split(AtomicReader originalIndex, Directory trainingIndex, Directory testIndex, Directory crossValidationIndex,
+  public void split(LeafReader originalIndex, Directory trainingIndex, Directory testIndex, Directory crossValidationIndex,
                     Analyzer analyzer, String... fieldNames) throws IOException {
 
     // create IWs for train / test / cv IDXs

Modified: lucene/dev/branches/branch_5x/lucene/classification/src/test/org/apache/lucene/classification/ClassificationTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/classification/src/test/org/apache/lucene/classification/ClassificationTestBase.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/classification/src/test/org/apache/lucene/classification/ClassificationTestBase.java (original)
+++ lucene/dev/branches/branch_5x/lucene/classification/src/test/org/apache/lucene/classification/ClassificationTestBase.java Wed Sep 24 01:20:36 2014
@@ -21,7 +21,7 @@ import org.apache.lucene.document.Docume
 import org.apache.lucene.document.Field;
 import org.apache.lucene.document.FieldType;
 import org.apache.lucene.document.TextField;
-import org.apache.lucene.index.AtomicReader;
+import org.apache.lucene.index.LeafReader;
 import org.apache.lucene.index.RandomIndexWriter;
 import org.apache.lucene.index.SlowCompositeReaderWrapper;
 import org.apache.lucene.search.Query;
@@ -83,18 +83,18 @@ public abstract class ClassificationTest
   }
 
   protected void checkCorrectClassification(Classifier<T> classifier, String inputDoc, T expectedResult, Analyzer analyzer, String textFieldName, String classFieldName, Query query) throws Exception {
-    AtomicReader atomicReader = null;
+    LeafReader leafReader = null;
     try {
       populateSampleIndex(analyzer);
-      atomicReader = SlowCompositeReaderWrapper.wrap(indexWriter.getReader());
-      classifier.train(atomicReader, textFieldName, classFieldName, analyzer, query);
+      leafReader = SlowCompositeReaderWrapper.wrap(indexWriter.getReader());
+      classifier.train(leafReader, textFieldName, classFieldName, analyzer, query);
       ClassificationResult<T> classificationResult = classifier.assignClass(inputDoc);
       assertNotNull(classificationResult.getAssignedClass());
       assertEquals("got an assigned class of " + classificationResult.getAssignedClass(), expectedResult, classificationResult.getAssignedClass());
       assertTrue("got a not positive score " + classificationResult.getScore(), classificationResult.getScore() > 0);
     } finally {
-      if (atomicReader != null)
-        atomicReader.close();
+      if (leafReader != null)
+        leafReader.close();
     }
   }
   protected void checkOnlineClassification(Classifier<T> classifier, String inputDoc, T expectedResult, Analyzer analyzer, String textFieldName, String classFieldName) throws Exception {
@@ -102,11 +102,11 @@ public abstract class ClassificationTest
   }
 
   protected void checkOnlineClassification(Classifier<T> classifier, String inputDoc, T expectedResult, Analyzer analyzer, String textFieldName, String classFieldName, Query query) throws Exception {
-    AtomicReader atomicReader = null;
+    LeafReader leafReader = null;
     try {
       populateSampleIndex(analyzer);
-      atomicReader = SlowCompositeReaderWrapper.wrap(indexWriter.getReader());
-      classifier.train(atomicReader, textFieldName, classFieldName, analyzer, query);
+      leafReader = SlowCompositeReaderWrapper.wrap(indexWriter.getReader());
+      classifier.train(leafReader, textFieldName, classFieldName, analyzer, query);
       ClassificationResult<T> classificationResult = classifier.assignClass(inputDoc);
       assertNotNull(classificationResult.getAssignedClass());
       assertEquals("got an assigned class of " + classificationResult.getAssignedClass(), expectedResult, classificationResult.getAssignedClass());
@@ -117,8 +117,8 @@ public abstract class ClassificationTest
       assertEquals(Double.valueOf(classificationResult.getScore()), Double.valueOf(secondClassificationResult.getScore()));
 
     } finally {
-      if (atomicReader != null)
-        atomicReader.close();
+      if (leafReader != null)
+        leafReader.close();
     }
   }
 
@@ -199,18 +199,18 @@ public abstract class ClassificationTest
   }
 
   protected void checkPerformance(Classifier<T> classifier, Analyzer analyzer, String classFieldName) throws Exception {
-    AtomicReader atomicReader = null;
+    LeafReader leafReader = null;
     long trainStart = System.currentTimeMillis();
     try {
       populatePerformanceIndex(analyzer);
-      atomicReader = SlowCompositeReaderWrapper.wrap(indexWriter.getReader());
-      classifier.train(atomicReader, textFieldName, classFieldName, analyzer);
+      leafReader = SlowCompositeReaderWrapper.wrap(indexWriter.getReader());
+      classifier.train(leafReader, textFieldName, classFieldName, analyzer);
       long trainEnd = System.currentTimeMillis();
       long trainTime = trainEnd - trainStart;
       assertTrue("training took more than 2 mins : " + trainTime / 1000 + "s", trainTime < 120000);
     } finally {
-      if (atomicReader != null)
-        atomicReader.close();
+      if (leafReader != null)
+        leafReader.close();
     }
   }
 

Modified: lucene/dev/branches/branch_5x/lucene/classification/src/test/org/apache/lucene/classification/utils/DataSplitterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/classification/src/test/org/apache/lucene/classification/utils/DataSplitterTest.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/classification/src/test/org/apache/lucene/classification/utils/DataSplitterTest.java (original)
+++ lucene/dev/branches/branch_5x/lucene/classification/src/test/org/apache/lucene/classification/utils/DataSplitterTest.java Wed Sep 24 01:20:36 2014
@@ -23,7 +23,7 @@ import org.apache.lucene.document.Docume
 import org.apache.lucene.document.Field;
 import org.apache.lucene.document.FieldType;
 import org.apache.lucene.document.TextField;
-import org.apache.lucene.index.AtomicReader;
+import org.apache.lucene.index.LeafReader;
 import org.apache.lucene.index.DirectoryReader;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.RandomIndexWriter;
@@ -44,7 +44,7 @@ import java.util.Random;
  */
 public class DataSplitterTest extends LuceneTestCase {
 
-  private AtomicReader originalIndex;
+  private LeafReader originalIndex;
   private RandomIndexWriter indexWriter;
   private Directory dir;
 
@@ -103,7 +103,7 @@ public class DataSplitterTest extends Lu
     assertSplit(originalIndex, 0.2, 0.35, idFieldName, textFieldName);
   }
 
-  public static void assertSplit(AtomicReader originalIndex, double testRatio, double crossValidationRatio, String... fieldNames) throws Exception {
+  public static void assertSplit(LeafReader originalIndex, double testRatio, double crossValidationRatio, String... fieldNames) throws Exception {
 
     BaseDirectoryWrapper trainingIndex = newDirectory();
     BaseDirectoryWrapper testIndex = newDirectory();

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/DocValuesConsumer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/DocValuesConsumer.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/DocValuesConsumer.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/DocValuesConsumer.java Wed Sep 24 01:20:36 2014
@@ -24,7 +24,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.NoSuchElementException;
 
-import org.apache.lucene.index.AtomicReader;
+import org.apache.lucene.index.LeafReader;
 import org.apache.lucene.index.BinaryDocValues;
 import org.apache.lucene.index.FieldInfo;
 import org.apache.lucene.index.FilteredTermsEnum;
@@ -137,7 +137,7 @@ public abstract class DocValuesConsumer 
         if (type == DocValuesType.NUMERIC) {
           List<NumericDocValues> toMerge = new ArrayList<>();
           List<Bits> docsWithField = new ArrayList<>();
-          for (AtomicReader reader : mergeState.readers) {
+          for (LeafReader reader : mergeState.readers) {
             NumericDocValues values = reader.getNumericDocValues(field.name);
             Bits bits = reader.getDocsWithField(field.name);
             if (values == null) {
@@ -151,7 +151,7 @@ public abstract class DocValuesConsumer 
         } else if (type == DocValuesType.BINARY) {
           List<BinaryDocValues> toMerge = new ArrayList<>();
           List<Bits> docsWithField = new ArrayList<>();
-          for (AtomicReader reader : mergeState.readers) {
+          for (LeafReader reader : mergeState.readers) {
             BinaryDocValues values = reader.getBinaryDocValues(field.name);
             Bits bits = reader.getDocsWithField(field.name);
             if (values == null) {
@@ -164,7 +164,7 @@ public abstract class DocValuesConsumer 
           mergeBinaryField(field, mergeState, toMerge, docsWithField);
         } else if (type == DocValuesType.SORTED) {
           List<SortedDocValues> toMerge = new ArrayList<>();
-          for (AtomicReader reader : mergeState.readers) {
+          for (LeafReader reader : mergeState.readers) {
             SortedDocValues values = reader.getSortedDocValues(field.name);
             if (values == null) {
               values = DocValues.emptySorted();
@@ -174,7 +174,7 @@ public abstract class DocValuesConsumer 
           mergeSortedField(field, mergeState, toMerge);
         } else if (type == DocValuesType.SORTED_SET) {
           List<SortedSetDocValues> toMerge = new ArrayList<>();
-          for (AtomicReader reader : mergeState.readers) {
+          for (LeafReader reader : mergeState.readers) {
             SortedSetDocValues values = reader.getSortedSetDocValues(field.name);
             if (values == null) {
               values = DocValues.emptySortedSet();
@@ -184,7 +184,7 @@ public abstract class DocValuesConsumer 
           mergeSortedSetField(field, mergeState, toMerge);
         } else if (type == DocValuesType.SORTED_NUMERIC) {
           List<SortedNumericDocValues> toMerge = new ArrayList<>();
-          for (AtomicReader reader : mergeState.readers) {
+          for (LeafReader reader : mergeState.readers) {
             SortedNumericDocValues values = reader.getSortedNumericDocValues(field.name);
             if (values == null) {
               values = DocValues.emptySortedNumeric(reader.maxDoc());
@@ -216,7 +216,7 @@ public abstract class DocValuesConsumer 
                           int docIDUpto;
                           long nextValue;
                           boolean nextHasValue;
-                          AtomicReader currentReader;
+                          LeafReader currentReader;
                           NumericDocValues currentValues;
                           Bits currentLiveDocs;
                           Bits currentDocsWithField;
@@ -297,7 +297,7 @@ public abstract class DocValuesConsumer 
                          int docIDUpto;
                          BytesRef nextValue;
                          BytesRef nextPointer; // points to null if missing, or nextValue
-                         AtomicReader currentReader;
+                         LeafReader currentReader;
                          BinaryDocValues currentValues;
                          Bits currentLiveDocs;
                          Bits currentDocsWithField;
@@ -368,7 +368,7 @@ public abstract class DocValuesConsumer 
    * iterables that filter deleted documents.
    */
   public void mergeSortedNumericField(FieldInfo fieldInfo, final MergeState mergeState, List<SortedNumericDocValues> toMerge) throws IOException {
-    final AtomicReader readers[] = mergeState.readers.toArray(new AtomicReader[toMerge.size()]);
+    final LeafReader readers[] = mergeState.readers.toArray(new LeafReader[toMerge.size()]);
     final SortedNumericDocValues dvs[] = toMerge.toArray(new SortedNumericDocValues[toMerge.size()]);
     
     // step 3: add field
@@ -381,7 +381,7 @@ public abstract class DocValuesConsumer 
               int readerUpto = -1;
               int docIDUpto;
               int nextValue;
-              AtomicReader currentReader;
+              LeafReader currentReader;
               Bits currentLiveDocs;
               boolean nextIsSet;
 
@@ -444,7 +444,7 @@ public abstract class DocValuesConsumer 
               int readerUpto = -1;
               int docIDUpto;
               long nextValue;
-              AtomicReader currentReader;
+              LeafReader currentReader;
               Bits currentLiveDocs;
               boolean nextIsSet;
               int valueUpto;
@@ -519,14 +519,14 @@ public abstract class DocValuesConsumer 
    * an Iterable that merges ordinals and values and filters deleted documents .
    */
   public void mergeSortedField(FieldInfo fieldInfo, final MergeState mergeState, List<SortedDocValues> toMerge) throws IOException {
-    final AtomicReader readers[] = mergeState.readers.toArray(new AtomicReader[toMerge.size()]);
+    final LeafReader readers[] = mergeState.readers.toArray(new LeafReader[toMerge.size()]);
     final SortedDocValues dvs[] = toMerge.toArray(new SortedDocValues[toMerge.size()]);
     
     // step 1: iterate thru each sub and mark terms still in use
     TermsEnum liveTerms[] = new TermsEnum[dvs.length];
     long[] weights = new long[liveTerms.length];
     for (int sub = 0; sub < liveTerms.length; sub++) {
-      AtomicReader reader = readers[sub];
+      LeafReader reader = readers[sub];
       SortedDocValues dv = dvs[sub];
       Bits liveDocs = reader.getLiveDocs();
       if (liveDocs == null) {
@@ -591,7 +591,7 @@ public abstract class DocValuesConsumer 
               int readerUpto = -1;
               int docIDUpto;
               int nextValue;
-              AtomicReader currentReader;
+              LeafReader currentReader;
               Bits currentLiveDocs;
               LongValues currentMap;
               boolean nextIsSet;
@@ -658,14 +658,14 @@ public abstract class DocValuesConsumer 
    * an Iterable that merges ordinals and values and filters deleted documents .
    */
   public void mergeSortedSetField(FieldInfo fieldInfo, final MergeState mergeState, List<SortedSetDocValues> toMerge) throws IOException {
-    final AtomicReader readers[] = mergeState.readers.toArray(new AtomicReader[toMerge.size()]);
+    final LeafReader readers[] = mergeState.readers.toArray(new LeafReader[toMerge.size()]);
     final SortedSetDocValues dvs[] = toMerge.toArray(new SortedSetDocValues[toMerge.size()]);
     
     // step 1: iterate thru each sub and mark terms still in use
     TermsEnum liveTerms[] = new TermsEnum[dvs.length];
     long[] weights = new long[liveTerms.length];
     for (int sub = 0; sub < liveTerms.length; sub++) {
-      AtomicReader reader = readers[sub];
+      LeafReader reader = readers[sub];
       SortedSetDocValues dv = dvs[sub];
       Bits liveDocs = reader.getLiveDocs();
       if (liveDocs == null) {
@@ -731,7 +731,7 @@ public abstract class DocValuesConsumer 
               int readerUpto = -1;
               int docIDUpto;
               int nextValue;
-              AtomicReader currentReader;
+              LeafReader currentReader;
               Bits currentLiveDocs;
               boolean nextIsSet;
 
@@ -798,7 +798,7 @@ public abstract class DocValuesConsumer 
               int readerUpto = -1;
               int docIDUpto;
               long nextValue;
-              AtomicReader currentReader;
+              LeafReader currentReader;
               Bits currentLiveDocs;
               LongValues currentMap;
               boolean nextIsSet;

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/FieldsConsumer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/FieldsConsumer.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/FieldsConsumer.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/FieldsConsumer.java Wed Sep 24 01:20:36 2014
@@ -22,7 +22,7 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.lucene.index.AtomicReader;
+import org.apache.lucene.index.LeafReader;
 import org.apache.lucene.index.Fields;
 import org.apache.lucene.index.MappedMultiFields;
 import org.apache.lucene.index.MergeState;
@@ -91,7 +91,7 @@ public abstract class FieldsConsumer imp
     int docBase = 0;
 
     for(int readerIndex=0;readerIndex<mergeState.readers.size();readerIndex++) {
-      final AtomicReader reader = mergeState.readers.get(readerIndex);
+      final LeafReader reader = mergeState.readers.get(readerIndex);
       final Fields f = reader.fields();
       final int maxDoc = reader.maxDoc();
       if (f != null) {

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/NormsConsumer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/NormsConsumer.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/NormsConsumer.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/NormsConsumer.java Wed Sep 24 01:20:36 2014
@@ -24,7 +24,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.NoSuchElementException;
 
-import org.apache.lucene.index.AtomicReader;
+import org.apache.lucene.index.LeafReader;
 import org.apache.lucene.index.DocValues;
 import org.apache.lucene.index.FieldInfo;
 import org.apache.lucene.index.MergeState;
@@ -75,7 +75,7 @@ public abstract class NormsConsumer impl
     for (FieldInfo field : mergeState.fieldInfos) {
       if (field.hasNorms()) {
         List<NumericDocValues> toMerge = new ArrayList<>();
-        for (AtomicReader reader : mergeState.readers) {
+        for (LeafReader reader : mergeState.readers) {
           NumericDocValues norms = reader.getNormValues(field.name);
           if (norms == null) {
             norms = DocValues.emptyNumeric();
@@ -104,7 +104,7 @@ public abstract class NormsConsumer impl
                           int readerUpto = -1;
                           int docIDUpto;
                           long nextValue;
-                          AtomicReader currentReader;
+                          LeafReader currentReader;
                           NumericDocValues currentValues;
                           Bits currentLiveDocs;
                           boolean nextIsSet;

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/StoredFieldsWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/StoredFieldsWriter.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/StoredFieldsWriter.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/StoredFieldsWriter.java Wed Sep 24 01:20:36 2014
@@ -20,7 +20,7 @@ import java.io.Closeable;
 import java.io.IOException;
 
 import org.apache.lucene.document.Document;
-import org.apache.lucene.index.AtomicReader;
+import org.apache.lucene.index.LeafReader;
 import org.apache.lucene.index.FieldInfo;
 import org.apache.lucene.index.FieldInfos;
 import org.apache.lucene.index.IndexableField;
@@ -82,7 +82,7 @@ public abstract class StoredFieldsWriter
    *  merging (bulk-byte copying, etc). */
   public int merge(MergeState mergeState) throws IOException {
     int docCount = 0;
-    for (AtomicReader reader : mergeState.readers) {
+    for (LeafReader reader : mergeState.readers) {
       final int maxDoc = reader.maxDoc();
       final Bits liveDocs = reader.getLiveDocs();
       for (int i = 0; i < maxDoc; i++) {

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/TermVectorsWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/TermVectorsWriter.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/TermVectorsWriter.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/TermVectorsWriter.java Wed Sep 24 01:20:36 2014
@@ -21,7 +21,7 @@ import java.io.Closeable;
 import java.io.IOException;
 import java.util.Iterator;
 
-import org.apache.lucene.index.AtomicReader;
+import org.apache.lucene.index.LeafReader;
 import org.apache.lucene.index.DocsAndPositionsEnum;
 import org.apache.lucene.index.FieldInfo;
 import org.apache.lucene.index.FieldInfos;
@@ -178,7 +178,7 @@ public abstract class TermVectorsWriter 
   public int merge(MergeState mergeState) throws IOException {
     int docCount = 0;
     for (int i = 0; i < mergeState.readers.size(); i++) {
-      final AtomicReader reader = mergeState.readers.get(i);
+      final LeafReader reader = mergeState.readers.get(i);
       final int maxDoc = reader.maxDoc();
       final Bits liveDocs = reader.getLiveDocs();
 

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsWriter.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsWriter.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsWriter.java Wed Sep 24 01:20:36 2014
@@ -25,7 +25,7 @@ import org.apache.lucene.codecs.StoredFi
 import org.apache.lucene.codecs.StoredFieldsWriter;
 import org.apache.lucene.codecs.compressing.CompressingStoredFieldsReader.ChunkIterator;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.index.AtomicReader;
+import org.apache.lucene.index.LeafReader;
 import org.apache.lucene.index.CorruptIndexException;
 import org.apache.lucene.index.FieldInfo;
 import org.apache.lucene.index.FieldInfos;
@@ -337,7 +337,7 @@ public final class CompressingStoredFiel
     
     MatchingReaders matching = new MatchingReaders(mergeState);
     
-    for (AtomicReader reader : mergeState.readers) {
+    for (LeafReader reader : mergeState.readers) {
       final SegmentReader matchingSegmentReader = matching.matchingSegmentReaders[idx++];
       CompressingStoredFieldsReader matchingFieldsReader = null;
       if (matchingSegmentReader != null) {

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsWriter.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsWriter.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsWriter.java Wed Sep 24 01:20:36 2014
@@ -28,7 +28,7 @@ import java.util.TreeSet;
 import org.apache.lucene.codecs.CodecUtil;
 import org.apache.lucene.codecs.TermVectorsReader;
 import org.apache.lucene.codecs.TermVectorsWriter;
-import org.apache.lucene.index.AtomicReader;
+import org.apache.lucene.index.LeafReader;
 import org.apache.lucene.index.FieldInfo;
 import org.apache.lucene.index.FieldInfos;
 import org.apache.lucene.index.Fields;
@@ -732,7 +732,7 @@ public final class CompressingTermVector
 
     MatchingReaders matching = new MatchingReaders(mergeState);
     
-    for (AtomicReader reader : mergeState.readers) {
+    for (LeafReader reader : mergeState.readers) {
       final SegmentReader matchingSegmentReader = matching.matchingSegmentReaders[idx++];
       CompressingTermVectorsReader matchingVectorsReader = null;
       if (matchingSegmentReader != null) {

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/compressing/MatchingReaders.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/compressing/MatchingReaders.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/compressing/MatchingReaders.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/compressing/MatchingReaders.java Wed Sep 24 01:20:36 2014
@@ -17,7 +17,7 @@ package org.apache.lucene.codecs.compres
  * limitations under the License.
  */
 
-import org.apache.lucene.index.AtomicReader;
+import org.apache.lucene.index.LeafReader;
 import org.apache.lucene.index.FieldInfo;
 import org.apache.lucene.index.FieldInfos;
 import org.apache.lucene.index.MergeState;
@@ -50,7 +50,7 @@ class MatchingReaders {
     // FieldInfos, then we can do a bulk copy of the
     // stored fields:
     for (int i = 0; i < numReaders; i++) {
-      AtomicReader reader = mergeState.readers.get(i);
+      LeafReader reader = mergeState.readers.get(i);
       // TODO: we may be able to broaden this to
       // non-SegmentReaders, since FieldInfos is now
       // required?  But... this'd also require exposing

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/perfield/PerFieldPostingsFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/perfield/PerFieldPostingsFormat.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/perfield/PerFieldPostingsFormat.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/perfield/PerFieldPostingsFormat.java Wed Sep 24 01:20:36 2014
@@ -43,7 +43,7 @@ import org.apache.lucene.util.Accountabl
 import org.apache.lucene.util.IOUtils;
 import org.apache.lucene.util.RamUsageEstimator;
 
-import static org.apache.lucene.index.FilterAtomicReader.FilterFields;
+import static org.apache.lucene.index.FilterLeafReader.FilterFields;
 
 /**
  * Enables per field postings support.

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/DoubleDocValuesField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/DoubleDocValuesField.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/DoubleDocValuesField.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/DoubleDocValuesField.java Wed Sep 24 01:20:36 2014
@@ -17,14 +17,12 @@ package org.apache.lucene.document;
  * limitations under the License.
  */
 
-import org.apache.lucene.index.AtomicReader; // javadocs
-
 /**
  * Syntactic sugar for encoding doubles as NumericDocValues
  * via {@link Double#doubleToRawLongBits(double)}.
  * <p>
  * Per-document double values can be retrieved via
- * {@link AtomicReader#getNumericDocValues(String)}.
+ * {@link org.apache.lucene.index.LeafReader#getNumericDocValues(String)}.
  * <p>
  * <b>NOTE</b>: In most all cases this will be rather inefficient,
  * requiring eight bytes per document. Consider encoding double

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/DoubleField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/DoubleField.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/DoubleField.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/DoubleField.java Wed Sep 24 01:20:36 2014
@@ -18,7 +18,6 @@ package org.apache.lucene.document;
  */
 
 import org.apache.lucene.analysis.NumericTokenStream; // javadocs
-import org.apache.lucene.index.AtomicReader;
 import org.apache.lucene.index.FieldInfo.IndexOptions;
 import org.apache.lucene.search.NumericRangeFilter; // javadocs
 import org.apache.lucene.search.NumericRangeQuery; // javadocs
@@ -57,7 +56,7 @@ import org.apache.lucene.util.NumericUti
  * NumericRangeFilter}.  To sort according to a
  * <code>DoubleField</code>, use the normal numeric sort types, eg
  * {@link org.apache.lucene.search.SortField.Type#DOUBLE}. <code>DoubleField</code> 
- * values can also be loaded directly from {@link AtomicReader#getNumericDocValues}.</p>
+ * values can also be loaded directly from {@link org.apache.lucene.index.LeafReader#getNumericDocValues}.</p>
  *
  * <p>You may add the same field name as an <code>DoubleField</code> to
  * the same document more than once.  Range querying and

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/FloatDocValuesField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/FloatDocValuesField.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/FloatDocValuesField.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/FloatDocValuesField.java Wed Sep 24 01:20:36 2014
@@ -17,14 +17,12 @@ package org.apache.lucene.document;
  * limitations under the License.
  */
 
-import org.apache.lucene.index.AtomicReader; // javadocs
-
 /**
  * Syntactic sugar for encoding floats as NumericDocValues
  * via {@link Float#floatToRawIntBits(float)}.
  * <p>
  * Per-document floating point values can be retrieved via
- * {@link AtomicReader#getNumericDocValues(String)}.
+ * {@link org.apache.lucene.index.LeafReader#getNumericDocValues(String)}.
  * <p>
  * <b>NOTE</b>: In most all cases this will be rather inefficient,
  * requiring four bytes per document. Consider encoding floating

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/FloatField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/FloatField.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/FloatField.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/FloatField.java Wed Sep 24 01:20:36 2014
@@ -18,7 +18,6 @@ package org.apache.lucene.document;
  */
 
 import org.apache.lucene.analysis.NumericTokenStream; // javadocs
-import org.apache.lucene.index.AtomicReader;
 import org.apache.lucene.index.FieldInfo.IndexOptions;
 import org.apache.lucene.search.NumericRangeFilter; // javadocs
 import org.apache.lucene.search.NumericRangeQuery; // javadocs
@@ -57,7 +56,7 @@ import org.apache.lucene.util.NumericUti
  * NumericRangeFilter}.  To sort according to a
  * <code>FloatField</code>, use the normal numeric sort types, eg
  * {@link org.apache.lucene.search.SortField.Type#FLOAT}. <code>FloatField</code> 
- * values can also be loaded directly from {@link AtomicReader#getNumericDocValues}.</p>
+ * values can also be loaded directly from {@link org.apache.lucene.index.LeafReader#getNumericDocValues}.</p>
  *
  * <p>You may add the same field name as an <code>FloatField</code> to
  * the same document more than once.  Range querying and

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/IntField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/IntField.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/IntField.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/IntField.java Wed Sep 24 01:20:36 2014
@@ -18,7 +18,6 @@ package org.apache.lucene.document;
  */
 
 import org.apache.lucene.analysis.NumericTokenStream; // javadocs
-import org.apache.lucene.index.AtomicReader;
 import org.apache.lucene.index.FieldInfo.IndexOptions;
 import org.apache.lucene.search.NumericRangeFilter; // javadocs
 import org.apache.lucene.search.NumericRangeQuery; // javadocs
@@ -57,7 +56,7 @@ import org.apache.lucene.util.NumericUti
  * NumericRangeFilter}.  To sort according to a
  * <code>IntField</code>, use the normal numeric sort types, eg
  * {@link org.apache.lucene.search.SortField.Type#INT}. <code>IntField</code> 
- * values can also be loaded directly from {@link AtomicReader#getNumericDocValues}.</p>
+ * values can also be loaded directly from {@link org.apache.lucene.index.LeafReader#getNumericDocValues}.</p>
  *
  * <p>You may add the same field name as an <code>IntField</code> to
  * the same document more than once.  Range querying and

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/LongField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/LongField.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/LongField.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/document/LongField.java Wed Sep 24 01:20:36 2014
@@ -18,7 +18,6 @@ package org.apache.lucene.document;
  */
 
 import org.apache.lucene.analysis.NumericTokenStream; // javadocs
-import org.apache.lucene.index.AtomicReader;
 import org.apache.lucene.index.FieldInfo.IndexOptions;
 import org.apache.lucene.search.NumericRangeFilter; // javadocs
 import org.apache.lucene.search.NumericRangeQuery; // javadocs
@@ -67,7 +66,7 @@ import org.apache.lucene.util.NumericUti
  * NumericRangeFilter}.  To sort according to a
  * <code>LongField</code>, use the normal numeric sort types, eg
  * {@link org.apache.lucene.search.SortField.Type#LONG}. <code>LongField</code> 
- * values can also be loaded directly from {@link AtomicReader#getNumericDocValues}.</p>
+ * values can also be loaded directly from {@link org.apache.lucene.index.LeafReader#getNumericDocValues}.</p>
  *
  * <p>You may add the same field name as an <code>LongField</code> to
  * the same document more than once.  Range querying and

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/BufferedUpdatesStream.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/BufferedUpdatesStream.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/BufferedUpdatesStream.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/BufferedUpdatesStream.java Wed Sep 24 01:20:36 2014
@@ -542,7 +542,7 @@ class BufferedUpdatesStream implements A
   // Delete by query
   private static long applyQueryDeletes(Iterable<QueryAndLimit> queriesIter, ReadersAndUpdates rld, final SegmentReader reader) throws IOException {
     long delCount = 0;
-    final AtomicReaderContext readerContext = reader.getContext();
+    final LeafReaderContext readerContext = reader.getContext();
     boolean any = false;
     for (QueryAndLimit ent : queriesIter) {
       Query query = ent.query;

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java Wed Sep 24 01:20:36 2014
@@ -713,7 +713,7 @@ public class CheckIndex {
    * Test field norms.
    * @lucene.experimental
    */
-  public static Status.FieldNormStatus testFieldNorms(AtomicReader reader, PrintStream infoStream, boolean failFast) throws IOException {
+  public static Status.FieldNormStatus testFieldNorms(LeafReader reader, PrintStream infoStream, boolean failFast) throws IOException {
     final Status.FieldNormStatus status = new Status.FieldNormStatus();
 
     try {
@@ -1307,7 +1307,7 @@ public class CheckIndex {
    * Test the term index.
    * @lucene.experimental
    */
-  public static Status.TermIndexStatus testPostings(AtomicReader reader, PrintStream infoStream) throws IOException {
+  public static Status.TermIndexStatus testPostings(LeafReader reader, PrintStream infoStream) throws IOException {
     return testPostings(reader, infoStream, false, false);
   }
   
@@ -1315,7 +1315,7 @@ public class CheckIndex {
    * Test the term index.
    * @lucene.experimental
    */
-  public static Status.TermIndexStatus testPostings(AtomicReader reader, PrintStream infoStream, boolean verbose, boolean failFast) throws IOException {
+  public static Status.TermIndexStatus testPostings(LeafReader reader, PrintStream infoStream, boolean verbose, boolean failFast) throws IOException {
 
     // TODO: we should go and verify term vectors match, if
     // crossCheckTermVectors is on...
@@ -1357,7 +1357,7 @@ public class CheckIndex {
    * Test stored fields.
    * @lucene.experimental
    */
-  public static Status.StoredFieldStatus testStoredFields(AtomicReader reader, PrintStream infoStream, boolean failFast) throws IOException {
+  public static Status.StoredFieldStatus testStoredFields(LeafReader reader, PrintStream infoStream, boolean failFast) throws IOException {
     final Status.StoredFieldStatus status = new Status.StoredFieldStatus();
 
     try {
@@ -1402,7 +1402,7 @@ public class CheckIndex {
    * Test docvalues.
    * @lucene.experimental
    */
-  public static Status.DocValuesStatus testDocValues(AtomicReader reader,
+  public static Status.DocValuesStatus testDocValues(LeafReader reader,
                                                      PrintStream infoStream,
                                                      boolean failFast) throws IOException {
     final Status.DocValuesStatus status = new Status.DocValuesStatus();
@@ -1444,7 +1444,7 @@ public class CheckIndex {
     return status;
   }
   
-  private static void checkBinaryDocValues(String fieldName, AtomicReader reader, BinaryDocValues dv, Bits docsWithField) {
+  private static void checkBinaryDocValues(String fieldName, LeafReader reader, BinaryDocValues dv, Bits docsWithField) {
     for (int i = 0; i < reader.maxDoc(); i++) {
       final BytesRef term = dv.get(i);
       assert term.isValid();
@@ -1454,7 +1454,7 @@ public class CheckIndex {
     }
   }
   
-  private static void checkSortedDocValues(String fieldName, AtomicReader reader, SortedDocValues dv, Bits docsWithField) {
+  private static void checkSortedDocValues(String fieldName, LeafReader reader, SortedDocValues dv, Bits docsWithField) {
     checkBinaryDocValues(fieldName, reader, dv, docsWithField);
     final int maxOrd = dv.getValueCount()-1;
     FixedBitSet seenOrds = new FixedBitSet(dv.getValueCount());
@@ -1494,7 +1494,7 @@ public class CheckIndex {
     }
   }
   
-  private static void checkSortedSetDocValues(String fieldName, AtomicReader reader, SortedSetDocValues dv, Bits docsWithField) {
+  private static void checkSortedSetDocValues(String fieldName, LeafReader reader, SortedSetDocValues dv, Bits docsWithField) {
     final long maxOrd = dv.getValueCount()-1;
     LongBitSet seenOrds = new LongBitSet(dv.getValueCount());
     long maxOrd2 = -1;
@@ -1564,7 +1564,7 @@ public class CheckIndex {
     }
   }
   
-  private static void checkSortedNumericDocValues(String fieldName, AtomicReader reader, SortedNumericDocValues ndv, Bits docsWithField) {
+  private static void checkSortedNumericDocValues(String fieldName, LeafReader reader, SortedNumericDocValues ndv, Bits docsWithField) {
     for (int i = 0; i < reader.maxDoc(); i++) {
       ndv.setDocument(i);
       int count = ndv.count();
@@ -1588,7 +1588,7 @@ public class CheckIndex {
     }
   }
 
-  private static void checkNumericDocValues(String fieldName, AtomicReader reader, NumericDocValues ndv, Bits docsWithField) {
+  private static void checkNumericDocValues(String fieldName, LeafReader reader, NumericDocValues ndv, Bits docsWithField) {
     for (int i = 0; i < reader.maxDoc(); i++) {
       long value = ndv.get(i);
       if (docsWithField.get(i) == false && value != 0) {
@@ -1597,7 +1597,7 @@ public class CheckIndex {
     }
   }
   
-  private static void checkDocValues(FieldInfo fi, AtomicReader reader, PrintStream infoStream, DocValuesStatus status) throws Exception {
+  private static void checkDocValues(FieldInfo fi, LeafReader reader, PrintStream infoStream, DocValuesStatus status) throws Exception {
     Bits docsWithField = reader.getDocsWithField(fi.name);
     if (docsWithField == null) {
       throw new RuntimeException(fi.name + " docsWithField does not exist");
@@ -1660,7 +1660,7 @@ public class CheckIndex {
     }
   }
   
-  private static void checkNorms(FieldInfo fi, AtomicReader reader, PrintStream infoStream) throws IOException {
+  private static void checkNorms(FieldInfo fi, LeafReader reader, PrintStream infoStream) throws IOException {
     switch(fi.getNormType()) {
       case NUMERIC:
         checkNumericDocValues(fi.name, reader, reader.getNormValues(fi.name), new Bits.MatchAllBits(reader.maxDoc()));
@@ -1674,7 +1674,7 @@ public class CheckIndex {
    * Test term vectors.
    * @lucene.experimental
    */
-  public static Status.TermVectorStatus testTermVectors(AtomicReader reader, PrintStream infoStream) throws IOException {
+  public static Status.TermVectorStatus testTermVectors(LeafReader reader, PrintStream infoStream) throws IOException {
     return testTermVectors(reader, infoStream, false, false, false);
   }
 
@@ -1682,7 +1682,7 @@ public class CheckIndex {
    * Test term vectors.
    * @lucene.experimental
    */
-  public static Status.TermVectorStatus testTermVectors(AtomicReader reader, PrintStream infoStream, boolean verbose, boolean crossCheckTermVectors, boolean failFast) throws IOException {
+  public static Status.TermVectorStatus testTermVectors(LeafReader reader, PrintStream infoStream, boolean verbose, boolean crossCheckTermVectors, boolean failFast) throws IOException {
     final Status.TermVectorStatus status = new Status.TermVectorStatus();
     final FieldInfos fieldInfos = reader.getFieldInfos();
     final Bits onlyDocIsDeleted = new FixedBitSet(1);

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/CompositeReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/CompositeReader.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/CompositeReader.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/CompositeReader.java Wed Sep 24 01:20:36 2014
@@ -19,15 +19,14 @@ package org.apache.lucene.index;
 
 import java.util.List;
 
-import org.apache.lucene.search.SearcherManager; // javadocs
 import org.apache.lucene.store.*;
 
 /**
  Instances of this reader type can only
  be used to get stored fields from the underlying AtomicReaders,
  but it is not possible to directly retrieve postings. To do that, get
- the {@link AtomicReaderContext} for all sub-readers via {@link #leaves()}.
- Alternatively, you can mimic an {@link AtomicReader} (with a serious slowdown),
+ the {@link LeafReaderContext} for all sub-readers via {@link #leaves()}.
+ Alternatively, you can mimic an {@link LeafReader} (with a serious slowdown),
  by wrapping composite readers with {@link SlowCompositeReaderWrapper}.
  
  <p>IndexReader instances for indexes on disk are usually constructed
@@ -91,7 +90,7 @@ public abstract class CompositeReader ex
    *  return {@code null}.
    *  
    *  <p><b>NOTE:</b> In contrast to previous Lucene versions this method
-   *  is no longer public, code that wants to get all {@link AtomicReader}s
+   *  is no longer public, code that wants to get all {@link LeafReader}s
    *  this composite is composed of should use {@link IndexReader#leaves()}.
    * @see IndexReader#leaves()
    */

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/CompositeReaderContext.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/CompositeReaderContext.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/CompositeReaderContext.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/CompositeReaderContext.java Wed Sep 24 01:20:36 2014
@@ -27,7 +27,7 @@ import java.util.List;
  */
 public final class CompositeReaderContext extends IndexReaderContext {
   private final List<IndexReaderContext> children;
-  private final List<AtomicReaderContext> leaves;
+  private final List<LeafReaderContext> leaves;
   private final CompositeReader reader;
   
   static CompositeReaderContext create(CompositeReader reader) {
@@ -46,13 +46,13 @@ public final class CompositeReaderContex
   /**
    * Creates a {@link CompositeReaderContext} for top-level readers with parent set to <code>null</code>
    */
-  CompositeReaderContext(CompositeReader reader, List<IndexReaderContext> children, List<AtomicReaderContext> leaves) {
+  CompositeReaderContext(CompositeReader reader, List<IndexReaderContext> children, List<LeafReaderContext> leaves) {
     this(null, reader, 0, 0, children, leaves);
   }
   
   private CompositeReaderContext(CompositeReaderContext parent, CompositeReader reader,
       int ordInParent, int docbaseInParent, List<IndexReaderContext> children,
-      List<AtomicReaderContext> leaves) {
+      List<LeafReaderContext> leaves) {
     super(parent, ordInParent, docbaseInParent);
     this.children = Collections.unmodifiableList(children);
     this.leaves = leaves == null ? null : Collections.unmodifiableList(leaves);
@@ -60,7 +60,7 @@ public final class CompositeReaderContex
   }
 
   @Override
-  public List<AtomicReaderContext> leaves() throws UnsupportedOperationException {
+  public List<LeafReaderContext> leaves() throws UnsupportedOperationException {
     if (!isTopLevel)
       throw new UnsupportedOperationException("This is not a top-level context.");
     assert leaves != null;
@@ -80,7 +80,7 @@ public final class CompositeReaderContex
   
   private static final class Builder {
     private final CompositeReader reader;
-    private final List<AtomicReaderContext> leaves = new ArrayList<>();
+    private final List<LeafReaderContext> leaves = new ArrayList<>();
     private int leafDocBase = 0;
     
     public Builder(CompositeReader reader) {
@@ -92,9 +92,9 @@ public final class CompositeReaderContex
     }
     
     private IndexReaderContext build(CompositeReaderContext parent, IndexReader reader, int ord, int docBase) {
-      if (reader instanceof AtomicReader) {
-        final AtomicReader ar = (AtomicReader) reader;
-        final AtomicReaderContext atomic = new AtomicReaderContext(parent, ar, ord, docBase, leaves.size(), leafDocBase);
+      if (reader instanceof LeafReader) {
+        final LeafReader ar = (LeafReader) reader;
+        final LeafReaderContext atomic = new LeafReaderContext(parent, ar, ord, docBase, leaves.size(), leafDocBase);
         leaves.add(atomic);
         leafDocBase += reader.maxDoc();
         return atomic;

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java Wed Sep 24 01:20:36 2014
@@ -49,7 +49,7 @@ import org.apache.lucene.store.Directory
  <code>IndexReader</code> instance; use your own
  (non-Lucene) objects instead.
 */
-public abstract class DirectoryReader extends BaseCompositeReader<AtomicReader> {
+public abstract class DirectoryReader extends BaseCompositeReader<LeafReader> {
 
   /** The index directory. */
   protected final Directory directory;
@@ -307,7 +307,7 @@ public abstract class DirectoryReader ex
    * Subclasses of {@code DirectoryReader} should take care to not allow
    * modification of this internal array, e.g. {@link #doOpenIfChanged()}.
    */
-  protected DirectoryReader(Directory directory, AtomicReader[] segmentReaders) {
+  protected DirectoryReader(Directory directory, LeafReader[] segmentReaders) {
     super(segmentReaders);
     this.directory = directory;
   }

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/DocValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/DocValues.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/DocValues.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/DocValues.java Wed Sep 24 01:20:36 2014
@@ -202,7 +202,7 @@ public final class DocValues {
   /**
    * Returns NumericDocValues for the reader, or {@link #emptyNumeric()} if it has none. 
    */
-  public static NumericDocValues getNumeric(AtomicReader in, String field) throws IOException {
+  public static NumericDocValues getNumeric(LeafReader in, String field) throws IOException {
     NumericDocValues dv = in.getNumericDocValues(field);
     if (dv == null) {
       return emptyNumeric();
@@ -214,7 +214,7 @@ public final class DocValues {
   /**
    * Returns BinaryDocValues for the reader, or {@link #emptyBinary} if it has none. 
    */
-  public static BinaryDocValues getBinary(AtomicReader in, String field) throws IOException {
+  public static BinaryDocValues getBinary(LeafReader in, String field) throws IOException {
     BinaryDocValues dv = in.getBinaryDocValues(field);
     if (dv == null) {
       dv = in.getSortedDocValues(field);
@@ -228,7 +228,7 @@ public final class DocValues {
   /**
    * Returns SortedDocValues for the reader, or {@link #emptySorted} if it has none. 
    */
-  public static SortedDocValues getSorted(AtomicReader in, String field) throws IOException {
+  public static SortedDocValues getSorted(LeafReader in, String field) throws IOException {
     SortedDocValues dv = in.getSortedDocValues(field);
     if (dv == null) {
       return emptySorted();
@@ -240,7 +240,7 @@ public final class DocValues {
   /**
    * Returns SortedNumericDocValues for the reader, or {@link #emptySortedNumeric} if it has none. 
    */
-  public static SortedNumericDocValues getSortedNumeric(AtomicReader in, String field) throws IOException {
+  public static SortedNumericDocValues getSortedNumeric(LeafReader in, String field) throws IOException {
     SortedNumericDocValues dv = in.getSortedNumericDocValues(field);
     if (dv == null) {
       NumericDocValues single = in.getNumericDocValues(field);
@@ -256,7 +256,7 @@ public final class DocValues {
   /**
    * Returns SortedSetDocValues for the reader, or {@link #emptySortedSet} if it has none. 
    */
-  public static SortedSetDocValues getSortedSet(AtomicReader in, String field) throws IOException {
+  public static SortedSetDocValues getSortedSet(LeafReader in, String field) throws IOException {
     SortedSetDocValues dv = in.getSortedSetDocValues(field);
     if (dv == null) {
       SortedDocValues sorted = in.getSortedDocValues(field);
@@ -271,7 +271,7 @@ public final class DocValues {
   /**
    * Returns Bits for the reader, or {@link Bits} matching nothing if it has none. 
    */
-  public static Bits getDocsWithField(AtomicReader in, String field) throws IOException {
+  public static Bits getDocsWithField(LeafReader in, String field) throws IOException {
     Bits dv = in.getDocsWithField(field);
     if (dv == null) {
       return new Bits.MatchNoBits(in.maxDoc());

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FilterDirectoryReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FilterDirectoryReader.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FilterDirectoryReader.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FilterDirectoryReader.java Wed Sep 24 01:20:36 2014
@@ -41,8 +41,8 @@ public abstract class FilterDirectoryRea
    */
   public static abstract class SubReaderWrapper {
 
-    private AtomicReader[] wrap(List<? extends AtomicReader> readers) {
-      AtomicReader[] wrapped = new AtomicReader[readers.size()];
+    private LeafReader[] wrap(List<? extends LeafReader> readers) {
+      LeafReader[] wrapped = new LeafReader[readers.size()];
       for (int i = 0; i < readers.size(); i++) {
         wrapped[i] = wrap(readers.get(i));
       }
@@ -57,7 +57,7 @@ public abstract class FilterDirectoryRea
      * @param reader the subreader to wrap
      * @return a wrapped/filtered AtomicReader
      */
-    public abstract AtomicReader wrap(AtomicReader reader);
+    public abstract LeafReader wrap(LeafReader reader);
 
   }
 
@@ -71,7 +71,7 @@ public abstract class FilterDirectoryRea
     public StandardReaderWrapper() {}
 
     @Override
-    public AtomicReader wrap(AtomicReader reader) {
+    public LeafReader wrap(LeafReader reader) {
       return reader;
     }
   }

Copied: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FilterLeafReader.java (from r1627177, lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FilterAtomicReader.java)
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FilterLeafReader.java?p2=lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FilterLeafReader.java&p1=lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FilterAtomicReader.java&r1=1627177&r2=1627188&rev=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FilterAtomicReader.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FilterLeafReader.java Wed Sep 24 01:20:36 2014
@@ -35,7 +35,7 @@ import org.apache.lucene.util.BytesRef;
  * methods and fields.
  * <p><b>NOTE</b>: If you override {@link #getLiveDocs()}, you will likely need
  * to override {@link #numDocs()} as well and vice-versa.
- * <p><b>NOTE</b>: If this {@link FilterAtomicReader} does not change the
+ * <p><b>NOTE</b>: If this {@link FilterLeafReader} does not change the
  * content the contained reader, you could consider overriding
  * {@link #getCoreCacheKey()} so that
  * {@link CachingWrapperFilter} shares the same entries for this atomic reader
@@ -43,13 +43,13 @@ import org.apache.lucene.util.BytesRef;
  * overridden as well if the {@link #getLiveDocs() live docs} are not changed
  * either.
  */
-public class FilterAtomicReader extends AtomicReader {
+public class FilterLeafReader extends LeafReader {
 
   /** Get the wrapped instance by <code>reader</code> as long as this reader is
-   *  an intance of {@link FilterAtomicReader}.  */
-  public static AtomicReader unwrap(AtomicReader reader) {
-    while (reader instanceof FilterAtomicReader) {
-      reader = ((FilterAtomicReader) reader).in;
+   *  an intance of {@link FilterLeafReader}.  */
+  public static LeafReader unwrap(LeafReader reader) {
+    while (reader instanceof FilterLeafReader) {
+      reader = ((FilterLeafReader) reader).in;
     }
     return reader;
   }
@@ -318,14 +318,14 @@ public class FilterAtomicReader extends 
   }
 
   /** The underlying AtomicReader. */
-  protected final AtomicReader in;
+  protected final LeafReader in;
 
   /**
    * <p>Construct a FilterAtomicReader based on the specified base reader.
    * <p>Note that base reader is closed if this FilterAtomicReader is closed.</p>
    * @param in specified base reader.
    */
-  public FilterAtomicReader(AtomicReader in) {
+  public FilterLeafReader(LeafReader in) {
     super();
     this.in = in;
     in.registerParentReader(this);

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/IndexReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/IndexReader.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/IndexReader.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/IndexReader.java Wed Sep 24 01:20:36 2014
@@ -49,7 +49,7 @@ import java.util.concurrent.atomic.Atomi
 
  <p>There are two different types of IndexReaders:
  <ul>
-  <li>{@link AtomicReader}: These indexes do not consist of several sub-readers,
+  <li>{@link LeafReader}: These indexes do not consist of several sub-readers,
   they are atomic. They support retrieval of stored fields, doc values, terms,
   and postings.
   <li>{@link CompositeReader}: Instances (like {@link DirectoryReader})
@@ -57,7 +57,7 @@ import java.util.concurrent.atomic.Atomi
   be used to get stored fields from the underlying AtomicReaders,
   but it is not possible to directly retrieve postings. To do that, get
   the sub-readers via {@link CompositeReader#getSequentialSubReaders}.
-  Alternatively, you can mimic an {@link AtomicReader} (with a serious slowdown),
+  Alternatively, you can mimic an {@link LeafReader} (with a serious slowdown),
   by wrapping composite readers with {@link SlowCompositeReaderWrapper}.
  </ul>
  
@@ -88,7 +88,7 @@ public abstract class IndexReader implem
   private final AtomicInteger refCount = new AtomicInteger(1);
 
   IndexReader() {
-    if (!(this instanceof CompositeReader || this instanceof AtomicReader))
+    if (!(this instanceof CompositeReader || this instanceof LeafReader))
       throw new Error("IndexReader should never be directly extended, subclass AtomicReader or CompositeReader instead.");
   }
   
@@ -129,7 +129,7 @@ public abstract class IndexReader implem
   }
   
   /** Expert: This method is called by {@code IndexReader}s which wrap other readers
-   * (e.g. {@link CompositeReader} or {@link FilterAtomicReader}) to register the parent
+   * (e.g. {@link CompositeReader} or {@link FilterLeafReader}) to register the parent
    * at the child (this reader) on construction of the parent. When this reader is closed,
    * it will mark all registered parents as closed, too. The references to parent readers
    * are weak only, so they can be GCed once they are no longer in use.
@@ -421,7 +421,7 @@ public abstract class IndexReader implem
    * context are private to this reader and are not shared with another context
    * tree. For example, IndexSearcher uses this API to drive searching by one
    * atomic leaf reader at a time. If this reader is not composed of child
-   * readers, this method returns an {@link AtomicReaderContext}.
+   * readers, this method returns an {@link LeafReaderContext}.
    * <p>
    * Note: Any of the sub-{@link CompositeReaderContext} instances referenced
    * from this top-level context do not support {@link CompositeReaderContext#leaves()}.
@@ -435,7 +435,7 @@ public abstract class IndexReader implem
    * This is a convenience method calling {@code this.getContext().leaves()}.
    * @see IndexReaderContext#leaves()
    */
-  public final List<AtomicReaderContext> leaves() {
+  public final List<LeafReaderContext> leaves() {
     return getContext().leaves();
   }
 

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/IndexReaderContext.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/IndexReaderContext.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/IndexReaderContext.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/IndexReaderContext.java Wed Sep 24 01:20:36 2014
@@ -34,7 +34,7 @@ public abstract class IndexReaderContext
   public final int ordInParent;
   
   IndexReaderContext(CompositeReaderContext parent, int ordInParent, int docBaseInParent) {
-    if (!(this instanceof CompositeReaderContext || this instanceof AtomicReaderContext))
+    if (!(this instanceof CompositeReaderContext || this instanceof LeafReaderContext))
       throw new Error("This class should never be extended by custom code!");
     this.parent = parent;
     this.docBaseInParent = docBaseInParent;
@@ -47,14 +47,14 @@ public abstract class IndexReaderContext
   
   /**
    * Returns the context's leaves if this context is a top-level context.
-   * For convenience, if this is an {@link AtomicReaderContext} this
+   * For convenience, if this is an {@link LeafReaderContext} this
    * returns itself as the only leaf.
    * <p>Note: this is convenience method since leaves can always be obtained by
    * walking the context tree using {@link #children()}.
    * @throws UnsupportedOperationException if this is not a top-level context.
    * @see #children()
    */
-  public abstract List<AtomicReaderContext> leaves() throws UnsupportedOperationException;
+  public abstract List<LeafReaderContext> leaves() throws UnsupportedOperationException;
   
   /**
    * Returns the context's children iff this context is a composite context

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java Wed Sep 24 01:20:36 2014
@@ -1224,13 +1224,13 @@ public class IndexWriter implements Clos
    *  reader you must use {@link #deleteDocuments(Term...)}). */
   public synchronized boolean tryDeleteDocument(IndexReader readerIn, int docID) throws IOException {
 
-    final AtomicReader reader;
-    if (readerIn instanceof AtomicReader) {
+    final LeafReader reader;
+    if (readerIn instanceof LeafReader) {
       // Reader is already atomic: use the incoming docID:
-      reader = (AtomicReader) readerIn;
+      reader = (LeafReader) readerIn;
     } else {
       // Composite reader: lookup sub-reader and re-base docID:
-      List<AtomicReaderContext> leaves = readerIn.leaves();
+      List<LeafReaderContext> leaves = readerIn.leaves();
       int subIndex = ReaderUtil.subIndex(docID, leaves);
       reader = leaves.get(subIndex).reader();
       docID -= leaves.get(subIndex).docBase;
@@ -2481,10 +2481,10 @@ public class IndexWriter implements Clos
       flush(false, true);
 
       String mergedName = newSegmentName();
-      final List<AtomicReader> mergeReaders = new ArrayList<>();
+      final List<LeafReader> mergeReaders = new ArrayList<>();
       for (IndexReader indexReader : readers) {
         numDocs += indexReader.numDocs();
-        for (AtomicReaderContext ctx : indexReader.leaves()) {
+        for (LeafReaderContext ctx : indexReader.leaves()) {
           mergeReaders.add(ctx.reader());
         }
       }
@@ -3945,7 +3945,7 @@ public class IndexWriter implements Clos
       try {
         if (!merger.shouldMerge()) {
           // would result in a 0 document segment: nothing to merge!
-          mergeState = new MergeState(new ArrayList<AtomicReader>(), merge.info.info, infoStream, checkAbort);
+          mergeState = new MergeState(new ArrayList<LeafReader>(), merge.info.info, infoStream, checkAbort);
         } else {
           mergeState = merger.merge();
         }
@@ -4375,10 +4375,10 @@ public class IndexWriter implements Clos
     protected IndexReaderWarmer() {
     }
 
-    /** Invoked on the {@link AtomicReader} for the newly
+    /** Invoked on the {@link LeafReader} for the newly
      *  merged segment, before that segment is made visible
      *  to near-real-time readers. */
-    public abstract void warm(AtomicReader reader) throws IOException;
+    public abstract void warm(LeafReader reader) throws IOException;
   }
 
   private void tragicEvent(Throwable tragedy, String location) {

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/IndexWriterConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/IndexWriterConfig.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/IndexWriterConfig.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/IndexWriterConfig.java Wed Sep 24 01:20:36 2014
@@ -110,7 +110,7 @@ public final class IndexWriterConfig ext
    *  ram buffers use <code>false</code> */
   public final static boolean DEFAULT_USE_COMPOUND_FILE_SYSTEM = true;
   
-  /** Default value for calling {@link AtomicReader#checkIntegrity()} before
+  /** Default value for calling {@link LeafReader#checkIntegrity()} before
    *  merging segments (set to <code>false</code>). You can set this
    *  to <code>true</code> for additional safety. */
   public final static boolean DEFAULT_CHECK_INTEGRITY_AT_MERGE = false;

Copied: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/LeafReader.java (from r1627177, lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/AtomicReader.java)
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/LeafReader.java?p2=lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/LeafReader.java&p1=lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/AtomicReader.java&r1=1627177&r2=1627188&rev=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/AtomicReader.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/LeafReader.java Wed Sep 24 01:20:36 2014
@@ -44,27 +44,27 @@ import org.apache.lucene.util.Bits;
  <code>IndexReader</code> instance; use your own
  (non-Lucene) objects instead.
 */
-public abstract class AtomicReader extends IndexReader {
+public abstract class LeafReader extends IndexReader {
 
-  private final AtomicReaderContext readerContext = new AtomicReaderContext(this);
+  private final LeafReaderContext readerContext = new LeafReaderContext(this);
 
   /** Sole constructor. (For invocation by subclass
    *  constructors, typically implicit.) */
-  protected AtomicReader() {
+  protected LeafReader() {
     super();
   }
 
   @Override
-  public final AtomicReaderContext getContext() {
+  public final LeafReaderContext getContext() {
     ensureOpen();
     return readerContext;
   }
 
   /**
-   * Called when the shared core for this {@link AtomicReader}
+   * Called when the shared core for this {@link LeafReader}
    * is closed.
    * <p>
-   * If this {@link AtomicReader} impl has the ability to share
+   * If this {@link LeafReader} impl has the ability to share
    * resources across instances that might only vary through
    * deleted documents and doc values updates, then this listener
    * will only be called when the shared core is closed.
@@ -112,9 +112,9 @@ public abstract class AtomicReader exten
   }
 
   /** Add a {@link CoreClosedListener} as a {@link ReaderClosedListener}. This
-   * method is typically useful for {@link AtomicReader} implementations that
+   * method is typically useful for {@link LeafReader} implementations that
    * don't have the concept of a core that is shared across several
-   * {@link AtomicReader} instances in which case the {@link CoreClosedListener}
+   * {@link LeafReader} instances in which case the {@link CoreClosedListener}
    * is called when closing the reader. */
   protected static void addCoreClosedListenerAsReaderClosedListener(IndexReader reader, CoreClosedListener listener) {
     reader.addReaderClosedListener(new CoreClosedListenerWrapper(listener));

Copied: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/LeafReaderContext.java (from r1627177, lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/AtomicReaderContext.java)
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/LeafReaderContext.java?p2=lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/LeafReaderContext.java&p1=lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/AtomicReaderContext.java&r1=1627177&r2=1627188&rev=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/AtomicReaderContext.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/LeafReaderContext.java Wed Sep 24 01:20:36 2014
@@ -21,22 +21,22 @@ import java.util.Collections;
 import java.util.List;
 
 /**
- * {@link IndexReaderContext} for {@link AtomicReader} instances.
+ * {@link IndexReaderContext} for {@link LeafReader} instances.
  */
-public final class AtomicReaderContext extends IndexReaderContext {
+public final class LeafReaderContext extends IndexReaderContext {
   /** The readers ord in the top-level's leaves array */
   public final int ord;
   /** The readers absolute doc base */
   public final int docBase;
   
-  private final AtomicReader reader;
-  private final List<AtomicReaderContext> leaves;
+  private final LeafReader reader;
+  private final List<LeafReaderContext> leaves;
   
   /**
-   * Creates a new {@link AtomicReaderContext} 
+   * Creates a new {@link LeafReaderContext} 
    */    
-  AtomicReaderContext(CompositeReaderContext parent, AtomicReader reader,
-      int ord, int docBase, int leafOrd, int leafDocBase) {
+  LeafReaderContext(CompositeReaderContext parent, LeafReader reader,
+                    int ord, int docBase, int leafOrd, int leafDocBase) {
     super(parent, ord, docBase);
     this.ord = leafOrd;
     this.docBase = leafDocBase;
@@ -44,12 +44,12 @@ public final class AtomicReaderContext e
     this.leaves = isTopLevel ? Collections.singletonList(this) : null;
   }
   
-  AtomicReaderContext(AtomicReader atomicReader) {
-    this(null, atomicReader, 0, 0, 0, 0);
+  LeafReaderContext(LeafReader leafReader) {
+    this(null, leafReader, 0, 0, 0, 0);
   }
   
   @Override
-  public List<AtomicReaderContext> leaves() {
+  public List<LeafReaderContext> leaves() {
     if (!isTopLevel) {
       throw new UnsupportedOperationException("This is not a top-level context.");
     }
@@ -63,7 +63,7 @@ public final class AtomicReaderContext e
   }
   
   @Override
-  public AtomicReader reader() {
+  public LeafReader reader() {
     return reader;
   }
 }
\ No newline at end of file

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/LiveIndexWriterConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/LiveIndexWriterConfig.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/LiveIndexWriterConfig.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/LiveIndexWriterConfig.java Wed Sep 24 01:20:36 2014
@@ -464,7 +464,7 @@ public class LiveIndexWriterConfig {
   }
   
   /**
-   * Sets if {@link IndexWriter} should call {@link AtomicReader#checkIntegrity()}
+   * Sets if {@link IndexWriter} should call {@link LeafReader#checkIntegrity()}
    * on existing segments before merging them into a new one.
    * <p>
    * Use <code>true</code> to enable this safety check, which can help
@@ -477,7 +477,7 @@ public class LiveIndexWriterConfig {
     return this;
   }
   
-  /** Returns true if {@link AtomicReader#checkIntegrity()} is called before 
+  /** Returns true if {@link LeafReader#checkIntegrity()} is called before 
    *  merging segments. */
   public boolean getCheckIntegrityAtMerge() {
     return checkIntegrityAtMerge;

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/MappedMultiFields.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/MappedMultiFields.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/MappedMultiFields.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/MappedMultiFields.java Wed Sep 24 01:20:36 2014
@@ -21,9 +21,9 @@ import java.io.IOException;
 
 import org.apache.lucene.util.Bits;
 
-import static org.apache.lucene.index.FilterAtomicReader.FilterFields;
-import static org.apache.lucene.index.FilterAtomicReader.FilterTerms;
-import static org.apache.lucene.index.FilterAtomicReader.FilterTermsEnum;
+import static org.apache.lucene.index.FilterLeafReader.FilterFields;
+import static org.apache.lucene.index.FilterLeafReader.FilterTerms;
+import static org.apache.lucene.index.FilterLeafReader.FilterTermsEnum;
 
 /** A {@link Fields} implementation that merges multiple
  *  Fields into one, and maps around deleted documents.

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/MergePolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/MergePolicy.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/MergePolicy.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/MergePolicy.java Wed Sep 24 01:20:36 2014
@@ -134,12 +134,12 @@ public abstract class MergePolicy {
      *  reorders doc IDs, it must override {@link #getDocMap} too so that
      *  deletes that happened during the merge can be applied to the newly
      *  merged segment. */
-    public List<AtomicReader> getMergeReaders() throws IOException {
+    public List<LeafReader> getMergeReaders() throws IOException {
       if (readers == null) {
         throw new IllegalStateException("IndexWriter has not initialized readers from the segment infos yet");
       }
-      final List<AtomicReader> readers = new ArrayList<>(this.readers.size());
-      for (AtomicReader reader : this.readers) {
+      final List<LeafReader> readers = new ArrayList<>(this.readers.size());
+      for (LeafReader reader : this.readers) {
         if (reader.numDocs() > 0) {
           readers.add(reader);
         }

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/MergeState.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/MergeState.java?rev=1627188&r1=1627187&r2=1627188&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/MergeState.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/MergeState.java Wed Sep 24 01:20:36 2014
@@ -59,7 +59,7 @@ public class MergeState {
 
     /** Creates a {@link DocMap} instance appropriate for
      *  this reader. */
-    public static DocMap build(AtomicReader reader) {
+    public static DocMap build(LeafReader reader) {
       final int maxDoc = reader.maxDoc();
       if (!reader.hasDeletions()) {
         return new NoDelDocMap(maxDoc);
@@ -137,7 +137,7 @@ public class MergeState {
   public FieldInfos fieldInfos;
 
   /** Readers being merged. */
-  public final List<AtomicReader> readers;
+  public final List<LeafReader> readers;
 
   /** Maps docIDs around deletions. */
   public DocMap[] docMaps;
@@ -157,7 +157,7 @@ public class MergeState {
   public int checkAbortCount;
 
   /** Sole constructor. */
-  MergeState(List<AtomicReader> readers, SegmentInfo segmentInfo, InfoStream infoStream, CheckAbort checkAbort) {
+  MergeState(List<LeafReader> readers, SegmentInfo segmentInfo, InfoStream infoStream, CheckAbort checkAbort) {
     this.readers = readers;
     this.segmentInfo = segmentInfo;
     this.infoStream = infoStream;