notmuch.git  about / heads / tags
Unnamed repository; edit this file 'description' to name the repository.
   commit 06bdb8c472a967b5e64714dc06534147d371a603 (patch)
   parent 1b878877 doc: fix typos
     tree 3898e20b0fdd3e9e33c762d7bf4ec9863226ff7c
   author David Bremner <david@tethera.net>  2023-04-25 09:45:02 -0300
committer David Bremner <david@tethera.net>  2023-04-25 12:21:22 -0300

start program to do a census of ghost messages

this should check term frequence for references
---
 ggc.cc | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/ggc.cc b/ggc.cc
new file mode 100644
index 00000000..8b558567
--- /dev/null
+++ b/ggc.cc
@@ -0,0 +1,26 @@
+#include <xapian.h>
+#include <iostream>
+int main(int argc, char **argv){
+  if (argc != 2) {
+    fprintf (stderr, "usage: ggc xapian-database\n");
+    exit (1);
+  }
+
+  Xapian::Database db(argv[1]);
+  Xapian::Enquire enquire(db);
+
+  enquire.set_query(Xapian::Query("Tghost"));
+
+  auto mset = enquire.get_mset (0,db.get_doccount ());
+
+  for (auto iter=mset.begin (); iter != mset.end(); iter++){
+    std::string mid, tid;
+    auto doc = iter.get_document ();
+    auto term_iter = doc.termlist_begin ();
+
+    term_iter.skip_to ("Q");
+    mid=(*term_iter).substr(1);
+    std::cout << "docid = " <<  *iter;
+    std::cout << " mid " << mid << std::endl;
+  }
+}


glossary
--------
Commit objects reference one tree, and zero or more parents.

Single parent commits can typically generate a patch in
unified diff format via `git format-patch'.

Multiple parents means the commit is a merge.

Root commits have no ancestor.  Note that it is
possible to have multiple root commits when merging independent histories.

Every commit references one top-level tree object.

git clone https://yhetil.org/notmuch.git