+// 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");
+}
+
+