So then, to make for example an index for an album that includes artist name
and album name, I would need to use something along the lines of this?
create procedure upd_index(in subject varchar, in _g iri_id, in _s iri_id,
in _p iri_id, in _o any)
{
declare vtb, subject;
declare text_to_index varchar;
select ru_qname into subject from rdf_url where ru_iid = _s;
text_to_index := sparql SELECT bif:concat(?o, " ", ?an)
WHERE
{
<subject> ?p ?o .
?s foaf:maker ?a .
?a foaf:name ?an .
?s dc:title ?o .
};
if(text_to_index is null)
return 0;
vtb := vt_batch(1);
vt_batch_d_id(vtb, (_g,_s,_p,_o));
vt_batch_feed(vtb, text_to_index, 0);
vt_batch_process_db_dba_rdf_quad(vtb);
}