Skip to main content

SharePoint search on local file drive - Why and How

A team member asked me why in some situation we need to use SharePoint search on local file drive as we can do 'search' directly on the folder in windows. I think it is necessary to do some research to show why and why the benifit is to do this. And more importantly - HOW.

 

WHY?

If you've played around with SharePoint local file search the answer is straight-forward:
  • You can let it search multiple local file drives, but using windows you can hardly do this.
  • SharePoint can search 'into' the real content even the keyword is in content of files in zip file. See the comparison I did a search for keyword 'issue':
  •  
    • Window built-in search:
    • SharePoint search:
  • SharePoint search can easily filter the result by type/date etc.
  • SharePoint can show a bit of content from the files found to give a bit more indication.
  • ...

HOW 

It's hard to find a step-by-step guide talking about how to make it work. That's why here I am:-)
 
  1. Go to the folder you want to add as a search source, right mouse down and then click "properties"
  2. In "Sharing" tab, click "Share" and define the accessability
  3. Open SharePoint central admin, go to Application Management->Managed Service Application->Search Service Application->Content Source
  4. Click "New Content Source", specify "Content Source Type" as "File Shares", use the share folder path e.g. //mycomputer/myfolder
  5. Save and run full crawl
  6. In "Scopes", add your newly created content source as a scope. After you save it will trigger a timer job to complete the setting of scope, generally takes 15 mins.
  7. After that the new local folder content source is ready for search!
Now create a search center. and then
 
  1. in "site settings", go to "Search scopes", add the newly created scope into search.
1,2,3 go! you can search your local drive now!

Comments

Popular posts from this blog

A Step-by-Step guide to use HttpModule in SharePoint with SPContext

I guess you must be familiar with what is HttpModule and how can we leverage it for our web applications. But if not, better have a good read of this article . SharePoint is built on top of .NET, so it has all the rights to use the beauties of .NET. Here I want to demo a simple case of httpmodule on SharePoint. Say if in a company it has lots of site collections and user 'Picky Docky' has access for all of them, for a reason farm administrator want to block him for one of the specific site without change his SharePoint permissions. Here are the steps to do it:-)   Create a empty SharePoint solution add a class file to it named  CustomSecurityModule.cs , code as below Create a feature and scope to "WebApplication" Create a feature receiver. Code as below When activate the feature it will create a modle in the web.config file for the SharePoint web applicaiton you deployed to as below: Enjoy!

Gist

If you want to embed source code (e.g. C#, HTML..) to your blog post I recommend to use Gist https://github.com/ . Especially if you want to give your readers the opportunity to copy and paste your code.

A SharePoint 2013 weather web part

I created a nice SharePoint 2013 weather web part. It has extremely simple code-behind and so easy for you to use or extend.  The core is using Yahoo! Weather Feed Plugin for jQuery Please go to https://weatherwebpartsp2013.codeplex.com/  to grab it. It is free with all the source code. Enjoy!