Show
Ignore:
Timestamp:
06.02.2009 18:19:44 (11 years ago)
Author:
davidb
Message:

Support for reindexing a document added

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugins/ArchivesInfPlugin.pm

    r18456 r18469  
    9090 
    9191    if (defined $archive_info) { 
    92     print STDERR "********* have parsed and processed an archive info file\n"; 
    93  
    9492    my $archive_info_filename = $self->{'archive_info_filename'}; 
    9593 
     
    10098 
    10199        my $index_status = $archive_info->get_status_info($doc_oid); 
    102         print STDERR "*** Updating $doc_oid $index_status\n"; 
     100####        print STDERR "*** Away to Update $doc_oid $index_status\n"; 
    103101 
    104102        if ($index_status eq "D") { 
    105103        # delete 
    106104        $archive_info->delete_info($doc_oid); 
     105        &GDBMUtils::gdbmDatabaseRemove($archive_info_filename,$doc_oid); 
    107106        } 
    108107        elsif ($index_status =~ m/^(I|R)$/) { 
     
    215214        my $process_file = 1; 
    216215 
    217         # ...unless the build processor is incremental capable and -incremental was specified 
     216        # ...unless the build processor is incremental capable and -incremental was specified, in which case we need to check its index_status flag 
    218217        if ($processor->is_incremental_capable() && $self->{'incremental'}) 
    219218        { 
     
    230229        } 
    231230        elsif ($index_status eq "R") { 
    232             # Need to be delete it from the index. 
     231            # Need to be reindexed/replaced 
    233232            $new_mode = $curr_mode."reindex"; 
     233 
    234234            $process_file = 1; 
    235235        } 
     
    237237        # ... or we're being asked to delete it (in which case skip it) 
    238238        elsif ($index_status eq "D") { 
    239         # Delete it somehow from archives dir!! 
    240         # => get short name, lop off filename, concat archivedir 
    241         # move to recyle bin 
     239        # Non-incremental Delete 
     240        # It's already been deleted from the archives directory 
     241        # (done during import.pl) 
     242        # => All we need to do here is not process it 
    242243 
    243244        $process_file = 0; 
    244245        } 
     246 
     247        if (!$processor->is_incremental_capable() && $self->{'incremental'}) { 
     248        # Nag feature 
     249        if (!defined $self->{'incremental-warning'}) { 
     250            print $outhandle "\n"; 
     251            print $outhandle "Warning: command-line option '-incremental' used with *non-incremental*\n"; 
     252            print $outhandle "         processor '", ref $processor, "'. Some conflicts may arise.\n"; 
     253            print $outhandle "\n"; 
     254            sleep 10; 
     255            $self->{'incremental-warning'} = 1; 
     256        } 
     257        } 
     258 
     259 
    245260 
    246261        if ($process_file) {