xapian-core  2.0.0
multi_termlist.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2007,2010,2013,2017,2024 Olly Betts
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of the
9  * License, or (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_TERMLIST_H
22 #define XAPIAN_INCLUDED_MULTI_TERMLIST_H
23 
24 #include "api/termlist.h"
25 
26 #include <xapian/database.h>
27 
29 
35 class MultiTermList : public TermList {
37  void operator=(const MultiTermList &) = delete;
38 
40  MultiTermList(const MultiTermList &) = delete;
41 
44 
47 
48  public:
50  MultiTermList(const Xapian::Database::Internal* db_, TermList* real_termlist_);
51 
54 
57 
59  Xapian::termcount get_wdf() const;
60 
63 
75  Internal * next();
76 
82  Internal* skip_to(std::string_view term);
83 
86 
89 };
90 
91 #endif // XAPIAN_INCLUDED_MULTI_TERMLIST_H
Adapter class for a TermList in a multidatabase.
void operator=(const MultiTermList &)=delete
Don't allow assignment.
Xapian::termcount get_approx_size() const
Return approximate size of this termlist.
Xapian::termcount get_wdf() const
Return the wdf for the term at the current position.
Xapian::termcount positionlist_count() const
Return the length of the position list for the current position.
Internal * next()
Advance the current position to the next term in the termlist.
Internal * skip_to(std::string_view term)
Skip forward to the specified term.
PositionList * positionlist_begin() const
Return a PositionIterator for the current position.
TermList * real_termlist
The TermList in the subdatabase.
Xapian::doccount get_termfreq() const
Return the term frequency for the term at the current position.
MultiTermList(const MultiTermList &)=delete
Don't allow copying.
intrusive_ptr_nonnull< const Xapian::Database::Internal > db
The multidatabase.
~MultiTermList()
Destructor.
Virtual base class for Database internals.
A normally non-NULL smart pointer using intrusive reference counting.
Abstract base class for iterating term positions in a document.
Definition: positionlist.h:32
Abstract base class for termlists.
Definition: termlist.h:42
Internal()
Only constructable as a base class for derived classes.
Definition: termlist.h:51
An indexed database of documents.
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
Abstract base class for termlists.