Ignore:
Timestamp:
2012-06-28T11:11:31+12:00 (12 years ago)
Author:
sjm84
Message:

Some fixes and additions to the Solr perl code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/solr/trunk/src/perllib/solrbuildproc.pm

    r24447 r25846  
    266266    my $gs2_docOID = $doc_obj->get_OID();
    267267
    268 
    269268    my $start_doc;
    270269    my $end_doc;
     
    296295
    297296    # only output if working with doc level
    298     my $text = $start_doc if ($sec_tag_name eq "");
    299 
     297    # my $text = undef;
     298   
     299    my $text = ($sec_tag_name eq "") ? $start_doc : "";
     300
     301#     my $text = $start_doc if ($sec_tag_name eq "");
     302     
    300303    # get the text for this document
    301304    my $section = $doc_obj->get_top_section();
     
    318321        $start_sec .= "    <doc>\n";
    319322        $start_sec .= "      <field name=\"docOID\">$sec_gs2_docOID</field>\n";
    320 
     323   
    321324        $end_sec    = "    </doc>\n";
    322325        $end_sec   .= "  </add>\n";
     
    441444        }
    442445
     446        # Remove any leading or trailing white space
     447        $new_text =~ s/\s+$//;
     448        $new_text =~ s/^\s+//;
     449   
     450       
    443451        if ($self->{'indexing_text'}) {
    444452            # add the tag
Note: See TracChangeset for help on using the changeset viewer.