service tomcat7 stop apt-get install ant nano -w /usr/local/fedora/server/config/fedora-users.xml
<user name="fgsAdmin" password="******"> <attribute name="fedoraRole"> <value>administrator</value> </attribute> </user>
service tomcat7 start git clone https://github.com/fcrepo3/gsearch.git cd gsearch/FedoraGenericSearch ant buildfromsource cd ~ cp -v gsearch/FgsBuild/fromsource/fedoragsearch.war /var/lib/tomcat7/webapps chown tomcat7:tomcat7 /var/lib/tomcat7/webapps/fedoragsearch.war cp -R /var/lib/tomcat7/webapps/fedoragsearch/FgsConfig ./ cd FgsConfig/ ant generateIndexingXslt cp fgsconfig-basic-for-islandora.properties fgsconfig-basic-for-islandora.properties.ORI nano -w fgsconfig-basic-for-islandora.properties
# file.name=fgsconfig-basic-for-islandora.properties
# This is a version of fgsconfig-basic.properties tailored for islandora
# These properties are used by running from command line:
# >ant -f fgsconfig-basic.xml -Dlocal.FEDORA_HOME=$FEDORA_HOME -propertyfile fgsconfig-basic-for-islandora.properties
# Be sure you have permissions to write to finalConfigPath.
# You must tailor the lines between #>>>>>>>>>> and #<<<<<<<<<<
# configDisplayName is displayed on the admin pages, so you know, which set of config files is in action.
# configDisplayName is also used as directory name of the config within the FgsConfigTemplate directory.
configDisplayName=configForIslandora
# gsearchBase is used for SOAP deployment.
gsearchBase=http://150.145.48.48:8080
# gsearchAppName is used for SOAP deployment.
gsearchAppName=fedoragsearch
# gsearchUser is used for SOAP deployment.
gsearchUser=fgsAdmin
# gsearchPass is used for SOAP deployment.
#>>>>>>>>>>
gsearchPass=****
#<<<<<<<<<<
# finalConfigPath must be in the classpath of the web server, must be an absolute path.
#>>>>>>>>>>
#finalConfigPath=${local.FEDORA_HOME}/tomcat/webapps/fedoragsearch/WEB-INF/classes
finalConfigPath=/var/lib/tomcat7/webapps/fedoragsearch/WEB-INF/classes
#<<<<<<<<<<
# At startup, GSearch will find the file log4j.xml in tomcat classpath.
# logFilePath is where to find the log file.
logFilePath=${local.FEDORA_HOME}/server/logs
# logLevel can be DEBUG, INFO, WARN, ERROR, FATAL.
logLevel=DEBUG
# namesOfRepositories separated by space.
namesOfRepositories=FgsRepos
# namesOfIndexes separated by space.
namesOfIndexes=FgsIndex
# Assuming there is one repository:
# fedoraBase is base url of the repository.
#>>>>>>>>>>
fedoraBase=http://150.145.48.48:8080
#<<<<<<<<<<
# fedoraAppName is Fedora app name of this repository.
fedoraAppName=fedora
# fedoraUser is the user name to access this repository.
fedoraUser=fedoraAdmin
# fedoraPass is the password to access this repository.
#>>>>>>>>>>
fedoraPass=****
#<<<<<<<<<<
# fedoraVersion is the Fedora version of this repository.
fedoraVersion=3.8.1
#objectStoreBase must be the location of the objects of this repository.
#>>>>>>>>>>
objectStoreBase=/srv/data/objectStore
#<<<<<<<<<<
#Assuming there is one index:
# indexEngine is Lucene, Solr, or Zebra.
indexEngine=Solr
# FgsIndex: indexBase is the server base url, in case of Solr or Zebra.
indexBase=http://127.0.0.1:8983/solr/islandora
# FgsIndex: indexDir is the path to the index.
indexDir=/srv/solr/data/index
# FgsIndex: indexingDocXslt is the name of the indexing stylesheet.
indexingDocXslt=foxmlToSolr
nano -w FgsConfigReposTemplate/repositoryInfo.xml
<?xml version="1.0" encoding="UTF-8"?> <resultPage> <repositoryInfo> <AdminInfo>DigiBESS EU</AdminInfo> <RepositoryShortName>DigiBESS</RepositoryShortName> <RepositoryLongName>Repository for DigiBESS project</RepositoryLongName> <RepositoryDeveloper>Giancarlo Birello, UIT@IRCrES</RepositoryDeveloper> <RepositoryContact>giancarlo.birello@ircres.cnr.it</RepositoryContact> </repositoryInfo> </resultPage>
nano -w FgsConfigIndexTemplate/Solr/indexInfo.xml (nothing TODO)
<?xml version="1.0" encoding="UTF-8"?> <resultPage indexName="INDEXNAME"> <indexInfo> <AdminInfo>The contents of this page is just an example, you may edit it in indexInfo.xml, and it is displayed by the getIndexInfo operation with the adminGetIndexInfoToHtml.xslt stylesheet.</AdminInfo> <IndexShortName>INDEXNAME</IndexShortName> <IndexLongName>INDEXNAME index on Solr</IndexLongName> <EngineUrl>http://lucene.apache.org/</EngineUrl> <EngineShortName>Solr</EngineShortName> <EngineLongName>Apache Lucene project</EngineLongName> <EngineDescription>The Apache Solr project develops open-source search software.</EngineDescription> <EngineTags>solr lucene apache open-source search software</EngineTags> <EngineImage>http://solr.apache.org/solr_green_300.gif</EngineImage> <QueryLanguage>See e.g. http://lucene.apache.org/java/docs/queryparsersyntax.html</QueryLanguage> <SampleSearch>dc.title:fedora AND dc.creator:"thornton staples"</SampleSearch> <IndexFieldNameList>PID, repositoryName,<BR/> property.label, property.contentModel, property.createdDate,<BR/> property.lastModifiedDate, property.state, property.type,<BR/> dc.creator, dc.date, dc.description, dc.format, dc.identifier,<BR/> dc.publisher, dc.relations, dc.right, dc.source,<BR/> dc.subject, dc.title,<BR/> DS2.text,<BR/> others depending on the indexing stylesheet. </IndexFieldNameList> <EngineDeveloper>Apache Lucene Solr project</EngineDeveloper> <EngineContact>info@lucene.apache.org/solr</EngineContact> <EngineAttribution>The Apache Lucene Solr project © 2005, The Apache Lucene Solr project, All Rights Reserved</EngineAttribution> </indexInfo> </resultPage>
export FEDORA_HOME=/usr/local/fedora ant -f fgsconfig-basic.xml -Dlocal.FEDORA_HOME=$FEDORA_HOME -propertyfile fgsconfig-basic-for-islandora.properties
Buildfile: /home/user/FgsConfig/fgsconfig-basic.xml
configFgsBasic:
configFgsRoot:
[mkdir] Created dir: /home/user/FgsConfig/configForIslandora/fgsconfigFinal
[copy] Copying 22 files to /home/user/FgsConfig/configForIslandora/fgsconfigFinal
[copy] Copying 1 file to /home/user/FgsConfig/configForIslandora
configFgsRepos:
[mkdir] Created dir: /home/user/FgsConfig/configForIslandora/fgsconfigFinal/repository/FgsRepos
[copy] Copying 3 files to /home/user/FgsConfig/configForIslandora/fgsconfigFinal/repository/FgsRepos
configFgsIndex:
[mkdir] Created dir: /home/user/FgsConfig/configForIslandora/fgsconfigFinal/index/FgsIndex
[copy] Copying 23 files to /home/user/FgsConfig/configForIslandora/fgsconfigFinal/index/FgsIndex
[copy] Copying 1 file to /home/user/FgsConfig
[copy] Copying 1 file to /home/user/FgsConfig/configForIslandora/fgsconfigFinal
[mkdir] Created dir: /var/lib/tomcat7/webapps/fedoragsearch/WEB-INF/classes/fgsconfigFinal
[copy] Copying 49 files to /var/lib/tomcat7/webapps/fedoragsearch/WEB-INF/classes/fgsconfigFinal
[copy] Copying 1 file to /var/lib/tomcat7/webapps/fedoragsearch/WEB-INF/classes
BUILD SUCCESSFUL
Total time: 0 seconds
cd ~ git clone --recursive https://github.com/discoverygarden/basic-solr-config.git
We need right foxmlToSolr.xslt to index every fields for Islandora modules.
cp -Rv ~/basic-solr-config/islandora_transforms /var/lib/tomcat7/webapps/fedoragsearch/WEB-INF/classes/fgsconfigFinal/index/FgsIndex/
cd /var/lib/tomcat7/webapps/fedoragsearch/WEB-INF/classes/fgsconfigFinal/index/FgsIndex/
cp foxmlToSolr.xslt foxmlToSolr.xslt.ORI
cp ~/basic-solr-config/foxmlToSolr.xslt ./
nano -w foxmlToSolr.xslt
adjust full path to islandora_transforms
edit islandora_transforms/*.xslt with an absolute path and adjust it (thanks Tim!!)
cd ~
git clone git://github.com/discoverygarden/dgi_gsearch_extensions
cd dgi_gsearch_extensions/
mvn package
cp target/gsearch_extensions-0.1.1-jar-with-dependencies.jar /var/lib/tomcat7/webapps/fedoragsearch/WEB-INF/lib/
nano -w /var/lib/tomcat7/webapps/fedoragsearch/WEB-INF/classes/fgsconfigFinal/index/FgsIndex/index.properties
-fgsindex.operationsImpl = dk.defxws.fgssolr.OperationsImpl
+fgsindex.operationsImpl = dk.defxws.fgssolrremote.OperationsImpl
-fgsindex.indexDir = /srv/solr/data/index
+fgsindex.indexDir = NOT_USED
chown -hR tomcat7:tomcat7 /var/lib/tomcat7/webapps/fedoragsearch
service tomcat7 restart