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); }
internal HeapedScorerDoc(ScorerDocQueue enclosingInstance, Scorer s):this(enclosingInstance, s, s.DocID()) { }
/// <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; } } }
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; }
public override void SetScorer(Scorer scorer) { this.scorer = scorer; }
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); }
public override void SetScorer(Scorer scorer) { this.scorer = scorer; base.SetScorer(scorer); }
/// <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. }
public override void SetScorer(Scorer scorer) { collector.SetScorer(scorer); }
/// <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);
public override void SetScorer(Scorer scorer) { comparator.SetScorer(scorer); }
internal HeapedScorerDoc(ScorerDocQueue enclosingInstance, Scorer scorer, int doc) { InitBlock(enclosingInstance); this.scorer = scorer; this.doc = doc; }
/// <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(); }
public override void SetScorer(Scorer scorer) { this.scorer = scorer; comparator.SetScorer(scorer); }