]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchView.pm
search: use git approxidate in WWW and "lei q --stdin"
[public-inbox.git] / lib / PublicInbox / SearchView.pm
index 08c77f35000e00d878746576599123bb377ffaed..2d0b8e13f24c8b4aecc7f6ad73652323b4465c7c 100644 (file)
@@ -34,7 +34,6 @@ sub sres_top_html {
                return PublicInbox::WWW::need($ctx, 'Search');
        my $q = PublicInbox::SearchQuery->new($ctx->{qp});
        my $x = $q->{x};
-       my $query = $q->{'q'};
        my $o = $q->{o};
        my $asc;
        if ($o < 0) {
@@ -54,6 +53,8 @@ sub sres_top_html {
        my ($mset, $total, $err, $html);
 retry:
        eval {
+               my $query = $q->{'q'};
+               $srch->query_approxidate($ctx->{ibx}->git, $query);
                $mset = $srch->mset($query, $opts);
                $total = $mset->get_matches_estimated;
        };