|
Revision 9440, 2.3 kB
(checked in by olly, 15 months ago)
|
|
api/postlist.cc,backends/flint/flint_alldocspostlist.cc,
backends/flint/flint_alldocspostlist.h,common/postlist.h,matcher/:
Eliminate several implementations of open_position_list and
read_position_list in favour of default ones in the PostList? base
class which throw InvalidOperationError?. Change the default
get_wdf implementation to also throw InvalidOperationError?.
|
| Line | |
|---|
| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | #ifndef XAPIAN_INCLUDED_FLINT_ALLDOCSPOSTLIST_H |
|---|
| 22 | #define XAPIAN_INCLUDED_FLINT_ALLDOCSPOSTLIST_H |
|---|
| 23 | |
|---|
| 24 | #include <string> |
|---|
| 25 | |
|---|
| 26 | #include "leafpostlist.h" |
|---|
| 27 | |
|---|
| 28 | class FlintAllDocsPostList : public LeafPostList { |
|---|
| 29 | |
|---|
| 30 | void operator=(const FlintAllDocsPostList &); |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | FlintAllDocsPostList(const FlintAllDocsPostList &); |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | PostList * read_did_from_current_key(); |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | Xapian::Internal::RefCntPtr<const FlintDatabase> db; |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | Xapian::doccount doccount; |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | AutoPtr<FlintCursor> cursor; |
|---|
| 46 | |
|---|
| 47 | |
|---|
| 48 | Xapian::docid current_did; |
|---|
| 49 | |
|---|
| 50 | public: |
|---|
| 51 | FlintAllDocsPostList(Xapian::Internal::RefCntPtr<const FlintDatabase> db_, |
|---|
| 52 | Xapian::doccount doccount_) |
|---|
| 53 | : db(db_), doccount(doccount_), cursor(db->termlist_table.cursor_get()), |
|---|
| 54 | current_did(0) |
|---|
| 55 | { |
|---|
| 56 | cursor->find_entry(""); |
|---|
| 57 | } |
|---|
| 58 | |
|---|
| 59 | ~FlintAllDocsPostList(); |
|---|
| 60 | |
|---|
| 61 | Xapian::doccount get_termfreq() const; |
|---|
| 62 | |
|---|
| 63 | Xapian::docid get_docid() const; |
|---|
| 64 | |
|---|
| 65 | Xapian::doclength get_doclength() const; |
|---|
| 66 | |
|---|
| 67 | Xapian::termcount get_wdf() const; |
|---|
| 68 | |
|---|
| 69 | PostList * next(Xapian::weight w_min); |
|---|
| 70 | |
|---|
| 71 | PostList * skip_to(Xapian::docid desired_did, Xapian::weight w_min); |
|---|
| 72 | |
|---|
| 73 | bool at_end() const; |
|---|
| 74 | |
|---|
| 75 | std::string get_description() const; |
|---|
| 76 | }; |
|---|
| 77 | |
|---|
| 78 | #endif // XAPIAN_INCLUDED_FLINT_ALLDOCSPOSTLIST_H |
|---|