Changeset 25889 for main/trunk/greenstone2/bin/script/activate.pl
- Timestamp:
- 2012-06-28T21:25:18+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/activate.pl
r25888 r25889 601 601 602 602 if($removeold) { 603 604 if ($buildtype eq "solr") {605 # if solr, remove any cores using the index_dir before deleting this dir606 foreach my $corename (@corenames) {607 $solr_server->admin_unload_core($corename);608 }609 }610 603 611 604 if(&util::dir_exists($index_dir)) { 612 605 &print_task_msg("Removing \"index\""); 606 607 if ($buildtype eq "solr") { 608 # if solr, remove any cores that are using the index_dir before deleting this dir 609 foreach my $corename (@corenames) { 610 $solr_server->admin_unload_core($corename); 611 } 612 } 613 613 614 &util::rm_r($index_dir); 614 615 … … 624 625 # the collection at this point since activate.pl lives on the server side 625 626 627 if ($buildtype eq "solr") { 628 # if solr, remove any cores that are using the building_dir before moving this dir onto index 629 foreach my $corename (@corenames) { 630 $solr_server->admin_unload_core("building-$corename"); 631 } 632 } 633 626 634 # Move the building directory to become the new index directory 627 635 &print_task_msg("Moving \"building\" -> \"index\""); … … 632 640 } 633 641 elsif ($keepold) { 634 if ($buildtype eq "solr") { 635 # if solr, remove any cores using the index_dir before deleting this dir642 if ($buildtype eq "solr") { ### no building- prefix for keepold incremental case? 643 # if solr, remove any cores that may be using the building_dir before moving this dir onto index 636 644 foreach my $corename (@corenames) { 637 $solr_server->admin_unload_core( $corename);645 $solr_server->admin_unload_core("building-$corename") if $solr_server->admin_ping_core("building-$corename"); 638 646 } 639 647 } … … 646 654 647 655 if ($buildtype eq "solr") { 648 # Call CREATE action to get the old cores pointing to the index folder 656 # Call CREATE action to get all cores pointing to the index folder, since building is now index 657 ### Should already be using the index_dir directory for $keepold (incremental) case? Then call RELOAD CORE 649 658 foreach my $corename (@corenames) { 650 $solr_server->admin_create_core($corename, $index_dir); 659 if($removeold) { 660 $solr_server->admin_create_core($corename, $index_dir); 661 } elsif ($keepold) { 662 $solr_server->admin_reload_core($corename); 663 } 651 664 } 652 665
Note:
See TracChangeset
for help on using the changeset viewer.