Re: Proof of concept for counting messages in thread

2023-02-13 Thread David Bremner
Michael J Gruber writes: > That is really weird: > ``` > xapian-delve -t G00021229 . > Posting List for term 'G00021229' (termfreq 115, collfreq 0, > wdf_max 0): 146259 ... > ``` > with 115 record numbers, all different. > Doing `xapian-delve -1r` for each of them and grepping

Re: Proof of concept for counting messages in thread

2023-02-13 Thread Michael J Gruber
Am Mo., 13. Feb. 2023 um 21:23 Uhr schrieb David Bremner : > > Michael J Gruber writes: > > > > It has 5, as confirmed by the search output and that of `notmuch > > count`. But it is matched by `count 115`. > > `xapian-check` is happy. (There used to be some issue with additional > > thread

Re: Proof of concept for counting messages in thread

2023-02-13 Thread David Bremner
Michael J Gruber writes: > > It has 5, as confirmed by the search output and that of `notmuch > count`. But it is matched by `count 115`. > `xapian-check` is happy. (There used to be some issue with additional > thread entries at some point.) > > Michael A simple test to try is % xapian-delve

Re: Proof of concept for counting messages in thread

2023-02-13 Thread Michael J Gruber
Am Mo., 13. Feb. 2023 um 17:32 Uhr schrieb David Bremner : > > Michael J Gruber writes: > > > I am getting a few surprising matches, e.g. > > ``` > > notmuch search --query=sexp '(thread (count 115)))' > > thread:00021229 2021-05-17 [5/5] Michael J Gruber ... redacted > > notmuch count

Re: Proof of concept for counting messages in thread

2023-02-13 Thread David Bremner
Michael J Gruber writes: > I am getting a few surprising matches, e.g. > ``` > notmuch search --query=sexp '(thread (count 115)))' > thread:00021229 2021-05-17 [5/5] Michael J Gruber ... redacted > notmuch count --exclude=false thread:00021229 > 5 > ``` > It could be some

Re: Proof of concept for counting messages in thread

2023-02-13 Thread Michael J Gruber
Am Mo., 13. Feb. 2023 um 13:26 Uhr schrieb David Bremner : > > So for this only supports counting messages in threads, and the sexp > based query parser. It seems useful to expand it to other fields > (from, e.g.). I'm not sure how motivated I am to shim this into the > infix query parser, but we

[PATCH 1/2] WIP/lib: add count query backend

2023-02-13 Thread David Bremner
--- lib/Makefile.local | 3 +- lib/count-query.cc | 62 ++ lib/database-private.h | 6 3 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 lib/count-query.cc diff --git a/lib/Makefile.local b/lib/Makefile.local index

Proof of concept for counting messages in thread

2023-02-13 Thread David Bremner
So for this only supports counting messages in threads, and the sexp based query parser. It seems useful to expand it to other fields (from, e.g.). I'm not sure how motivated I am to shim this into the infix query parser, but we will see how it goes.

[PATCH 2/2] WIP: support thread count queries

2023-02-13 Thread David Bremner
--- lib/parse-sexp.cc | 35 --- test/T081-sexpr-search.sh | 6 ++ 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/lib/parse-sexp.cc b/lib/parse-sexp.cc index 9cadbc13..1faa9023 100644 --- a/lib/parse-sexp.cc +++ b/lib/parse-sexp.cc @@