#include <documentterm.h>

Public Types | |
| typedef vector< Xapian::termpos > | term_positions |
Public Member Functions | |
| OmDocumentTerm (const string &tname_, Xapian::termcount wdf_) | |
| Make a new term. | |
| void | add_position (Xapian::termpos tpos) |
| Add a position to the position list. | |
| void | remove_position (Xapian::termpos tpos) |
| Remove an entry from the position list. | |
| void | inc_wdf (Xapian::termcount inc) |
| Increase the wdf. | |
| void | dec_wdf (Xapian::termcount dec) |
| Decrease the wdf. | |
| Xapian::termcount | get_wdf () const |
| Get the wdf. | |
| string | get_description () const |
| Return a string describing this object. | |
Public Attributes | |
| string | tname |
| The name of this term. | |
| Xapian::termcount | wdf |
| Within document frequency of the term. | |
| term_positions | positions |
| Positional information. | |
Definition at line 36 of file documentterm.h.
| typedef vector<Xapian::termpos> OmDocumentTerm::term_positions |
Definition at line 58 of file documentterm.h.
| OmDocumentTerm::OmDocumentTerm | ( | const string & | tname_, | |
| Xapian::termcount | wdf_ | |||
| ) | [inline] |
Make a new term.
| tname_ | The name of the new term. | |
| wdf_ | Initial wdf. |
Definition at line 43 of file documentterm.h.
References LOGCALL_VOID.
| void OmDocumentTerm::add_position | ( | Xapian::termpos | tpos | ) |
Add a position to the position list.
This adds an entry to the list of positions, unless there is already one for the specified position.
This does not change the value of the wdf.
| tpos | The position within the document at which the term occurs. |
Definition at line 221 of file omdocument.cc.
References LOGCALL_VOID, and positions.
Referenced by Xapian::Document::Internal::add_posting().
| void OmDocumentTerm::dec_wdf | ( | Xapian::termcount | dec | ) | [inline] |
| string OmDocumentTerm::get_description | ( | ) | const |
Return a string describing this object.
Definition at line 261 of file omdocument.cc.
References positions, Xapian::Internal::str(), tname, and wdf.
| Xapian::termcount OmDocumentTerm::get_wdf | ( | ) | const [inline] |
| void OmDocumentTerm::inc_wdf | ( | Xapian::termcount | inc | ) | [inline] |
| void OmDocumentTerm::remove_position | ( | Xapian::termpos | tpos | ) |
Remove an entry from the position list.
This removes an entry from the list of positions.
This does not change the value of the wdf.
| Xapian::InvalidArgumentError | is thrown if the position does not occur in the position list. |
Definition at line 242 of file omdocument.cc.
References LOGCALL_VOID, positions, Xapian::Internal::str(), and tname.
Positional information.
This is a list of positions at which the term occurs in the document. The list is in strictly increasing order of term position.
The positions start at 1.
Note that, even if positional information is present, the WDF might not be equal to the length of the position list, since a term might occur multiple times at a single position, but will only have one entry in the position list for each position.
Definition at line 73 of file documentterm.h.
Referenced by add_position(), get_description(), and remove_position().
| string OmDocumentTerm::tname |
The name of this term.
Definition at line 51 of file documentterm.h.
Referenced by get_description(), and remove_position().
Within document frequency of the term.
This is the number of occurrences of the term in the document.
Definition at line 56 of file documentterm.h.
Referenced by dec_wdf(), get_description(), get_wdf(), and inc_wdf().