My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Installation  
Extension Installation
Featured, Phase-Deploy
Updated Feb 4, 2010 by jeremy.o...@gmail.com
  • Download or Checkout SearchGSA.php
  • Copy to $MEDIAWIKI/extensions/SearchGSA.php
  • Add the following to LocalSettings.php:
  • $wgGSA = 'http://10.2.10.10/search';
    require_once("$IP/extensions/SearchGSA.php");
    $wgSearchType       = "SearchGSA";
Comment by cymen...@gmail.com, Dec 4, 2009

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

Comment by cymen...@gmail.com, Dec 4, 2009

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

Comment by cymen...@gmail.com, Dec 4, 2009

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

Comment by cymen...@gmail.com, Dec 4, 2009

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.

Comment by cymen...@gmail.com, Jan 6, 2010

I have posted my enhancement of this project to include interwiki results at: http://code.google.com/p/mediawiki-gsa-interwiki

Thanks, Cymen

Comment by karl...@gmail.com, Feb 21, 2011

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

Comment by syr...@gmail.com, Apr 5, 2011

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: ...

'site' => 'default_collection', 'client' => 'default_frontend',

Comment by don.rom...@gmail.com, Dec 28, 2011

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?


Sign in to add a comment
Powered by Google Project Hosting