Old Release

This documentation covers an old version of Fedora. Looking for another version? See all documentation.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

To support the differing needs for sophisticated, rich searching, fedora 4 comes with a standard mechanism and integration point for indexing content in an external service such as Apache Solr.

Define Indexing Namespace and Mixin in Compact Node Definition of fcrepo4

External indexing relies upon the objects you wish to have indexed to have an indexing:indexable mixin property.  Make sure your node definitions contain the following:

fcrepo-kernel/src/main/resources/fedora-node-types.cnd
<indexing = 'http://fedora.info/definitions/v4/indexing#'>

[indexing:indexable] mixin
- indexing:hasIndexingTransformation (STRING) multiple COPY nofulltext noqueryorder

The standard configuration chain is as follows:

  1. fcrepo4/fcrepo-webapp/src/main/webapp/WEB-INF/web.xml contains a context-param element with param-name "contextConfigLocation".  The param-value points to your spring configuration file, usually a path like WEB-INF/classes/*.xml
  2. One of you spring configuration files is repo.xml that contains a property repositoryConfiguration defining the location of your repository.json
  3. fedora-node-types.cnd is defined in you repository.json

Install fcrepo-jms-indexer-pluggable

https://github.com/futures/fcrepo-jms-indexer-pluggable

TODO: flesh out

Load an LDPATH program

The following is an example of loading a LDPATH program called "custom".

curl -X POST -H "Content-Type: application/rdf+ldpath" -d "@post.txt" "http://localhost:8080/rest/fedora:system/fedora:transform/fedora:ldpath/custom/fcr:content"

post.txt:
@prefix fcrepo : <http://fedora.info/definitions/v4/repository#>
id      = . :: xsd:string ;
title = dc:title :: xsd:string;
uuid = fcrepo:uuid :: xsd:string ;

 

 

Create objects with indexing properties

 

create object
curl -X POST -H "Content-Type: application/n3" "http://localhost:8080/rest/node/to/create" -d "@body.rdf"

body.rdf:
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix indexing:<http://fedora.info/definitions/v4/indexing#>.
<object uri> rdf:type  <http://fedora.info/definitions/v4/indexing#indexable>
indexing:hasIndexingTransformation \"default\".

TODO: test

  • No labels