Changeset 24643
- Timestamp:
- 2011-09-25T23:26:49+13:00 (13 years ago)
- Location:
- gs3-extensions/solr/trunk/src/perllib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/solr/trunk/src/perllib/solrbuilder.pm
r24501 r24643 236 236 $schema_insert_xml .= " "; # indent 237 237 $schema_insert_xml .= "<field name=\"$field\" "; 238 $schema_insert_xml .= "type=\" string\" indexed=\"true\" ";238 $schema_insert_xml .= "type=\"text_en_splitting\" indexed=\"true\" "; 239 239 $schema_insert_xml .= "stored=\"false\" multiValued=\"true\" />\n"; 240 240 } … … 249 249 my $in_dirname = &util::filename_cat($solr_home,"conf"); 250 250 my $schema_in_filename = &util::filename_cat($in_dirname,"schema.xml.in"); 251 252 251 253 252 my $collect_home = $ENV{'GSDLCOLLECTDIR'}; … … 384 383 my $core = "$core_prefix-$index_dir"; 385 384 385 # force_removeold == opposite of being run in 'incremental' mode 386 386 my $force_removeold = ($self->{'incremental'}) ? 0 : 1; 387 387 388 if ($force_removeold) { 388 389 print $outhandle "\n-removeold set (new index will be created)\n"; … … 391 392 &util::rm_r($full_index_dir); 392 393 &util::mk_dir($full_index_dir); 393 } 394 395 # if collect==core already in solr.xml (check with STATUS) 396 # => use RELOAD call to refresh fields now expressed in schema.xml 397 # 398 # else 399 # => use CREATE API to add to solr.xml 400 401 my $check_core_exists = $solr_server->admin_ping_core($core); 402 403 if ($check_core_exists) { 404 print $outhandle "Reloading Solr core: $core\n"; 405 $solr_server->admin_reload_core($core); 406 } 407 else { 394 395 # Solr then wants an "index" folder within this general index area! 396 # my $full_index_index_dir = &util::filename_cat($full_index_dir,"index"); 397 # &util::mk_dir($full_index_index_dir); 398 399 400 # now go on and create new index 408 401 print $outhandle "Creating Solr core: $core\n"; 409 402 $solr_server->admin_create_core($core); 403 404 } 405 else { 406 # if collect==core already in solr.xml (check with STATUS) 407 # => use RELOAD call to refresh fields now expressed in schema.xml 408 # 409 # else 410 # => use CREATE API to add to solr.xml 411 412 my $check_core_exists = $solr_server->admin_ping_core($core); 413 414 if ($check_core_exists) { 415 print $outhandle "Reloading Solr core: $core\n"; 416 $solr_server->admin_reload_core($core); 417 } 418 else { 419 print $outhandle "Creating Solr core: $core\n"; 420 $solr_server->admin_create_core($core); 421 } 410 422 } 411 423 } -
gs3-extensions/solr/trunk/src/perllib/solrserver.pm
r24501 r24643 115 115 } 116 116 117 my $output = { 'preamble' => $preamble_output, 117 my $output = { 'url' => $full_url, 118 'preamble' => $preamble_output, 118 119 'output' => $xml_output, 119 120 'error' => $error_output };
Note:
See TracChangeset
for help on using the changeset viewer.