about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchIdxShard.pm
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 /lib/PublicInbox/SearchIdxShard.pm
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 'lib/PublicInbox/SearchIdxShard.pm')
-rw-r--r--lib/PublicInbox/SearchIdxShard.pm28
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/PublicInbox/SearchIdxShard.pm b/lib/PublicInbox/SearchIdxShard.pm
index ac01340c..644d8b58 100644
--- a/lib/PublicInbox/SearchIdxShard.pm
+++ b/lib/PublicInbox/SearchIdxShard.pm
@@ -75,15 +75,15 @@ sub shard_worker_loop ($$$$$) {
                 } elsif ($line =~ /\AD ([a-f0-9]{40,}) ([0-9]+)\n\z/s) {
                         $self->remove_by_oid($1, $2 + 0);
                 } elsif ($line =~ s/\A\+X //) {
-                        my ($len, $docid, $xnum, $oid, $eidx_key) =
-                                                        split(/ /, $line, 5);
-                        $self->add_xref3($docid, $xnum, $oid, $eidx_key,
-                                                eml($r, $len));
+                        my ($len, $docid, $oid, $eidx_key) =
+                                                        split(/ /, $line, 4);
+                        $self->add_eidx_info($docid, $oid, $eidx_key,
+                                                        eml($r, $len));
                 } elsif ($line =~ s/\A-X //) {
-                        my ($len, $docid, $xnum, $oid, $eidx_key) =
-                                                        split(/ /, $line, 5);
-                        $self->remove_xref3($docid, $xnum, $oid,
-                                                $eidx_key, eml($r, $len));
+                        my ($len, $docid, $oid, $eidx_key) =
+                                                        split(/ /, $line, 4);
+                        $self->remove_eidx_info($docid, $oid, $eidx_key,
+                                                        eml($r, $len));
                 } else {
                         chomp $line;
                         my $eidx_key;
@@ -135,20 +135,20 @@ sub index_raw {
         }
 }
 
-sub shard_add_xref3 {
-        my ($self, $docid, $xnum, $oid, $xibx, $eml) = @_;
+sub shard_add_eidx_info {
+        my ($self, $docid, $oid, $xibx, $eml) = @_;
         my $eidx_key = $xibx->eidx_key;
         if (my $w = $self->{w}) {
                 my $hdr = $eml->header_obj->as_string;
                 my $len = length($hdr);
-                print $w "+X $len $docid $xnum $oid $eidx_key\n", $hdr or
+                print $w "+X $len $docid $oid $eidx_key\n", $hdr or
                         die "failed to write shard: $!";
         } else {
-                $self->add_xref3($docid, $xnum, $oid, $eidx_key, $eml);
+                $self->add_eidx_info($docid, $oid, $eidx_key, $eml);
         }
 }
 
-sub shard_remove_xref3 {
+sub shard_remove_eidx_info {
         my ($self, $docid, $oid, $xibx, $eml) = @_;
         my $eidx_key = $xibx->eidx_key;
         if (my $w = $self->{w}) {
@@ -157,7 +157,7 @@ sub shard_remove_xref3 {
                 print $w "-X $len $docid $oid $eidx_key\n", $hdr or
                         die "failed to write shard: $!";
         } else {
-                $self->remove_xref3($docid, $oid, $eidx_key, $eml);
+                $self->remove_eidx_info($docid, $oid, $eidx_key, $eml);
         }
 }