Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

meilisearch/demo-finding-rubygems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Please note: since January 2022, this demo is now hosted at https://github.com/meilisearch/demos/tree/main/src/finding-rubygems


MeiliSearch finds RubyGems

A new experience of search to find your favorite RubyGems 🎉

Search by gem name or by keywords.

rubygems demo gif

The search is powered by MeiliSearch, the open-source and instant search engine.

See also

This project uses the Ruby SDK for MeiliSearch.

How to run the data collector

Set the following environment variables:

  • MEILISEARCH_HOST_URL
  • MEILISEARCH_API_KEY

Run:

$ bundle install
$ bundle exec ruby meilisearch/app.rb

MeiliSearch settings

require 'meilisearch'

...

settings = {
  rankingRules: [
    'typo',
    'words',
    'desc(fame)',
    'proximity',
    'attribute',
    'exactness',
    'desc(total_downloads)',
  ],
  searchableAttributes: [
    'name',
    'summary'
  ],
  displayedAttributes: [
    'name',
    'summary',
    'description',
    'version',
    'total_downloads'
  ]
}

client = MeiliSearch::Client.new(URL, API_KEY)
client.index(index_uid).update_settings(settings)

Details

The front is deployed to GitHub Pages.

All gems data and main of HTML/CSS come from RubyGems website.

The script to fetch data and push them to MeiliSearch runs every day on Heroku with to Heroku Scheduler.

Here is the repository of MeiliSearch.

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •