
== Installation on Windows (deployed with an embedded jetty-webserver)==

	1. Unzip the folder to an arbitrary directory
	
	2. Change to folder "wiki-solr" and run:
	
			start_solr4wiki.bat
	
	3. Check if SOLR runs:
	
			 http://localhost:8983/solr
	
	4. Install it as Windows service (This is OPTIONAL, but strongly recommended in production environments)   
			
			installAsService.bat 
			
		NOTE: Please stop any running instance of SOLR before installing it as service.

== Installation on Linux (deployed in a Tomcat application server)==

	1. Install Tomcat6 (Tomcat7 should work too)
	
	2. Copy wiki-solr/webapps/solr.war to /usr/share/tomcat6/webapps
	
	3. Create file solr.xml at /etc/tomcat6/Catalina/localhost with the following content:
	
		<Context docBase="/usr/share/tomcat6/webapps/solr.war" debug="0" crossContext="true">
		<Environment name="solr/home" type="java.lang.String" value="/usr/share/tomcat6/DataWiki" override="true"/>
		</Context>
	
	4. Copy wiki-solr/DataWiki directory to /usr/share/tomcat6, ie. the following path should exist:
	
		  - /usr/share/tomcat6/DataWiki/collection1/conf
		  
		NOTE:  Make sure the DataWiki folder is writeable by Tomcat.
		
	5. Copy jar-files wiki-solr/lib/ext into Tomcats lib directory (usually at /usr/share/tomcat6/lib)
	
	6. Copy folders dist and contrib into /usr/share/tomcat6/DataWiki, ie. the following paths should exist:
	
		/usr/share/tomcat6/DataWiki/dist
		/usr/share/tomcat6/DataWiki/contrib
		
	7. Change the file paths to the libs in step (5) in the file /usr/share/tomcat6/DataWiki/collection1/conf/solrconfig.xml
	
		from ../../../contrib/extraction/lib  to ../contrib/extraction/lib and the others accordingly.
		
		NOTE: There are 8 paths in the file that need to be changed.
	
	8. Default port of Tomcat is 8080. Either change it to port 8983 OR change the default of EnhancedRetrieval to 8080.
	
	      - EnhancedRetrieval/includes/FacetedSearch/solrproxy.php
	      - EnhancedRetrieval/includes/FacetedSearch/FS_Settings.php
	    
	9. Restart Tomcat: 
			
				/etc/init.d/tomcat6 restart
	
	10. Check if SOLR runs (might require to install curl): 
			
				curl -I http://localhost:8080/solr/select
				
		  you should get a HTTP 200 return code
				
	If something fails, check the logs in /usr/share/tomcat6/logs				