Welcome!

Microsoft Cloud Authors: Janakiram MSV, Yeshim Deniz, David H Deans, Andreas Grabner, Stackify Blog

Related Topics: Microsoft Cloud, Cognitive Computing

Microsoft Cloud: Blog Feed Post

How to: Create an OpenSearch Provider for SharePoint

Certain web sites can be searched in Google Chrome using the syntax <ur> query in the address bar

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.

ChromeOpenSearchYouTube

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

ChromeOpenSearchYouTube2

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.

<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">

<ShortName>sp2010</ShortName>

<Description>sp2010</Description>

<Url

type="text/html"

method="get"

template="http://sp2010/search/results.aspx?k={searchTerms}" />

<Url

type="application/rss+xml"

method="get"

template="http://sp2010/_layouts/srchrss.aspx?k={searchTerms}&amp;start={startIndex}&amp;cnt={count}" />

<Image height="16" width="16" type="image/vnd.microsoft.icon">http://sp2010/_layouts/images/favicon.ico</Image>

</OpenSearchDescription>

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.

<link rel="search" type="application/opensearchdescription+xml" href="/XmlLibrary/search.xml" title="SP2010" />

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. :-)

WebApplicationGeneralSettingsFileHandling

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.

ChromeOpenSearchSharePoint

Hitting enter I get my usual search results page.

OpenSearchResults

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.

OpenSearchInstallODCX

 

You will see the following prompt.

OpenSearchConnectorPrompt

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

Windows7FederatedSearchList

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.

Windows7FederatedSearch

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.

Read the original blog entry...

More Stories By Corey Roth

Corey Roth, a SharePoint Server MVP, is a consultant at Hitachi Consulting specializing in SharePoint and Office 365 for clients in the energy sector. He has more than ten years of experience delivering solutions in the energy, travel, advertising and consumer electronics verticals.

Corey specializes in delivering ECM and search solutions to clients using SharePoint. Corey has always focused on rapid adoption of new Microsoft technologies including Visual Studio 2013, Office 365, and SharePoint.

He is a member of the .NET Mafia (www.dotnetmafia.com) where he blogs about the latest technology and SharePoint. He is dedicated to the community and speaks regularly at user groups and SharePoint Saturdays.

@ThingsExpo Stories
High-velocity engineering teams are applying not only continuous delivery processes, but also lessons in experimentation from established leaders like Amazon, Netflix, and Facebook. These companies have made experimentation a foundation for their release processes, allowing them to try out major feature releases and redesigns within smaller groups before making them broadly available. In his session at 21st Cloud Expo, Brian Lucas, Senior Staff Engineer at Optimizely, will discuss how by using...
In this strange new world where more and more power is drawn from business technology, companies are effectively straddling two paths on the road to innovation and transformation into digital enterprises. The first path is the heritage trail – with “legacy” technology forming the background. Here, extant technologies are transformed by core IT teams to provide more API-driven approaches. Legacy systems can restrict companies that are transitioning into digital enterprises. To truly become a lead...
SYS-CON Events announced today that Yuasa System will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Yuasa System is introducing a multi-purpose endurance testing system for flexible displays, OLED devices, flexible substrates, flat cables, and films in smartphones, wearables, automobiles, and healthcare.
SYS-CON Events announced today that CAST Software will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. CAST was founded more than 25 years ago to make the invisible visible. Built around the idea that even the best analytics on the market still leave blind spots for technical teams looking to deliver better software and prevent outages, CAST provides the software intelligence that matter ...
SYS-CON Events announced today that Daiya Industry will exhibit at the Japanese Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Ruby Development Inc. builds new services in short period of time and provides a continuous support of those services based on Ruby on Rails. For more information, please visit https://github.com/RubyDevInc.
SYS-CON Events announced today that Evatronix will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Evatronix SA offers comprehensive solutions in the design and implementation of electronic systems, in CAD / CAM deployment, and also is a designer and manufacturer of advanced 3D scanners for professional applications.
As businesses evolve, they need technology that is simple to help them succeed today and flexible enough to help them build for tomorrow. Chrome is fit for the workplace of the future — providing a secure, consistent user experience across a range of devices that can be used anywhere. In her session at 21st Cloud Expo, Vidya Nagarajan, a Senior Product Manager at Google, will take a look at various options as to how ChromeOS can be leveraged to interact with people on the devices, and formats th...
SYS-CON Events announced today that Taica will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Taica manufacturers Alpha-GEL brand silicone components and materials, which maintain outstanding performance over a wide temperature range -40C to +200C. For more information, visit http://www.taica.co.jp/english/.
SYS-CON Events announced today that SourceForge has been named “Media Sponsor” of SYS-CON's 21st International Cloud Expo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. SourceForge is the largest, most trusted destination for Open Source Software development, collaboration, discovery and download on the web serving over 32 million viewers, 150 million downloads and over 460,000 active development projects each and every month.
Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities – ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups. As a result, many firms employ new business models that place enormous impor...
SYS-CON Events announced today that TidalScale will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. TidalScale is the leading provider of Software-Defined Servers that bring flexibility to modern data centers by right-sizing servers on the fly to fit any data set or workload. TidalScale’s award-winning inverse hypervisor technology combines multiple commodity servers (including their ass...
As popularity of the smart home is growing and continues to go mainstream, technological factors play a greater role. The IoT protocol houses the interoperability battery consumption, security, and configuration of a smart home device, and it can be difficult for companies to choose the right kind for their product. For both DIY and professionally installed smart homes, developers need to consider each of these elements for their product to be successful in the market and current smart homes.
SYS-CON Events announced today that MIRAI Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. MIRAI Inc. are IT consultants from the public sector whose mission is to solve social issues by technology and innovation and to create a meaningful future for people.
In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, will lead you through the exciting evolution of the cloud. He'll look at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering ...
As hybrid cloud becomes the de-facto standard mode of operation for most enterprises, new challenges arise on how to efficiently and economically share data across environments. In his session at 21st Cloud Expo, Dr. Allon Cohen, VP of Product at Elastifile, will explore new techniques and best practices that help enterprise IT benefit from the advantages of hybrid cloud environments by enabling data availability for both legacy enterprise and cloud-native mission critical applications. By rev...
SYS-CON Events announced today that Dasher Technologies will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Dasher Technologies, Inc. ® is a premier IT solution provider that delivers expert technical resources along with trusted account executives to architect and deliver complete IT solutions and services to help our clients execute their goals, plans and objectives. Since 1999, we'v...
SYS-CON Events announced today that NetApp has been named “Bronze Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. NetApp is the data authority for hybrid cloud. NetApp provides a full range of hybrid cloud data services that simplify management of applications and data across cloud and on-premises environments to accelerate digital transformation. Together with their partners, NetApp emp...
SYS-CON Events announced today that TidalScale, a leading provider of systems and services, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. TidalScale has been involved in shaping the computing landscape. They've designed, developed and deployed some of the most important and successful systems and services in the history of the computing industry - internet, Ethernet, operating s...
Join IBM November 1 at 21st Cloud Expo at the Santa Clara Convention Center in Santa Clara, CA, and learn how IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Cognitive analysis impacts today’s systems with unparalleled ability that were previously available only to manned, back-end operations. Thanks to cloud processing, IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Imagine a robot vacuum that becomes your personal assistant tha...
Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to work together. The number of software platforms, apps, hardware and connectivity standards is creating paralysis among businesses that are afraid of being locked into a solution. EdgeX Foundry is unifying the community around a common IoT edge framework and an ecosystem of interoperable components.