xapian-core  1.4.25
chert_termlist.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2007,2008,2010,2011 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, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef XAPIAN_INCLUDED_CHERT_TERMLIST_H
22 #define XAPIAN_INCLUDED_CHERT_TERMLIST_H
23 
24 #include <string>
25 
26 #include "xapian/intrusive_ptr.h"
28 #include <xapian/types.h>
29 
30 namespace Xapian {
31  namespace Internal {
32  class ExpandStats;
33  }
34 }
35 
36 #include "chert_database.h"
37 #include "api/termlist.h"
38 #include "chert_table.h"
39 
41 class ChertTermList : public TermList {
43  void operator=(const ChertTermList &);
44 
47 
50 
53 
56 
59 
61  std::string data;
62 
67  const char *pos;
68 
70  const char *end;
71 
73  std::string current_term;
74 
77 
84 
85  public:
88  Xapian::docid did_);
89 
94  chert_doclen_t get_doclength() const;
95 
100  Xapian::termcount get_approx_size() const;
101 
103  void accumulate_stats(Xapian::Internal::ExpandStats & stats) const;
104 
106  std::string get_termname() const;
107 
109  Xapian::termcount get_wdf() const;
110 
118  Xapian::doccount get_termfreq() const;
119 
128  TermList * next();
129 
130  TermList * skip_to(const std::string & term);
131 
133  bool at_end() const;
134 
136  Xapian::termcount positionlist_count() const;
137 
139  Xapian::PositionIterator positionlist_begin() const;
140 };
141 
142 #endif // XAPIAN_INCLUDED_CHERT_TERMLIST_H
std::string current_term
The termname at the current position.
The Xapian namespace contains public interfaces for the Xapian library.
Definition: compactor.cc:80
A TermList in a chert database.
typedefs for Xapian
chert_doclen_t doclen
The length of document did.
Abstract base class for termlists.
Definition: termlist.h:39
Class for iterating over term positions.
const char * end
Pointer to the end of the encoded tag value.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Definition: types.h:72
Xapian::termcount termlist_size
The number of entries in this termlist.
Class for iterating over term positions.
C++ class definition for chert database.
Btree implementation.
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
std::string data
The tag value from the termlist table which holds the encoded termlist.
Abstract base class for termlists.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Definition: types.h:52
Xapian::termcount current_wdf
The wdf for the term at the current position.
const char * pos
Current position with the encoded tag value held in data.
unsigned int chert_doclen_t
An integer type for storing the length of a document - ie, the sum of the wdfs of the terms in the do...
Definition: chert_types.h:51
Xapian::Internal::intrusive_ptr< const ChertDatabase > db
The database we&#39;re reading data from.
Xapian::doccount current_termfreq
The term frequency for the term at the current position.
Xapian::docid did
The document id that this TermList is for.