xapian-core  1.4.27
serialise.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2006,2007,2008,2009,2012,2014 Olly Betts
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_SERIALISE_H
22 #define XAPIAN_INCLUDED_SERIALISE_H
23 
24 #include <string>
25 #include "xapian/weight.h"
26 
27 // Forward class declarations:
28 
29 namespace Xapian {
30  class Document;
31  class MSet;
32  class RSet;
33 }
34 
41 std::string serialise_stats(const Xapian::Weight::Internal &stats);
42 
49 void unserialise_stats(const char* p, const char* p_end,
51 
58 std::string serialise_mset(const Xapian::MSet &mset);
59 
67 Xapian::MSet unserialise_mset(const char * p, const char * p_end);
68 
75 std::string serialise_rset(const Xapian::RSet &omrset);
76 
83 Xapian::RSet unserialise_rset(const std::string &s);
84 
91 std::string serialise_document(const Xapian::Document &doc);
92 
99 Xapian::Document unserialise_document(const std::string &s);
100 
101 #endif
The Xapian namespace contains public interfaces for the Xapian library.
Definition: compactor.cc:80
Xapian::MSet unserialise_mset(const char *p, const char *p_end)
Unserialise a serialised Xapian::MSet object.
Definition: serialise.cc:154
std::string serialise_document(const Xapian::Document &doc)
Serialise a Xapian::Document object.
Definition: serialise.cc:251
Class representing a list of search results.
Definition: mset.h:44
void unserialise_stats(const char *p, const char *p_end, Xapian::Weight::Internal &stats)
Unserialise a serialised stats object.
Definition: serialise.cc:71
Xapian::Document unserialise_document(const std::string &s)
Unserialise a serialised Xapian::Document object.
Definition: serialise.cc:295
Xapian::RSet unserialise_rset(const std::string &s)
Unserialise a serialised Xapian::RSet object.
Definition: serialise.cc:232
Class to hold statistics for a given collection.
Weighting scheme API.
std::string serialise_rset(const Xapian::RSet &omrset)
Serialise a Xapian::RSet object.
Definition: serialise.cc:217
std::string serialise_mset(const Xapian::MSet &mset)
Serialise a Xapian::MSet object.
Definition: serialise.cc:113
std::string serialise_stats(const Xapian::Weight::Internal &stats)
Serialise a stats object.
Definition: serialise.cc:42
A handle representing a document in a Xapian database.
Definition: document.h:61
A relevance set (R-Set).
Definition: enquire.h:60