org.apache.lucene.index.AtomicReaderContext



API Populatity

6 Client projects

Project: org.apache

Project apache/lucene-solr in file ...c.java.org.apache.lucene.search.LeafCollector.java (2014-09-23)
@@ -19,8 +19,6 @@ package org.apache.lucene.search;
 
 import java.io.IOException;
 
-import org.apache.lucene.index.AtomicReaderContext;
-
 /**
  * <p>Collector decouples the score from the collected doc:
  * the score computation is skipped entirely if it's not
@@ -90,7 +88,7 @@ public interface LeafCollector {
    * number.
    * <p>Note: The collection of the current segment can be terminated by throwing
    * a {@link CollectionTerminatedException}. In this case, the last docs of the
-   * current {@link AtomicReaderContext} will be skipped and {@link IndexSearcher}
+   * current {@link org.apache.lucene.index.LeafReaderContext} will be skipped and {@link IndexSearcher}
    * will swallow the exception and continue collection with the next leaf.
    * <p>
    * Note: This is called in an inner search loop. For good search performance,
Project apache/lucene-solr in file ....lucene.search.TestScoreCachingWrappingScorer.java (2014-08-09)
@@ -19,7 +19,6 @@ package org.apache.lucene.search;
 
 import java.io.IOException;
 
-import org.apache.lucene.index.AtomicReaderContext;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.RandomIndexWriter;
 import org.apache.lucene.index.Term;
@@ -107,7 +106,7 @@ public class TestScoreCachingWrappingScorer extends LuceneTestCase {
     RandomIndexWriter writer = new RandomIndexWriter(random(), directory);
     writer.commit();
     IndexReader ir = writer.getReader();
-    writer.shutdown();
+    writer.close();
     IndexSearcher searcher = newSearcher(ir);
     Weight fake = new TermQuery(new Term("fake", "weight")).createWeight(searcher);
     Scorer s = new SimpleScorer(fake);
Project elasticsearch/elasticsearch in file ...torhighlight.SourceScoreOrderFragmentsBuilder.java (2012-11-01)
@@ -20,6 +20,7 @@
 package org.elasticsearch.search.highlight.vectorhighlight;
 
 import org.apache.lucene.document.Field;
+import org.apache.lucene.index.AtomicReaderContext;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.search.vectorhighlight.BoundaryScanner;
 import org.apache.lucene.search.vectorhighlight.XScoreOrderFragmentsBuilder;
@@ -50,7 +51,7 @@ public class SourceScoreOrderFragmentsBuilder extends XScoreOrderFragmentsBuilde
     protected Field[] getFields(IndexReader reader, int docId, String fieldName) throws IOException {
         // we know its low level reader, and matching docId, since that's how we call the highlighter with
         SearchLookup lookup = searchContext.lookup();
-        lookup.setNextReader(reader);
+        lookup.setNextReader((AtomicReaderContext) reader.getContext());
         lookup.setNextDocId(docId);
 
         List<Object> values = lookup.source().extractRawValues(mapper.names().sourcePath());