xapian-core  2.0.0
glass_metadata.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2005,2007,2008,2009,2011,2017,2024 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, see
19  * <https://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef XAPIAN_INCLUDED_GLASS_METADATA_H
23 #define XAPIAN_INCLUDED_GLASS_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 "glass_table.h"
31 #include "api/termlist.h"
32 
33 #include <string>
34 
35 class GlassCursor;
36 
40 
43 
46 
50 
53  std::string prefix;
54 
55  public:
57  GlassCursor* cursor_, std::string_view prefix_);
58 
60 
62 
68 
70  TermList * next();
71 
73  TermList* skip_to(std::string_view key);
74 };
75 
76 #endif // XAPIAN_INCLUDED_GLASS_METADATA_H
Abstract base class for iterating all terms in a database.
Abstract base class for iterating all terms in a database.
Definition: alltermslist.h:27
A cursor pointing to a position in a Btree table, for reading several entries in order,...
Definition: glass_cursor.h:148
Xapian::termcount get_approx_size() const
Return approximate size of this termlist.
std::string prefix
The prefix that all returned keys must have.
GlassMetadataTermList(const GlassMetadataTermList &)
Copying is not allowed.
GlassCursor * cursor
A cursor which runs through the postlist table reading metadata keys.
TermList * skip_to(std::string_view key)
Advance to the first key which is >= key.
void operator=(const GlassMetadataTermList &)
Assignment is not allowed.
Xapian::Internal::intrusive_ptr< const Xapian::Database::Internal > database
Keep a reference to our database to stop it being deleted.
TermList * next()
Advance to the next term in the list.
Xapian::doccount get_termfreq() const
Return the term frequency for the term at the current position.
Abstract base class for termlists.
Definition: termlist.h:42
An indexed database of documents.
Btree implementation.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Definition: types.h:64
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Definition: types.h:37
Abstract base class for termlists.
typedefs for Xapian