xapian-core  1.4.19
chert_document.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2008,2010,2011 Olly Betts
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of the
9  * License, or (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_CHERT_DOCUMENT_H
22 #define XAPIAN_INCLUDED_CHERT_DOCUMENT_H
23 
24 #include "chert_record.h"
25 #include "chert_values.h"
26 #include "backends/database.h"
27 #include "backends/document.h"
28 
32  void operator=(const ChertDocument &);
33 
36 
39 
42 
44  friend class ChertDatabase;
45 
48  Xapian::docid did_,
49  const ChertValueManager *value_manager_,
50  const ChertRecordTable *record_table_)
51  : Xapian::Document::Internal(db, did_),
52  value_manager(value_manager_), record_table(record_table_) { }
53 
54  public:
56  string do_get_value(Xapian::valueno slot) const;
57  void do_get_all_values(map<Xapian::valueno, string> & values_) const;
58  string do_get_data() const;
60 };
61 
62 #endif // XAPIAN_INCLUDED_CHERT_DOCUMENT_H
The Xapian namespace contains public interfaces for the Xapian library.
Definition: compactor.cc:80
Records in chert databases.
A document read from a ChertDatabase.
A record in a chert database.
Definition: chert_record.h:37
A document in the database, possibly plus modifications.
Definition: document.h:41
void do_get_all_values(map< Xapian::valueno, string > &values_) const
Retrieve all value values from the database.
ChertDocument(Xapian::Internal::intrusive_ptr< const Xapian::Database::Internal > db, Xapian::docid did_, const ChertValueManager *value_manager_, const ChertRecordTable *record_table_)
Private constructor - only called by ChertDatabase::open_document().
void operator=(const ChertDocument &)
Don&#39;t allow assignment.
const ChertRecordTable * record_table
Used for lazy access to document data.
ChertValueManager class.
A backend designed for efficient indexing and retrieval, using compressed posting lists and a btree s...
unsigned valueno
The number for a value slot in a document.
Definition: types.h:108
string do_get_value(Xapian::valueno slot) const
Implementation of virtual methods.
const ChertValueManager * value_manager
Used for lazy access to document values.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Definition: types.h:52
ChertDocument(const ChertDocument &)
Don&#39;t allow copying.
string do_get_data() const
Retrieve the document data from the database.