<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MC+A &#187; Suggest</title>
	<atom:link href="http://www.mcplusa.com/blog/tag/suggest/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mcplusa.com</link>
	<description>Connecting Business Intellingence</description>
	<lastBuildDate>Tue, 17 Jan 2012 21:54:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Adding Google Search Appliance Suggest Search To Your Existing Page</title>
		<link>http://www.mcplusa.com/blog/2009/07/adding-google-search-appliance-suggest-search-to-your-existing-page/</link>
		<comments>http://www.mcplusa.com/blog/2009/07/adding-google-search-appliance-suggest-search-to-your-existing-page/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 12:20:20 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Search Appliance]]></category>
		<category><![CDATA[6.0]]></category>
		<category><![CDATA[SAYT]]></category>
		<category><![CDATA[Search As You Type]]></category>
		<category><![CDATA[Suggest]]></category>

		<guid isPermaLink="false">http://www.mcplusa.com/?p=481</guid>
		<description><![CDATA[&#8220;Suggest&#8221; is a new beta feature on the Google Search Appliance 6.0.  Out of the box, it is designed to work with the default style sheet.  However, many of our clients have chosen to use a scripted page (asp/aspx/php/jsp).  In order to get this functionality working, additional coding is required.  This article describes wiring up [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;Suggest&#8221; is a new beta feature on the Google Search Appliance 6.0.  Out of the box, it is designed to work with the default style sheet.  However, many of our clients have chosen to use a scripted page (asp/aspx/php/jsp).  In order to get this functionality working, additional coding is required.  This article describes wiring up the search box via a proxy and asp.</p>
<p><strong>The Service</strong></p>
<p>There is a new service located at /suggest.  When you type the queries are sent to it.  The response comes back as a simple JSON package.  It is not encoded in JSONP so if you develop a separate page and want to use it, you&#8217;re faced with  a cross site scripting issue.</p>
<p><strong>The Solution</strong></p>
<ol>
<li>Copy suggest_js.js to the site which you want to utilize the service.</li>
<li>Create a proxy in your server (code below)</li>
<li>suggest_js.js is obfuscated.  But you just need to replace &#8220;/suggest&#8221; with the location of your new service (has to be at the same domain</li>
<li>Add the .ac-renderer, .ac-row, .ac-highlighted and .ac-active styles to your page</li>
<li>reference the new suggest_js.js file is reference in your html</li>
<li>call the function sgst(&#8216;q&#8217;);</li>
<li>Start typing!</li>
</ol>
<h3>Proxy Example:</h3>
<pre class="brush: vb; title: ; notranslate">
dim srcFile
srcFile = &amp;amp;amp;quot;http://gsa.mcplusa.com/suggest?&amp;amp;amp;quot;
srcFile = srcFile &amp;amp;amp;amp;amp; &amp;amp;amp;quot;token=&amp;amp;amp;quot; &amp;amp;amp;amp;amp; Request(&amp;amp;amp;quot;token&amp;amp;amp;quot;) &amp;amp;amp;amp;amp; &amp;amp;amp;quot;&amp;amp;amp;amp;amp;max_matches=10&amp;amp;amp;quot;&amp;amp;amp;lt;/div&amp;amp;amp;gt;
'Get the JSON
Response.Buffer = True
Dim objXMLHTTP, xml

'Create an xmlhttp object
Set xml = Server.CreateObject(&amp;amp;amp;quot;Microsoft.XMLHTTP&amp;amp;amp;quot;)
xml.Open &amp;amp;amp;quot;GET&amp;amp;amp;quot;, srcFile, False
xml.Send

Response.Write xml.responseText
set xml= Nothing
</pre>
<p><a id="single_image" href="http://www.mcplusa.com/wp-content/uploads/2009/07/on_webpage.jpg"><img class="alignnone size-thumbnail wp-image-487" title="The New Suggested Search running off the appliance." src="http://www.mcplusa.com/wp-content/uploads/2009/07/on_webpage-150x150.jpg" alt="The New Suggested Search running off the appliance." width="150" height="150" /></a></p>
<p>Update!</p>
<p>Mahesh T published a java servlet <a title="Lightbends Suggest" href="https://sites.google.com/site/lightbends/gsa_qs">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mcplusa.com/blog/2009/07/adding-google-search-appliance-suggest-search-to-your-existing-page/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

