none
Search files in specific document libraries

    Question


  • My site contains multiple document libraries.

    I need to have a way to allow my users to only search for documents located in specific libraries (those libraries will be set by me).

    I am assuming that I need to use the Content Search WebPart but I have not found a way to only search specific libraries.

    Saturday, January 25, 2014 7:24 PM

Answers

  • you can use search box webpart and  search result webpart in the search result webpart you can edit the query and you can put the same filtration along with {searchboxquery} 

    you can also create result source which reference the set of document libraries you want and set it to be the source of your search result webpart 


    Hope that helps|Amr Fouad|MCTS,MCPD sharePoint 2010

    Saturday, January 25, 2014 10:08 PM

All replies

  • you can use the ListID managed property 

    ListID:first_list_id ListID:second_list_id 

    or PATH managed property 

    PATH:http://server:port/Document1/* PATH:http://server:port/Document2/*
    



    Hope that helps|Amr Fouad|MCTS,MCPD sharePoint 2010

    Saturday, January 25, 2014 8:29 PM
  • I was wrong thinking that I should use the Content Search WebPart  because the user needs to enter the criteria for the files(s) to be found.

    I guess I need to use a Search WebPart that can search multiple doc libraries based on a user request.

    How can I do this?

    Saturday, January 25, 2014 9:51 PM
  • you can use search box webpart and  search result webpart in the search result webpart you can edit the query and you can put the same filtration along with {searchboxquery} 

    you can also create result source which reference the set of document libraries you want and set it to be the source of your search result webpart 


    Hope that helps|Amr Fouad|MCTS,MCPD sharePoint 2010

    Saturday, January 25, 2014 10:08 PM
  • Thanks Amr

    you can use search box webpart and  search result webpart in the search result webpart you can edit the query and you can put the same filtration along with {searchboxquery}  >>>> this works perfectly

    you can also create result source which reference the set of document libraries you want and set it to be the source of your search result webpart >>>> this would work only if I change my site default source to this new created result source

    Sunday, January 26, 2014 5:12 PM