public override void  SetScorer(Scorer scorer)
		{
			// Set a ScoreCachingWrappingScorer in case the wrapped Collector will call
			// score() also.
			this.scorer = new ScoreCachingWrappingScorer(scorer);
			c.SetScorer(this.scorer);
		}
예제 #2
0
			internal HeapedScorerDoc(ScorerDocQueue enclosingInstance, Scorer s):this(enclosingInstance, s, s.DocID())
			{
			}
예제 #3
0
		/// <summary> Adds a Scorer to the ScorerDocQueue in log(size) time if either
		/// the ScorerDocQueue is not full, or not lessThan(scorer, top()).
		/// </summary>
		/// <param name="scorer">
		/// </param>
		/// <returns> true if scorer is added, false otherwise.
		/// </returns>
		public virtual bool Insert(Scorer scorer)
		{
			if (size < maxSize)
			{
				Put(scorer);
				return true;
			}
			else
			{
				int docNr = scorer.DocID();
				if ((size > 0) && (!(docNr < topHSD.doc)))
				{
					// heap[1] is top()
					heap[1] = new HeapedScorerDoc(this, scorer, docNr);
					DownHeap();
					return true;
				}
				else
				{
					return false;
				}
			}
		}
예제 #4
0
			public SubScorer(Scorer scorer, bool required, bool prohibited, Collector collector, SubScorer next)
			{
				this.scorer = scorer;
				this.required = required;
				this.prohibited = prohibited;
				this.collector = collector;
				this.next = next;
			}
예제 #5
0
			public override void  SetScorer(Scorer scorer)
			{
				this.scorer = scorer;
			}
예제 #6
0
			public override void  SetScorer(Scorer scorer)
			{
				// wrap with a ScoreCachingWrappingScorer so that successive calls to
				// score() will not incur score computation over and over again.
				this.scorer = new ScoreCachingWrappingScorer(scorer);
			}
예제 #7
0
 public override void  SetScorer(Scorer scorer)
 {
     this.scorer = scorer;
     base.SetScorer(scorer);
 }
예제 #8
0
 public override void SetScorer(Scorer scorer)
 {
     this.scorer = scorer;
 }
예제 #9
0
 /// <summary>Sets the Scorer to use in case a document's score is
 /// needed.
 ///
 /// </summary>
 /// <param name="scorer">Scorer instance that you should use to
 /// obtain the current hit's score, if necessary.
 /// </param>
 public virtual void SetScorer(Scorer scorer)
 {
     // Empty implementation since most comparators don't need the score. This
     // can be overridden by those that need it.
 }
예제 #10
0
 public override void  SetScorer(Scorer scorer)
 {
     // wrap with a ScoreCachingWrappingScorer so that successive calls to
     // score() will not incur score computation over and over again.
     this.scorer = new ScoreCachingWrappingScorer(scorer);
 }
예제 #11
0
 public override void  SetScorer(Scorer scorer)
 {
     collector.SetScorer(scorer);
 }
예제 #12
0
 /// <summary> Called before successive calls to <see cref="Collect(int)" />. Implementations
 /// that need the score of the current document (passed-in to
 /// <see cref="Collect(int)" />), should save the passed-in Scorer and call
 /// scorer.score() when needed.
 /// </summary>
 public abstract void  SetScorer(Scorer scorer);
예제 #13
0
 public override void SetScorer(Scorer scorer)
 {
     comparator.SetScorer(scorer);
 }
예제 #14
0
			internal HeapedScorerDoc(ScorerDocQueue enclosingInstance, Scorer scorer, int doc)
			{
				InitBlock(enclosingInstance);
				this.scorer = scorer;
				this.doc = doc;
			}
예제 #15
0
		/// <summary> Called before successive calls to <see cref="Collect(int)" />. Implementations
		/// that need the score of the current document (passed-in to
		/// <see cref="Collect(int)" />), should save the passed-in Scorer and call
		/// scorer.score() when needed.
		/// </summary>
		public abstract void  SetScorer(Scorer scorer);
예제 #16
0
		/// <summary> Adds a Scorer to a ScorerDocQueue in log(size) time.
		/// If one tries to add more Scorers than maxSize
		/// a RuntimeException (ArrayIndexOutOfBound) is thrown.
		/// </summary>
		public void  Put(Scorer scorer)
		{
			size++;
			heap[size] = new HeapedScorerDoc(this, scorer);
			UpHeap();
		}
예제 #17
0
 /// <summary>Sets the Scorer to use in case a document's score is
 /// needed.
 /// 
 /// </summary>
 /// <param name="scorer">Scorer instance that you should use to
 /// obtain the current hit's score, if necessary. 
 /// </param>
 public virtual void SetScorer(Scorer scorer)
 {
     // Empty implementation since most comparators don't need the score. This
     // can be overridden by those that need it.
 }
예제 #18
0
			public override void  SetScorer(Scorer scorer)
			{
				collector.SetScorer(scorer);
			}
예제 #19
0
 public override void  SetScorer(Scorer scorer)
 {
     this.scorer = scorer;
     comparator.SetScorer(scorer);
 }