本文整理汇总了C#中Frame.ScanToFloorFrame方法的典型用法代码示例。如果您正苦于以下问题:C# Frame.ScanToFloorFrame方法的具体用法?C# Frame.ScanToFloorFrame怎么用?C# Frame.ScanToFloorFrame使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Frame
的用法示例。
在下文中一共展示了Frame.ScanToFloorFrame方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PrintSeekState
//.........这里部分代码省略.........
{
// Fresh TermsEnum; seek to first term:
FST<BytesRef>.Arc<BytesRef> arc;
if (OuterInstance.Index != null)
{
arc = OuterInstance.Index.GetFirstArc(Arcs[0]);
// Empty string prefix must have an output in the index!
Debug.Assert(arc.Final);
}
else
{
arc = null;
}
CurrentFrame = PushFrame(arc, OuterInstance.RootCode, 0);
CurrentFrame.LoadBlock();
}
TargetBeforeCurrentLength = CurrentFrame.Ord;
Debug.Assert(!Eof);
//if (DEBUG) {
//System.out.println("\nBTTR.next seg=" + segment + " term=" + brToString(term) + " termExists?=" + termExists + " field=" + fieldInfo.name + " termBlockOrd=" + currentFrame.state.termBlockOrd + " validIndexPrefix=" + validIndexPrefix);
//printSeekState();
//}
if (CurrentFrame == StaticFrame)
{
// If seek was previously called and the term was
// cached, or seek(TermState) was called, usually
// caller is just going to pull a D/&PEnum or get
// docFreq, etc. But, if they then call next(),
// this method catches up all internal state so next()
// works properly:
//if (DEBUG) System.out.println(" re-seek to pending term=" + term.utf8ToString() + " " + term);
bool result = SeekExact(Term_Renamed);
Debug.Assert(result);
}
// Pop finished blocks
while (CurrentFrame.NextEnt == CurrentFrame.EntCount)
{
if (!CurrentFrame.IsLastInFloor)
{
CurrentFrame.LoadNextFloorBlock();
}
else
{
//if (DEBUG) System.out.println(" pop frame");
if (CurrentFrame.Ord == 0)
{
//if (DEBUG) System.out.println(" return null");
Debug.Assert(SetEOF());
Term_Renamed.Length = 0;
ValidIndexPrefix = 0;
CurrentFrame.Rewind();
TermExists = false;
return null;
}
long lastFP = CurrentFrame.FpOrig;
CurrentFrame = Stack[CurrentFrame.Ord - 1];
if (CurrentFrame.NextEnt == -1 || CurrentFrame.LastSubFP != lastFP)
{
// We popped into a frame that's not loaded
// yet or not scan'd to the right entry
CurrentFrame.ScanToFloorFrame(Term_Renamed);
CurrentFrame.LoadBlock();
CurrentFrame.ScanToSubBlock(lastFP);
}
// Note that the seek state (last seek) has been
// invalidated beyond this depth
ValidIndexPrefix = Math.Min(ValidIndexPrefix, CurrentFrame.Prefix);
//if (DEBUG) {
//System.out.println(" reset validIndexPrefix=" + validIndexPrefix);
//}
}
}
while (true)
{
if (CurrentFrame.Next())
{
// Push to new block:
//if (DEBUG) System.out.println(" push frame");
CurrentFrame = PushFrame(null, CurrentFrame.LastSubFP, Term_Renamed.Length);
// this is a "next" frame -- even if it's
// floor'd we must pretend it isn't so we don't
// try to scan to the right floor frame:
CurrentFrame.IsFloor = false;
//currentFrame.hasTerms = true;
CurrentFrame.LoadBlock();
}
else
{
//if (DEBUG) System.out.println(" return term=" + term.utf8ToString() + " " + term + " currentFrame.ord=" + currentFrame.ord);
return Term_Renamed;
}
}
}