xapian-core  2.0.0
honey_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_HONEY_METADATA_H
23 #define XAPIAN_INCLUDED_HONEY_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 "honey_table.h"
31 #include "api/termlist.h"
32 
33 #include <string>
34 #include <string_view>
35 
36 class HoneyCursor;
37 
41 
44 
47 
51 
54  std::string prefix;
55 
56  public:
58  HoneyCursor* cursor_,
59  std::string_view prefix_);
60 
62 
64 
70 
72  TermList* next();
73 
75  TermList* skip_to(std::string_view key);
76 };
77 
78 #endif // XAPIAN_INCLUDED_HONEY_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
Xapian::doccount get_termfreq() const
Return the term frequency for the term at the current position.
Xapian::termcount get_approx_size() const
Return approximate size of this termlist.
HoneyCursor * cursor
A cursor which runs through the postlist table reading metadata keys.
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.
void operator=(const HoneyMetadataTermList &)
Assignment is not allowed.
HoneyMetadataTermList(const HoneyMetadataTermList &)
Copying is not allowed.
std::string prefix
The prefix that all returned keys must have.
TermList * skip_to(std::string_view key)
Advance to the first key which is >= key.
Virtual base class for Database internals.
Abstract base class for termlists.
Definition: termlist.h:42
An indexed database of documents.
HoneyTable class.
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