Hi Jason,

No such bif:match function exists in Virtuoso ...

You should be able to use a filter clause in conjunction with bif:contains to 
get a performant exact match with something like:

        select * where {?s ?p ?o . ?o bif:contains '"Nevis"' FILTER 
(?o="Nevis"@en)}

See the following live example against DBpedia:

http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&qtxt=select+*+where+%7B%3Fs+%3Fp+%3Fo+.+%3Fo+bif%3Acontains++%27%22Nevis%22%27+FILTER+%28%3Fo%3D%22Nevis%22%40en%29%7D&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=30000&debug=on&run=+Run+Query+
 
<http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org&qtxt=select+*+where+{?s+?p+?o+.+?o+bif:contains++%27%22Nevis%22%27+FILTER+(?o=%22Nevis%22@en)}&format=text/html&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=30000&debug=on&run=+Run+Query+>

Best Regards
Hugh Williams
Professional Services
OpenLink Software, Inc.      //              http://www.openlinksw.com/
Weblog   -- http://www.openlinksw.com/blogs/
LinkedIn -- http://www.linkedin.com/company/openlink-software/
Twitter  -- http://twitter.com/OpenLink
Google+  -- http://plus.google.com/100570109519069333827/
Facebook -- http://www.facebook.com/OpenLinkSoftware
Universal Data Access, Integration, and Management Technology Providers



> On 12 Feb 2018, at 22:05, Jason Koh <jb...@eng.ucsd.edu> wrote:
> 
> Hi, 
> 
> I would like to optimize objects of ``?s base:name ?o`` and previously 
> suggested to use bif:contains. However, as the query needs to be exact 
> matching, I wonder if there is a function like bif:match. (It looks like none 
> but would like to learn the reasoning.)
> 
> Regex must work but I found that it does not use the same index as contains.
> 
> Thanks!
> 
> 
> With regards,
> Jason Koh
> cseweb.ucsd.edu/~jbkoh <http://cseweb.ucsd.edu/~jbkoh>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! 
> http://sdm.link/slashdot_______________________________________________
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to