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

ReqOptSumScorer.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2014 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 REQOPTSUMSCORER_H
8 #define REQOPTSUMSCORER_H
9
10 #include "Scorer.h"
11
12 namespace Lucene {
13
16 class ReqOptSumScorer : public Scorer {
17 public:
18 ReqOptSumScorer(const ScorerPtr& reqScorer, const ScorerPtr& optScorer);
19 virtual ~ReqOptSumScorer();
20
21 LUCENE_CLASS(ReqOptSumScorer);
22
23 protected:
24 ScorerPtr reqScorer;
25 ScorerPtr optScorer;
26
27 public:
28 virtual int32_t nextDoc();
29 virtual int32_t advance(int32_t target);
30 virtual int32_t docID();
31
36 virtual double score();
37 };
38
39 }
40
41 #endif
Lucene::ReqOptSumScorer::ReqOptSumScorer
ReqOptSumScorer(const ScorerPtr &reqScorer, const ScorerPtr &optScorer)
Lucene::ReqOptSumScorer::advance
virtual int32_t advance(int32_t target)
Advances to the first beyond the current whose document number is greater than or equal to target...
Lucene::ReqOptSumScorer::docID
virtual int32_t docID()
Returns the following:
Scorer.h
Lucene::ReqOptSumScorer::optScorer
ScorerPtr optScorer
Definition: ReqOptSumScorer.h:25
Lucene::ScorerPtr
boost::shared_ptr< Scorer > ScorerPtr
Definition: LuceneTypes.h:429
Lucene::ReqOptSumScorer::~ReqOptSumScorer
virtual ~ReqOptSumScorer()
Lucene::ReqOptSumScorer::nextDoc
virtual int32_t nextDoc()
Advances to the next document in the set and returns the doc it is currently on, or NO_MORE_DOCS if t...
Lucene::Scorer
Common scoring functionality for different types of queries.
Definition: Scorer.h:22
Lucene::ReqOptSumScorer::score
virtual double score()
Returns the score of the current document matching the query. Initially invalid, until next() is call...
Lucene::ReqOptSumScorer::reqScorer
ScorerPtr reqScorer
Definition: ReqOptSumScorer.h:21
Lucene::ReqOptSumScorer
A Scorer for queries with a required part and an optional part. Delays skipTo() on the optional part ...
Definition: ReqOptSumScorer.h:16
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene
Definition: AbstractAllTermDocs.h:12

clucene.sourceforge.net