Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 7025

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 2162

Deprecated: Hook imagify_allow_picture_tags_for_webp is deprecated since version 2.2! Use imagify_allow_picture_tags_for_nextgen instead. in /www/collab365_296/public/wp-includes/functions.php on line 5758
SP2016 - SP2013 - OpenSearch / Federated search using Google Search Appliance - Collab365
Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1145

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1152

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1155

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1162

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1165

Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1145

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1152

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1155

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1162

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1165

Warning: Undefined array key "url" in /www/collab365_296/public/wp-content/plugins/thrive-visual-editor/thrive-dashboard/inc/smart-site/classes/class-tvd-smart-shortcodes.php on line 85

2015-03-25

Recently I was looking into the implementation of the OpenSearch / Federated Search on our SharePoint environment using the existing Google Search appliance. While we all know that SharePoint supports the Open Search but there are very limited documentation around integrating with the Google Search appliance.

I found a very good article about the tokens used by the SharePoint which can be passed to the GSA. I am also listing the tokens for a reference and more details can be found on the original article (http://sharepointtaproom.com/tag/sharepoint-search/).

  • {SearchTerms}
  • {startIndex}
  • {startPage}
  • {count}
  • {itemsPerPage}
  • {language}
  • {inputEncoding}
  • {outputEncoding}

So in this blog, we will see the steps to implement the OpenSearch with GSA.

Enable the OpenSearch on GSA: 

Configure / Create a result source using the GSA result endpoint:

  • Configure / Create a result source using the below url using the SharePoint UI or Powershell.
  • Replace the gsa url parameters with the above tokens . (ex:http://gsa/search?q=bill+material&start={startIndex}&num={itemsPerPage}&output=xml_no_dtd&proxystylesheet= test&client=test&site=operations)
  • Configure the search results web part to get the results from the above created result source.

Debugging the OpenSearch results:

  • Download a sample search results xml from your GSA or use one of the samples available on the open search website.
  • Copy the file and configure the local IIS site so that the xml can be accessed from the browser. (ex: http://localhost/gsasample.xml). This will allow us to test our search result web parts for the given xml output from the federated search results without actually getting it from the GSA.
  • Configure the result source as below:

  • Configure the search result webpart to get the results from the above result source.

The above screen displays the results returned by the below xml (gsasample.xml).

 <?xml version="1.0" encoding="UTF-8"?> 
<rss version="2.0"       xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"      xmlns:atom="http://www.w3.org/2005/Atom">
   <channel>
     <title>Example.com Search: New York history</title>
     <link>http://example.com/New+York+history</link>
     <description>Search results for "New York history" at Example.com</description>
     <opensearch:totalResults>4230000</opensearch:totalResults>
     <opensearch:startIndex>21</opensearch:startIndex>
     <opensearch:itemsPerPage>10</opensearch:itemsPerPage>
     <atom:link rel="search" type="application/opensearchdescription+xml" href="http://example.com/opensearchdescription.xml"/>
     <opensearch:Query role="request" searchTerms="New York History" startPage="1" />
     <item>
       <title>New York History</title>
       <link>http://www.columbia.edu/cu/lweb/eguids/amerihist/nyc.html</link>
       <description>
         ... Harlem.NYC - A virtual tour and information on 
         businesses ...  with historic photos of Columbia's own New York 
         neighborhood ... Internet Resources for the City's History. ...
       </description>
     </item>
   </channel>
 </rss>
(Visited 281 times, 1 visits today)

About the author 

Balamurugan Kailasam

Summit Bundle

Get 200+ hours of Microsoft 365 Training for 27$!

Master Office 365, Power Platform & SharePoint & Teams With 200+ Hours Of Training Videos and 108 Ebooks in the Collab365 Academy. This offer is insane and is only available for a limited period.