Changeset 15685

Show
Ignore:
Timestamp:
23.05.2008 15:33:58 (11 years ago)
Author:
mdewsnip
Message:

(Adding new DB support) Changed all the "gdbm_level"s to "db_level".

Location:
gsdl/trunk/perllib
Files:
5 modified

Legend:

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

    r14934 r15685  
    120120    $self->{'store_text'} = 1; 
    121121 
    122     # what level (section/document) the gdbm database - indexer intersection is 
    123     $self->{'gdbm_level'} = "section"; 
     122    # what level (section/document) the database - indexer intersection is 
     123    $self->{'db_level'} = "section"; 
    124124    #used by browse interface 
    125125    $self->{'doclist'} = []; 
     
    276276} 
    277277 
    278 # the standard gdbm level is section, but you may want to change it to document 
    279 sub set_gdbm_level { 
     278# the standard database level is section, but you may want to change it to document 
     279sub set_db_level { 
    280280    my $self= shift (@_); 
    281     my ($gdbm_level) = @_; 
    282  
    283     $self->{'gdbm_level'} = $gdbm_level; 
     281    my ($db_level) = @_; 
     282 
     283    $self->{'db_level'} = $db_level; 
    284284} 
    285285 
     
    491491 
    492492 
    493     if ($self->{'gdbm_level'} eq "document") { 
     493    if ($self->{'db_level'} eq "document") { 
    494494        # doc num is num_docs not num_sections 
    495495        # output the matching document number 
     
    526526     
    527527    # output a database entry for the document number 
    528     if ($self->{'gdbm_level'} eq "document") { 
     528    if ($self->{'db_level'} eq "document") { 
    529529        print $handle "[$self->{'num_docs'}]\n"; 
    530530        print $handle "<section>$doc_OID\n"; 
     
    544544    $first = 0; 
    545545    $section = $doc_obj->get_next_section($section); 
    546     last if ($self->{'gdbm_level'} eq "document"); # if no sections wanted, only gdbm the docs 
     546    last if ($self->{'db_level'} eq "document"); # if no sections wanted, only add the docs 
    547547    } 
    548548 
  • gsdl/trunk/perllib/cfgread4gs3.pm

    r15619 r15685  
    577577    my $default_search_level = "Doc"; 
    578578    my $default_retrieve_level = "Doc"; 
    579     my $default_gdbm_level = "Doc"; 
     579    my $default_db_level = "Doc"; 
    580580    $first = 1; 
    581581    if ($buildtype eq "mgpp" || $buildtype eq "lucene") { 
     
    589589            # let default search level follow the first level in the level list 
    590590            $default_search_level = $val; 
    591             # retrieve/GDBM levels may get modified later if text level is defined 
     591            # retrieve/database levels may get modified later if text level is defined 
    592592            $default_retrieve_level = $val; 
    593             $default_gdbm_level = $val; 
     593            $default_db_level = $val; 
    594594            $first = 0; 
    595595        } 
     
    603603     
    604604    if (defined $buildcfg->{'textlevel'}) { 
    605        # let the retrieve/gdbm levels always follow the textlevel 
     605       # let the retrieve/database levels always follow the textlevel 
    606606           $default_retrieve_level = $buildcfg->{'textlevel'}; 
    607        $default_gdbm_level = $buildcfg->{'textlevel'}; 
     607       $default_db_level = $buildcfg->{'textlevel'}; 
    608608          
    609609    } 
     
    623623    } 
    624624    if ($buildtype eq "lucene" || $buildtype eq "mgpp") { 
    625         # make the GDBM level  
    626         &write_line('COLCFG', ["<defaultDBLevel shortname=\"", $default_gdbm_level, "\" />"]); 
     625        &write_line('COLCFG', ["<defaultDBLevel shortname=\"", $default_db_level, "\" />"]); 
    627626    } 
    628627    # do searchTypeList 
  • gsdl/trunk/perllib/lucenebuilder.pm

    r15003 r15685  
    159159    # stored text is always Doc and Sec levels     
    160160    my $levels = { 'document' => 1, 'section' => 1 }; 
    161     # always do gdbm at section level 
    162     my $gdbm_level = "section";  
     161    # always do database at section level 
     162    my $db_level = "section";  
    163163 
    164164    # set up the document processr 
     
    169169    $self->{'buildproc'}->set_indexfieldmap ($self->{'indexfieldmap'}); 
    170170    $self->{'buildproc'}->set_levels ($levels); 
    171     $self->{'buildproc'}->set_gdbm_level ($gdbm_level); 
     171    $self->{'buildproc'}->set_db_level ($db_level); 
    172172    $self->{'buildproc'}->reset(); 
    173173    &plugin::begin($self->{'pluginfo'}, $self->{'source_dir'}, 
     
    320320 
    321321    my $store_levels = $self->{'levels'}; 
    322     my $gdbm_level = "section"; #always 
     322    my $db_level = "section"; #always 
    323323    my $dom_level = ""; 
    324324    foreach my $key (keys %$store_levels) { 
     
    342342    $self->{'buildproc'}->set_indexfieldmap ($self->{'indexfieldmap'}); 
    343343    $self->{'buildproc'}->set_levels ($local_levels); 
    344     $self->{'buildproc'}->set_gdbm_level($gdbm_level); 
     344    $self->{'buildproc'}->set_db_level($db_level); 
    345345    $self->{'buildproc'}->reset(); 
    346346    &plugin::read ($self->{'pluginfo'}, $self->{'source_dir'}, 
  • gsdl/trunk/perllib/lucenebuildproc.pm

    r14934 r15685  
    9292    if ($ldoc_level) 
    9393      { 
    94     if ($self->{'gdbm_level'} eq 'document') 
     94    if ($self->{'db_level'} eq 'document') 
    9595          { 
    9696        my $doc_sec_num = $self->{'num_docs'}; 
     
    386386            $section = $doc_obj->get_next_section($section); 
    387387            # if no sections wanted, only gdbm the docs 
    388             last if ($self->{'gdbm_level'} eq "document"); 
     388            last if ($self->{'db_level'} eq "document"); 
    389389          } 
    390390        print STDERR "\n*** incrementally add metadata from document at: " . $file . "\n"; 
  • gsdl/trunk/perllib/mgppbuilder.pm

    r15003 r15685  
    241241    } 
    242242     
    243     my $gdbm_level = "section"; 
     243    my $db_level = "section"; 
    244244 
    245245    $self->{'buildproc'}->set_output_handle ($handle); 
     
    249249    $self->{'buildproc'}->set_indexfieldmap ($self->{'indexfieldmap'}); 
    250250    $self->{'buildproc'}->set_levels ($self->{'levels'});                       
    251     $self->{'buildproc'}->set_gdbm_level ($gdbm_level);                        
     251    $self->{'buildproc'}->set_db_level ($db_level);                        
    252252    $self->{'buildproc'}->reset(); 
    253253    &plugin::begin($self->{'pluginfo'}, $self->{'source_dir'},  
     
    497497    } 
    498498         
    499     # gdbm_level is always section 
    500     my $gdbm_level = "section"; 
     499    # db_level is always section 
     500    my $db_level = "section"; 
    501501 
    502502    # set up the document processr 
     
    508508    $self->{'buildproc'}->set_indexfieldmap ($self->{'indexfieldmap'}); 
    509509    $self->{'buildproc'}->set_levels ($self->{'levels'});  
    510     $self->{'buildproc'}->set_gdbm_level ($gdbm_level);    
     510    $self->{'buildproc'}->set_db_level ($db_level);    
    511511     
    512512    $self->{'buildproc'}->reset();