Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In sharepoint how can a search be limited to current folder in a doc library?

Tags:

sharepoint

We have a large document library with 3000+ folders. Our customer wants to be able to search within the current folder. Because this document library has a lot of folders creating one scope per folder is out of question. So the question is: How can a search be limited to current folder in a doc library?

Thanks

like image 274
Houda Avatar asked Feb 11 '09 19:02

Houda


People also ask

How do I restrict a SharePoint search?

Here is how you can restrict the SharePoint search to fetch results only from the specific content source. In Add Result Source page, Provide a Name to the Result Source and optionally a description. Leave the option buttons for Protocol as “Local SharePoint” and Type as “SharePoint Search Results”.

How do I make a folder not searchable in SharePoint?

On the List Settings page, under General Settings, click Advanced settings. In the Search section, under Allow items from this document library to appear in search results, select Yes to include all of the items in the list or library in search result or No to exclude all items from search results.

Can you restrict access to a folder in SharePoint?

Open the list or library that contains the folder, document, or list item, on which you want to edit permission levels. Click the drop-down menu to the right of the folder, document, or list item on which you want to edit permission levels, and then click Manage Permissions.

Can you search a document library in SharePoint?

By typing a phrase up here, SharePoint will show you a selection of files and folders that are related to your search query. For example, if you type "Security" into the search bar, SharePoint Online will show you documents with Security in the title, content, or metatags.


3 Answers

Off hand I would say that you would need to implement a custom search feature and access the Search API directly. More importantly is that you seem to be suffering from a case of FileShareism. I've seen many a SharePoint implementation suffer and die from this affliction.

like image 116
webwires Avatar answered Oct 12 '22 01:10

webwires


If you want to limit to a document library:

This is already built in. When you are viewing a document library, the search box in the upper right defaults to "This List: NameOfDocLib". Searching here will limit the scope to the document library.

If you want to search individual folders:

This is built in to windows. Use the built in windows explorer search.

Tell your customers to open the folder in explorer view. Right click on your folder you want to search and select search.

Don't tell your customer that this was all built in. Take credit for it. Profit! :)

@webwires I agree about the 3000 folders. You should really think about breaking that out into multiple document libraries.

like image 42
Brian Bolton Avatar answered Oct 11 '22 23:10

Brian Bolton


What worked for me, was really fine-tuning my search scope. Made sure that I was using "include" as a behavior type. Then setting my web address (non-secure URL), to the document library folder I wanted to crawl.

I knew things were golden after the 15 minute crawl as I noticed my item count was greater than 0!

I then made sure that my web page (which was a search center site now converted into a v4 template), was able to have my search box web-part on it, and redirect search results to a results.aspx page under the same sub site.

like image 39
klewis Avatar answered Oct 12 '22 01:10

klewis