From 5f875446975b1473c1ffd7196e572e13d58ba56f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 27 Dec 2020 19:38:29 +0000 Subject: search: remove {mset} option for ->mset method The ->mset method always returns a Xapian mset nowadays, so naming a parameter {mset} is too confusing. As it does with MiscSearch, setting the {relevance} parameter to -1 now sorts by ascending docid order. -2 is now supported for descending docid order, too, since it may be useful for lei users. --- lib/PublicInbox/Isearch.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/Isearch.pm') diff --git a/lib/PublicInbox/Isearch.pm b/lib/PublicInbox/Isearch.pm index e362c80a..7ca2f9e4 100644 --- a/lib/PublicInbox/Isearch.pm +++ b/lib/PublicInbox/Isearch.pm @@ -61,7 +61,7 @@ sub mset_to_artnums { my $docids = PublicInbox::Search::mset_to_artnums($self->{es}, $mset); my $ibx_id = $self->{-ibx_id} //= _ibx_id($self); my $qmarks = join(',', map { '?' } @$docids); - if ($opt && ($opt->{mset} // 0) == 2) { # opt->{mset} = 2 was used + if ($opt && ($opt->{relevance} // 0) == -1) { # -1 => ENQ_ASCENDING my $range = ''; my @r; if (my $r = $opt->{uid_range}) { -- cgit v1.2.3-24-ge0c7