Rails for the Ruby Search API

Features

  • Made to simplify the usage of Algolia’s API within the Ruby on Rails Framework
  • Compatible with ActiveRecord, Mongoid, Sequel
  • Built to manage all search, indexing, events, and Recommend functionality
  • 100% open source
  • Comes with a WebMock sample configuration to mock Algolia’s API
  • Background retry strategy to ensure uptime
  • Seamless batching via iterators to optimize number of network calls
  • Zero downtime reindexing feature

Version

  • This gem supports Ruby from 2.4.x to 3.0.0 and Rails 5.x and 6.x

Related Integrations

  • Ruby API Client, Autocomplete, InstantSearch

Key links


Get started

INSTALL

1gem install algoliasearch-rails

INDEX

1class Contact < ActiveRecord::Base
2  include AlgoliaSearch
3
4  algoliasearch do
5    attributes :first_name, :last_name, :email
6    attribute :company do
7      { name: company_name, website: company_website }
8    end
9  end
10end
11
12Contact.reindex!

SEARCH

1Contact.algolia_search("jon doe")
Get started for freeExplore all developer docs

Built with Algolia

Showcase
Demo

Hacker News

Search for posts on Hackernews, sorted by votes or date

  • rubyonrails
  • react