<table><tr><td style="">poboiko created this revision.<br />poboiko added reviewers: Baloo, Frameworks.<br />poboiko requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D15983">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>In case a config was changed, we need to:</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">Stop the ContentIndexer (bug 373430)</li>
<li class="remarkup-list-item">Remove all scheduled indexing of files that should not be indexed</li>
<li class="remarkup-list-item">Check for stale index entries. Those includes documents marked for indexing, that should be removed</li>
</ol>

<p>(because of that we need to do it inside <tt style="background: #ebebeb; font-size: 13px;">scheduleIndexing</tt> before content indexing)</p>

<ol class="remarkup-list" start="4">
<li class="remarkup-list-item">Finally, check for unindexed files (if new files were added)</li>
</ol>

<p>(based on <a href="https://phabricator.kde.org/D15939" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">D15939: Perform checks for unindexed files and stale index entries on startup</a>). Also note that <tt style="background: #ebebeb; font-size: 13px;">IndexCleaner</tt> should clean all files, not just those inside <tt style="background: #ebebeb; font-size: 13px;">includeFolders</tt></p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Seems to be working. But it would be nice to test it more.</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">Add large folder to config. <tt style="background: #ebebeb; font-size: 13px;">baloo_file</tt> start indexing it.</li>
<li class="remarkup-list-item">Add it to exclude list. <tt style="background: #ebebeb; font-size: 13px;">baloo_file</tt> stops indexing it, and removes entries from DB.</li>
<li class="remarkup-list-item">Remove it from exclude list. <tt style="background: #ebebeb; font-size: 13px;">baloo_file</tt> starts indexing it again.</li>
</ol></div></div><br /><div><strong>BRANCH</strong><div><div>update-config (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D15983">https://phabricator.kde.org/D15983</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/file/fileindexscheduler.cpp<br />
src/file/fileindexscheduler.h<br />
src/file/indexcleaner.cpp<br />
src/file/mainhub.cpp</div></div></div><br /><div><strong>To: </strong>poboiko, Baloo, Frameworks<br /></div>