28 May 2013
We launched the private beta of our Search-as-a-Service offer two months ago. In that time we
received very positive feedback from our beta testers and we couldn’t thank
them enough for the help they provided. To date, they have sent over 1M
indexation jobs and over 5M queries, and the trend is increasing.
Today we are happy to continue simplifying the experience with the release of
six API Clients under the MIT license:
Ease of integration just improved again! Your feedback (and pull requests) is
most welcome.
24 May 2013
We are pleased to introduce a new version of Algolia Search Offline for iOS,
Android and OS X (Windows versions will come soon).
Version 2.1 significantly improves the out-of-the box relevance of Algolia
Search. We are now confident we have the best relevance on the market. We will
discuss our ranking approach compared to traditional methods in another post.
For now, the two main improvements offered in this version are:
* When the query string has one word that is the entire content of a field, we will display it first. You can try it with the "arm" query on our Crunchbase demonstration to get the idea: [http://bit.ly/searchcrunchbase](http://bit.ly/searchcrunchbase) (it uses the same relevance approach). * More importance is given to proximity than to the order of attributes. For example, the query "managing p" will now match first "Managing Partner" in the "Title" attribute instead of "P" in the "Name" attribute followed by "Managing" in the "Title". This is the case even if the order of the attributes is ["Name", "Title", ...].
While you can control ranking with the setRankingOrder method, you will
benefit from these improvements by default.
This new release also introduces some new features:
- A way to efficiently serialize latitude/longitude and float values in your custom objects (reduce the size of serialized objects by up to 80%).
- A method to compile an index in an old version format. This is useful when indexes are created server side and then pushed to applications that support old versions of Algolia.
- All characters in tag filters are now supported.
- It is now possible to do a logic OR between tags in filters. For example, you can search all contacts that match the query “paul” and have the tag “friend” OR the tag “classmate”.
We hope you’ll like these new features, and as ever, we welcome your feedback!
21 May 2013
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 function 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! Check it
out!
Obtaining the data
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’t want to spend days implementing our own
distributed crawler and definitely didn’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.
We chose to perform the crawling with grepsr, 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’ attributes to provide us with a clean dataset. After a few days we had
our full dataset ready for indexing.
Indexing
Indexing was actually the easiest part. We uploaded the data in JSON format to
our backend and used these simple settings:
{
"attributesToIndex": ["name", "author", "category"],
"attributesToHighlight": ["name", "author","category", "description"],
"customRanking": ["desc(score)", "asc(name)"]
}
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.
The score is a simple computation between the number of comments and the
average ranking: rating * log2(nbComments) * 10000
.
Searching
Similar to our CrunchBase demo, 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.
Guillaume Esquevin 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!
In the end we did receive access to the Apple API, which we may use later on
to keep the data in sync.
25 Apr 2013
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 sets up
your Xcode workspace.
You can now set up Algolia Search Offline in your iOS project with this line
in your Podfile:
pod 'AlgoliaSearchOffline-iOS-SDK'
You can also set up Algolia Search Offline in your OS X project with this
line:
pod 'AlgoliaSearchOffline-OSX-SDK'
Once you’re done, simply use the “pod install” command to set up Algolia
Search Offline in your project. Now it’s easy to manage library dependencies
for iOS and OS X projects!
16 Apr 2013
While our latest news focused on the Algolia Search cloud offer (you can still
join the beta, we’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, these
new features were built on early customer feedback and will simplify
integration.
Algolia becomes the easiest way to search by geolocation!
The ease of integration is a constant concern for us and that’s why we
carefully consider every new feature. Two important features made it in this
version:
- Geo-search 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 iOS and Android.
- Tag filters 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.
These new features are also available in the beta of our cloud version!
With some hard work… and a lot of profiling, we have been able to get a 10%
gain in performance on every query.
In V1, name matches were always considered more important than other
attributes, but we didn’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’s more powerful while actually being
more consistent with no specific processing of the name field.
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’ll get a 10 to 30% reduction in index size and an additional 20%
boost in performance (that’s 30% total compared to V1!).
Easy just got easier
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:
- 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.
- 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.
- Out of simple strings for which we provide a helper, every indexable object now has a UID. Our use of a “name” for this role led to a few difficulties when collisions were possible (persons for example). There are no longer any privileged attributes.
- License key initialization is now done using a static method. It is a best practice that was actually necessary to build a RubyMotion gem.
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.
Specific to iOS, you can now directly index core data entities with the
setCoreDataEntityDescription selector. No need to create a wrapper.
Still able to read V1 indexes
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.
We’re really sorry to make our Windows Phone and Windows customers wait. Feel
free to torment us with your needs, it’s great motivation to finish more
quickly ;)
If you’re still reading, I guess it’s time for you to test this new version of
the Algolia Search Offline SDK. Get started!