about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiInspect.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-12-08 03:54:33 +0000
committerEric Wong <e@80x24.org>2023-12-09 02:03:47 +0000
commit305e237b9e22ffed1b009f8f2b12bf99e8856748 (patch)
treeed5f2b4e3beb4d0d048088dc99483ac332f3841a /lib/PublicInbox/LeiInspect.pm
parentc5515401eb4f51998c8444afee9e8f6db1e8d514 (diff)
downloadpublic-inbox-305e237b9e22ffed1b009f8f2b12bf99e8856748.tar.gz
Xapian has always sorted termlist iterators, so we now:

1) break out of the iterator loop early on non-matches
2) avoid doing sorting ourselves

As a result, we'll also favor the wantarray forms of xap_terms
and all_terms to preserve sort order in most cases.

Confirmed by the Xapian maintainer: <20231201184844.GO4059@survex.com>

Link: https://lists.xapian.org/pipermail/xapian-discuss/2023-December/010013.html
Diffstat (limited to 'lib/PublicInbox/LeiInspect.pm')
-rw-r--r--lib/PublicInbox/LeiInspect.pm1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/PublicInbox/LeiInspect.pm b/lib/PublicInbox/LeiInspect.pm
index d4ad03eb..88d7949c 100644
--- a/lib/PublicInbox/LeiInspect.pm
+++ b/lib/PublicInbox/LeiInspect.pm
@@ -97,7 +97,6 @@ sub _inspect_doc ($$) {
                 my $term = ($1 // '');
                 push @{$ent->{terms}->{$term}}, $tn;
         }
-        @$_ = sort(@$_) for values %{$ent->{terms} // {}};
         $cur = $doc->values_begin;
         $end = $doc->values_end;
         for (; $cur != $end; $cur++) {