+ is($ibx->search->mset('m:Pine m:LNX m:10010260936330')->size, 1);
+});
+
+{ # List-Id searching
+ my $found = $query->('lid:i.m.just.bored');
+ is_deeply([ filter_mids($found) ], [ 'root@s' ],
+ 'got expected mid on exact lid: search');
+
+ $found = $query->('lid:just.bored');
+ is_deeply($found, [], 'got nothing on lid: search');
+
+ $found = $query->('lid:*.just.bored');
+ is_deeply($found, [], 'got nothing on lid: search');
+
+ $found = $query->('l:i.m.just.bored');
+ is_deeply([ filter_mids($found) ], [ 'root@s' ],
+ 'probabilistic search works on full List-Id contents');
+
+ $found = $query->('l:just.bored');
+ is_deeply([ filter_mids($found) ], [ 'root@s' ],
+ 'probabilistic search works on partial List-Id contents');
+
+ $found = $query->('lid:mad');
+ is_deeply($found, [], 'no match on phrase with lid:');
+
+ $found = $query->('lid:bored');
+ is_deeply($found, [], 'no match on partial List-Id with lid:');
+
+ $found = $query->('l:nothing');
+ is_deeply($found, [], 'matched on phrase with l:');
+}
+
+$ibx->with_umask(sub {
+ $rw_commit->();
+ my $doc_id = $rw->add_message(eml_load('t/data/message_embed.eml'));
+ ok($doc_id > 0, 'messages within messages');
+ $rw->commit_txn_lazy;
+ $ibx->search->reopen;
+ my $n_test_eml = $query->('n:test.eml');
+ is(scalar(@$n_test_eml), 1, 'got a result');
+ my $n_embed2x_eml = $query->('n:embed2x.eml');
+ is_deeply($n_test_eml, $n_embed2x_eml, '.eml filenames searchable');
+ for my $m (qw(20200418222508.GA13918@dcvr 20200418222020.GA2745@dcvr
+ 20200418214114.7575-1-e@yhbt.net)) {
+ is($query->("m:$m")->[0]->{mid},
+ '20200418222508.GA13918@dcvr', 'probabilistic m:'.$m);
+ is($query->("mid:$m")->[0]->{mid},
+ '20200418222508.GA13918@dcvr', 'boolean mid:'.$m);
+ }
+ is($query->('dfpost:4dc62c50')->[0]->{mid},
+ '20200418222508.GA13918@dcvr',
+ 'diff search reaches inside message/rfc822');
+ is($query->('s:"mail header experiments"')->[0]->{mid},
+ '20200418222508.GA13918@dcvr',
+ 'Subject search reaches inside message/rfc822');