本文整理汇总了C#中Lucene.Net.Util.BytesRef.Grow方法的典型用法代码示例。如果您正苦于以下问题:C# Lucene.Net.Util.BytesRef.Grow方法的具体用法?C# Lucene.Net.Util.BytesRef.Grow怎么用?C# Lucene.Net.Util.BytesRef.Grow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lucene.Net.Util.BytesRef
的用法示例。
在下文中一共展示了Lucene.Net.Util.BytesRef.Grow方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CompareTo
/// <summary>
/// Compare the fields of the terms first, and if not equals return from
/// compare. If equal compare terms.
/// </summary>
/// <param name="term">
/// the term to compare. </param>
/// <param name="termIndex">
/// the position of the term in the input to compare </param>
/// <param name="input">
/// the input buffer. </param>
/// <returns> int. </returns>
/// <exception cref="IOException"> If there is a low-level I/O error. </exception>
private int CompareTo(Term term, int termIndex, PagedBytesDataInput input, BytesRef reuse)
{
// if term field does not equal mid's field index, then compare fields
// else if they are equal, compare term's string values...
int c = CompareField(term, termIndex, input);
if (c == 0)
{
reuse.Length = input.ReadVInt();
reuse.Grow(reuse.Length);
input.ReadBytes(reuse.Bytes, 0, reuse.Length);
return Comparator.Compare(term.Bytes, reuse);
}
return c;
}