Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nguyenvanhuan243/rails_meilisearch_docker
Rails meilisearch docker
https://github.com/nguyenvanhuan243/rails_meilisearch_docker
meilisearch rails ruby
Last synced: about 4 hours ago
JSON representation
Rails meilisearch docker
- Host: GitHub
- URL: https://github.com/nguyenvanhuan243/rails_meilisearch_docker
- Owner: nguyenvanhuan243
- Created: 2023-10-21T05:44:17.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-22T02:21:09.000Z (about 1 year ago)
- Last Synced: 2024-11-12T02:14:33.677Z (about 2 months ago)
- Topics: meilisearch, rails, ruby
- Language: Ruby
- Homepage: https://ms-e247b6827365-5832.sgp.meilisearch.io
- Size: 49.8 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# README
# New app app with docker: ```rails new rails_app_new --main -database=psql```
# Meilisearch: https://www.meilisearch.com/
# Cloud: https://cloud.meilisearch.com/projects
# Search page: https://ms-fb38c25d79d8-5829.sfo.meilisearch.io/?api_key=7dd339c0c69795c9fb8fdd29cae743fe89fedb97&cloud_banner=false
# Docker
build: ``` docker-compose build ```
start: ``` docker-compose up ```# Meilisearch Install
# Gem: https://github.com/meilisearch/meilisearch-ruby
# frozen_string_literal: true
```
require 'meilisearch'module MeiliSearch
class Api
def initialize
@client = MeiliSearch::Client.new(ENV['MEILI_URL'], ENV['MEILI_MASTER_KEY'], timeout: 15)
enddef add_documents(index, data)
@client.index(index).add_documents(data)
enddef delete_documents(index)
@client.index(index).delete_all_documents
endend
end
```# Using
```
client = MeiliSearch::Api.new
client.add_documents(index, data)
```