xapian-core  1.4.20
dbcheck.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2010 Richard Boulton
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef XAPIAN_INCLUDED_DBCHECK_H
22 #define XAPIAN_INCLUDED_DBCHECK_H
23 
24 #include <xapian.h>
25 #include <string>
26 
34 std::string
36  const Xapian::PositionIterator & end,
37  Xapian::termcount * count = NULL);
38 
43 std::string
44 postlist_to_string(const Xapian::Database & db, const std::string & tname);
45 
50 std::string
52 
54 std::string
56 
58 std::string
59 termstats_to_string(const Xapian::Database & db, const std::string & term);
60 
65 void
66 dbcheck(const Xapian::Database & db,
67  Xapian::doccount expected_doccount,
68  Xapian::docid expected_lastdocid);
69 
70 #endif /* XAPIAN_INCLUDED_DBCHECK_H */
std::string termstats_to_string(const Xapian::Database &db, const std::string &term)
Convert statistics about a term to a string.
Definition: dbcheck.cc:115
std::string docterms_to_string(const Xapian::Database &db, Xapian::docid did)
Convert the list of terms in a document to a string.
Definition: dbcheck.cc:82
This class is used to access a database, or a group of databases.
Definition: database.h:68
void dbcheck(const Xapian::Database &db, Xapian::doccount expected_doccount, Xapian::docid expected_lastdocid)
Check consistency of database and statistics.
Definition: dbcheck.cc:126
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Definition: types.h:72
std::string docstats_to_string(const Xapian::Database &db, Xapian::docid did)
Convert statistics about a document to a string.
Definition: dbcheck.cc:105
Public interfaces for the Xapian library.
std::string postlist_to_string(const Xapian::Database &db, const std::string &tname)
Convert the list of postings in a postlist to a string.
Definition: dbcheck.cc:55
std::string positions_to_string(Xapian::PositionIterator &it, const Xapian::PositionIterator &end, Xapian::termcount *count=NULL)
Convert the list of positions in a positionlist to a string.
Definition: dbcheck.cc:33
Class for iterating over term positions.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Definition: types.h:38
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Definition: types.h:52