summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJani Nikula <jani@nikula.org>2016-03-02 15:48:15 +0200
committerJani Nikula <jani@nikula.org>2016-03-02 15:48:15 +0200
commit7c24aa421c4c85fac31f73e1e271cde11af10966 (patch)
treebaaed867d399d4c6c7ff1e8967316dce65073ff6
parentf75bdaa4a1bf6b4ac1548201aa5cfb1832740ab8 (diff)
bugs: query debugging
-rw-r--r--bugs.mdwn17
1 files changed, 16 insertions, 1 deletions
diff --git a/bugs.mdwn b/bugs.mdwn
index e9cd89c..d1b6d5f 100644
--- a/bugs.mdwn
+++ b/bugs.mdwn
@@ -1,5 +1,7 @@
[[!img notmuch-logo.png alt="Notmuch logo" class="left"]]
-# Troubleshooting and Bug reporting
+# Troubleshooting and Bug Reporting
+
+[[!toc levels=2]]
## Deciding what level the problem lives at
@@ -36,5 +38,18 @@ the list; someone will tag messages appropriately. The status of bugs
and current patches can also be followed
[online](http://nmbug.notmuchmail.org/status).
+## Debugging Queries
+
+If a search doesn't seem to do what you want, you can enable query debugging to
+print the Xapian queries the Notmuch library constructs by setting the
+`NOTMUCH_DEBUG_QUERY` environment variable to a non-empty value.
+For example:
+ $ NOTMUCH_DEBUG_QUERY=1 notmuch search big brown fox
+ Query string is:
+ big brown fox
+ Exclude query is:
+ Xapian::Query()
+ Final query is:
+ Xapian::Query((Tmail AND Zbig:(pos=1) AND Zbrown:(pos=2) AND Zfox:(pos=3)))