]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Search.pm
inbox: simplify v2 epoch counting
[public-inbox.git] / lib / PublicInbox / Search.pm
index 7785d48317ac9c9038d9e4ce33a3443b85179a31..b1d38fb901b2f0fcce07513bd559be71b812fa60 100644 (file)
@@ -197,8 +197,7 @@ sub xdb_sharded {
 
        # We need numeric sorting so shard[0] is first for reading
        # Xapian metadata, if needed
-       my $last = max(grep(/\A[0-9]+\z/, readdir($dh)));
-       return if !defined($last);
+       my $last = max(grep(/\A[0-9]+\z/, readdir($dh))) // return;
        my (@xdb, $slow_phrase);
        for (0..$last) {
                my $shard_dir = "$self->{xpfx}/$_";
@@ -396,6 +395,7 @@ sub qparse_new ($) {
        # for IMAP, undocumented for WWW and may be split off go away
        $cb->($qp, $NVRP->new(BYTES, 'bytes:'));
        $cb->($qp, $NVRP->new(TS, 'ts:'));
+       $cb->($qp, $NVRP->new(UID, 'uid:'));
 
        while (my ($name, $prefix) = each %bool_pfx_external) {
                $qp->add_boolean_prefix($name, $_) foreach split(/ /, $prefix);