Index: /main/trunk/greenstone2/bin/script/activate.pl
===================================================================
--- /main/trunk/greenstone2/bin/script/activate.pl	(revision 29219)
+++ /main/trunk/greenstone2/bin/script/activate.pl	(revision 29220)
@@ -583,5 +583,55 @@
     }
     
-
+	# Now the logic in GLI's CollectionManager.java	(processComplete() 
+	# and installCollection()) and Gatherer.configGS3Server().
+
+	# 1. Get library URL
+	
+	# For web servers that are external to a Greenstone installation, 
+	# the user can pass in their web server's library URL.
+	# For web servers included with GS (like tomcat for GS3 and server.exe 
+	# and apache for GS2), we work out the library URL:
+	if(!$library_url) { 
+		$library_url = &get_library_URL($gs_mode); # returns undef if no server is running
+	}
+	
+	# CollectionManager's installCollection phase in GLI
+	# 2. Ping the library URL, and if it's a persistent server and running, release the collection
+	
+	my $is_persistent_server = undef;
+	if($library_url) { # undef if no valid server URL
+   
+		&print_msg("Pinging $library_url\n");		
+		if (&ping_library($library_url, $gs_mode, $site)) { # server running
+		
+			# server is running, so release the collection if 
+			# the server is persistent and the collection is active
+			&print_msg("Checking if Greenstone server is persistent\n");
+			$is_persistent_server = &is_persistent($library_url, $gs_mode);			
+			
+			if ($is_persistent_server) { # only makes sense to issue activate and deactivate cmds to a persistent server
+			    
+			    &print_msg("Checking if the collection $qualified_collection is already active\n");
+			    my $collection_active = &ping_library_collection($library_url, $gs_mode, $qualified_collection, $site);
+
+			    if ($collection_active) {
+				&print_msg("De-activating collection $qualified_collection\n");
+				&deactivate_collection($library_url, $gs_mode, $qualified_collection, $site);
+			    }
+			    else {
+				&print_msg("Collection is not active => No need to deactivate\n");
+			    }
+			}
+			else {
+			    &print_msg("Server is not persistent => No need to deactivate collection\n");
+			}
+		}
+		else {
+		    &print_msg("No response to Ping => Taken to mean server is not running\n");
+		}
+
+	}
+
+    # 2b. If we're working with a solr collection, then start up the solrserver now.
     my $solr_server;
     my @corenames = ();
@@ -612,55 +662,6 @@
 	# by removing the temporary building cores and (re)creating the index cores
     }
-    
-	# Now the logic in GLI's CollectionManager.java	(processComplete() 
-	# and installCollection()) and Gatherer.configGS3Server().
-
-	# 1. Get library URL
-	
-	# For web servers that are external to a Greenstone installation, 
-	# the user can pass in their web server's library URL.
-	# For web servers included with GS (like tomcat for GS3 and server.exe 
-	# and apache for GS2), we work out the library URL:
-	if(!$library_url) { 
-		$library_url = &get_library_URL($gs_mode); # returns undef if no server is running
-	}
-	
-	# CollectionManager's installCollection phase in GLI
-	# 2. Ping the library URL, and if it's a persistent server and running, release the collection
-	
-	my $is_persistent_server = undef;
-	if($library_url) { # undef if no valid server URL
-   
-		&print_msg("Pinging $library_url\n");		
-		if (&ping_library($library_url, $gs_mode, $site)) { # server running
-		
-			# server is running, so release the collection if 
-			# the server is persistent and the collection is active
-			&print_msg("Checking if Greenstone server is persistent\n");
-			$is_persistent_server = &is_persistent($library_url, $gs_mode);			
-			
-			if ($is_persistent_server) { # only makes sense to issue activate and deactivate cmds to a persistent server
-			    
-			    &print_msg("Checking if the collection $qualified_collection is already active\n");
-			    my $collection_active = &ping_library_collection($library_url, $gs_mode, $qualified_collection, $site);
-
-			    if ($collection_active) {
-				&print_msg("De-activating collection $qualified_collection\n");
-				&deactivate_collection($library_url, $gs_mode, $qualified_collection, $site);
-			    }
-			    else {
-				&print_msg("Collection is not active => No need to deactivate\n");
-			    }
-			}
-			else {
-			    &print_msg("Server is not persistent => No need to deactivate collection\n");
-			}
-		}
-		else {
-		    &print_msg("No response to Ping => Taken to mean server is not running\n");
-		}
-
-	}
-	
+
+
 	# 3. Do all the moving building to index stuff now	
 
