[kdepim-users] How to disable mail indexing with Akonadi search
Martin Steigerwald
martin at lichtvoll.de
Mon Feb 8 15:43:08 GMT 2016
Am Montag, 8. Februar 2016, 16:21:02 CET schrieb Martin Steigerwald:
> Am Montag, 8. Februar 2016, 10:15:55 CET schrieb Daniel Vrátil:
> > On Saturday, February 6, 2016 7:35:17 PM CET Martin Steigerwald wrote:
> > > Back in Baloo times it was easy to disable mail indexing. But with
> > > Akonadi
> > > Search which as I understand is basically a renamed Baloo for mail stuff
> > > I
> > > didn´t find a way yet. Can one disable it?
>
> […]
>
> > You can prevent the Indexer from starting by modifying /usr/share/akonadi/
> > agents/akonadindexingagent.desktop, unsetting "AutoStart" capability.
>
> Thank, Dan. I think that would be at the self-compiled location for me.
>
> Okay, found it as akonadiindexingagent.desktop :). I didn´t find any
> Autostart parameter in there, so I set "Autostart=false".
Okay, after I found that "Autostart=false" didn´t work to prevent the agent
from starting, I found
38 X-Akonadi-MimeTypes=text/directory
39 X-Akonadi-Capabilities=Unique,Autostart
40 X-Akonadi-Identifier=akonadi_indexing_agent
and removed "Autostart" from capabilities and it still autostarts.
I looked a bit in the akonadi-search repo, file scheduler.cpp. And I think I
may have a chance with
71 //Trigger a full sync initially
72 if (!group.readEntry("initialIndexingDone", false)) {
73 qCDebug(AKONADI_INDEXER_AGENT_LOG) << "initial indexing";
74 QMetaObject::invokeMethod(this, "scheduleCompleteSync",
Qt::QueuedConnection);
75 }
setting initialIndexDone to true in some config file. Hmmm, still baloorc!?
And its set there already: initialIndexingDone=true
So I don´t get why it reindexes all the stuff again.
61 KConfig
config(Akonadi::ServerManager::addNamespace(QStringLiteral("baloorc")));
62 KConfigGroup group = config.group("Akonadi");
Okay, I at least found where it initializes a complete sync:
130 void Scheduler::scheduleCompleteSync()
But I bet the changes to access maildir items without storing them into DB
initially need to be done in maildir resource, not in indexing. But I can at
least check whether it respects the "do not index" this folder setting. I told
it to leave my biggest folders alone, yet still it hogs down my system like
crazy.
Hmmm, it seems it continues with Akonadi::CollectionFetchJob which seems to be
a method of Akonadi and I bet from there it calls into Maildir resource,
stuffes the results into the database and then… at some expires them again.
I think with some help I can at least get a basic understanding how it works.
I know some C, but not C++.
Thanks,
--
Martin
More information about the kdepim-users
mailing list