diff options
author | Eric Wong <e@80x24.org> | 2020-12-31 17:47:47 -1200 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-01-02 09:15:06 +0000 |
commit | 86851a5a264bc0e14e925982b09337ab32e20795 (patch) | |
tree | 6607acabf7fa2a51404b355f606d5f06e92077cd /lib/PublicInbox/Search.pm | |
parent | 171a9c24022ad7efef9248fc51fc357eed6aeb8a (diff) | |
download | public-inbox-86851a5a264bc0e14e925982b09337ab32e20795.tar.gz |
The default $QP_FLAGS won't be set until after Xapian is loaded, duh... This fixes t/imapd.t with TEST_RUN_MODE=0
Diffstat (limited to 'lib/PublicInbox/Search.pm')
-rw-r--r-- | lib/PublicInbox/Search.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index 547b6fbe..0bdf6fc6 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -196,6 +196,7 @@ sub xdb_shards_flat ($) { my $xpfx = $self->{xpfx}; my (@xdb, $slow_phrase); load_xapian(); + $self->{qp_flags} //= $QP_FLAGS; if ($xpfx =~ m/xapian${\SCHEMA_VERSION}\z/) { @xdb = ($X{Database}->new($xpfx)); $self->{qp_flags} |= FLAG_PHRASE() if !-f "$xpfx/iamchert"; @@ -232,7 +233,6 @@ sub mset_to_artnums { sub xdb ($) { my ($self) = @_; $self->{xdb} //= do { - $self->{qp_flags} //= $QP_FLAGS; my @xdb = $self->xdb_shards_flat or return; $self->{nshard} = scalar(@xdb); my $xdb = shift @xdb; |