Fix test failure.

This commit is contained in:
Martijn van Groningen 2013-12-09 17:27:58 +01:00
parent 1b481ef395
commit d3fde78394
1 changed files with 3 additions and 1 deletions

View File

@ -71,7 +71,9 @@ public interface FetchSubPhase {
public IndexSearcher searcher() {
if (atomicIndexSearcher == null) {
atomicIndexSearcher = new IndexSearcher(readerContext);
// Use the reader directly otherwise the IndexSearcher assertion will trip because it expects a top level
// reader context.
atomicIndexSearcher = new IndexSearcher(readerContext.reader());
}
return atomicIndexSearcher;
}