Ignore:
Timestamp:
2001-05-29T10:51:39+12:00 (22 years ago)
Author:
kjm18
Message:

added the store_text option as done in mgbuildproc.pm

File:
1 edited

Legend:

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

    r1917 r2480  
    6767    $self->{'num_processed_bytes'} = 0;
    6868    $self->{'outhandle'} = $outhandle;
     69    $self->{'store_text'} = 1;
    6970    $self->{'dontindex'} = {};
    7071    $self->{'indexfieldmap'} = {};
     
    175176
    176177    return $self->{'indexing_text'};
     178}
     179
     180sub set_store_text {
     181    my $self = shift (@_);
     182    my ($store_text) = @_;
     183
     184    $self->{'store_text'} = $store_text;
    177185}
    178186
     
    547555            if ($self->{'indexing_text'}) { #tag the text with <Text>...</Text>, add the <Paragraph> tags and strip out html if needed
    548556                $new_text .= "<TX>\n";
    549                 $tmp_text .= $doc_obj->get_text ($section);
     557                $tmp_text .= $doc_obj->get_text ($section) if $self->{'store_text'};
    550558                $tmp_text = $self->preprocess_text($tmp_text, $self->{'strip_html'}, $self->{'levels'}->{'Paragraph'});
    551559
     
    556564            }
    557565            else { # leave html stuff in, and dont add Paragraph tags - never retrieve paras at the moment
    558                 $new_text .= $doc_obj->get_text ($section);
     566                $new_text .= $doc_obj->get_text ($section) if $self->{'store_text'};
    559567                            #if ($self->{'levels'}->{'Paragraph'}) {
    560568                #$self->find_paragraphs($new_text);
     
    569577                my ($mfield, $mvalue) = (@$pair);
    570578                # check fields here, maybe others dont want - change to use dontindex!!
    571                 if ($mfield ne "Identifier" && $mfield ne "classifytype" &&
     579                if ($mfield ne "Identifier" && $mfield ne "classifytype" && $mfield ne "assocfilepath" &&
    572580                    $mfield !~ /^gsdl/ && defined $mvalue && $mvalue ne "") {
    573581                   
Note: See TracChangeset for help on using the changeset viewer.