Document Library search result customisation RRS feed

  • Question

  • Hi All,

    I manage a sharepoint environment in which the need has arisen to customize search. So far there seems to be available options to customize the global search functionality. On the other hand to do the same at the local level is what I am finding difficult.

    I am trying to customize searching within a document library such that when ever I use the Search box available in document libraries for a site the result types should only be of filename type only. By default when you specify a phrase in the document library search box SharePoint searches by both filename and content of the files in the library.This is frustrating to users as the results confuses most of my users.

    So please, I would be very thankful if anyone can suggest a way in which I can achieve the mentioned objective.



    Thursday, October 6, 2016 8:28 PM

All replies

  • Hi,

    Yes, SharePoint search component parses document contents, which makes document contents searchable.

    It’s hard coding to customize library build-in search, and you need to create a custom solution. Or you can set document contents non-searchable, which would affect results in search center (if users want to search document by document contents).

    Thus, I recommend a simple workaround: type “title:<search term>” in search box in library. It will show only filename type in search results.

    For example:

    Best Regards,

    Dean Wang


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, October 7, 2016 2:18 AM
  • Hi Dean,

    Thanks for the feedback. I have suggested the option for using Title: or Filename but unfortunately my users feel it a hassle to do that and not just intuitive. It's frustrating that microsoft would makeit difficult to customize document library search boxes but make it easy to customize the global search.Logically I would think searching in a confined area would mean making applicable search boxes in libraries more tailored.

    Thanks  anyway.


    Monday, October 10, 2016 3:29 PM