I'm not able to get this working with MediaWiki? 1.15.1. I've had to modify the collection and frontend options. I've verified the results are coming back as an XML set. However, no results are displayed. Still looking around but posting in case someone else has already figured out the solution.
I figured out that the script assumes that your wiki is going to be on server_name/ while our wikis are spread out like server_name/a/b/d/wiki/wiki_name/. I got it working if I patched the SearchGSA.php with the work arounds. I'll see if I can do it cleanly with the MediaWiki? variables.
I've got a cleaned up version I'll send to you (not sure how else to submit). It does the following:
Add two more configuration variables: wgGSAsite and wgGSAclient so the site and client HTTP GET parameters to the GSA search can be set in the wiki configuration.
For the HTTP GET parameter 'as_sitesearch' use $wgServer . $wgScriptPath instead of just $wgServer. This supports wikis that aren't installed on the HTTP root of the server.
Modify the getTitleSnippet method of GSASearchResult to remove the site name from the title (" - $wgSitename").
I have encountered an issue with the 2/2011 posted version where I am getting a XML parsing error "String could not be parsed as XML' in /var/www/html/w/extensions/SearchGSA/SearchGSA_body.php:79"
Make sure to have (in code lines around 33 and 68) your collection (site) and frontend names matching to the ones you actually have set-up in your GSA, example: ...
Here is my dump when typing in 'test' into the Mediawiki search box:
Unexpected non-MediaWiki? exception encountered, of type "Exception" exception 'Exception' with message 'String could not be parsed as XML' in D:\apache\htdocs\icipedia\extensions\SearchGSA\SearchGSA.php:75 Stack trace: #0 D:\apache\htdocs\icipedia\extensions\SearchGSA\SearchGSA.php(75): SimpleXMLElement->construct('<html> <head> ...') #1 D:\apache\htdocs\icipedia\includes\specials\SpecialSearch?.php(170): SearchGSA->searchTitle('test') #2 D:\apache\htdocs\icipedia\includes\specials\SpecialSearch?.php(119): SpecialSearch?->showResults('test') #3 D:\apache\htdocs\icipedia\includes\specials\SpecialSearch?.php(47): SpecialSearch?->goResult('test') #4 function?: wfSpecialSearch(NULL, Object(SpecialPage?)) #5 D:\apache\htdocs\icipedia\includes\SpecialPage?.php(851): call_user_func('wfSpecialSearch', NULL, Object(SpecialPage?)) #6 D:\apache\htdocs\icipedia\includes\SpecialPage?.php(578): SpecialPage?->execute(NULL) #7 D:\apache\htdocs\icipedia\includes\Wiki.php(262): SpecialPage?::executePath(Object(Title)) #8 D:\apache\htdocs\icipedia\includes\Wiki.php(63): MediaWiki?->handleSpecialCases(Object(Title), Object(OutputPage?), Object(WebRequest?)) #9 D:\apache\htdocs\icipedia\index.php(114): MediaWiki?->performRequestForTitle(Object(Title), NULL, Object(OutputPage?), Object(User), Object(WebRequest?)) #10 {main}
I installed the extension under /extensions/SearchGSA and within SearchGSA.php I've made sure that the two areas are updated to reflect the default_collection:
I'm not able to get this working with MediaWiki? 1.15.1. I've had to modify the collection and frontend options. I've verified the results are coming back as an XML set. However, no results are displayed. Still looking around but posting in case someone else has already figured out the solution.
Cymen
I figured out that the script assumes that your wiki is going to be on server_name/ while our wikis are spread out like server_name/a/b/d/wiki/wiki_name/. I got it working if I patched the SearchGSA.php with the work arounds. I'll see if I can do it cleanly with the MediaWiki? variables.
Cymen
I've got a cleaned up version I'll send to you (not sure how else to submit). It does the following:
Add two more configuration variables: wgGSAsite and wgGSAclient so the site and client HTTP GET parameters to the GSA search can be set in the wiki configuration.
For the HTTP GET parameter 'as_sitesearch' use $wgServer . $wgScriptPath instead of just $wgServer. This supports wikis that aren't installed on the HTTP root of the server.
Modify the getTitleSnippet method of GSASearchResult to remove the site name from the title (" - $wgSitename").
Thanks, Cymen
Can't find a method to contact you. If you want the changes (under GPL license of course), please email cymenvig at the wonders of gmail.
I have posted my enhancement of this project to include interwiki results at: http://code.google.com/p/mediawiki-gsa-interwiki
Thanks, Cymen
I have encountered an issue with the 2/2011 posted version where I am getting a XML parsing error "String could not be parsed as XML' in /var/www/html/w/extensions/SearchGSA/SearchGSA_body.php:79"
Has anyone else encountered this also?
KG
Make sure to have (in code lines around 33 and 68) your collection (site) and frontend names matching to the ones you actually have set-up in your GSA, example: ...
I'm new at this but I am getting the same error.
Here is my dump when typing in 'test' into the Mediawiki search box:
Unexpected non-MediaWiki? exception encountered, of type "Exception" exception 'Exception' with message 'String could not be parsed as XML' in D:\apache\htdocs\icipedia\extensions\SearchGSA\SearchGSA.php:75 Stack trace: #0 D:\apache\htdocs\icipedia\extensions\SearchGSA\SearchGSA.php(75): SimpleXMLElement->construct('<html> <head> ...') #1 D:\apache\htdocs\icipedia\includes\specials\SpecialSearch?.php(170): SearchGSA->searchTitle('test') #2 D:\apache\htdocs\icipedia\includes\specials\SpecialSearch?.php(119): SpecialSearch?->showResults('test') #3 D:\apache\htdocs\icipedia\includes\specials\SpecialSearch?.php(47): SpecialSearch?->goResult('test') #4 function?: wfSpecialSearch(NULL, Object(SpecialPage?)) #5 D:\apache\htdocs\icipedia\includes\SpecialPage?.php(851): call_user_func('wfSpecialSearch', NULL, Object(SpecialPage?)) #6 D:\apache\htdocs\icipedia\includes\SpecialPage?.php(578): SpecialPage?->execute(NULL) #7 D:\apache\htdocs\icipedia\includes\Wiki.php(262): SpecialPage?::executePath(Object(Title)) #8 D:\apache\htdocs\icipedia\includes\Wiki.php(63): MediaWiki?->handleSpecialCases(Object(Title), Object(OutputPage?), Object(WebRequest?)) #9 D:\apache\htdocs\icipedia\index.php(114): MediaWiki?->performRequestForTitle(Object(Title), NULL, Object(OutputPage?), Object(User), Object(WebRequest?)) #10 {main}
I installed the extension under /extensions/SearchGSA and within SearchGSA.php I've made sure that the two areas are updated to reflect the default_collection:
'site' => 'default_collection', 'client' => 'default_collection',
Here is what I am running for installed software:
MediaWiki? 1.17.1 PHP 5.3.5 (apache2handler) MySQL 5.5.9
Does this extension support MediaWiki? 1.17.x?