/* Create the scorer used to score our associated DisjunctionMaxQuery */ public override Scorer Scorer(IndexReader reader, bool scoreDocsInOrder, bool topScorer) { Scorer[] scorers = new Scorer[weights.Count]; int idx = 0; for (System.Collections.IEnumerator iter = weights.GetEnumerator(); iter.MoveNext();) { Weight w = (Weight)iter.Current; Scorer subScorer = w.Scorer(reader, true, false); if (subScorer != null && subScorer.NextDoc() != DocIdSetIterator.NO_MORE_DOCS) { scorers[idx++] = subScorer; } } if (idx == 0) { return(null); // all scorers did not have documents } DisjunctionMaxScorer result = new DisjunctionMaxScorer(Enclosing_Instance.tieBreakerMultiplier, similarity, scorers, idx); return(result); }
/* Create the scorer used to score our associated DisjunctionMaxQuery */ public override Scorer Scorer(IndexReader reader, bool scoreDocsInOrder, bool topScorer) { Scorer[] scorers = new Scorer[weights.Count]; int idx = 0; for (System.Collections.IEnumerator iter = weights.GetEnumerator(); iter.MoveNext(); ) { Weight w = (Weight) iter.Current; Scorer subScorer = w.Scorer(reader, true, false); if (subScorer != null && subScorer.NextDoc() != DocIdSetIterator.NO_MORE_DOCS) { scorers[idx++] = subScorer; } } if (idx == 0) return null; // all scorers did not have documents DisjunctionMaxScorer result = new DisjunctionMaxScorer(Enclosing_Instance.tieBreakerMultiplier, similarity, scorers, idx); return result; }