Ignore:
Timestamp:
2003-03-13T12:16:00+13:00 (21 years ago)
Author:
kjdon
Message:

modified to reflect the use of collectionConfig.xml as well as buildConfig.xml

File:
1 edited

Legend:

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

    r3771 r3872  
    125125        $line =~ s/\*\*defaultindex\*\*/$defaultindex/g;
    126126        $line =~ s/\*\*indexmeta\*\*/$indexmeta/g;
    127 
     127        $line =~ s/\*\*xmlindexes\*\*/$xmlindexes/g;
     128        $line =~ s/\*\*xmlplugins\*\*/$xmlpluginstring/g;
     129       
    128130        print OUTFILE $line;
    129131        }
     
    239241    # get the strings to include.
    240242    $pluginstring = "";
     243    $xmlpluginstring = "";
    241244    foreach $plugin (@plugin) {
    242245    if ($plugin eq RecPlug) {
    243246        $pluginstring .= "plugin         $plugin -use_metadata_files\n";
     247        $xmlpluginstring .= "<plugin name='$plugin'><option name='use_metadata_files'/></plugin>\n";
    244248    } else {
    245249        $pluginstring .= "plugin         $plugin\n";
     250        $xmlpluginstring .= "<plugin name='$plugin'/>\n";
    246251    }
    247252    }
     
    269274
    270275    # set up the default indexes - this could be a command line option at some stage
     276    # the names are added in here for the xml ones, but they should be added after building once the names are known.
    271277    if ($buildtype eq "mg") {
    272278    $indexes = "document:text document:Title document:Source";
     
    274280    $indexmeta = "collectionmeta .document:text    \"text\"\ncollectionmeta .document:Title  \"titles\"\ncollectionmeta .document:Source  \"filenames\"\n";
    275281
     282    $xmlindexes = "<index name='dtx' content='text' level='Document'><displayName lang='en'>text</displayName></index>\n<index name='dtt' content='Title' level='Document'><displayName lang='en'>titles</displayName></index>\n<index name='dsr' content='Source' level='Document'><displayName lang='en'>filenames</displayName></index>";
    276283    } elsif ($buildtype eq "mgpp") {
    277284    $indexes = "text,metadata";
    278285    $defaultindex = "text,metadata";
    279286    $indexmeta = "collectionmeta .text,metadata    \"text\"\n";
     287    $xmlindexes = "<index name='tm' content='text,metadata' level='Document'><displayName lang='en'>text</displayName></index>";
    280288    } else {
    281289    print STDOUT "Error: buildtype should be mg or mgpp, but its $buildtype\n";
Note: See TracChangeset for help on using the changeset viewer.