4

I have 2 big folders "Projects" and "Studies" with lots of SVN and some GIT projects inside. I had to disable indexing for them entirely, because, due to the sheer amount of files in .svn and .git folders, the quick search in the Start Menu worked very slowly, rendering it useless (and I really use that feature).

The problem is, that since these folders are explicitly excluded from indexing not even regular "slow" file searching works in them and this is quite annoying. And I really need the ability to search my project folders.

Manually excluding each .svn and .git folder could be a solution, but it would be unmaintainable, because there's really many of them.

Can you guys suggest anything? Thanks in advance.

1

2 Answers 2

5

I haven't tried this, but I found an MSDN article "What is included in the index?" (https://msdn.microsoft.com/en-us/library/windows/desktop/bb266513%28v=vs.85%29.aspx). I was hoping that the list of exclusions would give some indication of how you might expand. But then I saw one of the comments, which looks directly applicable:

Excluding by wildcard

For those interested, you can modify these defaults and add your own by turning off the search service, modifying the registry and restarting the service. The applicable keys are located here:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search\CrawlScopeManager\Windows\SystemIndex\

Any overrides you specify show up in the WorkingSetRules key. This supports wildcards so you can exclude, say, node_modules, .git .svn, etc. from search indexing. tswaters 8/1/2015

So you might want to give that a shot.

3
  • 1
    Looking through my default values in that key, I see that INCLUDE=0x00000000, and URL can include * as wildcards, for example URL=file:///C:\Users*\AppData\Local\Temp* (excluding all user's Temp files), and another as URL=file:///*\System Volume Information* (so it can exclude SystemVolumeInformation from any drive or directory). So probably adding a new WorkingSetRules by copying from one of those rules, but setting URL=file:///*\.svn* should do the trick. You probably also need to update WorkingSetRules\ItemCount to include your new rules.
    – PeterCJ
    Nov 23, 2015 at 19:36
  • 3
    Thanks man, it actually worked. The search is still quite slow though. I wonder how guys who made Everything achieve so unbelievable indexing and searching speeds. It indexed my whole computer in a matter of 2-3 minutes and it searches it in real time as I type - absolutely unmatched by the native Windows search. It's a pity that you can't hook a custom search engine to the Windows native search interface.
    – KotBehemot
    Nov 24, 2015 at 14:07
  • @KotBehemot My Windows Search Index is also unbelievably fast, this time around. It used to much slower on a different machine. I think it boils down to the search index database choking on patterns it does not like, which end up causing the slowness. All the more important to have a way to exclude everything irelevant from global indexed search, such as .git, node_modules and other innards.
    – Leeroy
    May 26, 2020 at 8:42
0

The Windows Search Index can be managed programmatically.

You can exclude folders from the Search Index using the following patterns :

  • file:///C:\*\packages\ matches a folder named "packages" and its content
  • file:///D:\*\obj\ matches a folder named "obj" and its content

I tested these patterns successfully under Windows 11 21h2.

More info in this answer on how it's done

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .