X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FSearch.pm;h=a0e6a93b1e4460d08aff18ff2a48a881a5fcd25a;hb=9bd675d33ad1e49bd2ebe12a1d216216e61380de;hp=098c97cdc2c11c72893d07a4eb4ffa3bb14bc856;hpb=3b508de80a200e9a32adbdc437434339187dde88;p=public-inbox.git diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index 098c97cd..a0e6a93b 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2018 all contributors +# Copyright (C) 2015-2019 all contributors # License: AGPL-3.0+ # based on notmuch, but with no concept of folders, files or flags # @@ -131,9 +131,9 @@ sub xdir ($;$) { my $dir = "$self->{mainrepo}/xap" . SCHEMA_VERSION; return $dir if $rdonly; - my $part = $self->{partition}; - defined $part or die "partition not given"; - $dir .= "/$part"; + my $shard = $self->{shard}; + defined $shard or die "shard not given"; + $dir .= "/$shard"; } } @@ -143,15 +143,15 @@ sub _xdb ($) { my ($xdb, $slow_phrase); my $qpf = \($self->{qp_flags} ||= $QP_FLAGS); if ($self->{version} >= 2) { - foreach my $part (<$dir/*>) { - -d $part && $part =~ m!/[0-9]+\z! or next; - my $sub = Search::Xapian::Database->new($part); + foreach my $shard (<$dir/*>) { + -d $shard && $shard =~ m!/[0-9]+\z! or next; + my $sub = Search::Xapian::Database->new($shard); if ($xdb) { $xdb->add_database($sub); } else { $xdb = $sub; } - $slow_phrase ||= -f "$part/iamchert"; + $slow_phrase ||= -f "$shard/iamchert"; } } else { $slow_phrase = -f "$dir/iamchert";