Table of Contents
The Fedora Generic Search Service, abbreviated GSearch, is part of the Fedora Service Framework. It was developed by Gert Schmeltz Pedersen at the Technical University of Denmark, with feedback and contributions from members of the Fedora community, including Beth Kirschner, Binaya Poudyal, Blake Anderson, Boon Low, Christian Tønsberg, Eric Brown, Jun Yamog, Junran Lei, Leire Urcelay, Luis Zorita, Matt Zumwalt, Matthias Razum, Michael Appleby, Michael Hoppe, Nikolai Schwertner, Patrick Monbaron, Pierre-Yves Landron, Ranju Upadhyaya, Robert Sherratt, Ryan E. Scherle, Sam Liberman, Shunde Zhang, Steve DiDomenico Thierry Michel, and Xinjian Guo.
The work is funded by DEFF, Denmark's Electronic Research Library.
The service has the following major features:
The service has been developed and tested on Linux. This release targets only Linux installations. If you want to use the service on other platforms, you may be expert enough to do so, at least several people have succeeded on Windows and Mac platforms. You are encouraged to share problems and experience with the Fedora community, send mail to fedora-commons-users, or to Chris Wilper, or to Gert Schmeltz Pedersen.
The following figure serves to give a first understanding for a developer, who will use GSearch in a Fedora application:

The figure shows:
GSearch may run in a separate web server and may index more than one Fedora repository, and it may update more than one index in parallel. For further architectural details, see Additional Information
...&indexDocXslt=[xslt-name][(paramname1=value1[,paramname2=value2[,...]])]Use the parameters at indexing time by putting xsl:param statement in the indexing xslt stylesheet, like this:
<xsl:param name="someparamname" select="defaultvalue"/>
fgsindex.mergeFactor and fgsindex.maxBufferedDocswill affect performance, see the index.properties file in configTestOnLucene. Also added
...?operation=updateIndex&action=optimizewhich will perform IndexWriter.optimize() which merges all segments together into a single segment, optimizing an index for search. Removed the optimize() call after each updateIndex.
To install the service:
The SOAP service operations are deployed with the .war file, and the .wsdl file is available here.
o Set the property values for your environment. o Select the default config in configDefault. o Save this edited file outside of the web server. o Run target configOnWebServer after deployment from command line: >ant -f configvalues.xml configOnWebServerThis will set your values into fedoragsearch.properties, repository.properties, and index.properties. Read these files to make sure they are correct.
.../webapps/<WEBAPPNAME>/client/make the file executable, and run
sh runRESTClient.shthen you will get the usage instruction.
.../webapps/<WEBAPPNAME>/WEB-INF/classes/config/rest/Then edit fedoragsearch.properties.
.../webapps/<WEBAPPNAME>/WEB-INF/classes/config/index/<INDEXNAME>/demoFoxmlToLucene.xsltFor the sake of the example, the stylesheet indexes only active Fedora objects with PID starting with "demo" The options for tailoring include fields from other metadata datastreams than DC, field types and field boosts, see the stylesheet for options. Then edit index.properties.
As of Fedora 2.2, it is possible to configure Fedora to send a signal to the Generic Search Service when objects are added, modified, and purged. We expect future versions of Fedora to use more sophisticated messaging techniques (like JMS) to accomplish this, but for now Fedora can be made to send simple REST calls to the service at appropriate times.
To enable this, edit your fedora.fcfg file
and change the class of the fedora.server.storage.DOManager
module to fedora.server.storage.GSearchDOManager.
Then populate the following module parameters as needed:
gSearchRESTURL - The REST endpoint for
GSearch, for example, http://localhost:8080/fedoragsearch/restgSearchUsername - If GSearch is protected by
authentication, this is the username that Fedora should use to
authenticate.gSearchPassword - The password for the above
user, if applicableThe Lucene plugin comes as the java package dk.defxws.fgslucene together with the Apache Lucene java libraries. The set of classes was inspired by the JDBC API specification.
The Lucene plugin is used by configuration as explained above, see also the DemoOnLucene example.
Lucene has a very rich functionality, and this plugin exploits a small fraction of it. As a java programmer, you may have ideas for further exploitation, which you may realize by implementing an enhanced version of the plugin. Please, share such ideas and implementations with the Fedora community.
The Solr plugin comes as the java package dk.defxws.fgssolr.
The Solr plugin is used by configuration as explained above, see also the DemoOnSolr example.
This plugin indexes documents via the HTTP POST interface of Solr. Searches may be performed via the Solr native HTTP GET to the Solr server and via gfindObjects, which accesses the Lucene index directly. Solr functionality does not include browsing, however, this is offered by the plugin via the browseIndex operation.
The Zebra plugin comes as the java package dk.defxws.fgszebra .
The Zebra plugin is used by configuration as seen from the DemoOnZebra example, which includes a README file, which explains how to get and install Zebra, and how to configure it.


A typical application will index one repository in one index. However, you have the possibility to index many repositories in one or more indexes in parallel, as illustrated here:

Luis Zorita had this problem and solved it (his mail to fedora-users on 24 August 2006):
Hello Gert: I have solved this multilingual problem adding the attribute URIEncoding="UTF-8" to .../tomcat/conf/server.xml and to .../tomcat/conf/server_fedoraTemplate.xml Now I can search special Spanish characters like "ñ", "í" etc. with fedoragsearch. Luis