xapian-core  2.0.0
multi_alltermslist.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2007,2008,2011,2017,2024 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, see
18  * <https://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef XAPIAN_INCLUDED_MULTI_ALLTERMSLIST_H
22 #define XAPIAN_INCLUDED_MULTI_ALLTERMSLIST_H
23 
24 #include "backends/alltermslist.h"
25 
26 #include <string>
27 
28 namespace Xapian {
29 class Database;
30 }
31 
36 
39 
40  /* Current termname (now in base class).
41  *
42  * If current_term.empty(), then either we haven't started yet (and
43  * count != 0) or we've reached the end (and count == 0).
44  */
45 
48 
50  mutable size_t count;
51 
54 
55  public:
57  MultiAllTermsList(size_t count_, TermList** termlists_);
58 
61 
63 
66 
68  TermList *next();
69 
75  TermList* skip_to(std::string_view term);
76 };
77 
78 #endif // XAPIAN_INCLUDED_MULTI_ALLTERMSLIST_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
Class for merging AllTermsList objects from subdatabases.
size_t count
Number of TermList* entries in termlists.
MultiAllTermsList(const MultiAllTermsList &)
Don't allow copying.
void operator=(const MultiAllTermsList &)
Don't allow assignment.
Xapian::doccount current_termfreq
Current termfreq (or 0 if not yet calculated).
Xapian::doccount get_termfreq() const
Return the term frequency for the term at the current position.
TermList * next()
Advance the current position to the next term in the termlist.
~MultiAllTermsList()
Destructor.
Xapian::termcount get_approx_size() const
Return approximate size of this termlist.
TermList ** termlists
Sub-termlists which we use as a heap.
TermList * skip_to(std::string_view term)
Skip forward to the specified term.
Abstract base class for termlists.
Definition: termlist.h:42
string term
The Xapian namespace contains public interfaces for the Xapian library.
Definition: compactor.cc:82
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