Lucene++ - a full-featured, c++ search engine
API Documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
include
lucene++
ScoreCachingWrappingScorer.h
Go to the documentation of this file.
1
2
// 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 SCORECACHINGWRAPPINGSCORER_H
8
#define SCORECACHINGWRAPPINGSCORER_H
9
10
#include "
Scorer.h
"
11
12
namespace
Lucene
{
13
22
class
LPPAPI
ScoreCachingWrappingScorer
:
public
Scorer
{
23
public
:
25
ScoreCachingWrappingScorer
(
const
ScorerPtr
& scorer);
26
virtual
~ScoreCachingWrappingScorer
();
27
28
LUCENE_CLASS
(
ScoreCachingWrappingScorer
);
29
30
protected
:
31
ScorerWeakPtr
_scorer
;
32
int32_t
curDoc
;
33
double
curScore
;
34
35
public
:
36
SimilarityPtr
getSimilarity
();
37
virtual
double
score
();
38
virtual
int32_t
docID
();
39
virtual
int32_t
nextDoc
();
40
virtual
void
score
(
const
CollectorPtr
& collector);
41
virtual
int32_t
advance
(int32_t target);
42
43
protected
:
44
virtual
bool
score
(
const
CollectorPtr
& collector, int32_t max, int32_t firstDocID);
45
};
46
47
}
48
49
#endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition
LuceneObject.h:24
Scorer.h
Lucene::ScoreCachingWrappingScorer::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::ScoreCachingWrappingScorer::curDoc
int32_t curDoc
Definition
ScoreCachingWrappingScorer.h:32
Lucene::ScoreCachingWrappingScorer::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::ScoreCachingWrappingScorer::score
virtual void score(const CollectorPtr &collector)
Scores and collects all matching documents.
Lucene::ScoreCachingWrappingScorer::score
virtual double score()
Returns the score of the current document matching the query. Initially invalid, until nextDoc() or a...
Lucene::ScoreCachingWrappingScorer::~ScoreCachingWrappingScorer
virtual ~ScoreCachingWrappingScorer()
Lucene::ScoreCachingWrappingScorer::curScore
double curScore
Definition
ScoreCachingWrappingScorer.h:33
Lucene::ScoreCachingWrappingScorer::_scorer
ScorerWeakPtr _scorer
Definition
ScoreCachingWrappingScorer.h:31
Lucene::ScoreCachingWrappingScorer::score
virtual bool score(const CollectorPtr &collector, int32_t max, int32_t firstDocID)
Collects matching documents in a range. Hook for optimization. Note, firstDocID is added to ensure th...
Lucene::ScoreCachingWrappingScorer::docID
virtual int32_t docID()
Returns the following:
Lucene::ScoreCachingWrappingScorer::ScoreCachingWrappingScorer
ScoreCachingWrappingScorer(const ScorerPtr &scorer)
Creates a new instance by wrapping the given scorer.
Lucene::ScoreCachingWrappingScorer::getSimilarity
SimilarityPtr getSimilarity()
Lucene::Scorer::Scorer
Scorer(const SimilarityPtr &similarity)
Constructs a Scorer.
Lucene
Definition
AbstractAllTermDocs.h:12
Lucene::ScorerWeakPtr
boost::weak_ptr< Scorer > ScorerWeakPtr
Definition
LuceneTypes.h:429
Lucene::SimilarityPtr
boost::shared_ptr< Similarity > SimilarityPtr
Definition
LuceneTypes.h:435
Lucene::ScorerPtr
boost::shared_ptr< Scorer > ScorerPtr
Definition
LuceneTypes.h:429
Lucene::CollectorPtr
boost::shared_ptr< Collector > CollectorPtr
Definition
LuceneTypes.h:295
clucene.sourceforge.net