Changeset 23160
- Timestamp:
- 2010-10-18T15:45:26+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/basebuildproc.pm
r23133 r23160 418 418 if ($edit_mode eq "delete") { 419 419 # record this doc so we don't process the reconstructed doc later 420 $self->{'dont_ reconstruct'}->{$doc_obj->get_OID()} = 1;420 $self->{'dont_process_reconstructed'}->{$doc_obj->get_OID()} = 1; 421 421 # we don't need to do anything else for the info database for a deleted document. The infodb starts from scratch each time, so no deletion is necessary 422 # do we need this??? where did num_docs come from, from reconstruction??423 #$self->{'num_docs'} -= 1 unless ($doctype eq "classification");424 422 return; 425 423 } … … 427 425 if ($edit_mode eq "update") { 428 426 # we don't want to process the reconstructed doc later, but we will process this version now. 429 $self->{'dont_ reconstruct'}->{$doc_obj->get_OID()} = 1;427 $self->{'dont_process_reconstructed'}->{$doc_obj->get_OID()} = 1; 430 428 } 431 429 … … 439 437 if (!defined $filename) { 440 438 # a reconstructed doc 441 $self->{'num_bytes'} += $doc_obj->get_metadata_element ($doc_obj->get_top_section (), "total_numbytes"); 442 print STDERR "new numbytes = $self->{'num_bytes'}\n"; 439 my $num_reconstructed_bytes = $doc_obj->get_metadata_element ($doc_obj->get_top_section (), "total_numbytes"); 440 if (defined $num_reconstructed_bytes) { 441 print STDERR "adding numbytes $num_reconstructed_bytes\n"; 442 $self->{'num_bytes'} += $num_reconstructed_bytes; 443 } 443 444 } 444 445 # classify the document 445 446 &classify::classify_doc ($self->{'classifiers'}, $doc_obj); 446 447 447 # now add all the section to the infodb.448 # now add all the sections to the infodb. 448 449 449 450 # is this a paged or a hierarchical document … … 596 597 unless ($self->is_incremental_capable()) 597 598 { 598 print STDERR "outputting db entry for doc number\n";599 599 if ($self->{'db_level'} eq "document") { 600 600 &dbutil::write_infodb_entry($self->{'infodbtype'}, $infodb_handle, $self->{'num_docs'}, { 'section' => [ $doc_OID ] }); … … 610 610 } # while defined section 611 611 612 print STDERR "end of infodb edit\n";613 612 } 614 613
Note:
See TracChangeset
for help on using the changeset viewer.