private static SolrIndexReader wrap(IndexReader r) { SolrIndexReader sir; // wrap the reader if (!(r instanceof SolrIndexReader)) { sir = new SolrIndexReader(r, null, 0); sir.associateInfo(null); } else { sir = (SolrIndexReader)r; } return sir; }
@Override public SolrIndexReader reopen(boolean openReadOnly) throws IOException { IndexReader r = in.reopen(openReadOnly); if (r == in) { return this; } SolrIndexReader sr = new SolrIndexReader(r, null, 0); sr.associateInfo(this); return sr; }