<?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>Search Nuggets &#187; OpenSearch</title>
	<atom:link href="http://blog.comperiosearch.com/blog/tag/opensearch/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.comperiosearch.com</link>
	<description>A blog about Search as THE solution</description>
	<lastBuildDate>Mon, 13 Jun 2016 08:59:45 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>Make an &#8220;instant search&#8221; application using JSON, Ajax and JQuery</title>
		<link>http://blog.comperiosearch.com/blog/2012/06/27/make-an-instant-search-application-using-json-ajax-and-jquery/</link>
		<comments>http://blog.comperiosearch.com/blog/2012/06/27/make-an-instant-search-application-using-json-ajax-and-jquery/#comments</comments>
		<pubDate>Wed, 27 Jun 2012 10:41:15 +0000</pubDate>
		<dc:creator><![CDATA[Fergus McDowall]]></dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[Json]]></category>
		<category><![CDATA[OpenSearch]]></category>
		<category><![CDATA[Wikipedia]]></category>

		<guid isPermaLink="false">http://blog.comperiosearch.com/?p=975</guid>
		<description><![CDATA[Update 20th Feb 2013: Instant search is now implemented on Solrstrap, the lightweight Solr interface written in JavaScript, HTML and CSS. Check it out here. Here is a quick demo that demonstrates how to create an &#8220;instant search&#8221; service using JSON, ajax and JQuery. This instant search application uses the excellent OpenSearch interface provided by [...]]]></description>
				<content:encoded><![CDATA[<p><em><strong>Update 20th Feb 2013:</strong> Instant search is now implemented on <a href="http://blog.comperiosearch.com/blog/2013/02/17/introducing-solrstrap/" title="Introducing Solrstrap: A blazing fast tool for querying Solr in a Googleish fashion">Solrstrap</a>, the lightweight Solr interface written in JavaScript, HTML and CSS. <a href="http://blog.comperiosearch.com/blog/2013/02/17/introducing-solrstrap/" title="Introducing Solrstrap: A blazing fast tool for querying Solr in a Googleish fashion">Check it out here</a></em>.</p>
<p>Here is a quick demo that demonstrates how to create an &#8220;instant search&#8221; service using JSON, ajax and JQuery. This instant search application uses the excellent OpenSearch interface provided by Wikipedia. Use this code as a starting point for developing prettier result pages.</p>
<p>The Wikipedia query API is described in some detail <a href="http://www.mediawiki.org/wiki/API:Main_page" target="_blank">here</a>.</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2012/06/instantsearch.html">Click here to see the demo</a>, or copy and paste the code below into a blank HTML document.</p><pre class="crayon-plain-tag">&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/jquery-latest.js&quot;&gt;&lt;/script&gt;</pre><p></p>
<h1>Search Wikipedia!</h1>
<p></p><pre class="crayon-plain-tag">&lt;input id=&quot;searchterm&quot; type=&quot;text&quot; /&gt; &lt;button id=&quot;search&quot;&gt;search&lt;/button&gt;</pre><p></p>
<div id="results"></div>
<p></p><pre class="crayon-plain-tag">&lt;script type=&quot;text/javascript&quot;&gt;// &lt;![CDATA[
      $(&quot;#searchterm&quot;).keyup(function(e){
        var q = $(&quot;#searchterm&quot;).val();
        $.getJSON(&quot;http://en.wikipedia.org/w/api.php?callback=?&quot;,
        {
          srsearch: q,
          action: &quot;query&quot;,
          list: &quot;search&quot;,
          format: &quot;json&quot;
        },
        function(data) {
          $(&quot;#results&quot;).empty();
          $(&quot;#results&quot;).append(&quot;

Results for &lt;b&gt;&quot; + q + &quot;&lt;/b&gt;

&quot;);
          $.each(data.query.search, function(i,item){
            $(&quot;#results&quot;).append(&quot;
&lt;div&gt;&lt;a href='http://en.wikipedia.org/wiki/&quot; + encodeURIComponent(item.title) + &quot;'&gt;&quot; + item.title + &quot;&lt;/a&gt;&quot; + item.snippet + &quot;&lt;/div&gt;
&quot;);
          });
        });
      });

// ]]&gt;&lt;/script&gt;</pre><p></p>
<div style="position: absolute; bottom: 0; right: 0; text-align: right;"><a href="http://blog.comperiosearch.com/author/fmcdowall/">Fergus McDowall</a> 2012</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.comperiosearch.com/blog/2012/06/27/make-an-instant-search-application-using-json-ajax-and-jquery/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
