Changeset 12356


Ignore:
Timestamp:
2006-07-31T16:29:33+12:00 (18 years ago)
Author:
kjdon
Message:

modified Michael's indexed_section change so that gsdldoctype of indexed_doc will be indexed too

Location:
trunk/gsdl/perllib
Files:
3 edited

Legend:

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

    r12274 r12356  
    147147    # sections match up with gdbm db
    148148    my $indexed_section = $doc_obj->get_metadata_element($section, "gsdldoctype") || "indexed_section";
    149     if (!$indexed_doc || $indexed_section ne "indexed_section") {
     149    if (!$indexed_doc || ($indexed_section ne "indexed_section" && $indexed_section ne "indexed_doc")) {
    150150        $text .= "\n</$sectiontag>\n" if ($sectiontag ne "");
    151151        $section = $doc_obj->get_next_section($section);
  • trunk/gsdl/perllib/mgbuildproc.pm

    r12274 r12356  
    8686
    8787    my $indexed_section = $doc_obj->get_metadata_element($section, "gsdldoctype") || "indexed_section";
    88     if ($indexed_doc && $indexed_section eq "indexed_section") {
     88    if (($indexed_doc) && ($indexed_section eq "indexed_section" || $indexed_section eq "indexed_doc")) {
    8989        $self->{'num_bytes'} += $doc_obj->get_text_length ($section);
    9090        foreach my $field (split (/,/, $fields)) {
  • trunk/gsdl/perllib/mgppbuildproc.pm

    r12274 r12356  
    195195    # only output this document if it is one to be indexed
    196196    return if ($doc_obj->get_doc_type() ne "indexed_doc");
    197 
     197   
    198198    my $indexed_doc = $self->is_subcollection_doc($doc_obj);
    199199   
     
    239239    $self->{'num_sections'} += 1;
    240240    $text .= "$sectiontag";
    241 
     241   
    242242    my $indexed_section = $doc_obj->get_metadata_element($section, "gsdldoctype") || "indexed_section";
    243     if (!$indexed_doc || $indexed_section ne "indexed_section") {
     243    if ((!$indexed_doc) || ($indexed_section ne "indexed_section" && $indexed_section ne "indexed_doc")) {
    244244        # we are not actually indexing anything for this document,
    245245        # but we want to keep the section numbers the same, so we just
     
    250250   
    251251    $self->{'num_bytes'} += $doc_obj->get_text_length ($section);
    252 
    253252    foreach my $field (split (/;/, $fields)) {
    254253        # only deal with this field if it doesn't start with top or
Note: See TracChangeset for help on using the changeset viewer.