Hi<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>&gt; Yes but aide system is missing, I filled a bug about this in<br>

</div>&gt; <a href="http://kde-apps.org" target="_blank">kde-apps.org</a> &lt;<a href="http://kde-apps.org" target="_blank">http://kde-apps.org</a>&gt;, when I write a new text queries<br>
<div>&gt; don&#39;t work at all and dolphin do a file name search and seems like<br>
&gt; logical &quot;and&quot; is totally broken. This behavior is not really useful to<br>
&gt; me :).<br>
<br>
</div><a href="http://kde-apps.org" target="_blank">kde-apps.org</a> is not really a place to file bugs. They will never get<br>
noticed. Please use <a href="http://bugs.kde.org" target="_blank">bugs.kde.org</a>.<br></blockquote><div> </div><div><div>Oh, sorry, I done a mistake when I wrote this. I naturally filled the bug in <a href="http://bugs.kde.org" target="_blank">bugs.kde.org</a> :).</div>




<div><br></div><div><a href="https://bugs.kde.org/show_bug.cgi?id=266307" target="_blank">https://bugs.kde.org/show_bug.cgi?id=266307</a> </div></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





As for the Dolphin search: I am not happy with it either. It will<br>
hopefully be better in 4.7.<br></blockquote><div><br></div><div>Fortunately this is an easy task, any change in the current system will be and improvement.</div><div><br></div><div>In my case, I&#39;m totally happy with KDE 4.5 behavior, a simple but powerful input box with auto completion (or aide system). It was marvelous when you pressed &quot;a&quot; and you could saw all things that begins with &quot;a&quot;. It&#39;s a powerful system that don&#39;t bothers people that don&#39;t understand it and could be disabled with a simple configuration check if really bothers someone.</div>




<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
</div></div>In theory it already is a bit multi-language. We only need translations<br>
for the ontologies. Sadly every attempt at providing those translations<br>
failed for different reasons.<br></blockquote><div><br></div><div>I hope you are referring to the parser and not the real ontology in the DB :). Seems an easy task because you only need to translate a few words so, obviously, if your past attempts failed I&#39;m missing something.</div>




<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>&gt; About aide system I&#39;m really interested in implement something similar<br>
&gt; so, where I can found this code?. I barely read C/C++ but I will do my best.<br>
<br>
</div>What do you mean by &quot;aide system&quot; anyway? Auto-completion?<br></blockquote><div><br></div><div>Yes I mean auto completion, sorry for the confusion. This aide was marvelous and KDE 4.5 was a quantum leap to Nepomuk and the main reason I begin to use in daily basics. In other KDE versions I tried very hard but I finally was frustrated so I deactivated it. For me, a database without queries is garbage. Well, the external disk management is other big problem but I wrote my own solution so actually don&#39;t bothers me so much and I assumed that I will lost all my data time to time.</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>&gt; At least I have one thing clear, an alternative search system written in<br>
&gt; python ready to use when official query systems are broken could be a<br>
&gt; great addition.<br>
<br>
</div>Why do you generate SPARQL directly instead of using the query API[1]?<br>
That would be much simpler for you and make for better readable code.<br></blockquote><div><br><a href="http://api.kde.org/4.x-api/kdelibs-apidocs/nepomuk/html/namespaceNepomuk_1_1Query.html" target="_blank">http://api.kde.org/4.x-api/kdelibs-apidocs/nepomuk/html/namespaceNepomuk_1_1Query.html</a></div>



<div><br></div><div>Well this in an interesting question. In my experience nepomuk query system is not reliable and, when I finally understand some of this stuff and do my first tests I found insuperable barriers. I think that I tried this, or something similar, example:</div>



<div><br></div><div><span style="color:rgb(83, 83, 83);font-family:&#39;Bitstream Vera Sans&#39;, &#39;Lucida Grande&#39;, &#39;Trebuchet MS&#39;, sans-serif;font-size:13px"><pre style="display:block;margin-top:0.3em;margin-right:0.3em;margin-bottom:0.3em;margin-left:0.3em;padding-top:0.3em;padding-right:0.3em;padding-bottom:0.3em;padding-left:0.3em;font-size:1em;font-family:Courier, &#39;Courier New&#39;, &#39;Andale Mono&#39;, Monaco, monospace;color:rgb(0, 0, 0);background-color:rgb(249, 249, 249);background-repeat:initial initial">

