Enabling Collection Support for Fedora 2.2.2

Creating the riTriples PostgreSQL Table

To use the PostgreSQL triplestore for the Resource Index (recommended):

  1. Login to your PostgreSQL server as an administrative user
  1. If you have not already created a fedoraAdmin user (you should have though!) then do the following:
    CREATE ROLE "fedoraAdmin" LOGIN PASSWORD 'fedoraAdmin'
      NOINHERIT CREATEDB
      VALID UNTIL 'infinity';
    
  1. Create the riTriples table
    CREATE DATABASE "riTriples"
      WITH ENCODING='SQL_ASCII'
      OWNER="fedoraAdmin";
    
  1. Make sure you can login to your Postgres server as fedoraAdmin.

Configuring the Triplestore in fedora.fcfg

We recommend using PostgreSQL as the backend for the MPT Triplestore for Resource Index. To enable this, edit $FEDORA_HOME/server/config/fedora.fcfg with the following:

  1. Look for the declaration of the module ResourceIndex and replace it with this:
      <module role="fedora.server.resourceIndex.ResourceIndex" class="fedora.server.resourceIndex.ResourceIndexModule">
        <comment>Supports the ResourceIndex.</comment>
        <param name="level" value="1">
          <comment>(required)
                Index level. Currently, only 0, 1 and 2 are supported
                levels. 0 = off: do not load the ResourceIndex 1 = basic: system
                metadata, RELS-EXT, disseminations 2 = basic + method permutations
                WARNING: changing the level (except to 0) requires
                running the Resource Index Rebuilder.</comment>
        </param>
        <param name="datastore" value="localPostgresMPTTriplestore">
          <comment>(required)
                Name of the triplestore to use. WARNING: changing the
                triplestore running the Resource Index Rebuilder.</comment>
        </param>
        <param name="syncUpdates" value="true">
          <comment>(optional, default is false)
                Whether to flush the triple buffer before
                returning from object modification operations.
                Specifying this as true will ensure that RI queries
                immediately reflect the latest triples.
                Specifying false will not provide this guarantee,
                but can significantly reduce roundtrip time for
                API-M operations (depending on the triplestore
                implementation).</comment>
        </param>
        <param name="alias:test" value="http://example.org/terms#">
          <comment>(optional) Aliases that can be used for queries. The param
                            name of an alias starts with the string &quot;alias:&quot; and is followed by
                            the name of the alias (shortcut) for the value, which is a URI
                            prefix. For example: name=&quot;alias:test&quot;
                            value=&quot;http://example.org/terms#&quot; will allow a query to use
                            test:apple instead of http://example.org/terms#apple</comment>
        </param>
      </module>
    
    
  2. Look for the declaration of the localPostgresMPPTTriplestore (ie. "<datastore id="localPostgresMPTTriplestore">"), and put in your details for your postgres database (eg. JDBC URL, username and password).
  3. Run fedora-rebuild.sh to re-index all the triples (selecting option 1 to rebuild the Resource Index)

Back to Deployment Guides