Changeset 17117

Show
Ignore:
Timestamp:
01.09.2008 11:54:30 (11 years ago)
Author:
kjdon
Message:

when indexing a combined field, put the field tags arounds the whole content, not each metadata value in the field. otherwise searching across fields doesn't work

Files:
1 modified

Legend:

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

    r17110 r17117  
    282282            $self->{'indexfieldmap'}->{$shortname} = 1; 
    283283        } 
     284        # we only want one tag around the index 
     285        $new_text .= "$paratag<$shortname>"; 
    284286        my @metadata_list = (); 
    285287        foreach my $submeta (split /,/, $real_field) { 
     
    287289            my $section_text = $doc_obj->get_text($section); 
    288290            if ($self->{'indexing_text'}) { 
    289                 # tag the text with <Text>...</Text>, add the <Paragraph> tags and strip out html if needed 
    290                 $new_text .= "$paratag<$shortname>\n"; 
    291291                if ($paratag ne "") { 
     292                # we fiddle around with splitting text into paragraphs 
     293                $new_text .= "</$shortname>$paratag<$shortname>\n"; 
    292294                $section_text = $self->preprocess_text($section_text, $self->{'strip_html'}, "</$shortname>$paratag<$shortname>"); 
    293295                } 
     
    295297                $section_text = $self->preprocess_text($section_text, $self->{'strip_html'}, ""); 
    296298                } 
    297                 $new_text .= "$section_text</$shortname>\n"; 
     299                $new_text .= "$section_text</$shortname><$shortname>\n"; 
    298300            } 
    299301            else { 
     
    313315        } 
    314316        foreach my $item (@metadata_list) { 
    315             $new_text .= "$paratag<$shortname>$item</$shortname>\n"; 
    316         } 
     317            #$new_text .= "$paratag<$shortname>$item</$shortname>\n"; 
     318            $new_text .= "$item "; 
     319        } 
     320        $new_text .= "</$shortname>"; 
    317321        } 
    318322