Table of Contents
The Fedora Generic Search Service 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, 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 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 in using the prototype on Windows and Mac platforms. You are encouraged to share problems and experience with the Fedora community, send mail to fedora-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 the Search Service in a Fedora application:

The figure shows:
The Search Service 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
Fedora version 2.2 does not automatically update the Search Service indexes, this will come with version 2.3.
To install the service:
The SOAP service operations are deployed with the .war file, and the .wsdl file is available here.
fedoragsearch.properties:
fedoragsearch.soapBase = http://<HOST:PORT>/<WEBAPPNAME>/services
fedoragsearch.soapUser = <SOAPUSER>
fedoragsearch.soapPass = <SOAPPASSWORD>
fedoragsearch.deployFile = <WEBSERVERPATH>/webapps/<WEBAPPNAME>/WEB-INF/classes/config/deploy.wsdd
(<WEBSERVERPATH> may be "${catalina.home}" in the Tomcat case)
(in general, you may insert system variable values in property values in this way)
fedoragsearch.default<OPERATION>RestXslt = <your default Rest stylesheet for the operation>
fedoragsearch.mimeTypes = <a sequence of mimeTypes used by the application>
The first accessible mimeType will decide,
which of the datastreams is fetched and indexed.
Currently "text/plain text/html application/pdf" are implemented.
fedoragsearch.repositoryNames = <REPOSNAMES>
fedoragsearch.indexNames = <INDEXNAMES>
For each repository:
repository/<REPOSNAME>/repository.properties:
fgsrepository.fedoraSoap = http://<HOST:PORT>/fedora/services (e.g. http://localhost:8080)
fgsrepository.fedoraUser = <FEDORAUSER>
fgsrepository.fedoraPass = <FEDORAPASSWORD>
fgsrepository.fedoraObjectDir = <absolute path to FedoraObjects directory with FOXML files>
For each index:
index/<INDEXNAME>/index.properties:
fgsindex.indexDir = <path to Lucene index directory, which must exist>
.../webapps/<WEBAPPNAME>/WEB-INF/classes/log4j.xml:
<param name="File" value="/<LOGPATH>/<LOGFILENAME>"/> /LOGPATH must exist
Edit the three files rest/demo*.xslt,
and the file index/DemoOnLucene/demoFoxmlToLucene.xslt,
where the xsl:include elements
shall have absolute paths instead of relative paths.
.../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 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 /jakarta-tomcat-5.0.28/conf/server.xml and to /jakarta-tomcat-5.0.28/conf/server_fedoraTemplate.xml Now I can search special Spanish characters like "ñ", "í" etc. with fedoragsearch. Luis