<?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>
	
	<atom:link href="http://blog.algolia.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.algolia.com</link>
	<description>Mobile search and instant suggest</description>
	<lastBuildDate>Tue, 21 May 2013 13:03:51 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		
		<link>http://blog.algolia.com/instant-search-on-ios-app-store/</link>
		<comments>http://blog.algolia.com/instant-search-on-ios-app-store/#comments</comments>
		<pubDate>Tue, 21 May 2013 12:55:10 +0000</pubDate>
		<dc:creator>Julien Lemoine</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[SaaS]]></category>

		<guid isPermaLink="false">http://blog.algolia.com/?p=1366</guid>
		<description><![CDATA[If you have an iOS device you probably search the App Store regularly for apps you have heard about. Following the recent AppGratis ousting from the AppStore, there were claims that the App Store search is broken. That was our trigger to try something ourselves that could serve both as a good demo and help [...]]]></description>
				<content:encoded><![CDATA[<figure class="full-width-mobile alignright thin" style="width: 240px;"><a href="http://www.algolia.com/demo/appstore/"><img alt="" src="http://blog.algolia.com/wp-content/uploads/2013/05/appstore.jpg" class="wp-image-1379" /></a></figure>
<p>If you have an iOS device you probably search the App Store regularly for apps you have heard about. Following the recent AppGratis ousting from the AppStore, there were claims that the App Store search is broken. That was our trigger to try something ourselves that could serve both as a good demo and help us to explore new use-cases! <a title="Instant Search on App Store" href="http://www.algolia.com/demo/appstore/" target="_blank">Check it out!</a></p>
<h2>Obtaining the data</h2>
<p>So first, we needed to obtain the data. Apple provides an API to accredited developers, but given that this can be fairly difficult to attain, we considered other solutions. Crawling was our second option, but that approach has its own caveats: you need to play nice with their servers or you get banned (very) quickly. We didn&#8217;t want to spend days implementing our own distributed crawler and definitely didn&#8217;t have the time to do a sequential and polite crawling. It is in these moments that you are glad to have an external team to do the job for you.</p>
<p><span id="more-1366"></span><br />
We chose to perform the crawling with <a title="Grepsr - Web Scraping" href="http://www.grepsr.com" target="_blank">grepsr</a>, a service we found via a simple Google search. After a few exchanges we were confident that they were up to the job, and they ended up exceeding our expectations. Not only did they crawl the pages, but they also scraped the apps&#8217; attributes to provide us with a clean dataset. After a few days we had our full dataset ready for indexing.</p>
<h2>Indexing</h2>
<p>Indexing was actually the easiest part. We uploaded the data in JSON format to our backend and used these simple settings:</p><pre class="crayon-plain-tag">{
"attributesToIndex": ["name", "author", "category"],
"attributesToHighlight": ["name", "author","category", "description"],
"customRanking": ["desc(score)", "asc(name)"]
}</pre><p>Our dataset included the 630k applications currently published in the US app store. For each of them we index the name, author and category, but also include their icon, score, and description for display and sorting.</p>
<p>The score is a simple computation between the number of comments and the average ranking: <code>rating * log2(nbComments) * 10000</code>.</p>
<h2>Searching</h2>
<p>Similar to our <a title="Instant Search on CrunchBase" href="http://blog.algolia.com/instant-search-on-crunchbase/">CrunchBase demo</a>, we trigger a query directly after page load and again after each keystroke. Additional queries are automatically triggered when scrolling to the bottom of the page.</p>
<p><a title="Guillaume Esquevin - Platypus Creation" href="http://platypus-creation.com" target="_blank">Guillaume Esquevin</a> did the front-end for us and a first version of the demo was up and ready in no time. Take a look at how simple and fast it is to search for an app!</p>
<p>In the end we did receive access to the Apple API, which we may use later on to keep the data in sync.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.algolia.com/instant-search-on-ios-app-store/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		
		<link>http://blog.algolia.com/algolia-search-offline-sdk-now-supports-cocoapods/</link>
		<comments>http://blog.algolia.com/algolia-search-offline-sdk-now-supports-cocoapods/#comments</comments>
		<pubDate>Thu, 25 Apr 2013 12:41:57 +0000</pubDate>
		<dc:creator>Julien Lemoine</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Offline]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://blog.algolia.com/?p=1286</guid>
		<description><![CDATA[We have great news for our iOS and OS X users: our Offline SDK is now available as a CocoaPods dependency. Cocoapods is a popular dependency management tool that lets you specify the libraries (dependencies) you want to use for your project in an easy-to-edit text file (Podfile). It then fetches all the required libraries and [...]]]></description>
				<content:encoded><![CDATA[<figure class="full-width-mobile alignright thin" style="width: 240px;"><a href="http://blog.algolia.com/wp-content/uploads/2013/04/cocoapods.png" class="fancybox" title=""><img alt="" src="http://blog.algolia.com/wp-content/uploads/2013/04/cocoapods.png" class="wp-image-1291" /></a></figure>
<p>We have great news for our iOS and OS X users: our Offline SDK is now available as a <em><a href="http://www.cocoapods.org/">CocoaPods</a> </em>dependency<em>.</em></p>
<p>Cocoapods is a popular dependency management tool that lets you specify the libraries (dependencies) you want to use for your project in an easy-to-edit text file (Podfile). It then fetches all the required libraries and sets up your Xcode workspace.</p>
<p>You can now set up Algolia Search Offline in your iOS project with this line in your Podfile:<br />
<code>pod 'AlgoliaSearchOffline-iOS-SDK'</code></p>
<p>You can also set up Algolia Search Offline in your OS X project with this line:<br />
<code>pod 'AlgoliaSearchOffline-OSX-SDK'</code></p>
<p>Once you&#8217;re done, simply use the &#8220;pod install&#8221; command to set up Algolia Search Offline in your project. Now it&#8217;s easy to manage library dependencies for iOS and OS X projects!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.algolia.com/algolia-search-offline-sdk-now-supports-cocoapods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		
		<link>http://blog.algolia.com/algolia-search-is-now-available-for-rubymotion/</link>
		<comments>http://blog.algolia.com/algolia-search-is-now-available-for-rubymotion/#comments</comments>
		<pubDate>Tue, 16 Apr 2013 13:45:50 +0000</pubDate>
		<dc:creator>Nicolas Dessaigne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Offline]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RubyMotion]]></category>

		<guid isPermaLink="false">http://blog.algolia.com/?p=1214</guid>
		<description><![CDATA[If you are a Ruby developer and have an iPhone, chances are you already now about the cool project that is RubyMotion! I quote: &#8220;It lets you quickly develop and test native iOS applications for iPhone or iPad, all using the awesome Ruby language you know and love.&#8221; And it rocks! It&#8217;s actually used by [...]]]></description>
				<content:encoded><![CDATA[<figure class="full-width-mobile alignright thin" style="width: 216px;"><a href="http://blog.algolia.com/wp-content/uploads/2013/04/rubymotion1.png" class="fancybox" title=""><img alt="" src="http://blog.algolia.com/wp-content/uploads/2013/04/rubymotion1.png" class="wp-image-1232" /></a></figure>
<p>If you are a Ruby developer and have an iPhone, chances are you already now about the cool project that is <a href="http://www.rubymotion.com/" target="_blank">RubyMotion</a>! I quote:</p>
<blockquote><p>&#8220;It lets you quickly develop and test native iOS applications for iPhone or iPad, all using the awesome Ruby language you know and love.&#8221;</p></blockquote>
<p>And it rocks! It&#8217;s actually used by the Ruby on Rails sponsor 37signals.</p>
<p>What if you could use your favorite search engine along with your favorite language to create iOS apps? That&#8217;s exactly what we propose with a RubyMotion Algolia Search gem that seamlessly integrates in your Ruby project. You know the trick:</p><pre class="crayon-plain-tag"> 
gem 'motion-algolia-search'
&nbsp;</pre><p>The gem code is open source. You can fork it from <a href="https://github.com/algolia/motion-algolia-search" target="_blank">github</a>.</p>
<p>Special thanks to the RubyMotion team and especially to <a href="https://twitter.com/joffreyjaffeux" target="_blank">Joffrey</a> for this integration!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.algolia.com/algolia-search-is-now-available-for-rubymotion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		
		<link>http://blog.algolia.com/v2-our-new-offline-search-sdk-with-geo-search-and-other-features/</link>
		<comments>http://blog.algolia.com/v2-our-new-offline-search-sdk-with-geo-search-and-other-features/#comments</comments>
		<pubDate>Tue, 16 Apr 2013 12:05:00 +0000</pubDate>
		<dc:creator>Nicolas Dessaigne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Geosearch]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Offline]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://blog.algolia.com/?p=1199</guid>
		<description><![CDATA[While our latest news focused on the Algolia Search cloud offer (you can still join the beta), we&#8217;re pleased to introduce a major new version of Algolia Search offline: V2! It is available today for iOS, Android and OS X. Windows Phone and Windows versions will be released as soon as they are ready. A few [...]]]></description>
				<content:encoded><![CDATA[<figure class="full-width-mobile alignright thin" style="width: 250px;"><a href="http://blog.algolia.com/wp-content/uploads/2013/04/gps-compass1.png" class="fancybox" title=""><img alt="" src="http://blog.algolia.com/wp-content/uploads/2013/04/gps-compass1.png" class="wp-image-1226" /></a></figure>
<p>While our latest news focused on the Algolia Search cloud offer (you can still join the <a title="Our Cloud Version is in Beta!" href="http://blog.algolia.com/our-saas-version-is-in-beta/">beta</a>), we&#8217;re pleased to introduce a major new version of Algolia Search offline: V2! It is available today for iOS, Android and OS X. Windows Phone and Windows versions will be released as soon as they are ready. A few months in the making, we used our early customers&#8217; feedback to introduce new features while simplifying integration.</p>
<h2>Algolia became the easiest way to search by geolocation!</h2>
<p>The ease of integration is a constant concern for us and that&#8217;s why we carefully consider every new feature. Two important features made it in this version:<br />
<span id="more-1199"></span></p>
<ul>
<li><span style="line-height: 13px;"><strong>Geo-search</strong> means the ability to search around a location or inside a bounding box. Results can be sorted by distance and of course geo-queries can be combined with textual ones. We added a dedicated tutorial in the doc to get up to speed with this new feature in no time (for <a title="iOS geo-search tutorial" href="http://www.algolia.com/doc/ios/#iOS_Geoloc" target="_blank">iOS</a> and <a title="Android geo-search tutorial" href="http://www.algolia.com/doc/android/#android_Geoloc" target="_blank">Android</a>).</span></li>
<li><strong>Tag filters</strong> enable restriction of results to specific tags. We received this demand a number of times in order to avoid the creation of too many specialized indexes.</li>
</ul>
<p>These new features are also available in the beta of our cloud version!</p>
<h2>Improved performance and ranking</h2>
<p>With some hard work&#8230; and a lot of profiling, we have been able to get a 10% gain in performance on every query.</p>
<p>In V1, name matches were always considered more important than other attributes, but we didn&#8217;t consider differences between other attributes. This changed in V2: ranking priority now respects the order in which you indicate attributes in the textToIndex method. It&#8217;s more powerful while actually being more consistent with no specific processing of the name field.</p>
<p>But this improvement comes at the cost of a slightly bigger index and longer computation. If index size is important or if you need to earn a few nanoseconds more, you can optimize it away with the increaseCompression method. You&#8217;ll get a 10 to 30% reduction in index size and an additional 20% boost in performance (that&#8217;s 30% total compared to V1!).</p>
<h2>Easy just got easier</h2>
<p>Integrating search in an app has never been so easy. For V2 we took into account all the excellent feedback we received, and wherever it was possible we simplified the API:</p>
<ul>
<li>No distinction between suggest and search methods. We wanted to match the expected use-cases of the SDK but it was causing more confusion than anything else. So there is now only one way to send queries to an index: the search method.</li>
<li>With the addition of geo-search, the index class was becoming crowded. We simplified this by decoupling the search approach and query definition. A small set of search methods enable the developer to choose if the search will be synchronous, use a callback, or batch several queries. And a simple SearchQuery class defines the nature of the queries themselves: geolocation, use of prefixes, tag filters, etc.</li>
<li>Out of simple strings for which we provide a helper, every indexable object now has a UID. Our use of a &#8220;name&#8221; for this role led to a few difficulties when collisions were possible (persons for example). There are no longer any privileged attributes.</li>
<li>License key initialization is now done using a static method. It is a best practice that was actually necessary to build a <a title="Algolia Search is now available for RubyMotion!" href="http://blog.algolia.com/algolia-search-is-now-available-for-rubymotion/">RubyMotion gem</a>.</li>
</ul>
<p>Specific to Android, we also added an AbstractIndexable abstract class. Instead of implementing the Indexable interface, you now have the option of directly extending AbstractIndexable that takes care of optional methods for you.</p>
<p>Specific to iOS, you can now directly index core data entities with the setCoreDataEntityDescription selector. No need to create a wrapper.</p>
<h2>Still able to read V1 indexes</h2>
<p>If for any reason you cannot replace or reindex your data, V2 is still able to search in a V1 index. However, as the name attribute was removed you do need to implement the IndexableLegacy interface. If you then publish changes, the new index will be in the V2 format.</p>
<p>We&#8217;re really sorry to make our Windows Phone and Windows customers wait. Feel free to torment us with your needs, great motivation to finish quicker <img src='http://blog.algolia.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>If you&#8217;re still reading, I guess it&#8217;s time for you to test this new version of the Algolia Search Offline SDK. <a href="http://www.algolia.com/get-started/">Get started</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.algolia.com/v2-our-new-offline-search-sdk-with-geo-search-and-other-features/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		
		<link>http://blog.algolia.com/we-are-finalists-at-next-berlin/</link>
		<comments>http://blog.algolia.com/we-are-finalists-at-next-berlin/#comments</comments>
		<pubDate>Thu, 11 Apr 2013 14:15:46 +0000</pubDate>
		<dc:creator>Nicolas Dessaigne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Conference]]></category>

		<guid isPermaLink="false">http://blog.algolia.com/?p=1181</guid>
		<description><![CDATA[The NEXT Berlin Conference will take place on April 23rd &#38; 24th in one of the most active ecosystem in Europe!  More than 100 experts will share their knowledge with an expected audience of 2000 attendees. If you follow our newsletter or social presence, chances are you saw our call for help to participate in the [...]]]></description>
				<content:encoded><![CDATA[<figure class="full-width-mobile alignright thin" style="width: 300px;"><a href="http://nextberlin.eu/2013/04/next13-start-up-pitch-these-are-the-12-finalists/"><img alt="" src="http://blog.algolia.com/wp-content/uploads/2013/04/NextBerlin.png" class="wp-image-1182" /></a></figure>
<p>The <a title="NEXT Berlin 2013" href="http://nextberlin.eu/" target="_blank">NEXT Berlin Conference</a> will take place on April 23rd &amp; 24th in one of the most active ecosystem in Europe!  More than 100 experts will share their knowledge with an expected audience of 2000 attendees.</p>
<p>If you follow our newsletter or social presence, chances are you saw our call for help to participate in the NEXT Berlin startup competition. We sincerely thank you for your votes! They placed us in the 30 top startups to be considered for the final. The judges then selected us as one of the <a title="NEXT Berlin Finalists" href="http://nextberlin.eu/2013/04/next13-start-up-pitch-these-are-the-12-finalists/" target="_blank">12 finalists</a> to pitch during the conference. We are thrilled to be able to present Algolia to the Berlin ecosystem!</p>
<p>If you happen to be attending NEXT Berlin, ping me if you’d like to meet! (@dessaigne on twitter, or nicolas at algolia dot com).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.algolia.com/we-are-finalists-at-next-berlin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		
		<link>http://blog.algolia.com/search-on-os-x-search-kit-vs-algolia/</link>
		<comments>http://blog.algolia.com/search-on-os-x-search-kit-vs-algolia/#comments</comments>
		<pubDate>Fri, 29 Mar 2013 17:05:08 +0000</pubDate>
		<dc:creator>Nicolas Dessaigne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://blog.algolia.com/?p=1112</guid>
		<description><![CDATA[I recently read Mattt Thompson&#8217;s post about Apple Search Kit and he&#8217;s right about it being rather unknown, at least I had never heard of it before. So my very first thought was &#8220;how does it compare to our own SDK for OS X?&#8221; I immediately asked Julien if he could perform a few tests. Here are [...]]]></description>
				<content:encoded><![CDATA[<figure class="full-width-mobile alignright thin" style="width: 234px;"><a href="http://blog.algolia.com/wp-content/uploads/2013/03/mountain-lion.jpg" class="fancybox" title=""><img alt="" src="http://blog.algolia.com/wp-content/uploads/2013/03/mountain-lion.jpg" class="wp-image-1115" /></a></figure>
<p>I recently read Mattt Thompson&#8217;s <a href="http://nshipster.com/search-kit/" target="_blank">post about Apple Search Kit</a> and he&#8217;s right about it being rather unknown, at least I had never heard of it before. So my very first thought was &#8220;how does it compare to our own SDK for OS X?&#8221; I immediately asked Julien if he could perform a few tests. Here are our findings.</p>
<h2>Scope of use</h2>
<p>Before examining the technical differences, it is important to stress the different intents behind the creation of both tools.</p>
<p><span id="more-1112"></span><br />
SearchKit has been designed as a document search engine, in what I call the &#8220;traditional approach&#8221;. It is able to index documents directly from disk (including conversion for a few common formats like pdf), and at the same time enables tokenization or stop words to be customized.</p>
<p>Algolia was designed differently. Even if it can be used to index 100-page documents, we targeted small texts, focusing on ease-of-use and performance. Tweaking a search engine requires deep expertise so we chose to hide that complexity by making sensible choices that work 99% of the time. You may see it as the &#8220;we know what&#8217;s best for you&#8221; approach taken by Apple for many of their products! On the other hand, we provide a Search SDK and only that. If you need to index PDF files, you need to manage the conversion with other libs.</p>
<h2>Test setup and scenario</h2>
<p>To get up to speed quickly, we performed our test with an existing dump of city data we had already grabbed from <a href="http://www.geonames.org/" target="_blank">geonames</a> for a tutorial (available here: <a href="http://www.algolia.com/doc/GeonamesCities.json" target="_blank">http://www.algolia.com/doc/<wbr />GeonamesCities.json</a>). It contains 150k cities with their name, country, known population, and geoposition.</p>
<p>Search Kit doesn&#8217;t support multi-fields (a document is a single collection of terms) so we chose to only index the city names in this test. (Teaser: upcoming Algolia SDK V2 will support geosearch).</p>
<h2>Results</h2>
<p>Here are the raw results on a MacBook Pro Retina:</p>
<table style="margin: 0 auto;">
<tbody>
<tr>
<td></td>
<td><b>Search Kit</b></td>
<td><b>Algolia</b></td>
</tr>
<tr>
<td><b>Indexation time</b></td>
<td>19498ms</td>
<td>4240ms</td>
</tr>
<tr>
<td><b>Index size</b></td>
<td>17MB without terms<br />
(24MB with terms for summary)</td>
<td>8MB</td>
</tr>
<tr>
<td><b>Search time for prefix queries</b><br />
(max 1k hits)</td>
<td></td>
<td></td>
</tr>
<tr>
<td>    l*</td>
<td>255ms</td>
<td>14ms</td>
</tr>
<tr>
<td>    lo*</td>
<td>255ms</td>
<td>16ms</td>
</tr>
<tr>
<td>    los*</td>
<td>51ms</td>
<td>20ms</td>
</tr>
<tr>
<td>    los a*</td>
<td>40ms</td>
<td>12ms</td>
</tr>
</tbody>
</table>
<p>The actual syntax of Algolia queries does not need the &#8216;*&#8217; character, as we use prefix queries by default.</p>
<h2>Our observations</h2>
<p>We discovered a few weak points of Search Kit during the test:</p>
<ul>
<li>It is a low level API and it doesn&#8217;t provide an Objective-C wrapper. It may explain why almost no one has heard of it.</li>
<li>It doesn&#8217;t provide any helper to highlight matching characters or terms.</li>
<li>It doesn&#8217;t support approximations, nor stemming. That means you need to query the exact words that are in the documents you index (prefix queries can also help in some cases).</li>
<li>There is no notion of multiple fields. A document is a simple set of terms. This is particularly problematic when you want to tune ranking, for example by boosting the title.</li>
<li>You must use a URI as identifier, even if you are indexing a simple string or if you are indexing an object that already has its own unique identifier. No big deal, but it complicates the code. Four our test, we had to write something like the following:</li>
</ul>
<p></p><pre class="crayon-plain-tag">NSURL *objectURL = [NSURL URLWithString:[NSString stringWithFormat:@"file:///%@", [cityName stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]]];
SKDocumentRef document = SKDocumentCreateWithURL((__bridge CFURLRef)objectURL);
SKIndexAddDocumentWithText(index, document, (__bridge CFStringRef)cityName, true);</pre><p>However, there are a few characteristics that Algolia does not provide:</p>
<ul>
<li>It enables customization of tokenization and of stop words. Make sure you know what you&#8217;re doing however, as it can have unexpected impact. For example, if you add &#8216;-&#8217; as a kSKTermChars, you won&#8217;t be able to find &#8220;Saint-Etienne&#8221; with the &#8220;etienne&#8221; query.</li>
<li>It is able to convert some common file types (PDF, HTML, RTF, DOC).</li>
<li>It supports more advanced boolean queries.</li>
</ul>
<h2>Conclusion</h2>
<p>There is no one-size-fits-all search engine out there, especially on OS X. I would say that if you&#8217;re building a search-as-you-type feature like Spotlight, you should first give our SDK a try. It is much faster to integrate, has better response times, and handles typos. And don&#8217;t forget it is also available for your iOS apps.</p>
<p>If, on the other hand, you want to build a more traditional document search, you may need the document conversion and customization of Search Kit.</p>
<p>We are no Search Kit gurus and we&#8217;re happy for any errors in this post to be corrected.</p>
<hr />
<p>&nbsp;</p>
<p>Here is the code we used for indexing and searching on Search Kit &amp; Algolia.</p>
<h4>Indexation with Search Kit</h4>
<p></p><pre class="crayon-plain-tag">CFTimeInterval before = CFAbsoluteTimeGetCurrent();
SKIndexRef index = SKIndexCreateWithURL((__bridge CFURLRef)fileURL, NULL, kSKIndexInvertedVector, NULL);
assert(index != nil);
NSString *citiesPath = [[NSBundle mainBundle] pathForResource:@"GeonamesCities" ofType:@"json"];
NSData* citiesData = [NSData dataWithContentsOfFile:citiesPath];
NSDictionary* dict = [NSJSONSerialization JSONObjectWithData:citiesData options:0 error:nil];

NSUInteger cnt = 0;
for (NSDictionary* k in dict) {
  NSString *cityName = [k objectForKey:@"Name"];
  NSURL *objectURL = [NSURL URLWithString:[NSString stringWithFormat:@"file:///%@", 
      [cityName stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]]];
  assert(objectURL != nil);
  SKDocumentRef document = SKDocumentCreateWithURL((__bridge CFURLRef)objectURL);
  SKIndexAddDocumentWithText(index, document, (__bridge CFStringRef)cityName, true);
  ++cnt;
}
SKIndexFlush(index);
SKIndexCompact(index);
CFTimeInterval after = CFAbsoluteTimeGetCurrent();
NSLog(@"Time to compile %zdms", (NSUInteger)((after - before) * 1000));</pre><p></p>
<h4>Indexation with Algolia Search</h4>
<p></p><pre class="crayon-plain-tag">CFTimeInterval before = CFAbsoluteTimeGetCurrent();
ASIndex* index = [[ASIndex alloc] initWithName:@"GeonamesCities" delegate:nil
                                  userDataClass:nil licenseKey:@""];
NSString *citiesPath = [[NSBundle mainBundle] pathForResource:@"GeonamesCities" ofType:@"json"];
NSData* citiesData = [NSData dataWithContentsOfFile:citiesPath];
NSDictionary* dict = [NSJSONSerialization JSONObjectWithData:citiesData options:0 error:nil];

for (NSDictionary* k in dict) {
    [index setEntry:nil forName:[k objectForKey:@"Name"]];
}
[index publishChanges];
CFTimeInterval after = CFAbsoluteTimeGetCurrent();
NSLog(@"Time to search %zdms", (NSUInteger)((after - before) * 1000));</pre><p></p>
<h4>Search with Search Kit</h4>
<p></p><pre class="crayon-plain-tag">NSString *query = @"l*";
CFTimeInterval before = CFAbsoluteTimeGetCurrent();
SKSearchOptions options = kSKSearchOptionDefault;
NSUInteger limit = 1000; // Maximum number of results
NSTimeInterval time = 10; // Maximum time to get results, in seconds
SKDocumentID documentIDs[limit];
CFURLRef *urls = calloc(limit, sizeof(CFURLRef));
float *scores = calloc(limit, sizeof(float));
SKSearchRef search = SKSearchCreate(index, (__bridge CFStringRef)query, options);
CFIndex count;

SKSearchFindMatches(search, limit, documentIDs, scores, time, &amp;count);
SKIndexCopyDocumentURLsForDocumentIDs(index, count, documentIDs, urls);

CFTimeInterval after = CFAbsoluteTimeGetCurrent();
NSLog(@"Time to search %zdms", (NSUInteger)((after - before) * 1000));</pre><p></p>
<h4>Search with Algolia Search</h4>
<p></p><pre class="crayon-plain-tag">NSString *query = @"l";
CFTimeInterval before = CFAbsoluteTimeGetCurrent();
[index setNbHitsForSuggest:1000]; // Maximum number of results

[index suggestSync:query];

CFTimeInterval after = CFAbsoluteTimeGetCurrent();
NSLog(@"Time to search %zdms", (NSUInteger)((after - before) * 1000));</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.algolia.com/search-on-os-x-search-kit-vs-algolia/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		
		<link>http://blog.algolia.com/instant-search-on-crunchbase/</link>
		<comments>http://blog.algolia.com/instant-search-on-crunchbase/#comments</comments>
		<pubDate>Tue, 26 Mar 2013 15:15:23 +0000</pubDate>
		<dc:creator>Nicolas Dessaigne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Demo]]></category>

		<guid isPermaLink="false">http://blog.algolia.com/?p=1071</guid>
		<description><![CDATA[After launching the Beta Cloud version of Algolia, we wanted to demonstrate what it can do. We built a search engine using CrunchBase data, so entrepreneurs can easily search for their company or themselves. Check it out! You can search for companies, people and financial organizations, using multiple attributes. Results are updated after each keystroke and matching characters [...]]]></description>
				<content:encoded><![CDATA[<figure class="full-width-mobile alignright thin" style="width: 216px;"><a href="http://www.crunchbase.com" target="_blank"><img alt="" src="http://blog.algolia.com/wp-content/uploads/2013/03/crunchbase_logo.png" class="wp-image-1072" /></a></figure>
<p>After launching the Beta Cloud version of Algolia, we wanted to demonstrate what it can do. We built a search engine using CrunchBase data, so entrepreneurs can easily search for their company or themselves. <a href="http://www.algolia.com/demo/crunchbase/" target="_blank">Check it out!</a></p>
<p>You can search for companies, people and financial organizations, using multiple attributes. Results are updated after each keystroke and matching characters are highlighted. And of course it tolerates typos. In this post we&#8217;ll explain in more detail how it works.</p>
<p><span id="more-1071"></span></p>
<h2>Indexation</h2>
<p>The CrunchBase API is unfortunately rather poor. There is no way to know the latest updates. So we dump it regularly and push it to our servers in json format after pruning unnecessary attributes and adding images encoded in base64.</p>
<p>We actually create 3 indexes for companies (117k+ entries), persons (152k+ entries) and financial organizations (9k+ entries). The json files, including images, are respectively 150MB, 70MB &amp; 7MB.  The full indexation takes about 5 seconds (excluding upload time). Resulting index sizes are respectfully 124MB, 85MB and 7,5MB.</p>
<p>Indexation is done simultaneously in 3 datacenters: US-West, US-East &amp; Europe. Additional datacenters are on the roadmap.</p>
<h2>Instant Search</h2>
<p>We trigger a query directly after page load and again after each keystroke. To simplify communication with the server, we created a javascript client (contact us if you want to use it before its release). We then simply call the search function indicating the callback that will handle resulting hits asynchronously. More details to follow once we&#8217;ve written the doc!</p>
<p>We automatically choose the server closest to your location by using <a href="http://aws.amazon.com/route53/" target="_blank">Amazon Route 53</a>. Once the DNS lookup is resolved, it lets us get low enough latencies that the response feels nearly instantaneous (if you test it from North America or Europe). From DSL connections, we obtain search latencies of about 90ms in San Francisco, 75ms in New York and 65ms in London. About 20ms are used for querying the index, 5ms for compressing the data and 5ms for uncompressing. The remaining time is the actual transfer of the data and depends of your location and the quality of your connection.</p>
<p>If you&#8217;re a hacker, you may also remark the presence of an API key in the javascript. It cannot be hidden as we directly query our servers from the browser. The operations it enables are however restricted to search only, you would need to use a different key to update entries for example. You can create and revoke as many API keys you need directly from the API.</p>
<h2>Hits Display</h2>
<p>No designer worked on the demo, but we hope it doesn&#8217;t show! We execute the 3 queries simultaneously and display the results by blocks of 20 hits. Additional queries are automatically triggered when scrolling to the bottom of the page.</p>
<p>We display approximate results with a transparent background to clearly differentiate them.</p>
<p>You can use the arrow keys to navigate inside the results.</p>
<h2>Ranking</h2>
<p>We use the standard ranking order. By descending priority:</p>
<ul>
<li>Exact matches before approximate matches;</li>
<li>User-defined order of attributes;</li>
<li>Distance between the matching term and the beginning of the attribute;</li>
<li>Proximity between terms in multi-word queries;</li>
<li>User defined score.</li>
</ul>
<p>For the order of attributes, we use {name, twitter, organization or people, description}. This translates into very simple settings. Here are for example the settings of the persons index:</p><pre class="crayon-plain-tag">{
  "attributesToIndex": ["name", "twitter", "unordered(companies)", "description"],
  "attributesToHighlight": ["name", "twitter", "companies", "description"],
  "customRanking": ["desc(size)", "asc(name)"]
}</pre><p>By default, all attributes are indexed and highlighted. &#8220;attributesToIndex&#8221; &amp; &#8220;attributesToHighlight&#8221; enable to precisely define what to index (and in what order), and what to highlight. The &#8220;unordered&#8221; modifier disable ranking between values of a multi-valued attributes.</p>
<p>For the user defined score (&#8220;customRanking&#8221; in settings) , we sort by decreasing order of CrunchBase entry size and then by alphabetical order.</p>
<h2>Help us</h2>
<p>This is just a demo but we&#8217;d like to continue improving it! Please tell us what you think and send your suggestions: contact at algolia dot com</p>
<h2></h2>
]]></content:encoded>
			<wfw:commentRss>http://blog.algolia.com/instant-search-on-crunchbase/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		
		<link>http://blog.algolia.com/our-saas-version-is-in-beta/</link>
		<comments>http://blog.algolia.com/our-saas-version-is-in-beta/#comments</comments>
		<pubDate>Mon, 18 Mar 2013 10:22:46 +0000</pubDate>
		<dc:creator>Nicolas Dessaigne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Beta]]></category>
		<category><![CDATA[Cloud]]></category>

		<guid isPermaLink="false">http://blog.algolia.com/?p=1054</guid>
		<description><![CDATA[Imagine all the power and simplicity of Algolia Search, but available online, from any connected device. Welcome to our Cloud offer! Up to now, our instant, typo-friendly search was only available locally on your device. You could only index data stored directly in your app. While that was great for offline apps, it was not [...]]]></description>
				<content:encoded><![CDATA[<figure class="full-width-mobile alignright thin" style="width: 240px;"><a href="http://blog.algolia.com/wp-content/uploads/2013/03/Cloud-Button.jpg" class="fancybox" title=""><img alt="" src="http://blog.algolia.com/wp-content/uploads/2013/03/Cloud-Button.jpg" class="wp-image-1056" /></a></figure>
<p>Imagine all the power and simplicity of Algolia Search, but available online, from any connected device. Welcome to our Cloud offer!</p>
<p>Up to now, our instant, typo-friendly search was only available locally on your device. You could only index data stored directly in your app. While that was great for offline apps, it was not so fantastic for rapidly changing data server-side. All that has just changed! You can now use our search engine online, enabling you to change your data at any frequency and return consistantly up-to-date search results in your apps. Interested? Request your invitation to the Beta from the <a title="Algolia Search Features" href="http://www.algolia.com/features/">features page</a>.</p>
<p>And don&#8217;t forget you can combine it with our offline SDK, for great search performance whatever the connectivity!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.algolia.com/our-saas-version-is-in-beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		
		<link>http://blog.algolia.com/new-website-new-video-new-algolia/</link>
		<comments>http://blog.algolia.com/new-website-new-video-new-algolia/#comments</comments>
		<pubDate>Tue, 12 Mar 2013 15:26:22 +0000</pubDate>
		<dc:creator>Nicolas Dessaigne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Company]]></category>

		<guid isPermaLink="false">http://blog.algolia.com/?p=1036</guid>
		<description><![CDATA[If you have visited our website in the past few days you may have noticed a few changes. We relaunched our website with a brand new design! Our main objective was to convey a clearer message about what Algolia is about and what we have to offer. In order to achieve this we: Completely redesigned [...]]]></description>
				<content:encoded><![CDATA[<figure class="full-width-mobile alignright thin" style="width: 212px;"><a href="http://blog.algolia.com/wp-content/uploads/2013/03/Rocket-launch.jpg" class="fancybox" title=""><img alt="" src="http://blog.algolia.com/wp-content/uploads/2013/03/Rocket-launch.jpg" class="wp-image-1042" /></a></figure>
<p>If you have visited our website in the past few days you may have noticed a few changes. We relaunched our website with a brand new design! Our main objective was to convey a clearer message about what Algolia is about and what we have to offer. In order to achieve this we:</p>
<ul>
<li>Completely redesigned the site to be less cluttered and hopefully better looking</li>
<li>Rewrote most of the content aiming for clarity and conciseness</li>
<li>Added illustrations to support our messages</li>
<li>Added a use-cases section to illustrate what can be built with Algolia Search.</li>
</ul>
<p>And finally, we made a new short video that should get you up to speed in barely a minute <img src='http://blog.algolia.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Hope you like it! Let us know how we could continue to improve!</p>
<p>PS: Don&#8217;t forget to check out our new <a href="http://algolia.com/pricing/" target="_blank">FREE</a> offer!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.algolia.com/new-website-new-video-new-algolia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		
		<link>http://blog.algolia.com/algolia-search-is-now-available-for-free/</link>
		<comments>http://blog.algolia.com/algolia-search-is-now-available-for-free/#comments</comments>
		<pubDate>Tue, 12 Mar 2013 09:15:33 +0000</pubDate>
		<dc:creator>Nicolas Dessaigne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Special offer]]></category>

		<guid isPermaLink="false">http://blog.algolia.com/?p=1026</guid>
		<description><![CDATA[Yes, you read that right! We&#8217;re not talking about a free trial, but of a completely FREE version of our SDK. It is often difficult to implement a good search experience, so we want to democratize access to easy-to-integrate and first class search features! All you have to do is to display non-intrusive Algolia branding. [...]]]></description>
				<content:encoded><![CDATA[<figure class="full-width-mobile alignright thin" style="width: 300px;"><a href="http://blog.algolia.com/wp-content/uploads/2013/03/tag_free2.png" class="fancybox" title=""><img alt="" src="http://blog.algolia.com/wp-content/uploads/2013/03/tag_free2.png" class="wp-image-1031" /></a></figure>
<p>Yes, you read that right! We&#8217;re not talking about a free trial, but of a completely FREE version of our SDK. It is often difficult to implement a good search experience, so we want to democratize access to easy-to-integrate and first class search features! All you have to do is to display non-intrusive Algolia branding.</p>
<p>This branded offer is already available on our website. Don&#8217;t delay, <a title="Get Started with Algolia" href="http://www.algolia.com/get-started/">register today</a>! Check out our <a title="Algolia Search Use Cases" href="http://www.algolia.com/usecases/">use-cases section</a> to discover possible implementations and see how Sharypic, Offline dictionaries, and Sush.io have integrated Algolia in their apps.</p>
<p>Help us spread the word. We want every app developer to be able to take advantage of this offer!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.algolia.com/algolia-search-is-now-available-for-free/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
