Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-13 Thread Hugh Williams
Hi Robert, Development suggest the query: sparql PREFIX dc: http://purl.org/dc/elements/1.1/ select distinct ?title ?u from http://dbpedia.org WHERE { ?prog dc:title ?title . ?u rdfs:label ?label . FILTER (bif:isnotnull (bif:strstr (?label, ?title))) } ORDER BY DESC ((select ?created where {

Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-10 Thread Robbet
Hi Ivan, thank you! Looks gut ... First one seems to work as a Sparql query. syntax error at bif:strstr before ( FILTER ( BOUND(bif:strstr (?label, ?title) ) But it works without the BOUND keyword. I'm new to Virtuoso and SQL / SPARQL environment and try to compare small buch of

Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-10 Thread Kingsley Idehen
On 6/10/11 1:10 AM, Robbet wrote: Hi Ivan, thank you! Looks gut ... First one seems to work as a Sparql query. syntax error at bif:strstr before ( FILTER ( BOUND(bif:strstr (?label, ?title) ) But it works without the BOUND keyword. I'm new to Virtuoso and SQL / SPARQL environment and

Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-10 Thread Robbet
Hi Kingsley, changed NumberofBuffers and MaxDirtyBuffer to 4GB recommendation. Did i miss something? Dunno if it's only rely in the given hardware or if my query causes the slowdowns. Best regards, Robert On 10.06.2011 02:20, Kingsley Idehen wrote: On 6/10/11 1:10 AM, Robbet wrote: Hi

Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-10 Thread Kingsley Idehen
On 6/10/11 1:28 AM, Robbet wrote: Hi Kingsley, changed NumberofBuffers and MaxDirtyBuffer to 4GB recommendation. Did i miss something? Dunno if it's only rely in the given hardware or if my query causes the slowdowns. If after doing that you don't have improvements. We are down to DBMS size

Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-10 Thread Hugh Williams
Hi Robbet, What are your actual NumberOfBuffers and MaXDirtyBuffer settings for your 4GB memory system, I presume those recommended in the Virtuoso Performance Tuning guide at: http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtRDFPerformanceTuning Which are:

Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-10 Thread Robbet
Hi, yes, i confirm both values. Best regards, Robert On 10.06.2011 04:02, Hugh Williams wrote: Hi Robbet, What are your actual NumberOfBuffers and MaXDirtyBuffer settings for your 4GB memory system, I presume those recommended in the Virtuoso Performance Tuning guide at:

Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-10 Thread Ivan Mikhailov
On Fri, 2011-06-10 at 02:10 +0200, Robbet wrote: Hi Ivan, thank you! Looks gut ... First one seems to work as a Sparql query. syntax error at bif:strstr before ( FILTER ( BOUND(bif:strstr (?label, ?title) ) But it works without the BOUND keyword. I'm sorry, there should be

Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-10 Thread Robbet
Hi Ivan, i'll try this. My whole query would be like: /Select ?title ?label v Where {?s dc:title ?title; dc:created ?created./ // /?dbpedia rdfs:label ?label FILTER (bif:strcontains (?title, ?label))/ /?dbpedia foaf:name ?name }

[Virtuoso-users] bif:contains - using a string variable as search term

2011-06-09 Thread Robbet
Hello, actually i'm trying to find a solution to compare two string variables (exact match of the string and if one variable contains the other). Is it possible (in any way) to use the bif:contains function in this case? Like /variable1 bif:contains variable2/ (or the other way round) ?

Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-09 Thread Ivan Mikhailov
Robert, bif:strstr (?haystack, ?needle) will return an zero-based position of of ?needle in ?haystack, or NULL if not found [1]. Thus FILTER (BOUND (bif:strstr (?haystack, ?needle))) is what you need. For similar future needs, note FILTER (BOUND (bif:strcasestr (?haystack, ?needle))) Recent