[PATCH] search: allow testing with current xapian.git and 1.5.x

2020-08-26 Thread Eric Wong
A `PI_XAPIAN' environment variable is now exposed for testing purposes. We'll also deal with the removal of `NumberValueRangeProcessor' and use `NumberRangeProcessor' in its place, but continue favoring the old Search::Xapian since that's all that's packaged for Debian 10.x stable. --- lib/Public

[PATCH 4/5] over*: use v5.10.1, drop warnings

2020-08-26 Thread Eric Wong
v5.10.1 lets us use the lighter parent.pm instead of base.pm, and we'll rely on the shebang to enable warnings (or not). While we're in the area, drop a no-longer-necessary import for PublicInbox::Search, since OverIdx doesn't require search. --- lib/PublicInbox/Over.pm| 2 +- lib/PublicInbox

[PATCH 0/5] some minor SQLite-related cleanups

2020-08-26 Thread Eric Wong
Dropping some expensive dead code and avoiding some overloaded method names to reduce confusion. Eric Wong (5): over: rename ->connect method to ->dbh over: rename ->disconnect to ->dbh_close over: recent: remove expensive COUNT query over*: use v5.10.1, drop warnings msgmap: use v5.10.1

[PATCH 1/5] over: rename ->connect method to ->dbh

2020-08-26 Thread Eric Wong
`->connect' is confused with the perlfunc for the `connect(2)' syscall, and also `DBI->connect'. Since SQLite doesn't use sockets, the word "connect" needlessly confuses me. Give it a short name to match the field name we use for it, which also matches the variable name used by the DBI(3pm) and D

[PATCH 2/5] over: rename ->disconnect to ->dbh_close

2020-08-26 Thread Eric Wong
Since we got rid of over->connect, `disconnect' no longer pairs with it. So name it after the `close(2)' syscall it ultimately issues. --- lib/PublicInbox/Over.pm | 4 ++-- lib/PublicInbox/OverIdx.pm| 6 +++--- lib/PublicInbox/V2Writable.pm | 4 ++-- t/over.t | 2 +-

[PATCH 3/5] over: recent: remove expensive COUNT query

2020-08-26 Thread Eric Wong
As noted in commit 87dca6d8d5988c5eb54019cca342450b0b7dd6b7 ("www: rework query responses to avoid COUNT in SQLite"), COUNT on many rows is expensive on big SQLite DBs. We've already stopped using that code path long ago in WWW while -imapd and -nntpd never used it. So we'll adjust our remaining

[PATCH 5/5] msgmap: use v5.10.1

2020-08-26 Thread Eric Wong
We use the defined-or (`//', `//=') operators in 5.10, so require 5.10.1 like the rest of our codebase. Update an outdated comment while we're at it. --- lib/PublicInbox/Msgmap.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/Msgmap.pm b/lib/PublicInbox/Msg