Question

I have created the Search Service Application and my Search is working fine. But my current requirement is I need to search for documents within a specific Document Library. Currently my search result page shows all the results from the whole site. My requirement is to show a documents from a single document library. How can I achieve this.

Était-ce utile?

La solution

Create a search scope and give URL for your specific document library only in the rule.

For details please check this link.

Help Link

Update: For SharePoint 2013 you need to create a Results Source and configure query to search in particular library only and configure your Search Results WebPart to use your Results Source.

Please check this link

Autres conseils

In addition to creating a result source (search scope), you can also simply provide the relevant query text directly in the search result web part of your search page. (See below).

NOTE: Be sure to include quotation marks around the URL path, I could not get it work otherwise.

{searchboxquery} path:"https://siteURL.com/DocumentLibraryName/*" 

For multiple locations, simply add them with a space delimiter.

{searchboxquery} path:"https://siteURL.com/DocumentLibrary1/*" path:"https://siteURL/DocumentLibrary2/*" path:"https://siteURL/DocumentLibrary2/*"

enter image description here

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top