about summary refs log tree commit homepage
path: root/lib/PublicInbox/Search.pm
diff options
context:
space:
mode:
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-02 20:46:55 +0000
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-02 20:46:55 +0000
commit44ff716b116f10ae42372f9f517356000636e571 (patch)
treeb69afdd2f8c37c6fec0c7c17e97d9349b6d2341f /lib/PublicInbox/Search.pm
parentf80ef6a32b28f54415f79513537f6c9fcd58a244 (diff)
downloadpublic-inbox-44ff716b116f10ae42372f9f517356000636e571.tar.gz
'Q' is merely a convention in the Xapian world, and is close
enough to unique for practical purposes, so stop using XMID
and gain a little more term length as a result.
Diffstat (limited to 'lib/PublicInbox/Search.pm')
-rw-r--r--lib/PublicInbox/Search.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm
index c074410c..74f406ad 100644
--- a/lib/PublicInbox/Search.pm
+++ b/lib/PublicInbox/Search.pm
@@ -56,7 +56,7 @@ my %bool_pfx_internal = (
 );
 
 my %bool_pfx_external = (
-        mid => 'XMID', # Message-ID (full/exact)
+        mid => 'Q', # Message-ID (full/exact), this is mostly uniQue
 );
 
 my %prob_prefix = (
@@ -333,7 +333,7 @@ sub lookup_skeleton {
         my ($self, $mid) = @_;
         my $skel = $self->{skel} or return lookup_message($self, $mid);
         $mid = mid_clean($mid);
-        my $term = 'XMID' . $mid;
+        my $term = 'Q' . $mid;
         my $smsg;
         my $beg = $skel->postlist_begin($term);
         if ($beg != $skel->postlist_end($term)) {
@@ -352,7 +352,7 @@ sub lookup_message {
         my ($self, $mid) = @_;
         $mid = mid_clean($mid);
 
-        my $doc_id = $self->find_first_doc_id('XMID' . $mid);
+        my $doc_id = $self->find_first_doc_id('Q' . $mid);
         my $smsg;
         if (defined $doc_id) {
                 # raises on error:
@@ -377,7 +377,7 @@ sub each_smsg_by_mid {
         my $xdb = $self->{xdb};
         # XXX retry_reopen isn't necessary for V2Writable, but the PSGI
         # interface will need it...
-        my ($head, $tail) = $self->find_doc_ids('XMID' . $mid);
+        my ($head, $tail) = $self->find_doc_ids('Q' . $mid);
         for (; $head->nequal($tail); $head->inc) {
                 my $doc_id = $head->get_docid;
                 my $doc = $xdb->get_document($doc_id);