In order to improve this blog I am constantly monitoring activity reports provided by Google Analytics. Few days ago I noticed that someone came to my blog by using the following keywords:

  • add wikipedia searchbox webpart to sharepoint
  • add google search bar to sharepoint

The query seemed interesting and here are some possible solutions:

Solution 1. – Federated Search

With Infrastructure Update Microsoft introduced a new feature for Search. Federated Search allows you to display results from any search engine that supports Open Search standard. Results are being displayed in the right column.

Microsoft offers a number of connectors for various search engines including Live.com, Wikipedia, MSDN and other. Unfortunately Google does not support Open Search.

Federated Search is also available for Microsoft Search Server 2008.

Solution 2. – Custom Search Web Parts

I created three simple web parts (nothing fancy, a bit of JavaScript and HTML) that allow you to easily initiate Search from a SharePoint page.

The following search engines are supported:

  • Google
  • Live.com
  • Wikipedia

You can download these from my SkyDrive.

6 Comments

  1. Mark Says

    The Wiki search worked fine in my Sharepoint site, but can the code be modified to open the search results in a new window.

  2. Toni Frankola Says

    @Mark: Yes. Just modify the default Javascript with something like this: http://webdesign.about.com/od/javascript/a/aa030600c.htm

  3. Mike F Says

    To open in a new window, use the following changes:

    Replace

    window.location.href = ‘http://www.google.com/search?q=’ + document.getElementById(‘QueryGoogle’).value;

    with

    window.open (‘http://www.google.com/search?q=’ + document.getElementById(‘QueryGoogle’).value, ‘newwindow’, config=’height=1000,width=3000, toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes,location=yes, directories=yes, status=yes’);

    Thanks Toni! Saved me tons of time.

  4. Ashli Says

    Hi, I want to try using these, but how do I deploy these web parts so I can use them with just the .dwp file? can you help please?

  5. Toni Frankola Says

    @Ashli: Just upload files to your web part gallary and that’s it.

  6. Ashli Says

    Thanks for the help! These are great! Do you have any more web parts to share?

Leave a Reply