Esempio n. 1
0
        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;
        }
Esempio n. 2
0
            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;
            }
Esempio n. 3
0
            public override void CopyFrom(TermState tsOther)
            {
                base.CopyFrom(tsOther);

                var other = (SepTermState)tsOther;

                if (DOC_INDEX == null)
                {
                    DOC_INDEX = other.DOC_INDEX.Clone();
                }
                else
                {
                    DOC_INDEX.CopyFrom(other.DOC_INDEX);
                }
                if (other.FREQ_INDEX != null)
                {
                    if (FREQ_INDEX == null)
                    {
                        FREQ_INDEX = other.FREQ_INDEX.Clone();
                    }
                    else
                    {
                        FREQ_INDEX.CopyFrom(other.FREQ_INDEX);
                    }
                }
                else
                {
                    FREQ_INDEX = null;
                }
                if (other.POS_INDEX != null)
                {
                    if (POS_INDEX == null)
                    {
                        POS_INDEX = other.POS_INDEX.Clone();
                    }
                    else
                    {
                        POS_INDEX.CopyFrom(other.POS_INDEX);
                    }
                }
                else
                {
                    POS_INDEX = null;
                }
                PAYLOAD_FP = other.PAYLOAD_FP;
                SKIP_FP    = other.SKIP_FP;
            }
Esempio n. 4
0
            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;
            }
Esempio n. 5
0
        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;
        }
Esempio n. 6
0
        internal virtual void Init(long skipPointer, IntIndexInputIndex docBaseIndex, IntIndexInputIndex freqBaseIndex,
                                   IntIndexInputIndex posBaseIndex, long payloadBasePointer, int df, bool storesPayloads)
        {
            base.Init(skipPointer, df);
            _currentFieldStoresPayloads = storesPayloads;

            _lastPayloadPointer = payloadBasePointer;

            for (var i = 0; i < MaxNumberOfSkipLevels; i++)
            {
                _docIndex[i].CopyFrom(docBaseIndex);
                if (_freqIndex != null)
                {
                    _freqIndex[i].CopyFrom(freqBaseIndex);
                }

                if (posBaseIndex != null)
                {
                    _posIndex[i].CopyFrom(posBaseIndex);
                }
            }
            Arrays.Fill(_payloadPointer, payloadBasePointer);
            Arrays.Fill(_payloadLength, 0);
        }
 public override void CopyFrom(IntIndexInputIndex other)
 {
     fp = ((MockSingleIntIndexInputIndex)other).fp;
 }
Esempio n. 8
0
 public abstract void CopyFrom(IntIndexInputIndex other);
 public override void CopyFrom(IntIndexInputIndex other)
 {
     InputIndex idx = (InputIndex)other;
     fp = idx.fp;
     upto = idx.upto;
 }
Esempio n. 10
0
 public abstract void CopyFrom(IntIndexInputIndex other);
Esempio n. 11
0
        internal virtual void Init(long skipPointer, IntIndexInputIndex docBaseIndex, IntIndexInputIndex freqBaseIndex,
            IntIndexInputIndex posBaseIndex, long payloadBasePointer, int df, bool storesPayloads)
        {
            base.Init(skipPointer, df);
            _currentFieldStoresPayloads = storesPayloads;

            _lastPayloadPointer = payloadBasePointer;

            for (var i = 0; i < MaxNumberOfSkipLevels; i++)
            {
                _docIndex[i].CopyFrom(docBaseIndex);
                if (_freqIndex != null)
                    _freqIndex[i].CopyFrom(freqBaseIndex);

                if (posBaseIndex != null)
                    _posIndex[i].CopyFrom(posBaseIndex);
            }
            Arrays.Fill(_payloadPointer, payloadBasePointer);
            Arrays.Fill(_payloadLength, 0);
        }
Esempio n. 12
0
            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;
            }
Esempio n. 13
0
            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;
            }
Esempio n. 14
0
            public override void CopyFrom(TermState tsOther)
            {
                base.CopyFrom(tsOther);

                var other = (SepTermState)tsOther;
                if (DOC_INDEX == null)
                {
                    DOC_INDEX = other.DOC_INDEX.Clone();
                }
                else
                {
                    DOC_INDEX.CopyFrom(other.DOC_INDEX);
                }
                if (other.FREQ_INDEX != null)
                {
                    if (FREQ_INDEX == null)
                    {
                        FREQ_INDEX = other.FREQ_INDEX.Clone();
                    }
                    else
                    {
                        FREQ_INDEX.CopyFrom(other.FREQ_INDEX);
                    }
                }
                else
                {
                    FREQ_INDEX = null;
                }
                if (other.POS_INDEX != null)
                {
                    if (POS_INDEX == null)
                    {
                        POS_INDEX = other.POS_INDEX.Clone();
                    }
                    else
                    {
                        POS_INDEX.CopyFrom(other.POS_INDEX);
                    }
                }
                else
                {
                    POS_INDEX = null;
                }
                PAYLOAD_FP = other.PAYLOAD_FP;
                SKIP_FP = other.SKIP_FP;
            }