Changeset 57
- Timestamp:
- 1999-09-17 14:18:21 (9 years ago)
- Location:
- trunk/xapian-core
- Files:
-
- 4 modified
-
backends/da/da_database.cc (modified) (5 diffs)
-
backends/da/da_database.h (modified) (1 diff)
-
common/database.h (modified) (1 diff)
-
common/omtypes.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xapian-core/backends/da/da_database.cc
r55 r57 9 9 #include "daread.h" 10 10 11 DAPostList::DAPostList(struct postings *pl) { 11 DAPostList::DAPostList(struct postings *pl, doccount tf) { 12 termfreq = tf; 12 13 postlist = pl; 13 14 DAreadpostings(postlist, 0, 0); … … 16 17 DAPostList::~DAPostList() { 17 18 DAclosepostings(postlist); 19 } 20 21 doccount DAPostList::get_termfreq() { 22 return termfreq; 18 23 } 19 24 … … 112 117 postlist = DAopenpostings(&ti, DA_t); 113 118 114 DAPostList * pl = new DAPostList(postlist );119 DAPostList * pl = new DAPostList(postlist, ti.freq); 115 120 return pl; 116 121 } … … 130 135 if (!id) { 131 136 id = termidvec.size() + 1; 132 printf("Adding term `%s' as ID %d\n", name.c_str(), id);137 // printf("Adding term `%s' as ID %d\n", name.c_str(), id); 133 138 termidvec.push_back(name); 134 139 termidmap[name] = id; 135 140 } 136 printf("Looking up term `%s': ID = %d\n", name.c_str(), id);141 // printf("Looking up term `%s': ID = %d\n", name.c_str(), id); 137 142 return id; 138 143 } … … 142 147 { 143 148 if (id <= 0 || id > termidvec.size()) throw RangeError("invalid termid"); 144 printf("Looking up termid %d: name = `%s'\n", id, termidvec[id - 1].c_str());149 // printf("Looking up termid %d: name = `%s'\n", id, termidvec[id - 1].c_str()); 145 150 return termidvec[id - 1]; 146 151 } -
trunk/xapian-core/backends/da/da_database.h
r37 r57 12 12 struct postings * postlist; 13 13 docid currdoc; 14 doccount termfreq; 14 15 15 DAPostList(struct postings *pl );16 DAPostList(struct postings *pl, doccount tf); 16 17 public: 17 18 ~DAPostList(); 19 20 doccount get_termfreq(); 18 21 19 22 docid get_docid(); // Gets current docid -
trunk/xapian-core/common/database.h
r37 r57 39 39 private: 40 40 public: 41 virtual doccount get_termfreq() = 0;// Gets number of docs indexed by this term 42 41 43 virtual docid get_docid() = 0; // Gets current docid 42 44 virtual weight get_weight() = 0; // Gets current weight -
trunk/xapian-core/common/omtypes.h
r55 r57 6 6 typedef unsigned int termid; 7 7 typedef unsigned int docid; 8 9 typedef docid doccount; 10 8 11 typedef unsigned int weight; 9 12
