Windows Client TechCenter > Windows 7 Forums > Windows 7 Miscellaneous > Windows 7 search - not returning file contents
Ask a questionAsk a question
 

QuestionWindows 7 search - not returning file contents

  • Tuesday, November 03, 2009 4:07 PMEdpocket08 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I just upgraded my Laptop from Vista to 7. Great. I just have problems when I try to search files. It seems that is searching ONLY the names of the files and not the content.

    I have at least three files "word documents .doc" with the word "ancestry". If I open "windows explorer" and i type "ancestry" in the search box i get: "No items match your search". In the address box says: "Search Results in My Documents".

    I have tried the following:

    1. Create a new .doc document with the word “ancestry” and save it in the same directory. After some minutes the file appears in the Search results box. Good.
    2. Open the original file with the word "ancestry" and make some changes and save it again. Nothing. It doesn't work.
    3. Open the original file with the word "ancestry" and save it with other name. Bingo! It appears.

    -I have checked the "indexing options dialog box" and it says "indexing complete"
    -I have also used the option "delete and rebuild index" and it doesn't work. Once the indexing process is finished and rebooted the computer, I typed "ancestry" and nothing, not even the new files I just created.

    The same happens with all kind of files. I just get results if the name of the file contains the word I am looking for.

All Replies

  • Tuesday, November 03, 2009 7:38 PMRob.Ford Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Yes, a few of us have had some fun with file content searching :-)

    You search for something that you know has the specified string and nothing is found.

    Check these:

    1. Control Panel -> Folder Options -> Search, select "Always search file names and contents...". This will search contents in unindexed locations (it will be slower).
    2. Control Panel -> Indexing Options -> Advanced -> File Types. Add any file types you need to search on here. For example, I had to add .vb. These indexing options appear to affect searching, too. If a file type is not in the indexing list, even if you select the option in step 1, search won't return any results.
    3. Check for the "I" attribute on files and folders that return no results. In may case, this somehow got set on my redirected "My Documents" folder and nothing was returned here in searches until I removed it.

    Hope this helps...
  • Tuesday, November 03, 2009 11:10 PMEdpocket08 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thanks.

    1. I did what you said in number 1 and it doesn't work. ("alwyas search files names and contents" is now on)
    2. I verified that the File Types (.doc in this case) is on and set to index file content.
    3. i don't know what "I" attribute is.

    I just want to search content in Microsoft Word Files. It shouldn't be so difficult.

  • Wednesday, November 04, 2009 4:52 AMRob.Ford Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi, sorry it didn't work for you, I and many others agree, this should not be so difficult but Microsoft appear to be struggling on this and see it differently, surprise, surprise.

    The "I" attriubute can be seen in two ways, from a command prompt via the ATTRIB command:

    C:\>attrib Documents
            I    C:\Documents

    where I is "Not content indexed file attribute."

    or

    Via explorer, right-click properties of the file or folder, Advanced, "Allow files in this folder to have contents indexed in addition to file properties".

    Or, use the "Brute force" method that derosnec added, that will always work!

  • Thursday, November 05, 2009 3:16 AMEdpocket08 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    All my folders and files in My Documents folder are set to Allow files to have contents indexed.
  • Thursday, November 05, 2009 9:47 AMShaon ShanMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Try right click on the file, choose Properties --- Permission, check if Administrators group and your current account are in the list. If so, check if both have "Full Control" permission.

    Or you can just copy all files to another folder, delete current files and move copied files back to help reset permission.
  • Thursday, November 05, 2009 11:32 AMEdpocket08 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Yes. Both have "full control".

    Maybe this info is useful:

    I went to the file and opened it. Make some slight changes. Saved it and Closed it. Bingo! now if i look whatever word in THAT file i get the result. I know, I can open each file, modify it and save it. Yes, I have thousands of files. And, it works for a period of time. If I rebuild the index for example, searching stops working with all the files again!
  • Monday, November 09, 2009 10:11 AMShaon ShanMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    How about copy these files to another folder? It seems like a permission issue as after re-saving or move the file, they will back to index.
  • Monday, November 09, 2009 6:48 PMRob.Ford Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Shaon, searching is flawed, we shouldn't have to fiddle with it and kick, it should just work!
  • Tuesday, November 10, 2009 4:25 AMEdpocket08 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    How about copy these files to another folder? It seems like a permission issue as after re-saving or move the file, they will back to index.

    I moved all the files from one folder to another. Now it works. I just get the files in the new folder but not in the original. I have looked at the permissions and I don't see any difference between the original file and the new one, though. I am not convinced that it is a permission issue.

    Do I have to move all my folders to make searching work?

    Another little problem is that I think I am supposed to see the string I was searching for in the piece of text that it shows with every file but this is not the case. Always I get the first words of the file.

    In any case, thanks for this advice.
  • Tuesday, November 10, 2009 6:59 AMShaon ShanMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Glad to hear that we find a workaround. If you would like to test more on this, try modify the permission such as delete Administrators group, Apply and re-add it back to see if issue still exists.

    Note: Incase we change it incorrect, backup may be needed.

  • Tuesday, November 10, 2009 7:05 AMRob.Ford Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Argh! Shaon, will someone at Microsoft please just admit that Windows search does not work?

    It should simply find what you enter, without all the pain, checking settings, fiddling around with it and praying!

    P.S. I have had no faith whatsoever in searching on Windows since around XP. It didn't work then and it still does not work now!
    • Edited byRob.Ford Tuesday, November 10, 2009 7:11 AMadded
    •  
  • Tuesday, November 10, 2009 9:57 AMShaon ShanMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Rob,

    It should work so I'm trying to confirm with you to see if we can find out the cause. Meanwhile I will report this issue to see if there is any known solution.
  • Tuesday, November 10, 2009 5:00 PMEdpocket08 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I don't know how to delete Administrators group. What I did was to add a user with full access to the original folder. it doesn't work.
  • Tuesday, November 10, 2009 9:36 PMRob.Ford Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Shaon, there are quite a few of us in these forums who are reporting that searching does not work in Windows 7. Searching on text strings that you know exist finds no results, for example. I have some shortcuts on my Start Menu that are never found for another example. I have had no faith in searching file contents since XP. Same problem, enter a string for a content search, no results. Open the file, there is your searched string.

    The bottom line is that this should work out of the box and it doesn't.

    Here's one example of what I am talking about:

    1. I search my networked home drive (H:\) (which is not indexed) for all files containing "createoject" which I know exists in many .VBS files.
    2. Absolutely no results are returned after about a 2 minute search completes.
    3. I change my indexing options (which should not affect searching except for speed) and I add .vbs files to be indexed.
    4. Rerun the search (and remember that H:\ is not indexed) - the results are now found.

    This is just one example of the problems with Windows Search.

    The problem is even worse on servers when you are searching for critical strings in log files. It says "no results" and you just can't trust it.
    • Edited byRob.Ford Tuesday, November 10, 2009 9:53 PMAdded example
    •  
  • Wednesday, November 11, 2009 3:51 PMvisdtm Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Yes, it is maddening.  For example, I have a text file containing the string "hospitalDischargeStatus".  If I search for "hospital", "hospitalDischarge", or "hospitalDischargeStatus", the file is found.  But, I cannot search for "Discharge" or "DischargeStatus" - nothing is found.  It seems you cannot search for embedded or trailing strings.  Does search recognize wildcard characters that I have not yet discovered?
  • Wednesday, November 11, 2009 9:20 PMRob.Ford Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Try typing it out  s-l-o-w-l-y  one character at a time, and watch what happens.    ;)


    Very good :-)

    Visdtm, yes, i have noticed this, too, especially on the Start Menu, you type something, like "console", results are found, type "sole", nothing at all!

  • Saturday, November 14, 2009 5:10 PMkayut Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have exactly the same problem.

    And this is true too:

    I went to the file and opened it. Make some slight changes. Saved it and Closed it. Bingo! now if i look whatever word in THAT file i get the result. I know, I can open each file, modify it and save it. Yes, I have thousands of files. And, it works for a period of time. If I rebuild the index for example, searching stops working with all the files again!

    What is the solution? changing to Google Desktop??
  • Monday, November 16, 2009 8:19 AMShaon ShanMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    How about go to Control Panel --- Index Options --- Advanced, change the Index Location to another folder (not on system partition).

    Meanwhile, try disable security programs such as firewall, antivirus program to see the result.
  • Monday, November 16, 2009 11:36 PMRob.Ford Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    What is the solution? changing to Google Desktop??

    Yes, that always works
  • Thursday, November 19, 2009 2:51 AMEdpocket08 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    How about go to Control Panel --- Index Options --- Advanced, change the Index Location to another folder (not on system partition).

    Meanwhile, try disable security programs such as firewall, antivirus program to see the result.

    (Not in system partition) I think I have only one partition in my hard disk.
  • Thursday, November 19, 2009 3:01 AMEdpocket08 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    What is the solution? changing to Google Desktop??

    Yes, that always works

    I am using Google Desktop but Google doesn't recognize .docx files (the new format of Word 2007) and I have a lot of files in that format.