diff options
author | Eric Wong <e@80x24.org> | 2021-03-20 19:04:03 +0900 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-03-21 09:45:46 +0000 |
commit | 7d2e572aca7297ea2015d2b6e7c71b672521ec82 (patch) | |
tree | 072f2f81930af5a84091431171c8af43e0584011 /lib/PublicInbox/LeiQuery.pm | |
parent | 592daf02926f747bacaa85a1d1509374c7e66f11 (diff) | |
download | public-inbox-7d2e572aca7297ea2015d2b6e7c71b672521ec82.tar.gz |
This will be used for keyword (and label) storage for externals. We'll be using this to ensure we don't redundantly auto-import messages into lei/store if they're already in a local external (they can still be imported explicitly via "lei import").
Diffstat (limited to 'lib/PublicInbox/LeiQuery.pm')
-rw-r--r-- | lib/PublicInbox/LeiQuery.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/PublicInbox/LeiQuery.pm b/lib/PublicInbox/LeiQuery.pm index 532668ae..007e35fc 100644 --- a/lib/PublicInbox/LeiQuery.pm +++ b/lib/PublicInbox/LeiQuery.pm @@ -57,6 +57,10 @@ sub lei_q { } if ($opt->{'local'} //= scalar(@only) ? 0 : 1) { $lxs->prepare_external($lse); + } else { + my $tmp = PublicInbox::LeiXSearch->new; + $tmp->prepare_external($lse); + $self->ale->refresh_externals($tmp); } if (@only) { for my $loc (@only) { @@ -90,6 +94,7 @@ sub lei_q { unless ($lxs->locals || $lxs->remotes) { return $self->fail('no local or remote inboxes to search'); } + $self->ale->refresh_externals($lxs); my ($xj, $mj) = split(/,/, $opt->{jobs} // ''); if (defined($xj) && $xj ne '' && $xj !~ /\A[1-9][0-9]*\z/) { return $self->fail("`$xj' search jobs must be >= 1"); |