I'm a software developer who was asked to help out with some Sharepoint 365 stuff. We have several large document libraries and as you can imagine it can be difficult searching. We have a lot of column data and these columns are the primary means of searching. Yes, you can currently search these. The problem is that the search feature also includes the content of the file. We'd like to only search for the column data and find the appropriate file that way. Is there a method to stop the search from searching within files?


1 Answer 1


I think your best option is to create a new Result Source that looks only into the meta data columns you want it to be searched up on.

I would recommend you try it for one column (using the query editor) and subsequently add other fields into the query.


Once this is done you can modify the search webpart to look into the new result source.

  • I see where you are going and I've been looking into this. However, it seems like this adds extra steps to the user. We just want people to go to the document library and be able to search any of the metadata columns. Really wish there was a way to just turn off searching within the word documents themselves. Seems like it should be a simple solution.
    – Coder
    Oct 20, 2017 at 18:21
  • This can still be achieved. You should drop a search box webpart on top of the library view. Then configure it to search only the library (You can exclude searching in the file content using query editor and use only MetaData in the query.. Oct 20, 2017 at 18:34
  • Also you can go to the library settings -> Advanced Setting to force a reindex on that library.. this will hopefully enable searching across the metadata Oct 20, 2017 at 18:37
  • How would I drop a search web part in the document library page? Using the modern UI, I feel like there are limited options. When I go to the classic view and open the 'Library' ribbon, 'Web Parts' is disabled.
    – Coder
    Oct 20, 2017 at 18:41
  • hmm.. i can't try this now... another option is to create a new page.. then add search box and then add the library webpart. Oct 20, 2017 at 18:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.