First impressions of the Talis Platform

In previous posts we explained that we are looking for a tool that would offer functionalities similar to the now 'out-of-business' Siderean Seamark.
The first product we took a look at was structWSF, but we didn't like the 'so called' REST API, so we moved rather quickly to the next on our list of potential replacements, being the TALIS Platform.

The Talis Platform offers a cloud-based data repository for unstructured and structured RDF data with a REST API, a SPARQL endpoint with search and faceted navigation facilities.

We started with a quick scan through the API documentation and we must say that Compared to structWSF the REST API is much, much cleaner.

So we decided to give it a try and asked for a developer store.

Our aim was to:
  1. load an RDF file
  2. configurate the fields for text search and faceted navigation
  3. test the system
We took as testfile a rdf file containing info on books.
Two of the instances taken from this RDF file.

book1


book2
Or codewise (N3)
<http://www.siderean.com/ia/data/bookdemo/book#13>
a book:Novel , book:Book ;
dc:coverage <http://www.siderean.com/ia/data/bookdemo/place#sanfrancisco> ;
dc:creator <http://www.siderean.com/ia/data/bookdemo/author#6> ;
dc:date "1904" ;
dc:description """
A gentle literary critic, Humphrey Van Weyden, falls into San Francisco Bay and is rescued by Wolf Larson,
captain of a seal-hunting ship, the Ghost. Van Weyden would have been better off in the bay.
""" ;
dc:title "The Sea Wolf" ;
book:price "2295"^^xsd:int .

Loading RDF

Structured RDF data are stored in the MetaBox of your store.

The HTTP adres of my metabox is: http://api.talis.com/stores/phermans-dev1/meta.

When I want to store RDF into this metabox, I must use following HTTP request using HTTP Digest Authentication:

address http://api.talis.com/stores/phermans-dev1/meta
method POST
mime-type application/rdf+xml

Doing this with curl:
curl -H "Content-type: application/rdf+xml" --digest -u user:password -d @/Path/to/mybooks.rdf http://api.talis.com/stores/phermans-dev1/meta

Configuring the store for full text search

Talis uses here two mechanisms:
  1. a field predicate map for configuring and mapping simple labels to properties
  2. a query profile to configure relevance ranking based on the relative importance of these properties (fields)

Field Predicate Map

The field predicate map needs to comply to a predefined rdf vocabulary.
First you define the list of your properties to be mapped

<rdf:Description rdf:about="http://api.talis.com/stores/phermans-dev1/config/fpmaps/1">
<frm:mappedDatatypeProperty rdf:resource="http://api.talis.com/stores/phermans-dev1/config/fpmaps/1#title"/>
<frm:mappedDatatypeProperty rdf:resource="http://api.talis.com/stores/phermans-dev1/config/fpmaps/1#label"/>
<frm:mappedDatatypeProperty rdf:resource="http://api.talis.com/stores/phermans-dev1/config/fpmaps/1#description"/>
<frm:mappedDatatypeProperty rdf:resource="http://api.talis.com/stores/phermans-dev1/config/fpmaps/1#name"/>
<frm:mappedDatatypeProperty rdf:resource="http://api.talis.com/stores/phermans-dev1/config/fpmaps/1#date"/>
<frm:mappedDatatypeProperty rdf:resource="http://api.talis.com/stores/phermans-dev1/config/fpmaps/1#price"/>
...
<rdf:type rdf:resource="http://schemas.talis.com/2006/bigfoot/configuration#FieldPredicateMap"/>
<rdfs:label>default field/predicate map</rdfs:label>
</rdf:Description>
And then the mapping itself (2 examples)

<rdf:Description rdf:about="http://api.talis.com/stores/phermans-dev1/config/fpmaps/1#title">
<frm:name>title</frm:name>
<frm:property rdf:resource="http://purl.org/dc/elements/1.1/title"/>
</rdf:Description>
<rdf:Description rdf:about="http://api.talis.com/stores/phermans-dev1/config/fpmaps/1#date">
<frm:name>date</frm:name>
<frm:property rdf:resource="http://purl.org/dc/elements/1.1/date"/>
</rdf:Description>

