about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchIdx.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-10-27 07:54:21 +0000
committerEric Wong <e@80x24.org>2020-11-07 10:18:52 +0000
commitcf27d2a29bf2a0c8cb670b9d775fab405ace9f79 (patch)
tree1aec9d69aa17eb4fc0254c5a2db194b551a0a0c7 /lib/PublicInbox/SearchIdx.pm
parentc82accdd243f599cddc62fe9e958552f5c55c595 (diff)
downloadpublic-inbox-cf27d2a29bf2a0c8cb670b9d775fab405ace9f79.tar.gz
Using `O' (owner) here (according Xapian omega's
termprefixes.rst) since we could say the newsgroup or inbox is
the owner of the given message.
Diffstat (limited to 'lib/PublicInbox/SearchIdx.pm')
-rw-r--r--lib/PublicInbox/SearchIdx.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm
index 061a8153..5171c610 100644
--- a/lib/PublicInbox/SearchIdx.pm
+++ b/lib/PublicInbox/SearchIdx.pm
@@ -369,6 +369,7 @@ sub add_xapian ($$$$) {
         index_headers($self, $smsg);
 
         if (defined(my $eidx_key = $smsg->{eidx_key})) {
+                $doc->add_boolean_term('O'.$eidx_key);
                 $doc->add_boolean_term('P'.
                                 "$eidx_key:$smsg->{num}:$smsg->{blob}");
         }
@@ -460,6 +461,7 @@ sub add_xref3 {
         begin_txn_lazy($self);
         my $doc = _get_doc($self, $docid, $oid) or return;
         term_generator($self)->set_document($doc);
+        $doc->add_boolean_term('O'.$eidx_key);
         $doc->add_boolean_term('P'."$eidx_key:$xnum:$oid");
         index_list_id($self, $doc, $eml);
         $self->{xdb}->replace_document($docid, $doc);