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


lucene::search::Weight Class Reference

Expert: Calculate query weights and build query scorers. More...

#include <SearchHeader.h>


Public Member Functions

virtual ~Weight ()
virtual QuerygetQuery ()=0
 The query that this concerns.
virtual float_t getValue ()=0
 The weight for this query.
virtual float_t sumOfSquaredWeights ()=0
 The sum of squared weights of contained query clauses.
virtual void normalize (float_t norm)=0
 Assigns the query normalization factor to this.
virtual Scorerscorer (lucene::index::IndexReader *reader)=0
 Constructs a scorer for this.
virtual void explain (lucene::index::IndexReader *reader, int32_t doc, Explanation *ret)=0
 An explanation of the score computation for the named document.
virtual TCHAR * toString ()


Detailed Description

Expert: Calculate query weights and build query scorers.

A Weight is constructed by a query, given a Searcher (Query#_createWeight(Searcher)). The sumOfSquaredWeights() method is then called on the top-level query to compute the query normalization factor (}). This factor is then passed to #normalize(float_t)}. At this point the weighting is complete and a scorer may be constructed by calling #scorer(IndexReader)}.


Constructor & Destructor Documentation

virtual lucene::search::Weight::~Weight (  )  [inline, virtual]


Member Function Documentation

virtual Query* lucene::search::Weight::getQuery (  )  [pure virtual]

The query that this concerns.

virtual float_t lucene::search::Weight::getValue (  )  [pure virtual]

The weight for this query.

virtual float_t lucene::search::Weight::sumOfSquaredWeights (  )  [pure virtual]

The sum of squared weights of contained query clauses.

virtual void lucene::search::Weight::normalize ( float_t  norm  )  [pure virtual]

Assigns the query normalization factor to this.

virtual Scorer* lucene::search::Weight::scorer ( lucene::index::IndexReader reader  )  [pure virtual]

Constructs a scorer for this.

virtual void lucene::search::Weight::explain ( lucene::index::IndexReader reader,
int32_t  doc,
Explanation ret 
) [pure virtual]

An explanation of the score computation for the named document.

virtual TCHAR* lucene::search::Weight::toString (  )  [virtual]


The documentation for this class was generated from the following file:

clucene.sourceforge.net