Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

External indexing relies upon the objects you wish to have indexed to have an indexing:indexable mixin property. This can be done using the REST interface or via the fedora-node-types.cnd

Definition using the REST interface

Go to http://localhost:8080/rest/fcr:namespaces and in the Register Namespace form add:

     Prefix: indexing

     Namespace: http://fedora.info/definitions/v4/indexing#

Go to http://localhost:8080/rest/fcr:nodetypes and in the Update CND form add:  

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

Definition via fedora-node-types.cnd

  Make sure your node definitions contain the following:

...

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".

Code Block
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 ;

 

 Note that for solr indexing the field name (such as id, title, and uuid) must be match fields that are defined in the solr schema.xml.

Create objects with indexing properties

...

Code Block
titlecreate object
curl -X POST -H "Content-Type: application/n3" "http://localhost:8080/rest/node/to/createanIndexableObject" -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