Changeset 17287 for gsdl/trunk/perllib


Ignore:
Timestamp:
2008-09-15T12:33:09+12:00 (16 years ago)
Author:
kjdon
Message:

added 'if verbosity > 3' to some print statements, and set doctype to be doc if not defined, rather than setting it back to undefined

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/lucenebuildproc.pm

    r17110 r17287  
    303303    if ($self->get_mode() eq "incinfodb")
    304304      {
    305         print STDERR "*** Processing a document added using INCINFODB ***\n";
     305        print STDERR "*** Processing a document added using INCINFODB ***\n" if ($self->{'verbosity'} > 3);
    306306        my ($archivedir) = $file =~ /^(.*?)(?:\/|\\)[^\/\\]*$/;
    307307        $archivedir = "" unless defined $archivedir;
     
    311311
    312312        # Number of files
    313         print STDERR "There are " . scalar($doc_obj->get_assoc_files()) . " associated documents...\n";
     313        print STDERR "There are " . scalar(@{$doc_obj->get_assoc_files()}) . " associated documents...\n" if ($self->{'verbosity'} > 3);
    314314
    315315        # resolve the final filenames of the files associated with this document
     
    329329
    330330        my $section = $doc_obj->get_top_section ();
    331         print STDERR "+ top section: '$section'\n";
     331        print STDERR "+ top section: '$section'\n" if ($self->{'verbosity'} > 3);
    332332        my $doc_OID = $doc_obj->get_OID();
    333333        my $url = "";
    334334        while (defined $section)
    335335          {
    336             print STDERR "+ processing section: '$section'\n";
     336            print STDERR "+ processing section: '$section'\n" if ($self->{'verbosity'} > 3);
    337337            # Attach all the other metadata to this document
    338338            # output the fact that this document is a document (unless doctype
     
    341341            if (!defined $dtype || $dtype !~ /\w/)
    342342              {
    343                 $doc_obj->add_utf8_metadata($section, "doctype", $dtype);
     343                #$doc_obj->add_utf8_metadata($section, "doctype", $dtype);
     344          $doc_obj->add_utf8_metadata($section, "doctype", "doc");
    344345              }
    345346            # output whether this node contains text
     
    380381              }
    381382            #output the matching doc number
    382             print STDERR "+ docnum=" . $self->{'numincdocs'} . "\n";
     383            print STDERR "+ docnum=" . $self->{'numincdocs'} . "\n" if ($self->{'verbosity'} > 3);
    383384            $doc_obj->add_utf8_metadata($section, "docnum", $self->{'numincdocs'});
    384385
     
    388389            last if ($self->{'db_level'} eq "document");
    389390          }
    390         print STDERR "\n*** incrementally add metadata from document at: " . $file . "\n";
     391        print STDERR "\n*** incrementally add metadata from document at: " . $file . "\n" if ($self->{'verbosity'} > 3);
    391392        &IncrementalBuildUtils::addDocument($self->{'collection'}, $doc_obj, $doc_obj->get_top_section());
    392393      }
Note: See TracChangeset for help on using the changeset viewer.