00001
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <config.h>
00023 #include "brass_alldocspostlist.h"
00024
00025 #include <string>
00026
00027 #include "brass_database.h"
00028 #include "debuglog.h"
00029
00030 #include "str.h"
00031
00032 using namespace std;
00033
00034 BrassAllDocsPostList::BrassAllDocsPostList(Xapian::Internal::RefCntPtr<const BrassDatabase> db_,
00035 Xapian::doccount doccount_)
00036 : BrassPostList(db_, string(), true),
00037 doccount(doccount_)
00038 {
00039 LOGCALL_CTOR(DB, "BrassAllDocsPostList", db_.get() | doccount_);
00040 }
00041
00042 Xapian::doccount
00043 BrassAllDocsPostList::get_termfreq() const
00044 {
00045 LOGCALL(DB, Xapian::doccount, "BrassAllDocsPostList::get_termfreq", NO_ARGS);
00046 RETURN(doccount);
00047 }
00048
00049 Xapian::termcount
00050 BrassAllDocsPostList::get_doclength() const
00051 {
00052 LOGCALL(DB, Xapian::termcount, "BrassAllDocsPostList::get_doclength", NO_ARGS);
00053
00054 RETURN(BrassPostList::get_wdf());
00055 }
00056
00057 Xapian::termcount
00058 BrassAllDocsPostList::get_wdf() const
00059 {
00060 LOGCALL(DB, Xapian::termcount, "BrassAllDocsPostList::get_wdf", NO_ARGS);
00061 AssertParanoid(!at_end());
00062 RETURN(1);
00063 }
00064
00065 PositionList *
00066 BrassAllDocsPostList::read_position_list()
00067 {
00068 LOGCALL(DB, Xapian::termcount, "BrassAllDocsPostList::read_position_list", NO_ARGS);
00069 throw Xapian::InvalidOperationError("BrassAllDocsPostList::read_position_list() not meaningful");
00070 }
00071
00072 PositionList *
00073 BrassAllDocsPostList::open_position_list() const
00074 {
00075 LOGCALL(DB, Xapian::termcount, "BrassAllDocsPostList::open_position_list", NO_ARGS);
00076 throw Xapian::InvalidOperationError("BrassAllDocsPostList::open_position_list() not meaningful");
00077 }
00078
00079 string
00080 BrassAllDocsPostList::get_description() const
00081 {
00082 string desc = "BrassAllDocsPostList(did=";
00083 desc += str(get_docid());
00084 desc += ",doccount=";
00085 desc += str(doccount);
00086 desc += ')';
00087 return desc;
00088 }