From 956ab5a5362a76cb70488c042d0e087902ccc2b8 Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Tue, 13 Feb 2018 03:02:56 +0000 Subject: search: free up 'Q' prefix for a real unique identifier 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) --- lib/PublicInbox/Search.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/PublicInbox/Search.pm') 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: -- cgit v1.2.3-24-ge0c7