From d7ceeaadbab7034eccb88b0c53b9538c1c92b25a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 8 Jan 2019 11:13:31 +0000 Subject: searchmsg: remove unused fields for PSGI in Xapian results These fields are only necessary in NNTP and not even stored in Xapian; so keeping them around for the PSGI web UI search results wastes nearly 80K when loading large result sets. --- t/search.t | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 't') diff --git a/t/search.t b/t/search.t index 3c758e68..6415a644 100644 --- a/t/search.t +++ b/t/search.t @@ -341,7 +341,7 @@ $ibx->with_umask(sub { is(scalar(@$res), 1, "searched $pfx successfully for From:"); foreach my $smsg (@$res) { - like($smsg->from, qr/Laggy Sender/, + like($smsg->from_name, qr/Laggy Sender/, "From appears with $pfx"); } } @@ -358,16 +358,18 @@ $ibx->with_umask(sub { $res = $ro->query('q:theatre'); is(scalar(@$res), 1, 'only one quoted body'); - like($res->[0]->from, qr/\AQuoter/, 'got quoted body') if scalar(@$res); + like($res->[0]->from_name, qr/\AQuoter/, + 'got quoted body') if (scalar(@$res)); $res = $ro->query('nq:theatre'); is(scalar @$res, 1, 'only one non-quoted body'); - like($res->[0]->from, qr/\ANon-Quoter/, 'got non-quoted body') if scalar(@$res); + like($res->[0]->from_name, qr/\ANon-Quoter/, + 'got non-quoted body') if (scalar(@$res)); foreach my $pfx (qw(b: bs:)) { $res = $ro->query($pfx . 'theatre'); is(scalar @$res, 2, "searched both bodies for $pfx"); - like($res->[0]->from, qr/\ANon-Quoter/, + like($res->[0]->from_name, qr/\ANon-Quoter/, "non-quoter first for $pfx") if scalar(@$res); } } -- cgit v1.2.3-24-ge0c7