예제 #1
0
        /// <summary> Calls collect() on the decorated HitCollector.
        ///
        /// </summary>
        /// <throws>  TimeExceededException if the time allowed has been exceeded. </throws>
        public override void  Collect(int doc, float score)
        {
            long time = TIMER_THREAD.GetMilliseconds();

            if (timeout < time)
            {
                if (greedy)
                {
                    //System.out.println(this+"  greedy: before failing, collecting doc: "+doc+"  "+(time-t0));
                    hc.Collect(doc, score);
                }
                //System.out.println(this+"  failing on:  "+doc+"  "+(time-t0));
                throw new TimeExceededException(timeout - t0, time - t0, doc);
            }
            //System.out.println(this+"  collecting: "+doc+"  "+(time-t0));
            hc.Collect(doc, score);
        }
예제 #2
0
 public override void  Collect(int doc)
 {
     collector.Collect(doc + base_Renamed, scorer.Score());
 }