Having done this configuration, we need to load this into our store:

address http://api.talis.com/stores/phermans-dev1/config/fpmaps/1
method PUT
mime-type application/rdf+xml

curl -H "Content-type: application/rdf+xml" --digest -u user:password -X PUT
-d @/Path/to/myfieldpredicatemap.rdf http://api.talis.com/stores/phermans-dev1/config/fpmaps/1

The query profile

This profile is used to indicate the importance of properties for full text search

A fragment of our configuration.
First the fields to be weighted:
<rdf:Description rdf:about="http://api.talis.com/stores/phermans-dev1/config/queryprofiles/1">
<j.1:fieldWeight rdf:resource="http://api.talis.com/stores/phermans-dev1/config/queryprofiles/1#name"/>
<j.1:fieldWeight rdf:resource="http://api.talis.com/stores/phermans-dev1/config/queryprofiles/1#description"/>
<j.1:fieldWeight rdf:resource="http://api.talis.com/stores/phermans-dev1/config/queryprofiles/1#label"/>
<j.1:fieldWeight rdf:resource="http://api.talis.com/stores/phermans-dev1/config/queryprofiles/1#title"/>
<j.1:fieldWeight rdf:resource="http://api.talis.com/stores/phermans-dev1/config/queryprofiles/1#date"/>
<rdf:type rdf:resource="http://schemas.talis.com/2006/bigfoot/configuration#QueryProfile"/>
<rdfs:label>default query profile</rdfs:label>
</rdf:Description>

Then the weights themselves:

<rdf:Description rdf:about="http://api.talis.com/stores/phermans-dev1/config/queryprofiles/1#name">
<j.1:weight>2.0</j.1:weight>
<j.0:name>name</j.0:name>
</rdf:Description>

Upload to the server:

address http://api.talis.com/stores/phermans-dev1/config/queryprofiles/1
method PUT
mime-type application/rdf+xml

curl -H "Content-type: application/rdf+xml" --digest -u user:password -X PUT -d @/Users/paul/qp.rdf
http://api.talis.com/stores/phermans-dev1/config/queryprofiles/1

This didn't seem to have any impact on my queries yet; so I decided to reindex the store.

Reindexing the store

The API allows you to post a job.

For a reindex it looks like the following:
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:bf="http://schemas.talis.com/2006/bigfoot/configuration#" >
<bf:JobRequest>
<rdfs:label>Reindex the RDF in my store</rdfs:label>
<bf:jobType rdf:resource="http://schemas.talis.com/2006/bigfoot/configuration#ReindexJob"/>
<bf:startTime>2009-08-07T16:30:00Z</bf:startTime>
</bf:JobRequest>
</rdf:RDF>

Remark: Make sure you get the startTime right, otherwise you have a long wait ...

Results

In the search interface I can use the fields now to limit my search results

Search for the string with wildcard 'se*'

search on all fields
Results: 5 books

results all fields
Same search but within title

search within fieldsResults: 2 books

results with 1 field
And the faceted navigation: same query with facets on price and date

faceted navigation
Results in HTML

HTML results of facets
Result in XML

facets in XML
For the moment there is still a limitation in the faceted search.
It only works if the entities queried are having direct datatype properties.
However in my set there is some indirection, where I first need to
travers an objectproperty to get at the wished datatype property.

:book1 :author :author1
:author1 :name "JJ"

This traversal isn't there yet, but should be in the future.

We end with a sparql query

SPARQLAnd its results

SPARQL results

Conclusion


This is all very promising. Not everything is there yet. We also would like to see some inferencing possible.
But anyhow, the Talis Platform stays on our shortlist.
We'll come back to it later.


Comments