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-02-13 03:02:56 +0000
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-02-14 00:35:23 +0000
commit956ab5a5362a76cb70488c042d0e087902ccc2b8 (patch)
tree5c0fdb9a6bb677694aabcebce88fdf301198c8e1 /lib/PublicInbox/Search.pm
parentdca7dc77cdc0ce8b2b1fc440a2a45011b58ba112 (diff)
downloadpublic-inbox-956ab5a5362a76cb70488c042d0e087902ccc2b8.tar.gz
This will allow easier-compatibility with v2 code which will
introduce content_id as the unique identifier.
The old "XMID" becomes "XM" as a free text searchable term.
"Q" becomes "XMID" as a boolean prefix.

There's no user-visible changes in this, but there needs to
be a schema version bump later on...
(more changes planned which can affect v1)
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 9ab5afe6..3ec96ca9 100644
--- a/lib/PublicInbox/Search.pm
+++ b/lib/PublicInbox/Search.pm
@@ -56,13 +56,13 @@ my %bool_pfx_internal = (
 );
 
 my %bool_pfx_external = (
-        mid => 'Q', # uniQue id (Message-ID)
+        mid => 'XMID', # uniQue id (Message-ID)
 );
 
 my %prob_prefix = (
         # for mairix compatibility
         s => 'S',
-        m => 'XMID', # 'mid:' (bool) is exact, 'm:' (prob) can do partial
+        m => 'XM', # 'mid:' (bool) is exact, 'm:' (prob) can do partial
         f => 'A',
         t => 'XTO',
         tc => 'XTO XCC',
@@ -85,7 +85,7 @@ my %prob_prefix = (
         dfblob => 'XDFPRE XDFPOST',
 
         # default:
-        '' => 'XMID S A XNQ XQUOT XFN',
+        '' => 'XM S A XNQ XQUOT XFN',
 );
 
 # not documenting m: and mid: for now, the using the URLs works w/o Xapian
@@ -285,7 +285,7 @@ sub lookup_message {
         my ($self, $mid) = @_;
         $mid = mid_clean($mid);
 
-        my $doc_id = $self->find_unique_doc_id('Q' . $mid);
+        my $doc_id = $self->find_unique_doc_id('XMID' . $mid);
         my $smsg;
         if (defined $doc_id) {
                 # raises on error: