== Enhanced Retrieval Extension 2.3 ==

=== Requirements ===
* PHP 7.x
* Composer
* MediaWiki 1.35.x
* SMW 3.x
* Apache SOLR server v8.30+

	You can setup your own Solr server. Please use the SOLR-schema given in:
		solr-config.zip (tested with Solr 8.30)
		
=== Installation Instructions ===

* Run in MW root folder:

	composer require diqa/enhanced-retrieval
 
* Add to your LocalSettings.php:
  $smwgEnabledDeferredUpdate = false;

* Start the SOLR server 

* Add these settings to LocalSettings.php: (adjust the values of course)

	-----------------------------------------------------------------------------------

		global $SOLRhost, $SOLRport, $SOLRuser, $SOLRpass, $SOLRcore;
		$SOLRhost = 'localhost';
		$SOLRport = 8983;
		$SOLRuser = '';
		$SOLRpass = '';
		$SOLRcore = 'mw';

	-----------------------------------------------------------------------------------

	Note: SOLRuser / SOLRpass / SOLRcore are optional, default is empty. 
		Default SOLR port is 8983. Default host is "localhost"

* Create the initial index:
	php {wiki-path}/extensions/EnhancedRetrieval/maintenance/updateSOLR.php -v
	
	OR via composer:
	
	cd {wiki-path}/extensions/EnhancedRetrieval
	composer run-script update

That's it.

=== Troubleshooting ===

==== Permission denied when accessing SOLR via the Wiki-Proxy ==== 
Replace {$WIKIHOST_AND_PATH} and try to access this URL:
	http://{$WIKIHOST_AND_PATH}/rest.php/EnhancedRetrieval/v1/proxy?defType=edismax&boost=max(smwh_boost_dummy)&facet=true&facet.field=smwh_categories&facet.field=smwh_attributes&facet.field=smwh_properties&facet.field=smwh_namespace_id&facet.field=smwh_Datentyp_xsdvalue_s&facet.field=smwh_Schematyp_xsdvalue_s&facet.field=smwh_Schemadefinition_xsdvalue_s&facet.field=smwh_Schemakennzeichen_xsdvalue_s&facet.mincount=1&json.nl=map&fl=smwh__MDAT_datevalue_l%2Csmwh_categories%2Csmwh_directcategories%2Csmwh_attributes%2Csmwh_properties%2Cid%2Csmwh_title%2Csmwh_namespace_id%2Cscore%2Csmwh_displaytitle&hl=true&hl.fl=smwh_search_field&hl.simple.pre=%3Cb%3E&hl.simple.post=%3C%2Fb%3E&hl.fragsize=250&sort=score%20desc%2C%20smwh_displaytitle%20asc&q.alt=smwh_search_field%3A(*)&searchText=(*)&rows=10&wt=json?
If it yields something like this as error message, then you probably cannot make HTTP connections via Apache.
	"Failed to connect to ::1: Permission denied"
To fix it, run the following command on the shell:
	sudo setsebool httpd_can_network_connect 1

