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


Scorer.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 SCORER_H
8 #define SCORER_H
9 
10 #include "DocIdSetIterator.h"
11 
12 namespace Lucene {
13 
22 class LPPAPI Scorer : public DocIdSetIterator {
23 public:
26  Scorer(const SimilarityPtr& similarity);
27  virtual ~Scorer();
28 
30 
31 protected:
33 
34 public:
36  SimilarityPtr getSimilarity();
37 
40  virtual void score(const CollectorPtr& collector);
41 
45  virtual double score() = 0;
46 
47 protected:
55  virtual bool score(const CollectorPtr& collector, int32_t max, int32_t firstDocID);
56 
57  friend class BooleanScorer;
59 };
60 
61 }
62 
63 #endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene::ScoreCachingWrappingScorer
A Scorer which wraps another scorer and caches the score of the current document. Successive calls to...
Definition: ScoreCachingWrappingScorer.h:22
Lucene::BooleanScorer
BooleanScorer uses a ~16k array to score windows of docs. So it scores docs 0-16k first,...
Definition: BooleanScorer.h:30
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::Scorer
Common scoring functionality for different types of queries.
Definition: Scorer.h:22
Lucene::CollectorPtr
boost::shared_ptr< Collector > CollectorPtr
Definition: LuceneTypes.h:295
Lucene::Scorer::similarity
SimilarityPtr similarity
Definition: Scorer.h:29
Lucene::DocIdSetIterator
This abstract class defines methods to iterate over a set of non-decreasing doc ids....
Definition: DocIdSetIterator.h:17
DocIdSetIterator.h
Lucene::SimilarityPtr
boost::shared_ptr< Similarity > SimilarityPtr
Definition: LuceneTypes.h:435

clucene.sourceforge.net