%META:TOPICPARENT{name="VirtTipsAndTricksGuide"}% ---+ How can I adjust the frequency of RDF text indexing? ---++ What 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. ---++ Why 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:strings, XML, BLOBs/CLOBs, etc.) which are inserted or changed by SPARUL or other methods may not be immediately available to [[http://docs.openlinksw.com/virtuoso/sparqlextensions.html#rdfsparqlrulefulltext][bif:contains]], [[http://docs.openlinksw.com/virtuoso/queryingxmldata.html#xcontainspredicate][bif:xcontains]], or other functions that depend on the text index. ---++ How 1 First, force a synchronization of the RDF text index: SQL> DB.DBA.VT_INC_INDEX_DB_DBA_RDF_OBJ (); 1 Next, set the text index to your desired frequency, using the [[http://docs.openlinksw.com/virtuoso/fn_vt_batch_update.html][VT_BATCH_UPDATE()]] function. * To update the index in real time, immediately after every change, use -- SQL> DB.DBA.VT_BATCH_UPDATE ( 'DB.DBA.RDF_OBJ', 'OFF', NULL ); * To decrease the frequency, use this form (changing the "1" below to your preferred interval, in minutes) -- SQL> DB.DBA.VT_BATCH_UPDATE ( 'DB.DBA.RDF_OBJ', 'ON', 1 ); 1 Insert some example data: SQL> SPARQL INSERT INTO { "Kalimero" . }; Query result: callret-0 ANY Insert into , 1 (or less) triples -- done No. of rows in result: 1 1 Check the inserted triples: SQL> SELECT * FROM WHERE { ?p ?o }; Query result: p o ANY ANY http://schema.org/name Kalimero No. of rows in result: 1 1 Check the inserted triples using bif:contains: SQL> SELECT * WHERE { ?p ?o . ?o bif:contains "Kalimero" }; Query result: p o ANY ANY http://schema.org/name Kalimero No. of rows in result: 1 ---++Related * bif:contains documentation * bif:xcontains documentation * Virtuoso [[http://docs.openlinksw.com/virtuoso/sparqlextensions.html#rdfsparqlrulefulltext][DB.DBA.VT_INC_INDEX_DB_DBA_RDF_OBJ() ]] function usage example * [[VirtTipsAndTricksGuideBIFContainsOptions][What free-text options can I use with bif:contains? ]]