Changeset 16431

Show
Ignore:
Timestamp:
16.07.2008 16:39:56 (11 years ago)
Author:
mdewsnip
Message:

Now passes the Greenstone document OID into GS2LuceneIndexer, to help support incremental building.

Files:
1 modified

Legend:

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

    r16300 r16431  
    8282 
    8383    my $doc_level = $mgppbuildproc::level_map{'document'}; 
    84     my $gs2ns = 'xmlns:gs2="http://www.greenstone.org/gs2"'; 
    8584 
    8685    my $levels = $self->{'levels'}; 
     
    8988    my $lpar_level = $levels->{'paragraph'}; 
    9089 
    91     my $docid=""; 
     90    my $gs2_id = ""; 
    9291    if ($ldoc_level) 
    93       { 
     92    { 
    9493    if ($self->{'db_level'} eq 'document') 
    95           { 
    96         my $doc_sec_num = $self->{'num_docs'}; 
    97         $docid = "gs2:id=\"$doc_sec_num\""; 
    98           } 
     94    { 
     95        $gs2_id = $self->{'num_docs'}; 
     96    } 
    9997        else 
    100           { 
     98    { 
    10199        # default is section level 
    102         my $doc_sec_num = $self->{'num_sections'} + 1; 
    103         $docid = "gs2:id=\"$doc_sec_num\""; 
    104           } 
    105       } 
    106     my $documenttag = "<$doc_level $gs2ns file=\"$file\" $docid >\n"; 
     100        $gs2_id = $self->{'num_sections'} + 1; 
     101    } 
     102    } 
     103    my $gs2_docOID = $doc_obj->get_OID(); 
     104    my $documenttag = "<$doc_level xmlns:gs2=\"http://www.greenstone.org/gs2\" file=\"$file\" gs2:id=\"$gs2_id\" gs2:docOID=\"$gs2_docOID\">\n"; 
    107105    my $documentendtag = "\n</$doc_level>\n"; 
    108106