[Nepomuk] Re: First problems with query API

Ignacio Serantes kde at aynoa.net
Thu Mar 3 20:04:11 CET 2011

On Wed, Mar 2, 2011 at 12:28 PM, Sebastian Trüg <trueg at kde.org> wrote:

> > So you actually want this:
> >
> > select ?r where { { ?r ?p1 ?v1 . ?v1 bif:contains "A" . } UNION { ?r ?p2
> > ?v2 . ?v2 bif:contains "B" . } UNION { ?r ?p3 ?v3 . ?v3 ... } . }"
> >
> > ? Are you sure?
> Ignore that. You mean that what you want is this:
> select ?r where {
>  ?r ?p1 ?v1 . ?v1 bif:contains "A" .
>   ?r ?p2 ?v2 . ?v2 bif:contains "B" .
>   ?r ?p3 ?v3 . ?v3 ...
> }
> Yes and no :).
Yes: this kind of functionality could be needed at search level and your API
seems to support it using AddTerm().
No: you can't transform this kind of search in this kind of query because is
crazy :).

When you told me that I must use the API, I did a try and found this
problem. You can't add a class with a constructor that supports 6 terms but
if you use it you crash DBMS or, when you use more than 3 terms dbms
freezes, at least with my data. I don't need to explain you the reasons why
this kind of stuff must be controlled at API level ;).

By the way, as always I need to do more tests, understand how db is
organised and where users need to do a search before I obtain conclusions
that could be useful to you but, sadly, I'm very short in free time and
Ksoprano is useful but annoying. I think I must write my own tool to work
with sparql and be more productive.

I have other mail pending with a couple of suggestions about building
queries and dbms, but I need some time to prepare it and verify that my
optimizations are reliable with additional test. I will try to respond you
this weekend.

> ?
> Cheers,
> Sebastian
> _______________________________________________
> Nepomuk mailing list
> Nepomuk at kde.org
> https://mail.kde.org/mailman/listinfo/nepomuk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/nepomuk/attachments/20110303/8a72f43a/attachment.htm 

More information about the Nepomuk mailing list