internal SepDocsEnum(SepPostingsReader outerInstance) { this.outerInstance = outerInstance; startDocIn = outerInstance.docIn; docReader = outerInstance.docIn.GetReader(); docIndex = outerInstance.docIn.GetIndex(); if (outerInstance.freqIn != null) { freqReader = outerInstance.freqIn.GetReader(); freqIndex = outerInstance.freqIn.GetIndex(); } else { freqReader = null; freqIndex = null; } if (outerInstance.posIn != null) { posIndex = outerInstance.posIn.GetIndex(); // only init this so skipper can read it } else { posIndex = null; } }
internal SepDocsAndPositionsEnum(SepPostingsReader outerInstance) { this.outerInstance = outerInstance; startDocIn = outerInstance.docIn; docReader = outerInstance.docIn.GetReader(); docIndex = outerInstance.docIn.GetIndex(); freqReader = outerInstance.freqIn.GetReader(); freqIndex = outerInstance.freqIn.GetIndex(); posReader = outerInstance.posIn.GetReader(); posIndex = outerInstance.posIn.GetIndex(); payloadIn = (IndexInput)outerInstance.payloadIn.Clone(); }
internal SepDocsAndPositionsEnum(SepPostingsReader outerInstance) { _outerInstance = outerInstance; _docReader = outerInstance._docIn.Reader(); _docIndex = outerInstance._docIn.Index(); _freqReader = outerInstance._freqIn.Reader(); _freqIndex = outerInstance._freqIn.Index(); _posReader = outerInstance._posIn.Reader(); _posIndex = outerInstance._posIn.Index(); _payloadIn = (IndexInput)outerInstance._payloadIn.Clone(); START_DOC_IN = outerInstance._docIn; }
internal SepDocsEnum(SepPostingsReader outerInstance) { _outerInstance = outerInstance; _docReader = outerInstance._docIn.Reader(); _docIndex = outerInstance._docIn.Index(); if (outerInstance._freqIn != null) { _freqReader = outerInstance._freqIn.Reader(); _freqIndex = outerInstance._freqIn.Index(); } else { _freqReader = null; _freqIndex = null; } _posIndex = outerInstance._posIn != null?outerInstance._posIn.Index() : null; START_DOC_IN = outerInstance._docIn; }
public override FieldsProducer FieldsProducer(SegmentReadState state) { PostingsReaderBase postingsReader = new SepPostingsReader(state.Directory, state.FieldInfos, state.SegmentInfo, state.Context, new MockIntFactory(baseBlockSize), state.SegmentSuffix); TermsIndexReaderBase indexReader; bool success = false; try { indexReader = new FixedGapTermsIndexReader(state.Directory, state.FieldInfos, state.SegmentInfo.Name, state.TermsIndexDivisor, BytesRef.UTF8SortedAsUnicodeComparer, state.SegmentSuffix, state.Context); success = true; } finally { if (!success) { postingsReader.Dispose(); } } success = false; try { FieldsProducer ret = new BlockTermsReader(indexReader, state.Directory, state.FieldInfos, state.SegmentInfo, postingsReader, state.Context, state.SegmentSuffix); success = true; return ret; } finally { if (!success) { try { postingsReader.Dispose(); } finally { indexReader.Dispose(); } } } }
internal SepDocsAndPositionsEnum(SepPostingsReader outerInstance) { _outerInstance = outerInstance; _docReader = outerInstance._docIn.Reader(); _docIndex = outerInstance._docIn.Index(); _freqReader = outerInstance._freqIn.Reader(); _freqIndex = outerInstance._freqIn.Index(); _posReader = outerInstance._posIn.Reader(); _posIndex = outerInstance._posIn.Index(); _payloadIn = (IndexInput) outerInstance._payloadIn.Clone(); START_DOC_IN = outerInstance._docIn; }
internal SepDocsEnum(SepPostingsReader outerInstance) { _outerInstance = outerInstance; _docReader = outerInstance._docIn.Reader(); _docIndex = outerInstance._docIn.Index(); if (outerInstance._freqIn != null) { _freqReader = outerInstance._freqIn.Reader(); _freqIndex = outerInstance._freqIn.Index(); } else { _freqReader = null; _freqIndex = null; } _posIndex = outerInstance._posIn != null ? outerInstance._posIn.Index() : null; START_DOC_IN = outerInstance._docIn; }