コード例 #1
0
        /// <exception cref="System.IO.IOException"/>
        internal SepSkipListReader(IndexInput skipStream,
                                   Int32IndexInput freqIn,
                                   Int32IndexInput docIn,
                                   Int32IndexInput posIn,
                                   int maxSkipLevels,
                                   int skipInterval)
            : base(skipStream, maxSkipLevels, skipInterval)
        {
            if (freqIn != null)
            {
                freqIndex = new Int32IndexInput.Index[maxSkipLevels];
            }
            docIndex = new Int32IndexInput.Index[maxSkipLevels];
            if (posIn != null)
            {
                posIndex = new Int32IndexInput.Index[m_maxNumberOfSkipLevels];
            }
            for (int i = 0; i < maxSkipLevels; i++)
            {
                if (freqIn != null)
                {
                    freqIndex[i] = freqIn.GetIndex();
                }
                docIndex[i] = docIn.GetIndex();
                if (posIn != null)
                {
                    posIndex[i] = posIn.GetIndex();
                }
            }
            payloadPointer = new long[maxSkipLevels];
            payloadLength  = new int[maxSkipLevels];

            if (freqIn != null)
            {
                lastFreqIndex = freqIn.GetIndex();
            }
            else
            {
                lastFreqIndex = null;
            }
            lastDocIndex = docIn.GetIndex();
            if (posIn != null)
            {
                lastPosIndex = posIn.GetIndex();
            }
            else
            {
                lastPosIndex = null;
            }
        }
コード例 #2
0
        public override BlockTermState NewTermState()
        {
            SepTermState state = new SepTermState();

            state.docIndex = docIn.GetIndex();
            if (freqIn != null)
            {
                state.freqIndex = freqIn.GetIndex();
            }
            if (posIn != null)
            {
                state.posIndex = posIn.GetIndex();
            }
            return(state);
        }