当前位置: 首页>>代码示例>>C#>>正文


C# Collector.AcceptsDocsOutOfOrder方法代码示例

本文整理汇总了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);
         }
     }
 }
开发者ID:sinsay,项目名称:SSE,代码行数:25,代码来源:IndexSearcher.cs

示例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;
            }
        }
开发者ID:Cefa68000,项目名称:lucenenet,代码行数:21,代码来源:CachingCollector.cs

示例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;
 }
开发者ID:Cefa68000,项目名称:lucenenet,代码行数:14,代码来源:RandomOrderCollector.cs


注:本文中的Lucene.Net.Search.Collector.AcceptsDocsOutOfOrder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。