<a href="http://api.kde.org/4.x-api/kdelibs-apidocs/nepomuk/html/classNepomuk_1_1Query_1_1LiteralTerm.html" title="Match literal properties via full text." style="padding-bottom:0px;text-decoration:none;color:rgb(0, 87, 174)" target="_blank">Nepomuk::Query::LiteralTerm</a> nepomukTerm(<span style="color:rgb(0, 32, 128)">&quot;nepomuk&quot;</span>);
<a href="http://api.kde.org/4.x-api/kdelibs-apidocs/nepomuk/html/classNepomuk_1_1Query_1_1Query.html" title="A Nepomuk desktop query." style="padding-bottom:0px;text-decoration:none;color:rgb(0, 87, 174)" target="_blank">Nepomuk::Query::Query</a> query( nepomukTerm );</pre>



</span></div><div><br></div><div>and I spend several hours reading until I found that I need to call to Soprano.LiteralValue(). Actually is pretty clear to me what was the problem but, a couple of weeks ago was a little bit annoying :).</div>

<div><br></div><div>When I finally have a working version I tried the next test:</div>

<div><br></div><div>term = Nepomuk.Query.LiteralTerm(Soprano.LiteralValue(&quot;música&quot;))</div><div>query = Nepomuk.Query.Query(term)</div><div><div>model = Nepomuk.ResourceManager.instance().mainModel()</div><div>data = model.executeQuery(sparqlQuery, Soprano.Query.QueryLanguageSparql)</div>



</div><div><br></div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>et voilà, I have no results for &quot;música&quot;. Code was working with ascii strings but with non ascii string didn&#39;t works. On the other side, using the API I only saw one column, the URI and this was the end.</div>



<div><br></div><div>But today, because your mail and because I learn a lot in last weeks, I tried API again and I found that both problems could be solved easily:</div><div><br></div><div><div>term = Nepomuk.Query.LiteralTerm(Soprano.LiteralValue(unicode(&quot;música&quot;, &#39;UTF-8&#39;)))</div>



<div>query = Nepomuk.Query.Query(term)</div><div>sparqlQuery = query.toSparqlQuery().replace(&#39;distinct ?r&#39;, &#39;distinct ?r ?r*&gt;nie:url AS ?url ?r*&gt;nao:prefLabel AS ?prefLabel&#39;)</div></div><div><br></div>



<div>the problem with unicode was solved converting strings using unicode() function and the columns problem was solved with a simple replace, in previous example I added columns ?url and ?prefLabel. I&#39;m not sure if I missed something an there is other method to do this stuff.</div>

<div><br></div><div>So, with a new API available I do a couple of test with a simple search to compare and here is the results (time = creation + execution + visualization):</div><meta http-equiv="content-type" content="text/html; charset=utf-8">

<div><br></div><div>search: &quot;película&quot;</div><div><div><div>105 results found in 9.35717892647 seconds (API with columns ?$r ?r*&gt;nie:url AS ?url)</div></div></div><div><div>105 results found in 8.65342307091 seconds (API with columns ?r)</div>

<meta http-equiv="content-type" content="text/html; charset=utf-8"></div><div><div>108 results found in 1.45403599739 seconds (nsSparqlBuilder with colums ?r ?url ?prefLabel ?title)</div></div><div><br></div><div>Both results are accurate because I search in the url field and I have three entries with the word &quot;película&quot;. There is 108 folders in total.</div>

<div><br></div><div>search: &quot;música&quot;</div><div><div>896 results found in 8.5596601963 seconds (API with columns $r ?r*&gt;nie:url AS ?url ?r*&gt;nao:prefLabel AS ?prefLabel)</div><div>896 results found in 9.21140098572 seconds (API with column ?r)</div>

<div>868 results found in 1.5461499691 seconds (nsSparqlBuilder with colums ?r ?url ?prefLabel ?title)</div><div><br></div><div>Both results are accurate because I have 29 tags related to &quot;música&quot; (nsSparqlBuilder don&#39;t shows this entries) and one folder with the word música (API don&#39;t shows this entries). There is 867 files and 30 tags related in total.</div>

<div><br></div><div>An important fact is that first API query, the one with more columns is more, fast that the second one and this was probably because virtuoso query optimizers are working better with the first query. I&#39;m only speculation of course. For sure I repeat both queries several times :).</div>

<div><br></div></div><div>As you could see time difference is high, and I spend some milliseconds testing if file exists, but I need more than two test to obtain valid conclusions. Obviously you are trying to extract more data than me and this always has a penalty cost. On the other side I don&#39;t tried FileQuery class yet and probably must be fast.</div>

<div><br></div><div>I&#39;m planning to improve my builder next weekend but I changed my mind and I will add support to this API because is an easy task and it will be terrific method to build test cases.</div><div><br></div>

<div>Thank you for your support.</div><div> </div></div>-- <br>Cheers,<div>Ignacio</div><div><br></div>