本文整理汇总了C#中Lucene.Net.Store.IndexInput.Seek方法的典型用法代码示例。如果您正苦于以下问题:C# Lucene.Net.Store.IndexInput.Seek方法的具体用法?C# Lucene.Net.Store.IndexInput.Seek怎么用?C# Lucene.Net.Store.IndexInput.Seek使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lucene.Net.Store.IndexInput
的用法示例。
在下文中一共展示了Lucene.Net.Store.IndexInput.Seek方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AssertSameStreams
private void AssertSameStreams(System.String msg, IndexInput expected, IndexInput actual, long seekTo)
{
if (seekTo >= 0 && seekTo < expected.Length())
{
expected.Seek(seekTo);
actual.Seek(seekTo);
AssertSameStreams(msg + ", seek(mid)", expected, actual);
}
}
示例2: GetOrdIndexInstance
/// <summary>
/// returns an address instance for sortedset ordinal lists
/// @lucene.internal
/// </summary>
protected internal virtual MonotonicBlockPackedReader GetOrdIndexInstance(IndexInput data, FieldInfo field, NumericEntry entry)
{
MonotonicBlockPackedReader ordIndex;
lock (OrdIndexInstances)
{
MonotonicBlockPackedReader ordIndexInstance;
if (!OrdIndexInstances.TryGetValue(field.Number, out ordIndexInstance))
{
data.Seek(entry.Offset);
ordIndexInstance = new MonotonicBlockPackedReader(data, entry.PackedIntsVersion, entry.BlockSize, entry.Count, false);
OrdIndexInstances[field.Number] = ordIndexInstance;
RamBytesUsed_Renamed.AddAndGet(ordIndexInstance.RamBytesUsed() + RamUsageEstimator.NUM_BYTES_INT);
}
ordIndex = ordIndexInstance;
}
return ordIndex;
}
示例3: GetTermsEnum
internal virtual TermsEnum GetTermsEnum(IndexInput input)
{
input.Seek(Bytes.Offset);
return new TermsEnumAnonymousInnerClassHelper(this, input);
}
示例4: GetIntervalInstance
/// <summary>
/// returns an address instance for prefix-compressed binary values.
/// @lucene.internal
/// </summary>
protected internal virtual MonotonicBlockPackedReader GetIntervalInstance(IndexInput data, FieldInfo field, BinaryEntry bytes)
{
MonotonicBlockPackedReader addresses;
long interval = bytes.AddressInterval;
lock (AddressInstances)
{
MonotonicBlockPackedReader addrInstance;
if (!AddressInstances.TryGetValue(field.Number, out addrInstance))
{
data.Seek(bytes.AddressesOffset);
long size;
if (bytes.Count % interval == 0)
{
size = bytes.Count / interval;
}
else
{
size = 1L + bytes.Count / interval;
}
addrInstance = new MonotonicBlockPackedReader(data, bytes.PackedIntsVersion, bytes.BlockSize, size, false);
AddressInstances[field.Number] = addrInstance;
RamBytesUsed_Renamed.AddAndGet(addrInstance.RamBytesUsed() + RamUsageEstimator.NUM_BYTES_INT);
}
addresses = addrInstance;
}
return addresses;
}