Search API Client for Ruby
Algolia Ruby Gem

Version

  • Supports Ruby version 2.2+

Related Integrations

Key links


Get started

Install (get a free account here.)

1gem install algolia

Index

1res = index.save_objects([{
2  firstname: 'Jimmie',
3  lastname:  'Barninger',
4  objectID:  'myID1'
5}, {
6  firstname: 'Warren',
7  lastname:  'Speach',
8  objectID:  'myID2'
9}])

Search

1index = client.init_index('contacts')
2
3// Search without settings
4res = index.search('query string')
5
6// Search with settings
7res = index.search('query string', {
8  params: {
9    attributesToRetrieve: 'firstname,lastname',
10    hitsPerPage: 20
11  }
12})
Get started for freeExplore all developer docs

Built with Algolia

Showcase
Demo

Yarn

Search all packages in the npm and yarn registry

  • typescript
  • javascript
  • ruby