none
Search file names in document libraries RRS feed

  • Question

  • I have been asked to configure the search functionality on our companies SP2010 Foundation site so it is easy to find files by searching for part of the words in the file name. 

    Right now, when someone enters the file name as a search string the results will not show the actual file but rather views in document libraries that holds that file (one of many files) or other files which content is refering to the file we are searching for. 

    How should one go around to configure the search engine to simply search for the file names of the documents in document libraries and then return the search result with links to those files?

    I would guess that it is a easy change somewhere but I have not managed to find it.

    I did use the sharepoint 2010 foundation search which I later upgraded to search server 2010 express with the hope that the setting would be available there. It did not help me though.

    Tuesday, April 2, 2013 11:44 AM

Answers

  • Look for the Basic:10(Text) crawled property. Make sure you check the "include values for this property in the search index" this enables you to just type in the value of the file name to search. Make sure this crawled property is mapped to the FileName managed property. Make sure the files you are searching for, that there extension is included in the "File Types". After all this do a full crawl and try again.

    Blog | SharePoint Field Notes Dev Tool | ClassMaster

    Tuesday, April 2, 2013 10:03 PM
  • http://technet.microsoft.com/us-en/library/hh134087

    You can modify the configuration of the managed property 
    Filenameor use OOTB.

    Filename managed property
    OOTB returns the name of the files but also Title column of lists
    Usage:In thesearch box, type
    Filename:sometext

    You can use another managed property. Example:

    Filename:Docu Fileextension:ppt

    This will keep the lists


    Miguel de Hortaleza

    Thursday, April 4, 2013 3:20 PM
  • Hi AndersObserve,

    By default SharePoint only crawls major versions of files as content access account should only have read permission to SharePoint content. This means content access account cannot index the draft versions. Therefore, items properties displayed on search result are the contents being indexed and security trimmed based on content access account, but once users click the link to view the details, SharePoint shows the contents according to current user’s permission.

     

    To get consistent contents for editors, you can enable "Any user who can read items" for Draft Item Security section or grant edit permissions to content access accounts. This will allow all users to see latest draft items on search result but this time readers may have a similar issue. 

    For more information, see

    http://social.msdn.microsoft.com/Forums/en-US/sharepointsearch/thread/972636f3-1971-42fb-b708-85f955741793

    http://sharepointconnoisseur.blogspot.com/2011/04/why-sharepoint-2010-search-does-not.html

    Best Regards.


    Kelly Chen
    TechNet Community Support

    Wednesday, April 10, 2013 1:48 AM
    Moderator
  • Hi AndersObserve,

    I understand this cannot be configurable, by default, search only crawl approve major version documents, the drafts documents are not crawled. This behavior can be altered in Document Library Settings -> Versioning Settings -> Draft Item Security. Choose the top radio button, "Any user who can read items". This will allow all users to see draft items including the crawling account. However, if the last major version being modified, then it will return the latest minor draft version.

    Best Regards.


    Kelly Chen
    TechNet Community Support

    Thursday, April 11, 2013 2:03 AM
    Moderator

