unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] index: check for xapian-compact when using --compact
@ 2020-09-01 16:54 Eric Wong
  2020-09-01 16:58 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Wong @ 2020-09-01 16:54 UTC (permalink / raw)
  To: meta

Otherwise, users may be frustrated to discover it missing
a long indexing run.
---
 script/public-inbox-index | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/script/public-inbox-index b/script/public-inbox-index
index 89c6b782..5dad6ecb 100755
--- a/script/public-inbox-index
+++ b/script/public-inbox-index
@@ -64,10 +64,14 @@ foreach my $ibx (@ibxs) {
 	PublicInbox::Admin::scan_ibx_modules($mods, $ibx);
 }
 
+# "Search::Xapian" includes SWIG "Xapian", too:
+$opt->{compact} = 0 if !$mods->{'Search::Xapian'};
+
 PublicInbox::Admin::require_or_die(keys %$mods);
 my $env = PublicInbox::Admin::index_prepare($opt, $cfg);
 local %ENV = (%ENV, %$env) if $env;
 require PublicInbox::InboxWritable;
+PublicInbox::Xapcmd::check_compact() if $opt->{compact};
 PublicInbox::Admin::progress_prepare($opt);
 for my $ibx (@ibxs) {
 	$ibx = PublicInbox::InboxWritable->new($ibx);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] index: check for xapian-compact when using --compact
  2020-09-01 16:54 [PATCH] index: check for xapian-compact when using --compact Eric Wong
@ 2020-09-01 16:58 ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2020-09-01 16:58 UTC (permalink / raw)
  To: meta

Eric Wong <e@80x24.org> wrote:
> Otherwise, users may be frustrated to discover it missing
> a long indexing run.

"after a long indexing run" :x

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-01 16:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-01 16:54 [PATCH] index: check for xapian-compact when using --compact Eric Wong
2020-09-01 16:58 ` Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).