public virtual void Reset(IBits liveDocs, TermAndPostings termAndPostings) { this.liveDocs = liveDocs; this.freq = termAndPostings.Freq; this.doc = -1; didNext = false; }
public virtual void Reset(Bits liveDocs, TermAndPostings termAndPostings) { this.LiveDocs = liveDocs; this.Freq_Renamed = termAndPostings.Freq; this.Doc = -1; DidNext = false; }
public virtual void Reset(IBits liveDocs, TermAndPostings termAndPostings) { this.liveDocs = liveDocs; this.positions = termAndPostings.Positions; this.startOffsets = termAndPostings.StartOffsets; this.endOffsets = termAndPostings.EndOffsets; this.doc = -1; didNext = false; nextPos = 0; }
public virtual void Reset(Bits liveDocs, TermAndPostings termAndPostings) { this.LiveDocs = liveDocs; this.Positions = termAndPostings.Positions; this.StartOffsets = termAndPostings.StartOffsets; this.EndOffsets = termAndPostings.EndOffsets; this.Doc = -1; DidNext = false; NextPos = 0; }
private void ReadVectors() { termAndPostings = new TermAndPostings[numTerms]; BytesRef lastTerm = new BytesRef(); for (int i = 0; i < numTerms; i++) { TermAndPostings t = new TermAndPostings(); BytesRef term = new BytesRef(); term.CopyBytes(lastTerm); int start = tvf.ReadVInt32(); int deltaLen = tvf.ReadVInt32(); term.Length = start + deltaLen; term.Grow(term.Length); tvf.ReadBytes(term.Bytes, start, deltaLen); t.Term = term; int freq = tvf.ReadVInt32(); t.Freq = freq; if (storePositions) { int[] positions = new int[freq]; int pos = 0; for (int posUpto = 0; posUpto < freq; posUpto++) { int delta = tvf.ReadVInt32(); if (delta == -1) { delta = 0; // LUCENE-1542 correction } pos += delta; positions[posUpto] = pos; } t.Positions = positions; } if (storeOffsets) { int[] startOffsets = new int[freq]; int[] endOffsets = new int[freq]; int offset = 0; for (int posUpto = 0; posUpto < freq; posUpto++) { startOffsets[posUpto] = offset + tvf.ReadVInt32(); offset = endOffsets[posUpto] = startOffsets[posUpto] + tvf.ReadVInt32(); } t.StartOffsets = startOffsets; t.EndOffsets = endOffsets; } lastTerm.CopyBytes(term); termAndPostings[i] = t; } }