Introduction

AllegroGraph's triple-stores now support Callimachus. This support has two levels. Firstly, AllegroGraph will automatically add (and delete) soundex-based indexing triples as you add regular triples to your store. For example, if you add the triple

<http://www.example.com/tess> <http://www.w3.org/2000/01/rdf-schema#label> "Tess Durbeyfield" . 

Then AllegroGraph will also add

	<http://www.example.com/tess> <http://www.openrdf.org/rdf/2011/keyword#phone> "D611" .  
	<http://www.example.com/tess> <http://www.openrdf.org/rdf/2011/keyword#phone> "T236" .  
	<http://www.example.com/tess> <http://www.openrdf.org/rdf/2011/keyword#phone> "T200" . 

Secondly, AllegroGraph will add auditing triples to your store whenever a SPARQL UPDATE command deletes a triple (and the insert-graph-uri is set). The details of the auditing triples are beyond the scope of this document but are designed to track provenance and change activity.

Callimachus support must be turned on before a store will begin adding Soundex or Auditing triples. You can turn on Callimachus behavior by sending an HTTP POST request to your store:

POST .../repository/STORENAME/callimachus 

You can also make Callimachus behavior the default for the server using the AllegroGraph configuration file.

Configuration File

There are two configuration parameters that allow AllegroGraph to support Callimachus:

Configuration parameters are described in Server Configuration and Control.

SPARQL soundex filter functions

AllegroGraph associates

<http://www.openrdf.org/rdf/2011/keyword#soundex> 

and

<http://www.openrdf.org/rdf/2011/keyword#regex> 

with the functions Callimachus uses to create its soundex-based text index. This means that you can use them in FILTERs and other SPARQL expressions. For example, to find every subject whose soundex matches that of tess, we could write:

	prefix keyword: <http://www.openrdf.org/rdf/2011/keyword#>  
	select ?s ?label {  
		?s keyword:phone ?o .  
		?s rdfs:label ?label .  
		FILTER(keyword:soundex('tess') = ?o)  
	}  
 
 
select * { ?s ?p ?o . BIND(<http://www.openrdf.org/rdf/2011/keyword#regex>(?o) AS ?sndx) }