Changeset 17797

Show
Ignore:
Timestamp:
10.11.2008 10:32:09 (11 years ago)
Author:
kjdon
Message:

my previous changes to the text method meant that field tags were being output for text as well as for index. Don't want this - they end up in the HTML and give errors. So now tags are only output if ->'indexing_text'}

Location:
gsdl/trunk/perllib
Files:
2 modified

Legend:

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

    r17568 r17797  
    227227        } 
    228228 
    229         $new_text = "<$shortname index=\"1\">$new_text</$shortname>"; 
     229        if ($self->{'indexing_text'}) { 
     230            # add the tag 
     231            $new_text = "<$shortname index=\"1\">$new_text</$shortname>"; 
     232        } 
    230233        # filter the text 
    231234        $new_text = $self->filter_text ($field, $new_text); 
     
    234237        $text .= "$new_text"; 
    235238 
    236         if ($new_field) { 
     239        if ($self->{'indexing_text'} && $new_field) { 
    237240            # we need to add to the list in indexfields 
    238241             
  • gsdl/trunk/perllib/mgppbuildproc.pm

    r17567 r17797  
    340340        # now we add the text and/or the metadata into new_text 
    341341        if ($section_text ne "" || scalar(@metadata_list)) { 
    342             $new_text .= "$paratag<$shortname>"; 
    343              
     342            if ($self->{'indexing_text'}) { 
     343            # only add tags in if indexing 
     344            $new_text .= "$paratag<$shortname>"; 
     345            } 
    344346            if ($section_text ne "") { 
    345347            $new_text .= "$section_text "; 
    346             if ($paratag ne "" && scalar(@metadata_list)) { 
     348            if ($self->{'indexing_text'} && $paratag ne "" && scalar(@metadata_list)) { 
    347349                $new_text .= "</$shortname>$paratag<$shortname>"; 
    348350            } 
     
    351353            $new_text .= "$item "; 
    352354            } 
    353             $new_text .= "</$shortname>"; 
    354              
    355             if ($new_field) { 
     355            if ($self->{'indexing_text'}) { 
     356            # only add tags in if indexing 
     357            $new_text .= "</$shortname>"; 
     358            } 
     359            if ($self->{'indexing_text'} && $new_field) { 
    356360            # we need to add to the list in indexfields 
    357361