How Windows Search determines what results to show?

0

What is the precise behavior of Windows Search? Is it searching for only files it considers documents? Or only in some directories, no matter what root directory was specified by the user?

Example: I'm searching for "msbuild" from "C:\". Windows Search finds:

  • a bunch of "MSBuild.exe.log" in the local settings from the previous Windows installation ("C:\Windows.old\Users\…").

  • a bunch of "MSBuild.exe.log" in a directory it's unwilling to show the name; I haven't verified all of them, but I checked some, and the directory points again to the local settings of the previous Windows installation, just a different user.

The following directories or files are missing from the search results, while being in C:\ and having sufficient permissions to be read:

  • C:\Program Files\MSBuild
  • C:\Program Files (x86)\MSBuild
  • C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild
  • C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
  • C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe.config

Why Windows Search is unwilling to show those files? What is the criteria? Is there a way to show all the matches in search results?

Note: when Windows Search receives some help from the user, it works as expected. For example searching "msbuild" from "C:\Windows\Microsoft.NET\Framework" shows the results. Weird.

Arseni Mourzenko

Posted 2013-04-27T08:04:05.123

Reputation: 1 700

Answers

0

Windows Search builds a search index that contains all the information of the files that are in specific paths. Those paths include by default the folders that contain personal data, such as Documents, Music, Images and so on. Moreover, Windows Search focuses on document files rather than application files, because those are the documents that are more likely to be searched by a standard user.

The reason why you can't find MSbuild in the paths that you have written, is that those are not indexed paths. Making a search there requires more time as the search engine must crawl the file system and not a cached index file. By default, Windows Search fill show the results that appear in indexed paths. It should also warn you that search in non-indexed paths may be slow.

When you search directly in C:\Windows\ you obtain the expected results because C:\Windows doesn't have any indexed subfolders, so Windows Search does a standard filesystem search.

You can configure Windows Search options under the Indexing Options entry in the Control Panel to include custom paths. Notice that the more files are indexed, the bigger the index file gets and the slower will the searches be (on a decent new computer this shouldn't be a problem anyway)

In Windows 8, there is a tab with options in the Ribbon interface of Windows Explorer that might help you get the expected results.

The Windows help website contains information on the search features.

Pincopallino

Posted 2013-04-27T08:04:05.123

Reputation: 947

When I look at Indexed Locations, "C:\Windows.old" is not marked as indexed. However, the results from this directory appear in search. So there should be an additional criteria involved. – Arseni Mourzenko – 2013-04-27T08:39:58.203

The results are in C:\Windows.old\Users.... The Users folder is indexed by default. As the Windows.old folder refers to an older installation of Windows, its Users subfolder might still be marked as an indexed folder somehow. – Pincopallino – 2013-04-27T11:30:22.060

I checked. The folder is not marked as indexed. If I remember well, the list of directories to index is stored in a central location, and not in the attributes of a directory, so it would be strange for new Windows to go and index something from the old installation. – Arseni Mourzenko – 2013-04-27T13:35:15.957

@MainMa: In Folder Options / Search tab, is the Include system directories option selected?

– Karan – 2013-04-27T15:08:13.053

@Karan: yep, it's already checked. – Arseni Mourzenko – 2013-04-27T15:27:05.597

@MainMa I've made the same search on my desktop and all the results appear, including the ones that you are reporting as missing. My Windows search has the default options, but I don't have any Windows folder. Notice that the results from non-indexed paths appear after some time, depending on the speed of your computer and the amount of data on the hard disk. So if you don't get those results, then there is something wrong with your configuration. Forcing an index rebuild might help – Pincopallino – 2013-04-28T08:19:06.013