Ignore:
Timestamp:
2007-01-12T14:18:53+13:00 (17 years ago)
Author:
kjdon
Message:

mgpp and lucene. made them always use doc and sec levels for the text regardless of index level specification. mgpp will always index at doc and sec level, but these options may not be presented to the user. this is to ensure that if we have sectioned documents, we don't need to turn on section indexing in order for the document display to use sections

File:
1 edited

Legend:

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

    r12951 r13590  
    8585    $self->{'strip_html'}=$strip;
    8686}
    87 
    88 
    89 sub get_gdbm_level {
    90     my $self = shift (@_);
    91    
    92     #if a Section level index is not built, the gdbm file should be at doc
    93     #level not Section
    94     if ($self->{'levels'}->{'section'}) {
    95     return "section";
    96     }
    97     return "document";
    98 }
    99 
    10087
    10188#sub find_paragraphs {
     
    208195    my ($fields) = split (/:/, $self->{'index'});
    209196
    210     my ($documenttag) = "";
    211     my($documentendtag) = "";
    212     if ($self->{'levels'}->{'document'}) {
    213     $documenttag = "\n<". $level_map{'document'} . ">\n";
    214     $documentendtag = "\n</". $level_map{'document'} . ">\n";
    215     }
    216     my ($sectiontag) = "";
    217     if ($self->{'levels'}->{'section'}) {
    218     $sectiontag = "\n<". $level_map{'section'} . ">\n";
    219     }
     197    # we always do text and index on Doc and Sec levels
     198    my ($documenttag) = "\n<". $level_map{'document'} . ">\n";
     199    my ($documentendtag) = "\n</". $level_map{'document'} . ">\n";
     200    my ($sectiontag) = "\n<". $level_map{'section'} . ">\n";
    220201    my ($paratag) = "";
    221202   
Note: See TracChangeset for help on using the changeset viewer.