Re: [Virtuoso-users] No bif:match other than bif:contains?

2018-02-13 Thread Jason Koh
Hi Hugh,

I will try that. Thanks for the suggestion!


With regards,
Jason Koh
cseweb.ucsd.edu/~jbkoh

On Tue, Feb 13, 2018 at 3:17 AM, Hugh Williams 
wrote:

> 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=select+*+where+%7B%3Fs+%3Fp+%3Fo+.+%
> 3Fo+bif%3Acontains++%27%22Nevis%22%27+FILTER+%28%3Fo%
> 3D%22Nevis%22%40en%29%7D=text%2Fhtml_redir_
> for_subjs=121_redir_for_hrefs==3=on=+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  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
> 
> --
> 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


Re: [Virtuoso-users] No bif:match other than bif:contains?

2018-02-13 Thread Hugh Williams
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=select+*+where+%7B%3Fs+%3Fp+%3Fo+.+%3Fo+bif%3Acontains++%27%22Nevis%22%27+FILTER+%28%3Fo%3D%22Nevis%22%40en%29%7D=text%2Fhtml_redir_for_subjs=121_redir_for_hrefs==3=on=+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  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 
> --
> 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