We only document the "s:" anyways. While the long name is more
descriptive, the ambiguity makes agnostic caching (by Varnish or
similar) slightly harder and longer URLs are more likely to be
accidentally truncated when shared.
s => 'S', # for mairix compatibility
m => 'Q', # 'mid' is exact, 'm' can do partial
f => 'A', # for mairix compatibility
s => 'S', # for mairix compatibility
m => 'Q', # 'mid' is exact, 'm' can do partial
f => 'A', # for mairix compatibility
is($res->{total}, 0, "path variant `$p' does not match");
}
is($res->{total}, 0, "path variant `$p' does not match");
}
- $res = $ro->query('subject:(Hello world)');
+ $res = $ro->query('s:(Hello world)');
@res = filter_mids($res);
@res = filter_mids($res);
- is_deeply(\@res, \@exp, 'got expected results for subject:() match');
+ is_deeply(\@res, \@exp, 'got expected results for s:() match');
- $res = $ro->query('subject:"Hello world"');
+ $res = $ro->query('s:"Hello world"');
@res = filter_mids($res);
@res = filter_mids($res);
- is_deeply(\@res, \@exp, 'got expected results for subject:"" match');
+ is_deeply(\@res, \@exp, 'got expected results for s:"" match');
- $res = $ro->query('subject:"Hello world"', {limit => 1});
+ $res = $ro->query('s:"Hello world"', {limit => 1});
is(scalar @{$res->{msgs}}, 1, "limit works");
my $first = $res->{msgs}->[0];
is(scalar @{$res->{msgs}}, 1, "limit works");
my $first = $res->{msgs}->[0];
- $res = $ro->query('subject:"Hello world"', {offset => 1});
+ $res = $ro->query('s:"Hello world"', {offset => 1});
is(scalar @{$res->{msgs}}, 1, "offset works");
my $second = $res->{msgs}->[0];
is(scalar @{$res->{msgs}}, 1, "offset works");
my $second = $res->{msgs}->[0];
$rw_commit->();
$ro->reopen;
$rw_commit->();
$ro->reopen;
my $res = $ro->query('ghost');
my @exp = sort qw(ghost-message@s ghost-reply@s);
my @res = filter_mids($res);
my $res = $ro->query('ghost');
my @exp = sort qw(ghost-message@s ghost-reply@s);
my @res = filter_mids($res);