diff options
author | Eric Wong <e@80x24.org> | 2021-02-10 18:57:58 -0100 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-02-11 19:15:05 +0000 |
commit | b503d87a23c90fc0f705a79bce34944e7e20b28b (patch) | |
tree | 73077711675b7b844a031acd2537a585addfac50 /lib/PublicInbox/SearchView.pm | |
parent | f310a5054fb8e215885f0b48afac44ff32ca1d56 (diff) | |
download | public-inbox-b503d87a23c90fc0f705a79bce34944e7e20b28b.tar.gz |
This greatly improves the usability of d:, dt:, and rt: search prefixes for users already familiar git's "approxidate" feature. That is, users familiar with the --(since|after|until|before)= options in git-log(1) and similar commands will be able to use those dates in the WWW UI.
Diffstat (limited to 'lib/PublicInbox/SearchView.pm')
-rw-r--r-- | lib/PublicInbox/SearchView.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index 08c77f35..2d0b8e13 100644 --- a/lib/PublicInbox/SearchView.pm +++ b/lib/PublicInbox/SearchView.pm @@ -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; }; |