xapian-core  1.4.25
termlist.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2007,2010,2013,2020 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, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef XAPIAN_INCLUDED_TERMLIST_H
22 #define XAPIAN_INCLUDED_TERMLIST_H
23 
24 #include <string>
25 #include <vector>
26 
27 #include "xapian/intrusive_ptr.h"
28 #include <xapian/types.h>
29 #include <xapian/termiterator.h>
30 
31 namespace Xapian {
32  class PositionIterator;
33  namespace Internal {
34  class ExpandStats;
35  }
36 }
37 
41  void operator=(const Internal &);
42 
44  Internal(const Internal &);
45 
46  protected:
48  Internal() { }
49 
50  public:
54  virtual ~Internal();
55 
57  virtual Xapian::termcount get_approx_size() const = 0;
58 
60  virtual void accumulate_stats(Xapian::Internal::ExpandStats & stats) const;
61 
63  virtual std::string get_termname() const = 0;
64 
66  virtual Xapian::termcount get_wdf() const = 0;
67 
69  virtual Xapian::doccount get_termfreq() const = 0;
70 
82  virtual Internal * next() = 0;
83 
89  virtual Internal * skip_to(const std::string &term) = 0;
90 
92  virtual bool at_end() const = 0;
93 
95  virtual Xapian::termcount positionlist_count() const = 0;
96 
105  virtual const std::vector<Xapian::termpos> * get_vector_termpos() const;
106 
108  virtual Xapian::PositionIterator positionlist_begin() const = 0;
109 
114  size_t shard_index = 0;
115 };
116 
117 // In the external API headers, this class is Xapian::TermIterator::Internal,
118 // but in the library code it's still known as "TermList" in most places.
120 
121 #endif // XAPIAN_INCLUDED_TERMLIST_H
The Xapian namespace contains public interfaces for the Xapian library.
Definition: compactor.cc:80
typedefs for Xapian
Abstract base class for termlists.
Definition: termlist.h:39
Internal()
Only constructable as a base class for derived classes.
Definition: termlist.h:48
Xapian::TermIterator::Internal TermList
Definition: termlist.h:119
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Definition: types.h:72
Class for iterating over term positions.
Base class for objects managed by intrusive_ptr.
Definition: intrusive_ptr.h:49
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Definition: types.h:38
Collates statistics while calculating term weight in an ESet.
Definition: expandweight.h:37
Class for iterating over a list of terms.