Changeset 13115


Ignore:
Timestamp:
2006-10-13T15:55:36+13:00 (18 years ago)
Author:
kjdon
Message:

fixed up defaultindex for mgpp collections, added maxnumeric and stemindexes to search service output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/bin/script/convert_coll_from_gs2.pl

    r12979 r13115  
    189189    }
    190190    my $defaultindex;
    191     if (defined $collectcfg->{'defaultindex'}) {
    192     $defaultindex = $collectcfg->{'defaultindex'};
    193     $defaultindex = $indexmap->{$defaultindex};
    194     } else {
    195     # use the first one
    196     $defaultindex = $firstindex;
     191    if ($buildtype eq "mg") {
     192    if (defined $collectcfg->{'defaultindex'}) {
     193        $defaultindex = $collectcfg->{'defaultindex'};
     194        $defaultindex = $indexmap->{$defaultindex};
     195    } else {
     196        # use the first one
     197        $defaultindex = $firstindex;
     198    }
     199    }
     200    elsif ($buildtype eq "mgpp") {
     201    $defaultindex = "idx";
     202    }
     203    elsif ($buildtype eq "lucene") {
     204    # lucene not implemented yet
    197205    }
    198206   
     
    264272
    265273   
    266     } else {
     274    } elsif ($buildtype eq "mg") {
    267275    $buildwriter->startTag('serviceRack', 'name'=>'GS2MGRetrieve');
    268276    $buildwriter->emptyTag('defaultIndex', 'name'=>$defaultindex);
     
    430438    $buildwriter->emptyTag('indexStem', 'name'=>$indexstem);
    431439    }
     440
     441    # index options
     442    my $stemindexes = 3; # default is stem and casefold
     443    if (defined $buildcfg->{'stemindexes'} && $buildcfg->{'stemindexes'} =~ /^\d+$/ ) {
     444    $stemindexes = $buildcfg->{'stemindexes'};
     445    }
     446    $buildwriter->emptyTag('option', 'name'=>'stemIndexes', 'value'=>$stemindexes);
     447    my $maxnumeric = 4; # default
     448    if (defined $buildcfg->{'maxnumeric'} && $buildcfg->{'maxnumeric'} =~ /^\d+$/) {
     449    $maxnumeric = $buildcfg->{'maxnumeric'};
     450    }
     451    $buildwriter->emptyTag('option', 'name'=>'maxnumeric', 'value'=>$maxnumeric);
    432452   
    433453    $buildwriter->emptyTag('defaultIndex', 'name'=>$defaultindex);
Note: See TracChangeset for help on using the changeset viewer.