本文整理汇总了C#中Lucene.Net.Search.Collector.AcceptsDocsOutOfOrder方法的典型用法代码示例。如果您正苦于以下问题:C# Collector.AcceptsDocsOutOfOrder方法的具体用法?C# Collector.AcceptsDocsOutOfOrder怎么用?C# Collector.AcceptsDocsOutOfOrder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lucene.Net.Search.Collector
的用法示例。
在下文中一共展示了Collector.AcceptsDocsOutOfOrder方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Search
public override void Search(Weight weight, Filter filter, Collector collector)
{
if (filter == null)
{
for (int i = 0; i < subReaders.Length; i++)
{
// search each subreader
collector.SetNextReader(subReaders[i], docStarts[i]);
Scorer scorer = weight.Scorer(subReaders[i], !collector.AcceptsDocsOutOfOrder(), true);
if (scorer != null)
{
scorer.Score(collector);
}
}
}
else
{
for (int i = 0; i < subReaders.Length; i++)
{
// search each subreader
collector.SetNextReader(subReaders[i], docStarts[i]);
SearchWithFilter(subReaders[i], weight, filter, collector);
}
}
}
示例2: ReplayInit
/// <summary>
/// Reused by the specialized inner classes. </summary>
internal virtual void ReplayInit(Collector other)
{
if (!Cached)
{
throw new InvalidOperationException("cannot replay: cache was cleared because too much RAM was required");
}
if (!other.AcceptsDocsOutOfOrder() && this.Other.AcceptsDocsOutOfOrder())
{
throw new System.ArgumentException("cannot replay: given collector does not support " + "out-of-order collection, while the wrapped collector does. " + "Therefore cached documents may be out-of-order.");
}
//System.out.println("CC: replay totHits=" + (upto + base));
if (LastReaderContext != null)
{
CachedSegs.Add(new SegStart(LastReaderContext, @base + Upto));
LastReaderContext = null;
}
}
示例3: RandomOrderCollector
internal RandomOrderCollector(Random random, Collector @in)
{
if ([email protected]())
{
throw new System.ArgumentException();
}
[email protected] = @in;
this.Random = random;
BufferSize = 1 + random.Next(100);
DocIDs = new int[BufferSize];
Scores = new float[BufferSize];
Freqs = new int[BufferSize];
Buffered = 0;
}