internal SepSkipListReader(IndexInput skipStream, IntIndexInput freqIn, IntIndexInput docIn, IntIndexInput posIn, int maxSkipLevels, int skipInterval) : base(skipStream, maxSkipLevels, skipInterval) { if (freqIn != null) _freqIndex = new IntIndexInputIndex[maxSkipLevels]; _docIndex = new IntIndexInputIndex[maxSkipLevels]; if (posIn != null) _posIndex = new IntIndexInputIndex[MaxNumberOfSkipLevels]; for (var i = 0; i < maxSkipLevels; i++) { if (freqIn != null) _freqIndex[i] = freqIn.Index(); _docIndex[i] = docIn.Index(); if (posIn != null) _posIndex[i] = posIn.Index(); } _payloadPointer = new long[maxSkipLevels]; _payloadLength = new int[maxSkipLevels]; _lastFreqIndex = freqIn != null ? freqIn.Index() : null; _lastDocIndex = docIn.Index(); _lastPosIndex = posIn != null ? posIn.Index() : null; }
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; }
public SepPostingsReader(Directory dir, FieldInfos fieldInfos, SegmentInfo segmentInfo, IOContext context, IntStreamFactory intFactory, string segmentSuffix) { var success = false; try { var docFileName = IndexFileNames.SegmentFileName(segmentInfo.Name, segmentSuffix, SepPostingsWriter.DOC_EXTENSION); _docIn = intFactory.OpenInput(dir, docFileName, context); _skipIn = dir.OpenInput( IndexFileNames.SegmentFileName(segmentInfo.Name, segmentSuffix, SepPostingsWriter.SKIP_EXTENSION), context); if (fieldInfos.HasFreq()) { _freqIn = intFactory.OpenInput(dir, IndexFileNames.SegmentFileName(segmentInfo.Name, segmentSuffix, SepPostingsWriter.FREQ_EXTENSION), context); } else { _freqIn = null; } if (fieldInfos.HasProx()) { _posIn = intFactory.OpenInput(dir, IndexFileNames.SegmentFileName(segmentInfo.Name, segmentSuffix, SepPostingsWriter.POS_EXTENSION), context); _payloadIn = dir.OpenInput( IndexFileNames.SegmentFileName(segmentInfo.Name, segmentSuffix, SepPostingsWriter.PAYLOAD_EXTENSION), context); } else { _posIn = null; _payloadIn = null; } success = true; } finally { if (!success) { Dispose(); } } }
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; }
internal SepSkipListReader(IndexInput skipStream, IntIndexInput freqIn, IntIndexInput docIn, IntIndexInput posIn, int maxSkipLevels, int skipInterval) : base(skipStream, maxSkipLevels, skipInterval) { if (freqIn != null) { _freqIndex = new IntIndexInputIndex[maxSkipLevels]; } _docIndex = new IntIndexInputIndex[maxSkipLevels]; if (posIn != null) { _posIndex = new IntIndexInputIndex[MaxNumberOfSkipLevels]; } for (var i = 0; i < maxSkipLevels; i++) { if (freqIn != null) { _freqIndex[i] = freqIn.Index(); } _docIndex[i] = docIn.Index(); if (posIn != null) { _posIndex[i] = posIn.Index(); } } _payloadPointer = new long[maxSkipLevels]; _payloadLength = new int[maxSkipLevels]; _lastFreqIndex = freqIn != null?freqIn.Index() : null; _lastDocIndex = docIn.Index(); _lastPosIndex = posIn != null?posIn.Index() : null; }
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; }