Hi Dimitris,

i have a problem with the bif:contains function.
It does not work and i could find if there is any configuration options to enable it.

Server/Virtuoso: version 06.01.3127, on Linux (x86_64-pc-linux-gnu), Single Edition
SPARQL Endpoint: http://el.dbpedia.org/sparql

For the same query, the bif:contains function does not return any results, while with Filter regex does
e.g.

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
A)
   select ?o ?l where {   ?o rdfs:label ?l.
      ?l bif:contains "Linux".    }
B)
   select ?o ?l where {   ?o rdfs:label ?l.
      FILTER(regex(?l,"Linux")).    }

I tested the (A) option in the dbpedia.org/sparql and it works fine

Execute urls
A) http://el.dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fel.dbpedia.org&should-sponge=&query=PREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0A%0D%0Aselect+%3Fo+%3Fl+where+ {%0D%0A%3Fo+rdfs%3Alabel+%3Fl.%0D%0A%3Fl+bif%3Acontains+%22Linux %22.%0D%0A}&format=text%2Fhtml&debug=on&timeout=

B) http://el.dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fel.dbpedia.org&should-sponge=&query=PREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0A%0D%0Aselect+%3Fo+%3Fl%0D%0Awhere+ {%0D%0A%3Fo+rdfs%3Alabel+%3Fl.%0D%0AFILTER%28regex%28%3Fl%2C%22Linux %22%29%29.%0D%0A}&format=text%2Fhtml&debug=on&timeout=


It looks like you did not initialize the RDF freetext index.

To create index on all triples just perform the following command using isql:
    DB.DBA.RDF_OBJ_FT_RULE_ADD (null, null, 'All');
Then force a synchronization:

    DB.DBA.VT_INC_INDEX_DB_DBA_RDF_OBJ ();


Please read:

http://docs.openlinksw.com/virtuoso/sparqlextensions.html


Best regards,

Patrick

Reply via email to