about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-10-27 07:54:44 +0000
committerEric Wong <e@80x24.org>2020-11-07 10:22:03 +0000
commit4c315ed49fe8a6224264d74c490e0ee552365b2f (patch)
treef36428594fa810ddc343a42a87d4adf0188c3b2b /t
parent090238c3353438526dec707dad0718cb21efd07f (diff)
downloadpublic-inbox-4c315ed49fe8a6224264d74c490e0ee552365b2f.tar.gz
It doesn't seem worth storing xref3 data in Xapian now that
the same info is in over.sqlite3.
Diffstat (limited to 't')
-rw-r--r--t/search.t26
1 files changed, 2 insertions, 24 deletions
diff --git a/t/search.t b/t/search.t
index e789b81e..da9acb07 100644
--- a/t/search.t
+++ b/t/search.t
@@ -341,14 +341,6 @@ $ibx->with_umask(sub {
                 my $uid = PublicInbox::SearchIdx::get_val($doc, $col);
                 is($uid, $smsg->{num}, 'UID column matches {num}');
                 is($uid, $m->get_docid, 'UID column matches docid');
-
-                # check ->xref3 for external index:
-                is_deeply($smsg->xref3($doc), [], 'xref3 empty by default');
-                my $exp = "inbox.com.example:$uid:deadbeef";
-                $doc->add_boolean_term('P'.$exp);
-                is_deeply($smsg->xref3($doc), [ $exp ], 'xref3 can be set');
-                $doc->remove_term('P'.$exp);
-                is_deeply($smsg->xref3($doc), [], 'xref3 can be unset');
         }
 
         $mset = $ibx->search->mset('tc:list@example.com');
@@ -521,13 +513,8 @@ $ibx->with_umask(sub {
         $rw_commit->();
         my $doc_id = $rw->add_message(eml_load('t/data/message_embed.eml'));
         ok($doc_id > 0, 'messages within messages');
-
-        my $eml = PublicInbox::Eml->new(<<EOF);
-List-Id: <blahblah.example.com>
-
-EOF
-        $rw->add_xref3($doc_id, 1, 'deadbeef', 'newsgroup1.example', $eml);
-        $rw_commit->();
+        $rw->commit_txn_lazy;
+        $ibx->search->reopen;
         my $n_test_eml = $query->('n:test.eml');
         is(scalar(@$n_test_eml), 1, 'got a result');
         my $n_embed2x_eml = $query->('n:embed2x.eml');
@@ -545,15 +532,6 @@ EOF
         is($query->('s:"mail header experiments"')->[0]->{mid},
                 '20200418222508.GA13918@dcvr',
                 'Subject search reaches inside message/rfc822');
-        is($query->('l:blahblah.example.com')->[0]->{num}, $doc_id,
-                'xref3 List-Id probabilistic works');
-        is($query->('lid:blahblah.example.com')->[0]->{num}, $doc_id,
-                'xref3 List-Id boolean term works');
-        $rw->remove_xref3($doc_id, 'deadbeef', 'newsgroup1.example', $eml);
-        $rw->commit_txn_lazy;
-        $ibx->search->reopen;
-        my $res = $query->('lid:blahblah.example.com');
-        is_deeply($res, [], '->remove_xref3 dropped boolean term');
 });
 
 done_testing();