}
-// export function for a msglist or a fulltext index record
-// (both are indexed by a long and the data is arrays of longs)
+// export function for a msglist
+// (indexed by a long and the data is arrays of longs)
void export_msglist(int which_cdb, DBT *in_key, DBT *in_data) {
int i;
int num_msgs;
}
+// export function for a full text search index record
+// (indexed by an int and the data is arrays of longs)
+void export_fulltext(int which_cdb, DBT *in_key, DBT *in_data) {
+ int i;
+ int num_msgs;
+ long msg;
+
+ // records are indexed by a single "int" and contains an array of zero or more "long"s
+ int indexnum;
+ memcpy(&indexnum, in_key->data, sizeof(int));
+
+ printf("fulltext|%d|", indexnum);
+
+ if (in_data->size > 0) {
+ num_msgs = in_data->size / sizeof(long);
+ for (i=0; i<num_msgs; ++i) {
+ memcpy(&msg, (in_data->data + (i * sizeof(long))), sizeof(long));
+ if (i != 0) {
+ printf(",");
+ }
+ printf("%ld", msg);
+ }
+ }
+ printf("|\n");
+}
+
+
// export function for a visit record
void export_visit(int which_cdb, DBT *in_key, DBT *in_data) {
struct visit *visit = (struct visit *)in_data->data;
export_dir, // CDB_DIRECTORY
export_usetable, // CDB_USETABLE
export_bigmsg, // CDB_BIGMSGS
- zero_function, // CDB_FULLTEXT
+ export_fulltext, // CDB_FULLTEXT
zero_function, // CDB_EUIDINDEX
export_usersbynumber, // CDB_USERSBYNUMBER
zero_function, // CDB_UNUSED1 (obsolete)