function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Steve WestSteve West 

Federated search syntax for Google opensearch site query

We are setting up an external site for Federated Search to search our online help library. We are trying to use the OpenSearch Google syntax to limit the search to a particular URL like this:

<Url method="get" type="text/html"
      template="http://www.google.com/search?q={searchTerms}&amp;as_sitesearch=outgoing.more4apps.com/doco"/>
 

I have tried multiple variations of the URL but the validation rejects the XML file with an error:
Missing template URL for search with supported format for element "OpenSearchDescription" for source ...

If I remove the site parameter it works fine. What is the syntax I should use to get the Google OpenSearch to use a site?

Thanks.

SwethaSwetha (Salesforce Developers) 
HI Steve,
Recommend reviewing the example mentioned in 
https://developer.salesforce.com/docs/atlas.en-us.federated_search.meta/federated_search/federated_search_examples.htm

Request: URL Template Parameters
https://developer.salesforce.com/docs/atlas.en-us.federated_search.meta/federated_search/federated_search_url_template_parameters.htm

https://www.jitendrazaa.com/blog/salesforce/federated-search-in-salesforce/

If this information helps, please mark the answer as best. Thank you
Steve WestSteve West
These links don't really help me with the format for the Google search UTL.

Thanks.
Steve WestSteve West
I have the federated search working correctly now.
SwethaSwetha (Salesforce Developers) 
Thanks Steve, for coming back. I'm curious to know the approach and solution that worked for you.
Steve WestSteve West
I wrote a simple Reverse Proxy Server to forward to the OpenSearch Google URL. The Reverse Proxy Server uses the syntax acceptable to Federated Search.