poboiko created this revision.
poboiko added reviewers: Baloo, Frameworks.
poboiko requested review of this revision.

REVISION SUMMARY
  In case a config was changed, we need to:
  
  1. Stop the ContentIndexer (bug 373430)
  2. Remove all scheduled indexing of files that should not be indexed
  3. Check for stale index entries. Those includes documents marked for 
indexing, that should be removed
  
  (because of that we need to do it inside `scheduleIndexing` before content 
indexing)
  
  4. Finally, check for unindexed files (if new files were added)
  
  (based on D15939: Perform checks for unindexed files and stale index entries 
on startup <https://phabricator.kde.org/D15939>). Also note that `IndexCleaner` 
should clean all files, not just those inside `includeFolders`

TEST PLAN
  Seems to be working. But it would be nice to test it more.
  
  1. Add large folder to config. `baloo_file` start indexing it.
  2. Add it to exclude list. `baloo_file` stops indexing it, and removes 
entries from DB.
  3. Remove it from exclude list. `baloo_file` starts indexing it again.

BRANCH
  update-config (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D15983

AFFECTED FILES
  src/file/fileindexscheduler.cpp
  src/file/fileindexscheduler.h
  src/file/indexcleaner.cpp
  src/file/mainhub.cpp

To: poboiko, #baloo, #frameworks

Reply via email to