user/dev discussion of public-inbox itself
 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	[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

user/dev discussion of public-inbox itself

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/meta
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/meta

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 meta meta/ https://public-inbox.org/meta \
		meta@public-inbox.org
	public-inbox-index meta

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
	nntp://ou63pmih66umazou.onion/inbox.comp.mail.public-inbox.meta
	nntp://czquwvybam4bgbro.onion/inbox.comp.mail.public-inbox.meta
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.mail.public-inbox.meta
	nntp://news.gmane.io/gmane.mail.public-inbox.general
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for the project(s) associated with this inbox:

	https://80x24.org/public-inbox.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git