From cc22505339e40fe45113ee39a4688070807eba58 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 17 Aug 2015 16:49:31 +0000 Subject: search: simplify indexing operation There's no need to make a transaction for each message when doing incremental indexing against a git repository. While we're at it, simplify the interface for callers, too and do not auto-create the Xapian database if it was not explicitly enabled. --- public-inbox-mda | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'public-inbox-mda') diff --git a/public-inbox-mda b/public-inbox-mda index 46a24a14..a3c959ac 100755 --- a/public-inbox-mda +++ b/public-inbox-mda @@ -89,10 +89,8 @@ sub search_index_sync { my ($git_dir) = @_; eval { require PublicInbox::Search; - require PublicInbox::GitCatFile; - my $git = PublicInbox::GitCatFile->new($git_dir); umask 0022; # XXX FIXME use git config core.sharedRepository - my $s = PublicInbox::Search->new($git_dir, 1); - $s->index_sync($git); + my $s = PublicInbox::Search->new($git_dir, 2); + $s->index_sync; }; } -- cgit v1.2.3-24-ge0c7