<div class="gmail_quote">On Mon, Feb 28, 2011 at 8:32 AM, Sebastian Trüg <span dir="ltr">&lt;<a href="mailto:trueg@kde.org" target="_blank">trueg@kde.org</a>&gt;</span> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div></div><div>On 02/27/2011 02:32 PM, Ignacio Serantes wrote:<br>
&gt; Hi!<br>
&gt;<br><br>
</div></div>That is why I wrote the query API. It handles all that for you and is<br>
optimized. There is no need for you to try to solve all the SPARQL<br>
problems again.<br></blockquote><div><br></div><div>I will add support to API in my query system so all this questions will be solved analyzing sparql queries created with the API.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>&gt; But the really big problem is with relation ontologies like nao:hasTag.</div><div>
&gt; In this particular case query is &quot;?x nao:hasTag ?y . ?y nao:identifier<br>
&gt; ?z . FILTER(?z)&quot;, so you need a inner join and you do the real filter in<br>
&gt; nao:identifier but this is not applicable to all relations. Some light<br>
&gt; about this stuff are welcome.<br>
<br>
</div>Actually the query should look like this:<br>
?r nao:hasTag ?t . ?t nao:prefLabel ?l . ?l bif:contains &quot;foobar&quot; .<br>
And that is why I can only stress: use the query API. This is why I<br>
wrote it. :)<br></blockquote><div><br></div><div>Yes, this was my first approach but when I found how to obtain identifier and I prefer to use it for unicode security and because identifier looks like a more generic property than prefLabel. In my test results sets are the same so I continue to use identifier.</div>


<div><br></div><div>About bif:contains, I do some test with filter() and bif:contains and I found that the second has penalty costs. I wrote the same query with both versions and found that results are always fast using filter() so I stop using bif:contains. Probably this was casual but, for precaution I write my builder using Filter().</div>


<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Cheers,<br>
Sebastian<br>
_______________________________________________<br>
Nepomuk mailing list<br>
<a href="mailto:Nepomuk@kde.org" target="_blank">Nepomuk@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/nepomuk" target="_blank">https://mail.kde.org/mailman/listinfo/nepomuk</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Cheers,<div>Ignacio</div><div><br></div><br>