Search API Client for Ruby

Ruby + Algolia

Build search experiences with libraries & UI components.

Sign up
What is Algolia

What is Algolia

Algolia empowers modern developers to build world class search and discovery experiences without any DevOps.
Libraries with every major language and framework make it easy to enrich your users' experiences. 

Ruby

API-first search and discovery for your Ruby applications

Utilize the Algolia open-source Ruby gem to index your data, configure your search, add analytics and much more.  

Algolia is an API-First Search and Discovery platform that empowers builders to compose experiences at scale. Explore Algolia

Features

  • Gives API access to all Algolia functionality, settings, advanced features, and ML/AI products

  • Installs with and without Bundler

  • Compatible with ActiveRecord, Mongoid, and Sequel

  • Built with modern tools: Minitest, Yard convention, Faraday

  • Background retry strategy to ensure uptime

  • Seamless batching via iterators to optimize number of network calls

  • Zero downtime reindexing feature

  • Thin & minimal low-level HTTP client to interact with Algolia's API

Version

  • Supports Ruby version 2.2+

Related Integrations

Get started

  • Install (get a free account here.)
    1
    gem install algolia
  • Index
    1
    res = index.save_objects([{
    2
      firstname: 'Jimmie',
    3
      lastname:  'Barninger',
    4
      objectID:  'myID1'
    5
    }, {
    6
      firstname: 'Warren',
    7
      lastname:  'Speach',
    8
      objectID:  'myID2'
    9
    }])
  • Search
    1
    index = client.init_index('contacts')
    2
    3
    // Search without settings
    4
    res = index.search('query string')
    5
    6
    // Search with settings
    7
    res = index.search('query string', {
    8
      params: {
    9
        attributesToRetrieve: 'firstname,lastname',
    10
        hitsPerPage: 20
    11
      }
    12
    })
Get started for free
Explore developer docs