What Is Algolia?
Algolia is a hosted full-text, numerical, and faceted search engine capable of delivering realtime results from the first keystroke. Algolia’s powerful API lets you quickly and seamlessly implement search within your websites and mobile applications. Our search API powers billions of queries for thousands of companies every month, delivering relevant results in under 100ms anywhere in the world.
Algolia is not based on traditional search solutions like Lucene or Solr. Algolia was built from the ground up specifically for searching through semi-structured data to power user-facing search.
In order to provide the best user experience, we focus on performance - milliseconds matter, and we developed an engine capable of delivering results in a few milliseconds, fast enough to power a seamless, “as-you-type” experience - the de facto consumer-grade search experience.
Our ability to achieve unparalleled speed relies on a multitude of factors, many of which are outlined in this blog post. For instance, the Algolia engine handles the vast majority of computation at indexing time, as opposed to at query time. Beyond this, we control the full stack end-to-end. We’ve obsessed over every detail, from obtaining high quality infrastructure (bare-metal servers!) to crafting our own Ubuntu-based OS painstakingly modified for search engine performance.
Beyond speed, we focus on providing all the features necessary to build a full-fledged search experience out-of-the-box: prefix search, typo-tolerance, faceting, highlighting, and more.
Performance is important; however, in order for search to be successful, results need to be relevant to the user. Varying from the traditional TF-IDF approach to relevancy, we built a modern tie-breaking algorithm tuned specifically for semi-structured data. Rather than calculating one “score” per result and sorting based solely off a magic number, Algolia calculates N scores and then applies N successive sorting. In layman’s terms, this means “buckets” of results are sorted by a cascade of varying criteria. When matches occur in the first criterion, the second criterion is considered to help break the tie, and so on in succession. This approach is meant to mimic how our brains naturally search for information - and as a consequence, is far easier to debug.
The Algolia engine provides various criteria for building stellar textual relevancy. On top of these, additional rules can be set to further hone the relevancy for a specific dataset. For example, a numeric “popularity” attribute could be leveraged as a potential tie-breaker rule to help more popular items rank higher. By enabling business relevance metrics to be added at will and via API, this forms the foundation for handling advanced search experiences like personalization, merchandising and more.
An index is an entity within Algolia where you import the data you want to search (indexing) and perform queries against (search). Each index within Algolia is analogous to a table within a database except the index is highly optimized for search.
Each item stored within an index is a record. A record is a JSON schemaless object you wish to make searchable that you add to your index. Each attribute in a record can be used for searching, displaying, filtering, or ranking.
An operation is an atomic action performed on our engine. There are two types of operations: index and search operations.
- Indexing is the process of adding, updating, deleting, or manipulating the data within the index.
- Searching is the process of querying the data stored in the index to return relevant search results.
Algolia has many built-in features that can easily be configured and used within any search implementation. All of these are available out of the box, and don’t require any extra development.
Here’s a quick review of select features that are particularly helpful for getting started with building search.
Global Language Support
Algolia works with all languages, including Chinese, Japanese, Korean, Hebrew and Arabic without any additional work required. This means that both left-to-right (LTR) and right-to-left (RTL) scripts are supported.
Users misspell words, especially those using mobile devices. To prevent letting these common mistakes ruin your user’s search experience, Algolia provides robust typo-tolerance, along with easy ways to customize just how tolerant a search experience should be.
Highlighting and Snippeting
Each search response contains one or more highlighted results so you can easily show which section and words matched the user’s query. Highlighting will work even in cases where the user misspelled a query. Similarly, it’s possible to include snippets of response information in the case of lengthier pieces of content.
The Algolia response contains matching facets based on the query and any previously selected facets. With this information, you can build an intuitive, faceted experience that allows users to understand the available refinements and helps avoid “no results” screens.
Synonyms tell the engine about sets of words and expressions that should be considered equal — for example,
jacket ⇔ parka or
mad ⇔ angry. You can specify various types of synonyms based on the needs of your data.
Query expansion is the progressive loosening of query constraints to include more results when none are initially found. Algolia provides various parameters and advanced syntax options for fine-tuning this type of behavior.
Advanced Language Processing
Search results from queries based on location (Geo-Search) can contain distance information. This enables you to display nearby search results sorted by distance, or constrain your search to a particular region or radius.
Multiple Sorting Strategies
Algolia allows you to easily set up various sorting strategies, to help your users select their preferred ranking. For example, you may choose to allow users to sort by recency or lowest price.
The distinct feature allows for either de-duplication or grouping based on a specific “key” attribute. This allows you to easily remove duplicate records or group sets of records (which is particularly useful for handling parent-child relationships).
Algolia’s personalization feature creates relevance tuned specifically for each user. For example, teenagers searching for “Grand Theft Auto” might be looking for game strategies; mothers searching the same want to know if the game is appropriate for their kids. Personalization allows you to “boost” results that might be subjectively more in line with a particular user’s tastes.
Continue building your Algolia knowledge with these concepts:
Did you find this page helpful?
We're always looking for advice to help improve our documentation!
Please let us know what's working (or what's not!).
We're constantly iterating thanks to the feedback we receive.