throw new IllegalStateException("Can't wrap non elasticsearch directory reader"); NonClosingReaderWrapper nonClosingReaderWrapper = new NonClosingReaderWrapper(engineSearcher.getDirectoryReader()); DirectoryReader reader = wrap(nonClosingReaderWrapper); if (reader != nonClosingReaderWrapper) {
throw new IllegalStateException("Can't wrap non elasticsearch directory reader"); NonClosingReaderWrapper nonClosingReaderWrapper = new NonClosingReaderWrapper(engineSearcher.getDirectoryReader()); DirectoryReader reader = wrap(nonClosingReaderWrapper); if (reader != nonClosingReaderWrapper) {
throw new IllegalStateException("Can't wrap non elasticsearch directory reader"); NonClosingReaderWrapper nonClosingReaderWrapper = new NonClosingReaderWrapper(engineSearcher.getDirectoryReader()); DirectoryReader reader = wrap(nonClosingReaderWrapper); if (reader != nonClosingReaderWrapper) {
throw new IllegalStateException("Can't wrap non elasticsearch directory reader"); NonClosingReaderWrapper nonClosingReaderWrapper = new NonClosingReaderWrapper(engineSearcher.getDirectoryReader()); DirectoryReader reader = wrap(nonClosingReaderWrapper); if (reader != nonClosingReaderWrapper) {
@Override protected DirectoryReader doWrapDirectoryReader(DirectoryReader in) throws IOException { return new NonClosingReaderWrapper(in); }
@Override protected DirectoryReader doWrapDirectoryReader(DirectoryReader in) throws IOException { return new NonClosingReaderWrapper(in); }
@Override protected DirectoryReader doWrapDirectoryReader(DirectoryReader in) throws IOException { return new NonClosingReaderWrapper(in); }