5

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

3 Answers 3

6

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.

2
  • No need for custom search feature. This is all built in. Feb 12, 2009 at 20:57
  • I would call that more of a work around and not necessarily "built in" but it certainly gets the job done. It all depends on if it satisfies the customers requirements as some organizations will demand a consistent interface for searching.
    – webwires
    Feb 17, 2009 at 17:46
2

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.

1
  • wow, was my answer really that bad to deserve a -1? I just presented the no-cost solution and I get voted down. strange. :/ Feb 15, 2009 at 18:05
1

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.

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.