Lucene++ - a full-featured, c++ search engine
API Documentation

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
DisjunctionMaxScorer.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2011 Alan Wright. All rights reserved.
3 // Distributable under the terms of either the Apache License (Version 2.0)
4 // or the GNU Lesser General Public License.
6
7 #ifndef DISJUNCTIONMAXSCORER_H
8 #define DISJUNCTIONMAXSCORER_H
9
10 #include "Scorer.h"
11
12 namespace Lucene
13 {
18 class DisjunctionMaxScorer : public Scorer
19 {
20 public:
21 DisjunctionMaxScorer(double tieBreakerMultiplier, SimilarityPtr similarity, Collection<ScorerPtr> subScorers, int32_t numScorers);
22 virtual ~DisjunctionMaxScorer();
23
24 LUCENE_CLASS(DisjunctionMaxScorer);
25
26 protected:
28 Collection<ScorerPtr> subScorers;
29 int32_t numScorers;
30
32 double tieBreakerMultiplier;
33
34 int32_t doc;
35
36 public:
37 virtual int32_t nextDoc();
38 virtual int32_t docID();
39
42 virtual double score();
43
44 virtual int32_t advance(int32_t target);
45
46 protected:
48 void scoreAll(int32_t root, int32_t size, int32_t doc, Collection<double> sum, Collection<double> max);
49
51 void heapify();
52
55 void heapAdjust(int32_t root);
56
58 void heapRemoveRoot();
59 };
60 }
61
62 #endif

clucene.sourceforge.net