You may want to change the frequency of Virtuoso's RDF text index updates.
You can decrease the frequency, if your queries are usually made some time after data inserts/updates.
You can also increase the frequency to real-time, if you need inserts/updates to be immediately available for queries.
Virtuoso's RDF text indexes (that is, the indexes on literal object values, which are distinct from the indexes of URIs in any position) are updated periodically as a batch operation; by default, the interval is one (1) minute.
This means that typed literals (xsd:string
s, XML, BLOB
s/CLOB
s, etc.) which are inserted or changed by SPARUL or other methods may not be immediately available to bif:contains
, bif:xcontains
, or other functions that depend on the text index.
SQL> DB.DBA.VT_INC_INDEX_DB_DBA_RDF_OBJ ();
VT_BATCH_UPDATE()
function.
SQL> DB.DBA.VT_BATCH_UPDATE ( 'DB.DBA.RDF_OBJ', 'OFF', NULL );
SQL> DB.DBA.VT_BATCH_UPDATE ( 'DB.DBA.RDF_OBJ', 'ON', 1 );
SQL> SPARQL INSERT INTO <http://example.com> { <http://www.worldcat.org/Book_11> <http://schema.org/name> "Kalimero" . }; Query result: callret-0 ANY Insert into <http://example.com>, 1 (or less) triples -- done No. of rows in result: 1
SQL> SELECT * FROM <http://example.com> WHERE { <http://www.worldcat.org/Book_11> ?p ?o }; Query result: p o ANY ANY http://schema.org/name Kalimero No. of rows in result: 1
bif:contains
:
SQL> SELECT * WHERE { <http://www.worldcat.org/Book_11> ?p ?o . ?o bif:contains "Kalimero" }; Query result: p o ANY ANY http://schema.org/name Kalimero No. of rows in result: 1
bif:contains
documentation bif:xcontains
documentation DB.DBA.VT_INC_INDEX_DB_DBA_RDF_OBJ()
function usage example bif:contains
?