A while back, Kevin Williams pointed out to me that certain web sites could be searched in Google Chrome using the syntax <ur> query in the address bar. For example, once I have been to youtube.com, I can later type in youtube to initiate a search query.

Pressing tab, give you a spot to enter your query or you can just type a space and put in your keyword.

As someone that does a lot of work with SharePoint Enterprise Search, this got me thinking. I want my SharePoint site to show up in my browser too. I did some research and discovered this is part of OpenSearch and that I can achieve the same result with any OpenSearch compatible search engine (which SharePoint is), so I knew this would be relatively easy to research. I figured this kind of thing might already be included in SharePoint 2010 (and maybe it is and I just haven’t found it), but from what I can tell it’s not. If anything, you can use this technique in SharePoint 2007 as well. If this file is auto generated somehow, I would love to hear about it.

To get started, you must first create an XML file which describes where to point search queries on your web server. The filename does not matter (search.xml in my case). The syntax is pretty simple, but there are a couple of things to watch out for. I started with Microsoft’s description of how to create a file on MSDN. However, it appears there is an issue in the documentation (or maybe something changed in a different version). The issue I saw is that on the URL element, it says you an attribute called format. I could not get this to work so I looked at working examples on site and discovered they had the attribute listed at type. The other issue I ran into in this file is apparently the ShortName element cannot have capital letters in it. Here is what my entire file looks like for my server called sp2010.

The ShortName element specifies the keyword to type into Chrome to prompt you to do a search (i.e.: youtube.com up above, sp2010 in our case). You need to already have a search center created. In my case I have a site called Search and I will point to a results page in there called results.aspx. You will change this according to your environment. For browser based search results, we use a type of text/html. We use the keyword URL syntax here so the browser passes in what you searched for as the {searchTerms} token to the k query string parameter. You will notice I have a second Url element present. This is here in case you want to use this same while to do Windows 7 federated search. I’ll talk briefly about that in the end, but it uses the path to the RSS feed of your search results. You can also include a custom image icon with the search results as well along with many other things. Read the MSDN article for more information on what you can put in this file.

The next thing we need to do is put this XML file somewhere on the SharePoint server. You can just open SharePoint designer and drag it to the root of the server or put it in a document library somewhere. It doesn’t matter as long as you know the URL to it. The next thing we have to do is put a link tag in your master page file specifying where this XML file is. You should normally deploy master pages via solution package and feature, but for today’s purposes, I just opened SharePoint Designer and customized v4.master (gasp!). Remember v4.master is the new default master page for sites running on v4. Add the following line somewhere in the head tag and change the URL to your XML file.

Remember to check the file in when you are done. One thing to point out about SharePoint 2010 is that it won’t serve up some file type directly to the browser (it forces a download). I think this may cause issues, so at the suggestion of @danluciano, I changed the browser file handling of my Web Application in central admin (Central Admin –> Web Applications –> General Settings). It’s set to Strict by default and I changed it to Permissive. You don’t need to worry about this in SharePoint 2007. Honestly, it may work in SharePoint 2010 without changing this but when I was running into issues getting things working earlier this seemed to be a possible issue. If you try it without, let me know. :-)

At this point, if you did everything right, you should be able to use your new keyword in Chrome after visiting your SharePoint site. Here is what mine looks like after type in sp2010.

Hitting enter I get my usual search results page.

I think this is pretty cool. You should be able to use this in other browsers as well such as IE8, but I really like how Chrome handles it. Now I mentioned Windows 7 federated search. You can take the file you created above, save it to your desktop as .odcx file extension and install it. What makes this possible is the second URL element we specified using the application/rss+xml type.

You will see the following prompt.

When you open Windows Explorer, it will show your SharePoint site in the list of Searches. It also adds it to your favorites.

Clicking on the SP2010 search connector here allows us to search the SharePoint site directly. You will be prompted for authentication if necessary. Executing the same search query above looks like this.

Clicking on any of the links takes you directly to SharePoint. Remember you can implement this now with SharePoint 2010 or SharePoint 2007. It’s definitely cool and another great way to get data out of SharePoint.

Corey Roth, a SharePoint Server MVP, is an independent consultant specializing in Cloud technologies such as Azure and Office 365. He also specializes in mobile development. Corey serves as the product manager for two cloud-first mobile app platforms: BrewZap and HappenZap.

Cloud Expo

Cloud Computing & All That
It Touches In One Location Cloud Computing - Big Data - Internet of Things
SDDC - WebRTC - DevOps
Cloud computing is become a norm within enterprise IT.

The competition among public cloud providers is red hot, private cloud continues to grab increasing shares of IT budgets, and hybrid cloud strategies are beginning to conquer the enterprise IT world.

Big Data is driving dramatic leaps in resource requirements and capabilities, and now the Internet of Things promises an exponential leap in the size of the Internet and Worldwide Web.

The world of SDX now encompasses Software-Defined Data Centers (SDDCs) as the technology world prepares for the Zettabyte Age.

Add the key topics of WebRTC and DevOps into the mix, and you have three days of pure cloud computing that you simply cannot miss.

Delegates will leave Cloud Expo with dramatically increased understanding the entire scope of the entire cloud computing spectrum from storage to security.

Cloud Expo - the world's most established event - offers a vast selection of 130+ technical and strategic Industry Keynotes, General Sessions, Breakout Sessions, and signature Power Panels. The exhibition floor features 100+ exhibitors offering specific solutions and comprehensive strategies. The floor also features two Demo Theaters that give delegates the opportunity to get even closer to the technology they want to see and the people who offer it.

Attend Cloud Expo. Craft your own custom experience. Learn the latest from the world's best technologists. Find the vendors you want and put them to the test.