protected internal override void DoClose() { fieldsReader.Close(); tis.Close(); if (freqStream != null) { freqStream.Close(); } if (proxStream != null) { proxStream.Close(); } CloseNorms(); if (termVectorsReaderOrig != null) { termVectorsReaderOrig.Close(); } if (cfsReader != null) { cfsReader.Close(); } }
protected internal override void DoClose() { TermVectorsReader tvReader = (TermVectorsReader)System.Threading.Thread.GetData(termVectorsLocal); if (tvReader != null) { tvReader.Close(); System.Threading.Thread.SetData(termVectorsLocal, null); } fieldsReader.Close(); tis.Close(); if (freqStream != null) { freqStream.Close(); } if (proxStream != null) { proxStream.Close(); } CloseNorms(); if (termVectorsReaderOrig != null) { termVectorsReaderOrig.Close(); } if (cfsReader != null) { cfsReader.Close(); } }
protected internal override void DoClose() { bool hasReferencedReader = (referencedSegmentReader != null); termVectorsLocal.Close(); //termVectorsLocal.Clear(); if (hasReferencedReader) { referencedSegmentReader.DecRefReaderNotNorms(); referencedSegmentReader = null; } deletedDocs = null; // close the single norms stream if (singleNormStream != null) { // we can close this stream, even if the norms // are shared, because every reader has it's own // singleNormStream singleNormStream.Close(); singleNormStream = null; } // re-opened SegmentReaders have their own instance of FieldsReader if (fieldsReader != null) { fieldsReader.Close(); } if (!hasReferencedReader) { // close everything, nothing is shared anymore with other readers if (tis != null) { tis.Close(); } if (freqStream != null) { freqStream.Close(); } if (proxStream != null) { proxStream.Close(); } if (termVectorsReaderOrig != null) { termVectorsReaderOrig.Close(); } if (cfsReader != null) { cfsReader.Close(); } if (storeCFSReader != null) { storeCFSReader.Close(); } // maybe close directory base.DoClose(); } }