The name of the backend is virtuosobackend
. Thus, to use it one simply has to load it as follows:
const Soprano::Backend* virtBack = Soprano::PluginManager::instance()->discoverBackendByName("virtuosobackend");
indices
- A comma-separated list of quadruple indices to be used (Example:'spog,posg,opsg'). If not specified, the indices are not changed, ie. the Virtuoso defaults are used. fulltextindex
- Enable or disable the full text index which allows to perform full text queries on string literals embedded in SPARQL queries. For more information see the documentation on Virtuoso SPARQL extensions. none
- disable the index (default) sync
- enable syncroneous updates of the index (the index is always in sync. This might give a performace penalty) N
- The interval in minutes after which the index will be updated.
Soprano::BackendSettings settings; // configure the used indices settings << Soprano::BackendSetting( "indices", "spog,posg,opsg" ); // set the full text index to be updated every 10 minutes settings << Soprano::BackendSetting( "fulltextindex", "10" );
The following setting is required for starting a local instance of Virtuoso:
This means that a conversion needs to take place whenever the empty graph or the special graph are encountered. This introduces a slight performance penalty. In the future an option might be introduced to disable this behaviour.
The backend does solve this issue for boolean values only by introducing a fake datatype for boolean literals: a non-empty string means true while an empty string means false. This is converted internally so the user of the backend will never notice it. The only exception may be queries that contain filters. More input is needed here.
The same hack used for boolean values is currently used for time and datetime values, too. This is caused by the fact that Virtuoso looses the fractions of seconds. It is very well possible that this can simply be solved by changing some setting. Again: help is appreciated.