[Kde-pim] Porting StdAddressBook to Akonadi does not work as Akonadi::ContactSearchJob returns no results

Cristian OneČ› onet.cristian at gmail.com
Wed Feb 6 08:03:17 GMT 2013


Hi,

I'm having problems replacing the deprecated StdAddressBook API with
the new Akonadi::ContactSearchJob API (in KMyMoney) as it's
recommended here [1]. The problem is that it does not work as expected
since the ContactSearchJob returns no results with Nepomuk disabled.
This dependency is not mentioned in the porting guides that I've read
so it's a bit frustrating since I had Nepomuk turned off due to the
often recurring 100% CPU usage issues.

At this point I went on and enabled Nepomuk together with the email
indexer. I waited for the indexer to finish it's initial indexing.
Then ran the ContactSearchJob again. This time the search by email
query took about 1 minute of 100% CPU usage from Nepomuk (I have 45
contacts in my address book) but again without any results. Even tried
to run the 'Search contact by email' query from the Akonadi console
but all I've got on Akonadi's output was 'QStringList
Akonadi::NepomukSearch::search(const QString&) Calling blockingQuery()
failed! '.

Since I suspect that there is something wrong with my setup (KDE 4.9.5
on Gentoo) I've searched for similar issues and found that KMail's
auto completion does not work either [2].

From there I've found out that in 4.10 KMail will be able to perform
the auto completion without Nepomuk [3]. I've tried a similar approach
which works as expected without any issues. The only thing that
bothers me is that you need to iterate over all contacts to find the
one that you are looking for (having the email of the KDE user
obtained with IdentityManager). Anyway for my 45 contacts this works
as expected and a lot faster then the whole Nepomuk indexing engine.

I'm writing this mail because I've tried yesterday (without success)
on #akonadi to get some hints about what could be wrong with Nepomuk
on my setup. Maybe I could provide valuable information to fixing [2]
I just need to know where to look.

About searching trough the contacts in Akonadi without Nepomuk [3]. Is
it OK to use it in non-KDEPIM applications? Isn't there an easier way
to obtain the Akonadi:Item using the email address? Do you see some
performance issues in this approach? I would prefer this approach
since it works with Nepomuk disabled which is a possible scenario (the
user can do it from SystemSettings).

Thanks,
Regards,
Cristian OneČ›


[1] https://blogs.kde.org/2010/06/19/akonadi-porting-application-developers
[2] https://bugs.kde.org/show_bug.cgi?id=259949
[3] https://projects.kde.org/projects/kde/kdepim/repository/revisions/1a6588fa84377b4d5b016c122379b882bf095457
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list