This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How do I reindex a single folder in Kmail?

Tags: None
(comma "," separated)
piedro
Registered Member
Posts
374
Karma
1
OS
Hello!

This is on kmail 4.14.

How can I reindex a single folder in kmail?
The "reindex folder" option has been removed, so how do I do it now?

thx, p.
User avatar
einar
Administrator
Posts
3402
Karma
7
OS
The question is, why do you want to reindex it? (honest question) Did the indexing miss some messages?


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
wolfi323
Registered Member
Posts
1129
Karma
11
OS
You can enable/disable indexing for each folder separately in the "Folder Properties" dialog (right-click on the folder and select "Folder Properties", you can find the indexing option on the "Maintenance" tab).

I suppose disabling indexing for a particular folder should remove all indexed data and re-enabling it afterwards should reindex the folder (but I'm not sure).
piedro
Registered Member
Posts
374
Karma
1
OS
THx for your help!

@einar:
I want to reindex because I had the hope that my mails will then show up on my harddrive.
I have a folder "Archive" in my "Local Folders", I imported about 15000 mails. STill the folder
".local/share/local-mail/Archive" doesn't hold any mails.

Neither does ".local/share/.local-mail.directory/.Archive.directory"...
(I know there's always the three subfolders "cur", "new" and "tmp" and these are empty in the above cases!)

Now the only solution to make the files appear seems to be to create a second folder "Archive2" within "Local Folders" in kmail and let kmail copy all mail from "Archive" to "Archive2". After that I get all 15000 mails as individual files in
".local/share/local-mail/Archive2/new"... After deleting "the folder "Archive" within kmail and then renaming "Archive2" to "Archive" my mails are physically on my harddrive in ".local/share/local-mail/Archive/new" as expected...

This is a very clumsy workaround but since noone seems to know where the mail is physically stored after an import I have to assume that the files are cashed somehow by akonadi or the Kmail Importer. I do trust none of the two and I want to be able to create physical backups with rsyncing my "local-mail" folder to my NAS. Just in case kmail messes up (I know that this is highly unlikely given the rocksolid, stable perfomance of Kmail/akonadi over the last years and the soon to come smooth transition to KDE 5 but you know I am rather safe than sorry....)

BTW: Reindexing the folders doesn't help with this, but still I am grateful to know what it does and how to force it...

thx again, piedro
piedro
Registered Member
Posts
374
Karma
1
OS
@wolfi321

I ahve a local folder with 14840 mails, the "maintainance" tab shows me that 10006 mails are indexed.
Removing the index tick mark and reapplying it later does not remove the old index - it comes up again at 10006 items.

So I guess your suggestion does not work,
sry, p.
piedro
Registered Member
Posts
374
Karma
1
OS
Now I checked all the maintance tabs of my kmail folders. It seems like none of the folders is indexed completely.

How can I fix that, as I checked just reenabling indexing per folder doesn't change anything. Do I have to restart this akonadi_baloo_indexer thing somehow?

Now the whole seraching for mails with virtual folders is completely useless if the mails aren't completely indexed.

Does anyone ever test these KDE features at all? It is not that I have such a highly customized system...

thx, piedro
wolfi323
Registered Member
Posts
1129
Karma
11
OS
piedro wrote:I want to reindex because I had the hope that my mails will then show up on my harddrive.
I have a folder "Archive" in my "Local Folders", I imported about 15000 mails. STill the folder
".local/share/local-mail/Archive" doesn't hold any mails.

Well, that's totally unrelated to indexing.

Your problem seems to be that Akonadi is/was not able to write back the mails to your actual mail folders. So some of them are only in the Akonadi cache.
No idea how to investigate or fix that though.
AFAIK, there's no way to force Akonadi to sync again.

Copying to another folder might be a workaround.

There are bug reports open about that AFAIK, please search on bugs.kde.org or wait for a better answer from somebody more knowledgeable about the inner workings of Akonadi.

piedro wrote:Now I checked all the maintance tabs of my kmail folders. It seems like none of the folders is indexed completely.

How can I fix that, as I checked just reenabling indexing per folder doesn't change anything. Do I have to restart this akonadi_baloo_indexer thing somehow?

I'd say remove ~/.local/share/baloo/email, and all your mail should be reindexed again then.
piedro
Registered Member
Posts
374
Karma
1
OS
"Copying to another folder might be a workaround."

It does work - I am doing it all the time only way to fix it....

"There are bug reports open about that AFAIK, please search on bugs.kde.org or wait for a better answer from somebody more knowledgeable about the inner workings of Akonadi."

I have to disagree on this one... I always search the bug list... and it turns out that there are hundreds of bugs on akonadi and kmail, lots of them are way too old to matter, because too much changed, others can't be recognized because the desription does not really help, most of them are unconfirmed... (meaning nobody is working on them, I guess)

Maybe I misuse the search function on bugs.kde.org but I rarely come up with really related bugs...
Also I do think that akonadi will be dropped soon, so I have no trust in someone fixing akonadi as is ...
I guess workarounds are our best option at the moment and I think the forums here is the best place to find them or post them.

About the reindexing: I tried that before the deleting of the .../baloo/email folder, I get some reindexing but it seeems never to finish completely which, as mentioned, makes searching quite useless. Which is a shame because the searching improved so much after using the baloo based approach...

Well, I have to give up, I guess,
thx anyway, piedro
User avatar
einar
Administrator
Posts
3402
Karma
7
OS
Also I do think that akonadi will be dropped soon, so I have no trust in someone fixing akonadi as is ...

There are no plans on dropping Akonadi. The storage mechanism is changing, but it won't get dropped.

Also, you can delete the cache by using akonadiconsole -> browser -> right click on the folder you want -> clear akonadi cache.


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
piedro
Registered Member
Posts
374
Karma
1
OS
thx for clearing that up.

Deleting the akonadi cache of a folder, does this mean it recaches the folder then or is there anything lost?
Well I am lost here but that doesn't count I guess....

thx for helping,
piedro
wolfi323
Registered Member
Posts
1129
Karma
11
OS
piedro wrote:Deleting the akonadi cache of a folder, does this mean it reccaches the folder then or is there anything lost?

If some mail of that folder is not yet written back to the maildir (or whatever) and only in the cache, it is lost if you do that.
So I wouldn't recommend it in your case.

Regarding the bugreports: I read them, so I know they are there.
They might not be separate reports about exactly this problem (probably only mentioned in other bugreports), or maybe I just read about them on one of KDE's mailinglists.
I'm not sure at the moment, I'll have to search myself...

And as einar already mentioned, Akonadi is not going to be dropped at all.
It is to be redesigned from scratch (without a central server AIUI), but that will take some time.
For the foreseeable future (i.e. at least the current year probably), the current Akonadi will be used.

As Akonadi is intended to be a cache (and a framework for applications) anyway, it shoudn't matter.
Unless there are problems like you experience, that the cache is not synced back to the actual store...
piedro
Registered Member
Posts
374
Karma
1
OS
thx wolfi321.

So as it seems everything should work allright if I get that sysncing problem figured out.

I'll create a new thread for this as I think this leads too far from the original question.
If you don't mind would you care to have a look into this one:

viewtopic.php?f=215&t=125036

thx everyone,
p.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], Yahoo [Bot]