Fedora Generic Search (Fedora GSearch) provides full-text indexing and searching for Fedora. This functionality is not offered by Fedora out-of-the-box, which is why it's a good idea to install Fedora GSearch alongside it.
In this document,java -jar GSearchInstaller.jarThis will launch the installer's opening dialog.
java -jar GSearchInstaller.jar -help
$FEDORAHOME/tomcat/webapps/fedoragsearch/WEB-INF/classes/config/index/demoFoxmlToLucene.xsltAt present, Muradora's file allows all digital objects in your Fedora repository to be indexed and searchable. If you're alright with indexing just the Greenstone documents stored in Fedora's repository, then we'll add the following to the above file:
<xsl:if test="starts-with($PID,'greenstone')"> ... </xsl:if>So that now the file contains:
<xsl:if test="foxml:digitalObject/foxml:objectProperties/foxml:property[@NAME='http://www.w3.org/1999/02/22-rdf-syntax-ns#type' and @VALUE='FedoraObject']"> <xsl:if test="starts-with($PID,'greenstone')"> // ADDED THIS <!-- filter out annotations: --> <!-- <xsl:choose> <xsl:when test="foxml:digitalObject/foxml:datastream/foxml:datastreamVersion[last()]/foxml:xmlContent/rdf:RDF/rdf:Description/rel:isMemberOf[@rdf:resource='info:fedora/mura:annotations']"> </xsl:when> // CORRECTED typo in this comment <xsl:otherwise> --> <xsl:apply-templates mode="activeDemoFedoraObject"/> <!-- </xsl:otherwise> </xsl:choose> --> </xsl:if> // ADDED THIS </xsl:if>
$FEDORAHOME/tomcat/webapps/fedoragsearch/WEB-INF/classes/config/index/index.propertieswe're going to add fulltext (and label) to the list of fields that are indexed and are therefore searchable. We do this by appending
ds.fulltext ds.labelSo that it now becomes:
fgsindex.defaultQueryFields = dc.description dc.title dc.creator dc.identifier ds.fulltext ds.labelThe field ds.label and a document's full-text can now be searched and will appear in the search results. (Only a customisable snippet-size of a document's full-text will present in the results of a search.)
http://localhost:8080/fedoragsearch/restIf you visit this page, there are links to doing searches and browsing the Fedora repository's full-text contexts.
gsearch.indexName=your-fedora-index-nameIf you had to create the properties file, you'd have to create this property as well. But if the file already existed, then the property gsearch.indexName would have been in there and you need only adjust the index name it is set to to your own.