Lucene++ - a full-featured, c++ search engine
API Documentation
A Scorer for documents matching a Term. More...
#include <TermScorer.h>
Public Member Functions | |
TermScorer (const WeightPtr &weight, const TermDocsPtr &td, const SimilarityPtr &similarity, ByteArray norms) | |
Construct a TermScorer. | |
virtual | ~TermScorer () |
virtual String | getClassName () |
boost::shared_ptr< TermScorer > | shared_from_this () |
virtual void | score (const CollectorPtr &collector) |
Scores and collects all matching documents. | |
virtual int32_t | docID () |
Returns the following: | |
virtual int32_t | nextDoc () |
Advances to the next document matching the query. The iterator over the matching documents is buffered using TermDocs#read(Collection<int32_t>, Collection<int32_t>) . | |
virtual double | score () |
Returns the score of the current document matching the query. Initially invalid, until nextDoc() or advance(int32_t) is called the first time, or when called from within Collector#collect . | |
virtual int32_t | advance (int32_t target) |
Advances to the first match beyond the current whose document number is greater than or equal to a given target. The implementation uses TermDocs#skipTo(int32_t) . | |
virtual String | toString () |
Returns a string representation of this TermScorer. | |
virtual float | termFreq () |
![]() | |
Scorer (const SimilarityPtr &similarity) | |
Constructs a Scorer. | |
Scorer (const WeightPtr &weight) | |
virtual | ~Scorer () |
boost::shared_ptr< Scorer > | shared_from_this () |
SimilarityPtr | getSimilarity () |
Returns the Similarity implementation used by this scorer. | |
void | visitSubScorers (QueryPtr parent, BooleanClause::Occur relationship, ScorerVisitor *visitor) |
void | visitScorers (ScorerVisitor *visitor) |
![]() | |
virtual | ~DocIdSetIterator () |
boost::shared_ptr< DocIdSetIterator > | shared_from_this () |
![]() | |
virtual | ~LuceneObject () |
virtual void | initialize () |
Called directly after instantiation to create objects that depend on this object being fully constructed. | |
virtual LuceneObjectPtr | clone (const LuceneObjectPtr &other=LuceneObjectPtr()) |
Return clone of this object. | |
virtual int32_t | hashCode () |
Return hash code for this object. | |
virtual bool | equals (const LuceneObjectPtr &other) |
Return whether two objects are equal. | |
virtual int32_t | compareTo (const LuceneObjectPtr &other) |
Compare two objects. | |
![]() | |
virtual | ~LuceneSync () |
virtual SynchronizePtr | getSync () |
Return this object synchronize lock. | |
virtual LuceneSignalPtr | getSignal () |
Return this object signal. | |
virtual void | lock (int32_t timeout=0) |
Lock this object using an optional timeout. | |
virtual void | unlock () |
Unlock this object. | |
virtual bool | holdsLock () |
Returns true if this object is currently locked by current thread. | |
virtual void | wait (int32_t timeout=0) |
Wait for signal using an optional timeout. | |
virtual void | notifyAll () |
Notify all threads waiting for signal. | |
Static Public Member Functions | |
static String | _getClassName () |
![]() | |
static String | _getClassName () |
![]() | |
static String | _getClassName () |
Protected Member Functions | |
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 that nextDoc() was called before this method. | |
![]() | |
LuceneObject () | |
Static Protected Member Functions | |
static const Collection< double > & | SIM_NORM_DECODER () |
Protected Attributes | |
WeightPtr | weight |
TermDocsPtr | termDocs |
TermDocs * | __termDocs |
ByteArray | norms |
double | weightValue |
int32_t | doc |
Collection< int32_t > | docs |
decltype(docs.get()) | __docs |
Collection< int32_t > | freqs |
decltype(freqs.get()) | __freqs |
int32_t | freq |
int32_t | pointer |
int32_t | pointerMax |
Collection< double > | scoreCache |
![]() | |
SimilarityPtr | similarity |
![]() | |
SynchronizePtr | objectLock |
LuceneSignalPtr | objectSignal |
Static Protected Attributes | |
static const int32_t | SCORE_CACHE_SIZE |
Additional Inherited Members | |
![]() | |
WeightPtr | weight |
![]() | |
static const int32_t | NO_MORE_DOCS |
When returned by nextDoc() , advance(int) and docID() it means there are no more docs in the iterator. | |
Lucene::TermScorer::TermScorer | ( | const WeightPtr & | weight, |
const TermDocsPtr & | td, | ||
const SimilarityPtr & | similarity, | ||
ByteArray | norms | ||
) |
Construct a TermScorer.
weight | The weight of the Term in the query. |
td | An iterator over the documents matching the Term. |
similarity | The Similarity implementation to be used for score computations. |
norms | The field norms of the document fields for the Term. |
|
virtual |
|
inlinestatic |
|
virtual |
Advances to the first match beyond the current whose document number is greater than or equal to a given target. The implementation uses TermDocs#skipTo(int32_t)
.
target | The target document number. |
Implements Lucene::DocIdSetIterator.
|
virtual |
Returns the following:
NO_MORE_DOCS
if nextDoc()
or advance(int)
were not called yet. NO_MORE_DOCS
if the iterator has exhausted. Implements Lucene::DocIdSetIterator.
|
inlinevirtual |
Reimplemented from Lucene::Scorer.
|
virtual |
Advances to the next document matching the query. The iterator over the matching documents is buffered using TermDocs#read(Collection<int32_t>, Collection<int32_t>)
.
Implements Lucene::DocIdSetIterator.
|
virtual |
Returns the score of the current document matching the query. Initially invalid, until nextDoc()
or advance(int32_t)
is called the first time, or when called from within Collector#collect
.
Implements Lucene::Scorer.
|
virtual |
Scores and collects all matching documents.
collector | The collector to which all matching documents are passed. |
Reimplemented from Lucene::Scorer.
|
protectedvirtual |
Collects matching documents in a range. Hook for optimization. Note, firstDocID is added to ensure that nextDoc()
was called before this method.
collector | The collector to which all matching documents are passed. |
max | Do not score documents past this. |
firstDocID | The first document ID (ensures nextDoc() is called before this method. |
Reimplemented from Lucene::Scorer.
|
inline |
|
staticprotected |
|
inlinevirtual |
Reimplemented from Lucene::Scorer.
|
virtual |
Returns a string representation of this TermScorer.
Reimplemented from Lucene::LuceneObject.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |