[Nepomuk] Re: Presentation, queries and other stuff
kde at aynoa.net
Tue Mar 1 15:29:32 CET 2011
On Tue, Mar 1, 2011 at 9:17 AM, Sebastian Trüg <trueg at kde.org> wrote:
> query = Nepomuk.Query.Query(term)
> sparqlQuery = query.toSparqlQuery().replace('distinct ?r', 'distinct ?r
> > ?r*>nie:url AS ?url ?r*>nao:prefLabel AS ?prefLabel')
> oh no, please don't!
> If you want additional variables use Query::addRequestProperty or
This is the method I looking for but I don't found it, thank you :). If I
have time this night I will do a try.
> > function and the columns problem was solved with a simple replace, in
> > previous example I added columns ?url and ?prefLabel. I'm not sure if I
> > missed something an there is other method to do this stuff.
> Replacing like that is ugly ugly hacking. You either use the approaches
> I mention above or you use Nepomuk::Resource which you get from the
For sure that is an ugly one ;).
> The reason that it is a bit slower are additional tests that are done.
> Your query will also return "hidden" resources like ontololy properties
> and classes.
Well yes, a "bit" :), I see API generated queries and I need to study them
to learn because my approach is not the same yours. I need to improve my
queries because I have a barely knowledge about how data is stored and this
is bad, know things like nao#userVisible are mandatory. I look for a
document about Nepomuk db structure but I don't found it. Is there one?. Db
has stored procedures that can be used?
My primal goal was, with the sources of data I'm using: custom data, strigi
and bangarang, obtain accurate result sets in a weekend or reinstall KDE
4.5, so I was not worried about doing things well or fast. This goal is
achieved so I must look for new goals, like doing things well and fast.
> This is another reason to stick with the query API. If performance could
> be improved it should be done in the query API instead of rewriting
> something new. That way all applications can benefit from the
There is no discussion about this, any query improvement must be added to
API obviously. Are you using a specific db to test?. Use the same data will
be a great help to writing test cases, compare result sets, performances and
found methods to optimize queries.
> BTW: which version of KDE are you using here?
openSUSE with Upstream release aka. KR46 (KDE SC 4.6) packages, but three
weeks ago I was using KDE 4.5 Upstream version.
> Nepomuk mailing list
> Nepomuk at kde.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Nepomuk