All replies

  • You can use the Keyword Query Language to just search titles:

    http://msdn.microsoft.com/en-us/library/ee558911(v=office.14).aspx

    KQL will work if entered manually, I've automated it in Advanced Search customisation but I can't remember if it's possible to set it to be the default for normal search boxes or normal search results.

    Tuesday, April 2, 2013 6:12 PM
  • Look for the Basic:10(Text) crawled property. Make sure you check the "include values for this property in the search index" this enables you to just type in the value of the file name to search. Make sure this crawled property is mapped to the FileName managed property. Make sure the files you are searching for, that there extension is included in the "File Types". After all this do a full crawl and try again.

    Blog | SharePoint Field Notes Dev Tool | ClassMaster

    Tuesday, April 2, 2013 10:03 PM
  • http://technet.microsoft.com/us-en/library/hh134087

    You can modify the configuration of the managed property 
    Filenameor use OOTB.

    Filename managed property
    OOTB returns the name of the files but also Title column of lists
    Usage:In thesearch box, type
    Filename:sometext

    You can use another managed property. Example:

    Filename:Docu Fileextension:ppt

    This will keep the lists


    Miguel de Hortaleza

    Thursday, April 4, 2013 3:20 PM
  • Thank you for the help!

    It seems like my searches only finds approved documents. Could that be because the crawling account is lacking some permissions or similar?

    What are the suggested permission for the search account to be able to see all files in document libraries that do not have any special permissions?

    Tuesday, April 9, 2013 1:43 PM
  • Hi AndersObserve,

    By default SharePoint only crawls major versions of files as content access account should only have read permission to SharePoint content. This means content access account cannot index the draft versions. Therefore, items properties displayed on search result are the contents being indexed and security trimmed based on content access account, but once users click the link to view the details, SharePoint shows the contents according to current user’s permission.

     

    To get consistent contents for editors, you can enable "Any user who can read items" for Draft Item Security section or grant edit permissions to content access accounts. This will allow all users to see latest draft items on search result but this time readers may have a similar issue. 

    For more information, see

    http://social.msdn.microsoft.com/Forums/en-US/sharepointsearch/thread/972636f3-1971-42fb-b708-85f955741793

    http://sharepointconnoisseur.blogspot.com/2011/04/why-sharepoint-2010-search-does-not.html

    Best Regards.


    Kelly Chen
    TechNet Community Support

    Wednesday, April 10, 2013 1:48 AM
    Moderator
  • Thank you for the response. The last link confirmed the behaviour that I experience now, i.e. only documents which have the current version as approved are indexed. The problem for us is that we would like to find all documents that have had an approved version any time in the past.

    Since the users with only read permission are able to see the latest major version even though it might exist a more recent minor version, I would expect that the crawl would examine those older major versions. It does seem like the crawl is skipping any major versions that are not the last version though.

    Is this configurable or do I just have to stick with it?

    Wednesday, April 10, 2013 11:41 AM
  • Hi AndersObserve,

    I understand this cannot be configurable, by default, search only crawl approve major version documents, the drafts documents are not crawled. This behavior can be altered in Document Library Settings -> Versioning Settings -> Draft Item Security. Choose the top radio button, "Any user who can read items". This will allow all users to see draft items including the crawling account. However, if the last major version being modified, then it will return the latest minor draft version.

    Best Regards.


    Kelly Chen
    TechNet Community Support

    Thursday, April 11, 2013 2:03 AM
    Moderator
  • Hi All,

                        I have requirment which search can crawl last modified document in query results in search center.

    example :

    #1 . Doc1. doc   Effective Date (Metadata column) modfied on April 24 th 2013  ---->first version.

    #2. Doc1. doc  Effective Date (Metadata column) modfied on April 24 th 2013 ---->updated and check-in.

    #3. Doc1. doc   Effective Date (Metadata column)  modfied on April 25 th 2013   -> this is latest record check-in.

    When query the doc1.doc it shoud return #2 , #3 results.in other word for the same doc1.doc it should return two records one latest another most recent historical version of doc1.doc version.

    Could you please share your thoughts on it how to achieve search results.

    Thanks

    Ramesh


    • Edited by RameshSP Wednesday, April 24, 2013 3:21 PM
    Wednesday, April 24, 2013 3:05 PM
  • Steve,

    I tried the suggested solution above while trying to configure the search functionality on SharePoint 2013 to only return results for the file name searched and not a bunch of all other files that have the key search word in their body. In Basic:10 Title (Text), and Filename (text) are already added mappings but the "Include In full-text index"  which is currently unchecked) is grayed out. Let me know what would be the settings to change.

    Thanks

    John

    Tuesday, October 20, 2015 7:46 PM