<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Chomp Technology Blog</title>
	<atom:link href="http://chomptech.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://chomptech.wordpress.com</link>
	<description>Chomp Inc. Engineering Blog</description>
	<lastBuildDate>Tue, 17 May 2011 22:34:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='chomptech.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Chomp Technology Blog</title>
		<link>http://chomptech.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://chomptech.wordpress.com/osd.xml" title="Chomp Technology Blog" />
	<atom:link rel='hub' href='http://chomptech.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Chomp Connect Developer Shares His Integration Experience</title>
		<link>http://chomptech.wordpress.com/2010/04/15/chomp-connect-developer-shares-his-integration-experience/</link>
		<comments>http://chomptech.wordpress.com/2010/04/15/chomp-connect-developer-shares-his-integration-experience/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 19:05:35 +0000</pubDate>
		<dc:creator>Rob Wills</dc:creator>
				<category><![CDATA[Chomp Connect]]></category>

		<guid isPermaLink="false">http://chomptech.wordpress.com/?p=26</guid>
		<description><![CDATA[Tom Horn on the Cannonade Microblog sharing his experience integrating Chomp Connect into his iPhone apps.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chomptech.wordpress.com&amp;blog=11440684&amp;post=26&amp;subd=chomptech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Tom Horn on the <a title="Cannonade Microblog" href="http://www.cannonade.net/blog.php?id=1470" target="_self">Cannonade Microblog</a> sharing his experience integrating Chomp Connect into his iPhone apps.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chomptech.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chomptech.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chomptech.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chomptech.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/chomptech.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/chomptech.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/chomptech.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/chomptech.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chomptech.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chomptech.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chomptech.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chomptech.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chomptech.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chomptech.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chomptech.wordpress.com&amp;blog=11440684&amp;post=26&amp;subd=chomptech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://chomptech.wordpress.com/2010/04/15/chomp-connect-developer-shares-his-integration-experience/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/063cfecea601ed055650bc8e0c941c00?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rob Wills</media:title>
		</media:content>
	</item>
		<item>
		<title>Email newsletter issues</title>
		<link>http://chomptech.wordpress.com/2010/03/29/email-newsletter-issues/</link>
		<comments>http://chomptech.wordpress.com/2010/03/29/email-newsletter-issues/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 05:20:58 +0000</pubDate>
		<dc:creator>Cathy Edwards</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://chomptech.wordpress.com/?p=23</guid>
		<description><![CDATA[Late on Friday night, we implemented a new email newsletter designed to let our users know of new and on-sale app recommendations, making it even easier to find great new apps. This was the first time we&#8217;d tried these kinds of mailouts, and unfortunately a bug crept into our system that caused around 100 of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chomptech.wordpress.com&amp;blog=11440684&amp;post=23&amp;subd=chomptech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Late on Friday night, we implemented a new email newsletter designed to let our users know of new and on-sale app recommendations, making it even easier to find great new apps. This was the first time we&#8217;d tried these kinds of mailouts, and unfortunately a bug crept into our system that caused around 100 of our users to get this email multiple times.</p>
<p>We hate spam as well, and we&#8217;re very sorry that this happened.</p>
<p>In a nut shell, our email delivery system got itself into a state that it shouldn&#8217;t have been able to get into, and was reporting that emails weren’t delivered when in fact they had been. Our email generator did what it was supposed to do and attempted to resend these &#8216;failed&#8217; emails, causing a loop of retries. We discovered and fixed the problem quickly, but know that for those few affected users it would have been a huge inconvenience.</p>
<p>We care about our users and we’d like to say sorry. If you were one of the ~100 people who received multiple emails, please write to us at feedback@chomp.com and include your Chomp username by March 31 and we’ll send you a $10 iTunes gift card. We hope that you&#8217;ll keep using Chomp to find great apps to spend it on.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chomptech.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chomptech.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chomptech.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chomptech.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/chomptech.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/chomptech.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/chomptech.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/chomptech.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chomptech.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chomptech.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chomptech.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chomptech.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chomptech.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chomptech.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chomptech.wordpress.com&amp;blog=11440684&amp;post=23&amp;subd=chomptech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://chomptech.wordpress.com/2010/03/29/email-newsletter-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58a9a5604ed780fdd08ee1df550527fc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fewmets</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting Access to your Flurry Exception Logs</title>
		<link>http://chomptech.wordpress.com/2010/03/22/getting-access-to-your-flurry-exception-logs/</link>
		<comments>http://chomptech.wordpress.com/2010/03/22/getting-access-to-your-flurry-exception-logs/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 05:03:06 +0000</pubDate>
		<dc:creator>Rob Wills</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://chomptech.wordpress.com/?p=15</guid>
		<description><![CDATA[Flurry won&#8217;t give you access to more than one 15 record page of your exception log! If you take your unhandled exceptions seriously (we do), analyzing them regularly is a top priority. To take the tedium out of manually paging and downloading all the individual CSV exports, you can use the Internet&#8217;s Swiss Army Knife™, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chomptech.wordpress.com&amp;blog=11440684&amp;post=15&amp;subd=chomptech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Flurry won&#8217;t give you access to more than one 15 record page of your exception log!</p>
<p>If you take your unhandled exceptions seriously (we do), analyzing them regularly is a top priority. To take the tedium out of manually paging and downloading all the individual CSV exports, you can use the Internet&#8217;s Swiss Army Knife™, curl.</p>
<p>If you&#8217;re on Mac OS X, curl is already installed. On Windows you will need to <a href="http://curl.haxx.se/latest.cgi?curl=win32-ssl-sspi" target="_blank">download and install</a>.</p>
<p>First, use curl to log in to Flurry, obtaining the session cookie for future requests:</p>
<p><span style="font-family:'Courier New';">&lt;youremail&gt;</span> and <span style="font-family:'Courier New';">&lt;yourpassword&gt;</span> needs to be URL encoded:</p>
<pre>$ /usr/bin/php -r 'echo urlencode("<span style="color:#0000ff;">rob@domain.com</span>")."\n";'
  <em>rob%40domain.com</em>
<em>
</em></pre>
<pre>$ curl --cookie-jar ./flurry.jar \
  -d "loginEmail=<strong><span style="color:#0000ff;">&lt;youremail&gt;</span></strong>&amp;loginPassword=<span style="color:#0000ff;"><strong>&lt;yourpassword&gt;</strong></span>&amp;rememberMe=true&amp;__checkbox_rememberMe=true" \
  -k https://dev.flurry.com/secure/loginAction.do</pre>
<ul>
<li><span style="font-family:'Courier New';">&#8211;cookie-jar</span> stores the response cookie for later use</li>
<li><span style="font-family:'Courier New';">-d</span> sends the POST data</li>
<li><span style="font-family:'Courier New';">-k</span> turns off certificate verification</li>
</ul>
<p>Grab the Project ID for your App by looking at the CSV download link from the Flurry Error listing page.</p>
<p>Now ask curl to repeatedly download each page of your exception log CSV export:</p>
<pre>$ curl --cookie ./flurry.jar \
'http://dev.flurry.com/exceptionLogsCsv.do?projectID=<span style="color:#0000ff;">&lt;yourproject&gt;</span>&amp;versionCut=versionsAll&amp;intervalCut=allTime&amp;direction=1&amp;offset=[000-100:15]&amp;pageSize=15' \
--output "exception#1.csv"</pre>
<p>You&#8217;re ready to read those into iWork Numbers or Microsoft Excel one at a time, or you can go another step further and combine them all for a single exception log:</p>
<pre>$ grep -h -v -e "^Timestamp" exception???.csv | sort &gt; AllExceptions.csv</pre>
<p>Now get on with tracking down your reported errors and uncaught exceptions.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chomptech.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chomptech.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chomptech.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chomptech.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/chomptech.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/chomptech.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/chomptech.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/chomptech.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chomptech.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chomptech.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chomptech.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chomptech.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chomptech.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chomptech.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chomptech.wordpress.com&amp;blog=11440684&amp;post=15&amp;subd=chomptech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://chomptech.wordpress.com/2010/03/22/getting-access-to-your-flurry-exception-logs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/063cfecea601ed055650bc8e0c941c00?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rob Wills</media:title>
		</media:content>
	</item>
		<item>
		<title>Chomp Connect for iPhoneOS</title>
		<link>http://chomptech.wordpress.com/2010/03/02/chomp-connect-for-iphoneos/</link>
		<comments>http://chomptech.wordpress.com/2010/03/02/chomp-connect-for-iphoneos/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 05:11:54 +0000</pubDate>
		<dc:creator>Rob Wills</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://chomptech.wordpress.com/?p=9</guid>
		<description><![CDATA[I want to highlight a specific feature of our Chomp Connect for iPhone OS offering – shared sessions on the client device. To encourage users to submit a rating it&#8217;s essential to reduce the overall complexity of the process. If they have to jump through hoops before they can tell the world about this app [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chomptech.wordpress.com&amp;blog=11440684&amp;post=9&amp;subd=chomptech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I want to highlight a specific feature of our Chomp Connect for iPhone OS offering – shared sessions on the client device.</p>
<p>To encourage users to submit a rating it&#8217;s essential to reduce the overall complexity of the process. If they have to jump through hoops before they can tell the world about this app they&#8217;re using, they may not bother. Our aim is to keep that process quick and easy, helping to make sure a user will have their say.</p>
<p>One of the great features of Chomp Connect is the ability to find and use an existing user session. If a user has taken the time to signup for or sign into an account, we don&#8217;t want them to go through that again unless they really have to! That session may have been established using the Chomp app directly, or by Chomp Connect in another app.</p>
<p>To achieve this we need to share data between apps. These apps have no ability to know each other is installed, or even if the Chomp app is installed. If Chomp was installed, you could use a registered URL scheme to launch Chomp, have the user perform the rating and possibly return them to your app (if your App also registered a URL scheme). Although more and more people are downloading Chomp every day, it would still limit the potential for users to review the app on Chomp.</p>
<p>I searched for other methods of sharing small amounts of data between apps, and discovered that iPhone OS 3.0 and above provides great support for pasteboards. There are two system pasteboards, System and Finder, but also an application pasteboard that can be created with a unique name. These application pasteboards can be configured as persistent allowing them to be shared between applications that know that unique name. We configure Chomp Connect to use a specific pasteboard name, enabling any app that embeds Chomp Connect to seamlessly share any previous session on the device.</p>
<div id="attachment_10" class="wp-caption alignnone" style="width: 530px"><a href="http://chomptech.files.wordpress.com/2010/03/connect-pasteboard.png"><img class="size-full wp-image-10" title="Connect Pasteboard" src="http://chomptech.files.wordpress.com/2010/03/connect-pasteboard.png?w=520&#038;h=283" alt="Chomp Connect Pasteboard" width="520" height="283" /></a><p class="wp-caption-text">Sharing information between Apps with UIPasteboard</p></div>
<p>Implementation is very straightforward, using the <code>UIPasteboard</code> convenience methods that set and get a simple string pasteboard item.</p>
<pre class="objc" style="padding-left:30px;"><span style="color:#002200;"><span style="color:#339966;"><em>/* ChompDialog.m */</em></span></span></pre>
<pre class="objc" style="font-family:monospace;padding-left:30px;"><span style="color:#002200;">+</span> <span style="color:#002200;">(</span>UIPasteboard <span style="color:#002200;">*</span><span style="color:#002200;">)</span>getPasteboard <span style="color:#002200;">{</span>
    <span style="color:#11740a;font-style:italic;">// Chomp Connect pasteboard will be created if none exists</span>
    UIPasteboard <span style="color:#002200;">*</span>ccPasteboard <span style="color:#002200;">=</span> <span style="color:#002200;">[</span>UIPasteboard pasteboardWithName<span style="color:#002200;">:</span><span style="color:#bf1d1a;">@</span><span style="color:#bf1d1a;">"com.chomp.connect.pboard"</span> create<span style="color:#002200;">:</span><span style="color:#a61390;">YES</span><span style="color:#002200;">]</span>;
    <span style="color:#a61390;">if</span> <span style="color:#002200;">(</span>ccPasteboard.changeCount &lt; 1<span style="color:#002200;">)</span> <span style="color:#002200;">[</span>ccPasteboard setPersistent<span style="color:#002200;">:</span><span style="color:#a61390;">YES</span><span style="color:#002200;">]</span>;
    <span style="color:#a61390;">return</span> ccPasteboard;
<span style="color:#002200;">}</span>

<span style="color:#002200;">+</span> <span style="color:#002200;">(</span><span style="color:#400080;">NSString</span> <span style="color:#002200;">*</span><span style="color:#002200;">)</span>getChompUserToken <span style="color:#002200;">{</span>
    <span style="color:#a61390;">return</span> <span style="color:#002200;">[</span><span style="color:#002200;">[</span>ChompDialog getPasteboard<span style="color:#002200;">]</span> <span style="color:#a61390;">string</span><span style="color:#002200;">]</span>;
<span style="color:#002200;">}</span>

<span style="color:#002200;">+</span> <span style="color:#002200;">(</span><span style="color:#a61390;">void</span><span style="color:#002200;">)</span>setChompUserToken<span style="color:#002200;">:</span><span style="color:#002200;">(</span><span style="color:#400080;">NSString</span> <span style="color:#002200;">*</span><span style="color:#002200;">)</span>newToken <span style="color:#002200;">{</span>
    <span style="color:#002200;">[</span><span style="color:#002200;">[</span>ChompDialog getPasteboard<span style="color:#002200;">]</span> setString<span style="color:#002200;">:</span>newToken<span style="color:#002200;">]</span>;
<span style="color:#002200;">}</span></pre>
<pre class="objc" style="font-family:monospace;padding-left:30px;"><span style="color:#002200;">
</span></pre>
<p>The end result is reduced complexity for a user to perform a review, therefore a higher probability that they will.</p>
<p>We make it easy for your users to show their love!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chomptech.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chomptech.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chomptech.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chomptech.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/chomptech.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/chomptech.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/chomptech.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/chomptech.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chomptech.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chomptech.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chomptech.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chomptech.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chomptech.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chomptech.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chomptech.wordpress.com&amp;blog=11440684&amp;post=9&amp;subd=chomptech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://chomptech.wordpress.com/2010/03/02/chomp-connect-for-iphoneos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/063cfecea601ed055650bc8e0c941c00?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rob Wills</media:title>
		</media:content>

		<media:content url="http://chomptech.files.wordpress.com/2010/03/connect-pasteboard.png" medium="image">
			<media:title type="html">Connect Pasteboard</media:title>
		</media:content>
	</item>
		<item>
		<title>Further Fine-Tuning MySQL Full-Text Search</title>
		<link>http://chomptech.wordpress.com/2010/01/14/further-fine-tuning-mysql-full-text-search/</link>
		<comments>http://chomptech.wordpress.com/2010/01/14/further-fine-tuning-mysql-full-text-search/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 21:29:24 +0000</pubDate>
		<dc:creator>Miker</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://chomptech.wordpress.com/?p=4</guid>
		<description><![CDATA[When the Chomp iPhone went out to the public for the first time a few days ago one of the first surprises for the team was how frequently users were using the search function. We assumed that folks would be browsing for apps and generally shy away from searching unless they needed to. There were [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chomptech.wordpress.com&amp;blog=11440684&amp;post=4&amp;subd=chomptech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When the Chomp iPhone went out to the public for the first time a few days ago one of the first surprises for the team was how frequently users were using the search function. We assumed that folks would be browsing for apps and generally shy away from searching unless they needed to. There were a few common cases that we missed where searching for apps is pretty essential, bad us&#8230; But we&#8217;ve done a quick scramble and gotten search to a really good place despite still being far from perfect. The search that we have running now is running on top of a MySQL full text index. We&#8217;re going to need to swap to a real search index as some point most likely, something like <a href="http://lucene.apache.org/solr/">Solr/Lucene</a> or <a href="http://www.sphinxsearch.com/">Sphinx</a> (we&#8217;re looking for folks familiar with tools like those, so please <a href="http://chompapps.com/jobs">let us know if you&#8217;re interested in joining the team</a>).</p>
<p>In the meantime though it was just me pretty much by my lonesome, really wanting to get MySQL to be able to at least do a good enough job to buy me a few weeks worth of time. There&#8217;s an article in the MySQL docs about <a href="http://dev.mysql.com/doc/refman/5.0/en/fulltext-fine-tuning.html">fine-tuning MySQL for full text searches</a>, which was a great starting point. Turns out there were a few different issues contributing to the plain old vanilla out-of-the-box MySQL full text searches not performing the way we wanted them to.</p>
<p>The first major issue was the way in which MySQL tokenizes the field being used for the index. The really simple settings were things like tuning the stopword list (which actually we&#8217;ve removed completely now, we&#8217;re taking care of the problem by sanitizing the row we have the index on before we insert into it) and turning the minimum word length down to two characters (so that apps like &#8220;Oz&#8221; get indexed at all, and so that you can find &#8220;Oz Weather&#8221; without it getting buried in all the weather apps out there). The more complex bit however was getting punctuation treated as word matter instead of whitespace. There are a bunch of apps where the punctuation is significant, such as &#8220;Ping!&#8221; or &#8220;m:Vampire&#8221;. The easiest way to do so (without recompiling MySQL) is to define a new collation and modify the character set in the process. <a href="http://www.thenoyes.com/littlenoise/?p=91">This post</a>, linked from the bottom of the MySQL fine-tuning post, is a great practical example. Docs are hard to find, and the configuration is a bit raw, but once you understand what&#8217;s going on it&#8217;s pretty trivial to tell the system to use characters like :, $, and % as word characters.  One useful debugging tip there is to dump the index info using the myisam_ftdump utility to get a list of tokens from the index. Really helped when I thought I had the right set of characters in my modified character set but had made a mistake.</p>
<p>The second major issue was sorting by relevance coming out of the match. Because folks tend to use subwords pretty frequently (must be because of the small keyboard, we see lots of stuff like &#8216;facebo&#8217;, which I assume maps to Facebook) we use boolean mode match()es, but we still want to sort by relevance. The common suggestion there is to do a select from the table using a boolean match() and then select the match() of the text against the query to use as a column to sort by. The suggestion is in the <a href="http://dev.mysql.com/doc/refman/5.1/en/fulltext-search.html">second comment down on the MySQL full text search functions page</a>. Not bad, but also far from perfect. I haven&#8217;t dug into the details of how that function operates, but it certainly wasn&#8217;t doing what we wanted it to. For instance if someone used to search for &#8220;facebook&#8221; they would get back a whole bunch of other apps ahead of the facebook app itself. Stuff like &#8220;Facebook It!&#8221; for example, which I certainly consider to match the term &#8220;Facebook&#8221; less well than the exact text. What we were looking for was a measure of how far the application name was from the input term and sort by that. What we wanted was the <a href="http://en.wikipedia.org/wiki/Levenshtein_distance">Levenshtein Distance</a>, but unfortunately MySQL doesn&#8217;t have that. We could suck all the values out and then compute the distances on the web front end &#8211; too nasty for large sets though. Fortunately there&#8217;s a <a href="http://joshdrew.com/">Levenshtein Distance User Defined Function for MySQL</a> that did the trick quite nicely. Now the whole thing is fully offloaded to the database and we can hold off making additions to the infrastructure till we have some time to really think through which option we want to go with.</p>
<p>Add in a little bit of text munging before we push the text into the index and we have a version that works with prefix strings for both punctuation bearing and punctuation free version. So now if you search for &#8216;m:vampire&#8217; or &#8216;mvampire&#8217; or even &#8216;mvamp&#8217; on chomp you get back the m:Vampire app as the first hit. The nice thing about having that relevance hack defined as a UDF is that we can retweek it as necessary to generally provide a different kind of relevance. For us it was LD, and that gets us far enough. But if you want to use boolean matches on a full text search and your relevance function is just about anything else that can be evaluated as a pairwise comparison between the query and each individual row this is a decent way to get MySQL sorting things the way you see fit. No recompiling MySQL core required.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chomptech.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chomptech.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chomptech.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chomptech.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/chomptech.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/chomptech.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/chomptech.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/chomptech.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chomptech.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chomptech.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chomptech.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chomptech.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chomptech.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chomptech.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chomptech.wordpress.com&amp;blog=11440684&amp;post=4&amp;subd=chomptech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://chomptech.wordpress.com/2010/01/14/further-fine-tuning-mysql-full-text-search/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0e6a142ce090eeda9ea1379e116257b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Miker</media:title>
		</media:content>
	</item>
	</channel>
</rss>
