













All resources stored in the Linked Media Framework are indexed in the semantic search component that uses Apache SOLR as its backend and creates a search index over selected properties of the resources. The semantic search component extends SOLR by some semantic capabilities, but it is fully API compatible and you can use any SOLR client library to access the LMF Search (e.g. AjaxSOLR).
The LMF semantic search component is capable of handling several different search configurations at the same time using the SOLR multi-core functionality. In this way, a LMF installation can be used for offering different perspectives on the data managed by it.
Search over resources will always be domain-specific and will need to take into account the schema of the data. Therefore, the semantic search component provides only very simple and straightforward search functionality by default for three typical generic cases of metadata:
To adapt the search component to your specific domain, the LMF Admin Interface offers the possibility to define so-called "RDF Path Programs". An RDF Path Program is a set of rules that map index fields to RDF properties or paths of RDF properties. For example, the following program (rdf) defines four fields (title, summary, tag, type):
@prefix hg : <http://www.holygoat.co.uk/owl/redwood/0.1/tags/> ;
title = rdfs:label :: xsd:string ;
summary = rdfs:comment :: lmf:text ;
tag = hg:taggedWithTag / hg:name :: xsd:string ;
type = rdf:type :: xsd:anyURI ;
The complete RDF Path Language is documented under RdfPathLanguage .
In the most simple case (e.g. title), the rule maps an index field to exactly one RDF property. In more complex cases, the rule allows to follow a path of RDF properties; e.g. in the "tag" field above, the rule would start at the current resource and follow the hg:taggedWithTag property, and from there it will follow the hg:name property and store it in the index.
RDF Path Programs can be uploaded by the SOLR Cores Webservice available under <APPDIR>/solr/cores. It supports the following operations:
The "Query & Search" tab in the admin interface offers you to immediately try out the semantic search component by entering the search into the "Query Explorer" and pressing the "Run" button.
A good start is to enter the query *:* and let it execute. This search will list you all indexed resources together with their field values. Try adding a simple rule to the shortcuts, upload and reindex and then run the search again. You will see how the new field has been added to the search results.
The semantic search component can be used with any SOLR client library. A list of SOLR client libraries is available at http://wiki.apache.org/solr/IntegratingSolr . Note that the LMF only offers the search functionality but not the indexing functionality of existing clients.
Bundled with the Linked Media Framework comes an exemplary implementation of a Semantic Search interface in pure HTML and Javascript using the AjaxSOLR library. The interface is accessible via http://localhost:8080/LMF/solr/ui/ . Given the right kind of data, it also demonstrates how facetting over metadata properties can be used to display additional information in widgets, like a map or a timeline.
In case you want to offer a customised search interface for your application scenario, you can copy the bundled Search UI implementation and quickly adapt it to your requirements. In this way we have already implemented several search demonstrators.
A typical approach to using the LMF as a Semantic Search server is to