[Kde-pim] KMail/Akonadi searching
Christian Mollekopf
chrigi_1 at fastmail.fm
Thu Jan 19 00:43:12 GMT 2012
Hey,
I spent today to improve the searching situation a bit, but couldn't fix all
problems yet. It's a more of a workaround than a real fix as you can see but at
least basic searching works this way. A better solution will need changes in
some more places and probably nepomuk-core available (As I don't really feel
like copying more stuff from the nepomuk repository).
Additionally to nepomuksearchengine I also fixed nepomuksearch, although I
don't know if it is used at all (I also haven't tested this part).
I also added on commit to kdepim (cbd7a8777a4bfd89125be4cf58e276b51388adc5)
which quotes the search string, because otherwise a searchpattern consisting
of several words is not interpreted as one pattern but rather the AND-
conjunction of each individual word.
Apart from the current solution being a rather ugly hack, there also exist two
other problems:
- The search collection is indexed and then searched which is probably not
what we want. If somebody can tell me how to determine the search collection
(by some attribute or so) I could exclude it from the feeder. Another option
would be to exclude it by adding a IndexPolicyAttribute to the search
collection.
- Each query gets somehow executed twice. I can't see the call twice on the
kmail side, but on the akonadi-server there are always two queries, no idea
why.
Apart from those issues and the feeder not having indexed all emails here it
works pretty well. The search itself seems pretty fast: ~1-3 seconds for a
query resulting in a small result set, which searches through fulltext/and
headers in ~80000 indexed emails. If the result set is large filling the table
seems to be much more of a bottleneck than the actual query.
If the attached fixes are applied to akonadi and we manage to exclude the
search collection, we'll have at least half-way decent searching in 4.8.
Cheers,
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-the-akonadiItemId-property-to-get-the-item-id.patch
Type: text/x-patch
Size: 15413 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20120119/7d92b8ed/attachment.bin>
-------------- next part --------------
_______________________________________________
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