Fedora Generic Search Service Version 2.7

  • compatible with Fedora Version 3.7.1
  • compatibility with Lucene 4.6.1, Solr 4.6.1, PDFBox 1.8.4, and Tika 1.4
  • easier configuration of GSearch for Islandora


apt-get install ant
apt-get install unzip
 
nano -w /usr/local/fedora/server/config/fedora-users.xml
    <user name="fgsAdmin" password="******">
      <attribute name="fedoraRole">
        <value>administrator</value>
      </attribute>
    </user>
wget http://garr.dl.sourceforge.net/project/fedora-commons/services/3.7/fedoragsearch-2.7.zip
unzip fedoragsearch-2.7.zip
cp fedoragsearch-2.7/fedoragsearch.war /var/lib/tomcat7/webapps/
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://v2p2repo.to.cnr.it: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://v2p2repo.to.cnr.it: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.7

  #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://v2p2repo.to.cnr.it:8080/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>V2P2 repository 3.7.1
  http://v2p2dev.to.cnr.it/doku.php</AdminInfo>
  <RepositoryShortName>v2p2repo</RepositoryShortName>
  <RepositoryLongName>Repository for V2P2 project</RepositoryLongName>
  <RepositoryDeveloper>Giancarlo Birello, UIT@Ceris</RepositoryDeveloper>
  <RepositoryContact>g.birello@ceris.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 &#169; 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/giancarlo/FgsConfig/fgsconfig-basic.xml

configFgsBasic:

configFgsRoot:
    [mkdir] Created dir: /home/giancarlo/FgsConfig/configForIslandora/fgsconfigFinal
     [copy] Copying 22 files to /home/giancarlo/FgsConfig/configForIslandora/fgsconfigFinal
     [copy] Copying 1 file to /home/giancarlo/FgsConfig/configForIslandora

configFgsRepos:
    [mkdir] Created dir: /home/giancarlo/FgsConfig/configForIslandora/fgsconfigFinal/repository/FgsRepos
     [copy] Copying 3 files to /home/giancarlo/FgsConfig/configForIslandora/fgsconfigFinal/repository/FgsRepos

configFgsIndex:
    [mkdir] Created dir: /home/giancarlo/FgsConfig/configForIslandora/fgsconfigFinal/index/FgsIndex
     [copy] Copying 23 files to /home/giancarlo/FgsConfig/configForIslandora/fgsconfigFinal/index/FgsIndex
     [copy] Copying 1 file to /home/giancarlo/FgsConfig
     [copy] Copying 1 file to /home/giancarlo/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: 1 second
cd /usr/local/solr/islandora/conf/
cp /var/lib/tomcat7/webapps/fedoragsearch/WEB-INF/classes/fgsconfigFinal/index/FgsIndex/conf/schema-4.6.1-for-fgs-2.7.xml ./
mv schema.xml schema.xml.ORI
cp schema-4.6.1-for-fgs-2.7.xml schema.xml

nano -w schema.xml

	+ <dynamicField name="*_hlt" type="text_general"   indexed="true"  stored="true" termVectors="true" termPositions="true" termOffsets="true"/>
	
	+ <dynamicField name="dc.*"  type="text_general" indexed="true" stored="true" multiValued="true"/>

We need right foxmlToSolr.xslt to index every fields for Islandora modules.

apt-get install git
cd ~
git clone git://github.com/discoverygarden/basic-solr-config

cd /var/lib/tomcat7/webapps/fedoragsearch/WEB-INF/classes/fgsconfigFinal/index/FgsIndex/
cp foxmlToSolr.xslt foxmlToSolr.xslt.ORI
cp ~/basic-solr-config/foxmlToSolr.xslt ./
cp -R ~/basic-solr-config/islandora_transforms ./

nano -w foxmlToSolr.xslt
     adjust full path to islandora_transforms

nano -w islandora_transforms/slurp_all_MODS_to_solr.xslt
     adjust full path to library

apt-get install maven
cd ~
git clone git://github.com/discoverygarden/dgi_gsearch_extensions
cd dgi_gsearch_extensions/
mvn package
cp target/gsearch_extensions-0.1.0-jar-with-dependencies.jar /var/lib/tomcat7/webapps/fedoragsearch/WEB-INF/lib/

service tomcat7 restart



TEST installation

 
 
repo371/fgsearch27.txt ยท Last modified: 2014/03/19 13:05 by giancarlo

Developers: CNR IRCrES IT Office and Library
Giancarlo Birello (giancarlo.birello _@_ ircres.cnr.it) and Anna Perin (anna.perin _@_ ircres.cnr.it)
V2P2@TO.CNR is licensed under: Creative Commons License
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Drupal Garland Theme for Dokuwiki