25 #ifndef OM_HGUARD_CHERT_POSTLIST_H 26 #define OM_HGUARD_CHERT_POSTLIST_H 69 :
ChertTable(
"postlist", path_ +
"/postlist.", readonly_),
80 const map<
string, map<
Xapian::docid, pair<char, Xapian::termcount> > > & mod_plists,
81 const map<Xapian::docid, Xapian::termcount> & doclens,
82 const map<
string, pair<Xapian::termcount_diff, Xapian::termcount_diff> > & freq_deltas);
111 void get_freqs(
const std::string & term,
191 bool next_in_chunk();
231 bool move_forward_in_chunk_to_at_least(
Xapian::docid desired_did);
237 bool keep_reference);
282 bool at_end()
const {
return is_at_end; }
287 std::string get_description()
const;
290 static void read_number_of_entries(
const char ** posptr,
bool term_exists(const string &term) const
PostlistChunkReader is essentially an iterator wrapper around a postlist chunk.
bool is_last_chunk
True if this is the last chunk.
Abstract base class for postlists.
A position list in a chert database.
Xapian::doccount number_of_entries
The number of entries in the posting list.
Xapian::termcount wdf_upper_bound
Upper bound on wdf for this postlist.
A cursor pointing to a position in a Btree table, for reading several entries in order, or finding approximate matches.
Xapian::docid first_did_in_chunk
The first document id in this chunk.
const char * end
Pointer to byte after end of current chunk.
bool open(chert_revision_number_t revno)
Class managing a Btree table in a Chert database.
void open()
Open the btree at the latest revision.
Abstract base class for leaf postlists.
Xapian::docid get_docid() const
Returns the current docid.
Xapian::termcount wdf
The wdf of the current document.
Abstract base class for leaf postlists.
Types used by chert backend and the Btree manager.
unsigned int chert_revision_number_t
A type used to store a revision number for a table.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
bool have_started
Whether we've started reading the list yet.
AutoPtr< ChertCursor > cursor
Cursor pointing to current chunk of postlist.
API for working with Xapian databases.
bool is_at_end
Whether we've run off the end of the list yet.
static string make_key(const string &term, Xapian::docid did)
Compose a key from a termname and docid.
ChertPostListTable(const string &path_, bool readonly_)
Create a new table object.
Xapian::docid last_did_in_chunk
The last document id in this chunk.
bool at_end() const
Return true if and only if we're off the end of the list.
AutoPtr< ChertPostList > doclen_pl
PostList for looking up document lengths.
A position list in a chert database.
std::string pack_chert_postlist_key(const std::string &term)
Xapian::Internal::intrusive_ptr< const ChertDatabase > this_db
The database we are searching.
Xapian::doccount get_termfreq() const
Returns number of docs indexed by this term.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
static string make_key(const string &term)
Compose a key from a termname.
A backend designed for efficient indexing and retrieval, using compressed posting lists and a btree s...
Xapian::docid did
Document id we're currently at.
ChertPositionList positionlist
The position list object for this posting list.
Various assertion macros.
A postlist in a chert database.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Abstract base class for iterating term positions in a document.
PostlistChunkWriter is a wrapper which acts roughly as an output iterator on a postlist chunk...
Xapian::termcount get_wdf() const
Returns the Within Document Frequency of the term in the current document.
string make_key(Xapian::docid did)
Wrapper around standard unique_ptr template.
const char * pos
Position of iteration through current chunk.