Changeset 15688

Show
Ignore:
Timestamp:
23.05.2008 16:14:50 (11 years ago)
Author:
mdewsnip
Message:

Changed "dontgdbm" to "dontdb" internally (the collect.cfg file still uses "dontgdbm").

Location:
gsdl/trunk/perllib
Files:
2 modified

Legend:

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

    r15003 r15688  
    128128    $self->{'classifiers'} = &classify::load_classifiers ($classifiers, $build_dir, $outhandle); 
    129129 
    130     # load up any dontgdbm fields 
    131     $self->{'dontgdbm'} = {}; 
     130    # load up any dontdb fields 
     131    $self->{'dontdb'} = {}; 
    132132    if (defined ($self->{'collect_cfg'}->{'dontgdbm'})) { 
    133133    foreach my $dg (@{$self->{'collect_cfg'}->{'dontgdbm'}}) { 
    134         $self->{'dontgdbm'}->{$dg} = 1; 
     134        $self->{'dontdb'}->{$dg} = 1; 
    135135    } 
    136136    } 
     
    340340    my $reconstructed_docs = undef; 
    341341    if ($self->{'keepold'}) { 
    342     # reconstruct doc_obj metadata from gdbm for all docs 
     342    # reconstruct doc_obj metadata from database for all docs 
    343343    $reconstructed_docs = &classify::reconstruct_doc_objs_metadata($fulldbname); 
    344344    } 
     
    359359    $self->{'buildproc'}->set_mode ('infodb'); 
    360360    $self->{'buildproc'}->set_assocdir ($assocdir); 
    361     $self->{'buildproc'}->set_dontgdbm ($self->{'dontgdbm'}); 
     361    $self->{'buildproc'}->set_dontdb ($self->{'dontdb'}); 
    362362    $self->{'buildproc'}->set_classifiers ($self->{'classifiers'}); 
    363363    $self->{'buildproc'}->set_indexing_text (0); 
     
    365365 
    366366    # make_infodatabase needs full reset even for incremental build 
    367     # as incremental works by reconstructing all docs from GDBM and 
     367    # as incremental works by reconstructing all docs from the database and 
    368368    # then adding in the new ones 
    369369    $self->{'buildproc'}->zero_reset();  
  • gsdl/trunk/perllib/basebuildproc.pm

    r15685 r15688  
    2525 
    2626# This document processor outputs a document for indexing (should be  
    27 # implemented by subclass) and storing in gdbm database 
     27# implemented by subclass) and storing in the database 
    2828 
    2929package basebuildproc; 
     
    4747    # outhandle is where all the debugging info goes 
    4848    # output_handle is where the output of the plugins is piped 
    49     # to (i.e. mg, gdbm etc.) 
     49    # to (i.e. mg, database etc.) 
    5050    $outhandle = STDERR unless defined $outhandle; 
    5151 
     
    6060    $self->{'mode'} = "text"; 
    6161    $self->{'assocdir'} = $build_dir; 
    62     $self->{'dontgdbm'} = {}; 
     62    $self->{'dontdb'} = {}; 
    6363 
    6464    $self->{'index'} = "section:text"; 
     
    216216} 
    217217 
    218 sub set_dontgdbm { 
    219     my $self = shift (@_); 
    220     my ($dontgdbm) = @_; 
    221  
    222     $self->{'dontgdbm'} = $dontgdbm; 
     218sub set_dontdb { 
     219    my $self = shift (@_); 
     220    my ($dontdb) = @_; 
     221 
     222    $self->{'dontdb'} = $dontdb; 
    223223} 
    224224 
     
    334334    my $doctype = $doc_obj->get_doc_type(); 
    335335 
    336     # only output this document if it is a "indexed_doc" or "info_doc" (GDBM database only) document 
     336    # only output this document if it is a "indexed_doc" or "info_doc" (database only) document 
    337337    return if ($doctype ne "indexed_doc" && $doctype ne "info_doc"); 
    338338 
     
    356356    else 
    357357    { 
    358     # doc_obj reconstructed from GDBM (has metadata, doc structure but no text) 
     358    # doc_obj reconstructed from database (has metadata, doc structure but no text) 
    359359    my $top_section = $doc_obj->get_top_section(); 
    360360    $archivedir = $doc_obj->get_metadata_element($top_section,"archivedir"); 
     
    402402    # Output whether this node contains text 
    403403    # 
    404     # If doc_obj reconstructed from GDBM file then no need to  
     404    # If doc_obj reconstructed from database file then no need to  
    405405    # explicitly add <hastxt> as this is preserved as metadata when 
    406     # the GDBM file is loaded in 
     406    # the database file is loaded in 
    407407 
    408408    if (defined $filename) 
     
    443443        } 
    444444 
    445         if (!defined $self->{'dontgdbm'}->{$field}) { 
     445        if (!defined $self->{'dontdb'}->{$field}) { 
    446446            print $handle "<$field>$value\n"; 
    447447 
     
    473473    } 
    474474 
    475     # If doc_obj reconstructed from GDBM file then no need to  
     475    # If doc_obj reconstructed from database file then no need to  
    476476    # explicitly add <archivedir> as this is preserved as metadata when 
    477     # the GDBM file is loaded in 
     477    # the database file is loaded in 
    478478 
    479479    if (defined $filename)