#include <omenquire.h>
Inheritance diagram for OmWeight:
Public Methods | |
OmWeight () | |
virtual | ~OmWeight () |
OmWeight * | create (const Internal *internal_, om_doclength querysize_, om_termcount wqf_, om_termname tname_) |
Initialise the weight object with the neccessary stats, or places to get them from. More... | |
virtual om_weight | get_sumpart (om_termcount wdf, om_doclength len) const=0 |
Get a weight which is part of the sum over terms being performed. More... | |
virtual om_weight | get_maxpart () const=0 |
Gets the maximum value that get_sumpart() may return. More... | |
virtual om_weight | get_sumextra (om_doclength len) const=0 |
Get an extra weight for a document to add to the sum calculated over the query terms. More... | |
virtual om_weight | get_maxextra () const=0 |
Gets the maximum value that get_sumextra() may return. More... | |
virtual bool | get_sumpart_needs_doclength () const |
return false if the weight object doesn't need doclength. More... | |
Protected Attributes | |
const Internal * | internal |
om_doclength | querysize |
om_termcount | wqf |
om_termname | tname |
Friends | |
class | OmEnquire |
|
Initialise the weight object with the neccessary stats, or places to get them from. You shouldn't call this method yourself
|
|
Gets the maximum value that get_sumextra() may return. This is used in optimising searches. Implemented in BoolWeight, BM25Weight, and TradWeight. |
|
Gets the maximum value that get_sumpart() may return. This is used in optimising searches, by having the postlist tree decay appropriately when parts of it can have limited, or no, further effect. Implemented in BoolWeight, BM25Weight, and TradWeight. |
|
Get an extra weight for a document to add to the sum calculated over the query terms. This returns a weight for a given document, and is used by some weighting schemes to account for influence such as document length.
Implemented in BoolWeight, BM25Weight, and TradWeight. |
|
Get a weight which is part of the sum over terms being performed. This returns a weight for a given term and document. These weights are summed to give a total weight for the document.
Implemented in BoolWeight, BM25Weight, and TradWeight. |
|
return false if the weight object doesn't need doclength.
Reimplemented in BoolWeight, BM25Weight, and TradWeight. |