X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=xapian-dump.cc;h=0364481f1d99adae86272b64fa3cbe6a444d53e8;hp=b28c274c7d475623e1f59e9d7360ed8bab9c2733;hb=736bad40ac5cb08e205525741246295f7a7ab1e8;hpb=ea96cb694f83ca00db9516bd3cb7724fb63a7854 diff --git a/xapian-dump.cc b/xapian-dump.cc index b28c274c..0364481f 100644 --- a/xapian-dump.cc +++ b/xapian-dump.cc @@ -24,12 +24,9 @@ * * And for each document ID: * - * All terms - * All values - * - * Things not yet dumped include: - * - * Data associated with a document. + * Document data + * All document terms + * All document values */ #include @@ -47,7 +44,7 @@ print_document_terms (Xapian::Document doc) { Xapian::TermIterator i; - printf ("Terms:\n"); + printf (" Terms:\n"); for (i = doc.termlist_begin (); i != doc.termlist_end (); i++) cout << "\t" << *i << endl; @@ -70,7 +67,7 @@ print_document_values (Xapian::Document doc) int value_no, value_int; double value_float; - printf ("Values:\n"); + printf (" Values:\n"); for (i = doc.values_begin (); i != doc.values_end (); i++) { value_no = i.get_valueno(); @@ -101,6 +98,9 @@ print_document (Xapian::Database db, Xapian::docid id) doc = db.get_document (id); + printf (" Data:\n"); + cout << "\t" << doc.get_data () << endl; + print_document_terms (doc); print_document_values (doc);