Search DrupalHybrid.com

Step by Step installation Guide: FedoraGSearch


Download and install
Fedora 3.1
Gsearch 2.2

New Features in Version 2.2

  • Fedora 3.1 compatibility
  • Lucene 2.4.0 compatibility
  • Solr 1.3.0 compatibility
  • For the lucene plugin: Search result filtering by access constraints, as defined by XACML policies, in order to show only those search hits that the user is actually permitted to read. Read more...

 
·         Download GSearch 2.2, unzip it and copy the fedoragsearch.war file to 
     TOMCAT_HOME/webapps
·         Restart tomcat to unpack WAR
 
1. Edit the C:/fedora/tomcat/webapps/fedoragsearch/WEB-INF/classes/log4j.xml. Find the piece of code that looks like: 
  <param name="File" value="LOGPATH/fedoragsearch.log"/>
change it to: 
  <param name="File" value="C:/fedora/server/logs/fedoragsearch.log"/>

2. Edit the C:/fedora/tomcat/webapps/fedoragsearch/WEB-INF/classes/config/fedoragsearch.properties and change the properties listed below: 
Note: change configDemoOnLucene folder to config
# this is the URL to your fedoragsearch service
fedoragsearch.soapBase = http://localhost:8080/fedoragsearch/services

# these should be the same as what is contained in your fedora.fcfg file for gsearch credentials.
fedoragsearch.soapUser = fedoraAdmin
fedoragsearch.soapPass = admin

#
fedoragsearch.deployFile = C:/fedora/tomcat/webapps/fedoragsearch/WEB-INF/classes/config/deploy.wsdd

# list of supported mime types. Make sure the below list is there at a minimum.
fedoragsearch.mimeTypes = text/plain text/html application/pdf

# the name of the repository that you chose above
fedoragsearch.repositoryNames = Fedora

# the name of the index that you chose above
fedoragsearch.indexNames = FedoraIndex


3. Enter C:/fedora/tomcat/webapps/fedoragsearch/WEB-INF/classes/config/repository and rename the REPOSNAME (DemoAtDtu) folder to the repository name you have chosen. In this case we rename it to Fedora

4. Enter the new Fedora folder and edit the repository.properties file modifying the properties listed below: 

# the name of this repository
fgsrepository.repositoryName    = Fedora

# the location of the fedora service and credentials (need admin level user for this)
fgsrepository.fedoraSoap        = http://localhost:8080/fedora/services
fgsrepository.fedoraUser        = fedoraAdmin
fgsrepository.fedoraPass        = admin

# the location of where all the foxml files are stored
fgsrepository.fedoraObjectDir   = C:/fedora/data/objects


5. Enter C:/fedora/tomcat/webapps/fedoragsearch/WEB-INF/classes/config/index and rename the DemoOnLucene folder to the index name you have chosen. In this case we rename it to FedoraIndex

6. Enter the new FedoraIndex folder and edit the index.properties file modifying the properties listed below: 

# The name of the index to be created
fgsindex.indexName = FedoraIndex

# The location of where you want to store the index. Make sure this directory exists! Give same path as the FedoraIndex Directory

 
fgsindex.indexDir = C:\fedora\tomcat\webapps\fedoragsearch\WEB-INF\classes\config\index\FedoraIndex

# list of fields to query for


fgsindex.defaultQueryFields = dc.description dc.title dc.creator dc.identifier dc.subject dc.date dc.type dc.coverage dc.publisher dc.contributor dc.source
7. Enter C:/fedora/tomcat/webapps/fedoragsearch/WEB-INF/classes/config/rest. You need to edit the stylesheets in here to set the path to your installation point. You need to edit the following files:
  1. demoBrowseIndexToHtml.xslt 2. demoGetIndexInfoToHtml.xslt 3. demoGetRepositoryInfoToHtml.xslt 4. demoGfindObjectsToHtml.xslt 5. demoUpdateIndexToHtml.xslt
8. Locate the piece of code that looks like the following: 
<xsl:include href="WEBSERVERPATH/webapps/fedoragsearch/WEB-INF/classes/config/rest/demoCommon.xslt"/>
Replace WEBSERVERPATH to the path of your Tomcat installation (C:/fedora/tomcat). 
9. Edit the file demoBrowseIndexToHtml.xslt and replace the 
<select name="indexName">
...
</select>
with the modified version (please take care to change the FedoraIndex value to the name of your index):

<select name="indexName">
    <xsl:choose>
        <xsl:when test="$INDEXNAME='FedoraIndex'">
            <option value="FedoraIndex" selected="true">FedoraIndex</option>
                </xsl:when>
                <xsl:otherwise>
            <option value="FedoraIndex" selected="true">FedoraIndex</option>
        </xsl:otherwise>
    </xsl:choose>
</select>


10. To configure Fedora for automatic updates (Fedora will notify Fedora GSearch or object changes and Fedora GSearch will reindex the object) you need to edit the fedora.fcfg file.
C:\fedora\server\config
Locate the following properties and set them accordingly.
  1. Locate the module that is called fedora.server.storage.DOManager and make sure the class is set to fedora.server.storage.GSearchDOManager
2.      Locate  gSearchRESTURL: the REST endpoint for GSearch, for example,   http://localhost:8080/fedoragsearch/rest

Optional
3.      Locate gSearchUsername: if GSearch is protected by authentication, this is the username that   Fedora should use to authenticate.
4.      Locate gSearchPassword: the password for the above user if applicable
11. Restart Tomcat and go to the rest interface e.g. http://localhost:8080/fedoragsearch/rest
  1. Click on the updateIndex link on the top left
       2. Click the updateIndex createEmpty button

Congratulations

·        If all went well, you will see REST Client Demo of Fedora Generic Search Service page

·        For more information, please consult the Installation & Configuration
Guide in the online documentation.

1 comment:

Anonymous said...

I have installed Fedora Commons 3.4 and used the g Search Facility. It seems as if the Generic Search Service 2.2 is only compatible with 3.1-3.3 of Fedora.