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

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

- File List
- Globals

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
29 LUCENE_CLASS(Scorer);
30
31 protected:
32 SimilarityPtr similarity;
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;
58 friend class ScoreCachingWrappingScorer;
59 };
60
61 }
62
63 #endif
Lucene::BooleanScorer
BooleanScorer uses a ~16k array to score windows of docs. So it scores docs 0-16k first...
Definition: BooleanScorer.h:30
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. Note that this class assumes it iterates on doc Ids, and therefore NO_MORE_DOCS is set to { NO_MORE_DOCS} in order to be used as a sentinel object. Implementations of this class are expected to consider INT_MAX as an invalid value.
Definition: DocIdSetIterator.h:17
DocIdSetIterator.h
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_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::ScoreCachingWrappingScorer
A Scorer which wraps another scorer and caches the score of the current document. Successive calls to...
Definition: ScoreCachingWrappingScorer.h:22
Lucene::SimilarityPtr
boost::shared_ptr< Similarity > SimilarityPtr
Definition: LuceneTypes.h:435

clucene.sourceforge.net