xapian-core  1.4.25
chert_metadata.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2005,2007,2008,2011 Olly Betts
5  * Copyright (C) 2008 Lemur Consulting Ltd
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #ifndef XAPIAN_INCLUDED_CHERT_METADATA_H
23 #define XAPIAN_INCLUDED_CHERT_METADATA_H
24 
25 #include "xapian/intrusive_ptr.h"
26 #include <xapian/database.h>
27 #include <xapian/types.h>
28 
29 #include "backends/alltermslist.h"
30 #include "chert_table.h"
31 #include "api/termlist.h"
32 
33 #include <string>
34 
35 class ChertCursor;
36 
40 
42  void operator=(const ChertMetadataTermList &);
43 
46 
50 
53  std::string prefix;
54 
55  public:
57  ChertCursor * cursor_, const std::string &prefix_);
58 
60 
66  std::string get_termname() const;
67 
73 
75  TermList * next();
76 
78  TermList * skip_to(const std::string &key);
79 
81  bool at_end() const;
82 };
83 
84 #endif // XAPIAN_INCLUDED_CHERT_METADATA_H
typedefs for Xapian
A cursor pointing to a position in a Btree table, for reading several entries in order, or finding approximate matches.
Definition: chert_cursor.h:66
std::string get_termname() const
Returns the current termname.
Abstract base class for termlists.
Definition: termlist.h:39
bool at_end() const
True if we&#39;re off the end of the list.
ChertCursor * cursor
A cursor which runs through the postlist table reading metadata keys.
void operator=(const ChertMetadataTermList &)
Assignment is not allowed.
API for working with Xapian databases.
ChertMetadataTermList(const ChertMetadataTermList &)
Copying is not allowed.
std::string prefix
The prefix that all returned keys must have.
Abstract base class for iterating all terms in a database.
Xapian::doccount get_termfreq() const
Return the term frequency for the term at the current position.
Btree implementation.
TermList * next()
Advance to the next term in the list.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Definition: types.h:38
Abstract base class for termlists.
Abstract base class for iterating all terms in a database.
Definition: alltermslist.h:27
TermList * skip_to(const std::string &key)
Advance to the first key which is >= key.
Xapian::Internal::intrusive_ptr< const Xapian::Database::Internal > database
Keep a reference to our database to stop it being deleted.