xapian-core  2.0.0
remote_alltermslist.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2007,2008,2011,2018,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_REMOTE_ALLTERMSLIST_H
22 #define XAPIAN_INCLUDED_REMOTE_ALLTERMSLIST_H
23 
24 #include "backends/alltermslist.h"
25 
26 #include <string_view>
27 
31  void operator=(const RemoteAllTermsList &) = delete;
32 
35 
37 
38  std::string data;
39 
40  const char* p = NULL;
41 
42  public:
44  RemoteAllTermsList(std::string_view prefix,
45  std::string&& data_)
46  : data(data_) {
47  current_term = prefix;
48  }
49 
52 
55 
57  TermList* next();
58 
64  TermList* skip_to(std::string_view term);
65 };
66 
67 #endif // XAPIAN_INCLUDED_REMOTE_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
Iterate all terms in a remote database.
void operator=(const RemoteAllTermsList &)=delete
Don't allow assignment.
TermList * skip_to(std::string_view term)
Skip forward to the specified term.
Xapian::termcount get_approx_size() const
Return approximate size of this termlist.
RemoteAllTermsList(const RemoteAllTermsList &)=delete
Don't allow copying.
TermList * next()
Advance the current position to the next term in the termlist.
RemoteAllTermsList(std::string_view prefix, std::string &&data_)
Construct.
Xapian::doccount current_termfreq
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
std::string current_term
The current term.
Definition: termlist.h:54
string term
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