meilisearch-rails 0.9.1 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -1
- data/README.md +21 -8
- data/lib/meilisearch/rails/version.rb +1 -1
- data/meilisearch-rails.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6cae00e4ee6cf99a4a37dc952878f7daf7a7a20430e5fd46a79c3a67c0fc449
|
4
|
+
data.tar.gz: 5a7ac80cc7e7efec587c50130512b689da1d9ff79f9fed659a938c7d9e271da1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52e7e1d510abc2c5b60d53c017ab2daf966134f5978181d7f02020d94a35e6ea5211956de69b156eaa71ff42e0ddbea58f1bf22d63c56a8cbc917dd93966ad15
|
7
|
+
data.tar.gz: 7e900cf552380b547f9f3a7d451f4a9f94631c48fc56a2269eead4104263b33807ffeca035bb8ca468cad4c516df5f8e8faf7de269a6321f7f8a049f7c0a0f6a
|
data/Gemfile
CHANGED
@@ -13,7 +13,7 @@ group :development do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
group :test do
|
16
|
-
rails_version = ENV['RAILS_VERSION'] || '
|
16
|
+
rails_version = ENV['RAILS_VERSION'] || '6.1'
|
17
17
|
sequel_version = ENV['SEQUEL_VERSION'] ? "~> #{ENV['SEQUEL_VERSION']}" : '>= 4.0'
|
18
18
|
|
19
19
|
gem 'active_model_serializers'
|
@@ -31,6 +31,7 @@ group :test do
|
|
31
31
|
gem 'jdbc-sqlite3', platform: :jruby
|
32
32
|
gem 'rspec', '~> 3.0'
|
33
33
|
gem 'simplecov', require: 'false'
|
34
|
+
gem 'codecov', require: 'false'
|
34
35
|
gem 'threads'
|
35
36
|
|
36
37
|
gem 'byebug'
|
data/README.md
CHANGED
@@ -6,17 +6,21 @@
|
|
6
6
|
|
7
7
|
<h4 align="center">
|
8
8
|
<a href="https://github.com/meilisearch/meilisearch">Meilisearch</a> |
|
9
|
+
<a href="https://www.meilisearch.com/pricing?utm_campaign=oss&utm_source=integration&utm_medium=meilisearch-rails">Meilisearch Cloud</a> |
|
9
10
|
<a href="https://docs.meilisearch.com">Documentation</a> |
|
10
11
|
<a href="https://discord.meilisearch.com">Discord</a> |
|
11
12
|
<a href="https://roadmap.meilisearch.com/tabs/1-under-consideration">Roadmap</a> |
|
12
13
|
<a href="https://www.meilisearch.com">Website</a> |
|
13
|
-
<a href="https://
|
14
|
+
<a href="https://www.meilisearch.com/docs/faq">FAQ</a>
|
14
15
|
</h4>
|
15
16
|
|
16
17
|
<p align="center">
|
17
18
|
<a href="https://github.com/meilisearch/meilisearch-rails/actions"><img src="https://github.com/meilisearch/meilisearch-rails/workflows/Tests/badge.svg" alt="Test"></a>
|
19
|
+
<a href="https://app.codecov.io/gh/meilisearch/meilisearch-rails/tree/main" >
|
20
|
+
<img src="https://codecov.io/gh/meilisearch/meilisearch-rails/branch/main/graph/badge.svg?token=9J7LRP11IR"/>
|
21
|
+
</a>
|
18
22
|
<a href="https://github.com/meilisearch/meilisearch-rails/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-informational" alt="License"></a>
|
19
|
-
<a href="https://
|
23
|
+
<a href="https://ms-bors.herokuapp.com/repositories/68"><img src="https://bors.tech/images/badge_small.svg" alt="Bors enabled"></a>
|
20
24
|
</p>
|
21
25
|
|
22
26
|
<p align="center">⚡ The Meilisearch integration for Ruby on Rails 💎</p>
|
@@ -28,6 +32,7 @@
|
|
28
32
|
## Table of Contents <!-- omit in toc -->
|
29
33
|
|
30
34
|
- [📖 Documentation](#-documentation)
|
35
|
+
- [⚡ Supercharge your Meilisearch experience](#-supercharge-your-meilisearch-experience)
|
31
36
|
- [🤖 Compatibility with Meilisearch](#-compatibility-with-meilisearch)
|
32
37
|
- [🚀 Getting started](#-getting-started)
|
33
38
|
- [Compatibility](#-compatibility)
|
@@ -58,7 +63,11 @@
|
|
58
63
|
|
59
64
|
The whole usage of this gem is detailed in this README.
|
60
65
|
|
61
|
-
To learn more about Meilisearch, check out our [Documentation](https://
|
66
|
+
To learn more about Meilisearch, check out our [Documentation](https://www.meilisearch.com/docs/learn/tutorials/getting_started.html) or our [API References](https://www.meilisearch.com/docs/reference/api/).
|
67
|
+
|
68
|
+
## ⚡ Supercharge your Meilisearch experience
|
69
|
+
|
70
|
+
Say goodbye to server deployment and manual updates with [Meilisearch Cloud](https://www.meilisearch.com/pricing?utm_campaign=oss&utm_source=integration&utm_medium=meilisearch-rails). No credit card required.
|
62
71
|
|
63
72
|
## 🤖 Compatibility with Meilisearch
|
64
73
|
|
@@ -66,7 +75,7 @@ This package guarantees compatibility with [version v1.x of Meilisearch](https:/
|
|
66
75
|
|
67
76
|
## 🔧 Installation <!-- omit in toc -->
|
68
77
|
|
69
|
-
This package requires Ruby version 2.
|
78
|
+
This package requires Ruby version 2.7.0 or later and Rails 6.1 or later. It may work in older versions but it is not officially supported.
|
70
79
|
|
71
80
|
With `gem` in command line:
|
72
81
|
```bash
|
@@ -82,7 +91,7 @@ gem 'meilisearch-rails'
|
|
82
91
|
|
83
92
|
### Run Meilisearch <!-- omit in toc -->
|
84
93
|
|
85
|
-
There are many easy ways to [download and run a Meilisearch instance](https://
|
94
|
+
There are many easy ways to [download and run a Meilisearch instance](https://www.meilisearch.com/docs/reference/features/installation.html#download-and-launch).
|
86
95
|
|
87
96
|
For example, if you use Docker:
|
88
97
|
|
@@ -108,6 +117,8 @@ MeiliSearch::Rails.configuration = {
|
|
108
117
|
|
109
118
|
The gem is compatible with [ActiveRecord](https://github.com/rails/rails/tree/master/activerecord), [Mongoid](https://github.com/mongoid/mongoid) and [Sequel](https://github.com/jeremyevans/sequel).
|
110
119
|
|
120
|
+
⚠️ Note that even if you want to use all the default options, you must declare an empty `meilisearch` block in your model.
|
121
|
+
|
111
122
|
#### Add documents <!-- omit in toc -->
|
112
123
|
|
113
124
|
The following code will create a `Book` index and add search capabilities to your `Book` model.
|
@@ -123,7 +134,9 @@ class Book < ActiveRecord::Base
|
|
123
134
|
end
|
124
135
|
```
|
125
136
|
|
126
|
-
|
137
|
+
#### Automatic indexing
|
138
|
+
|
139
|
+
As soon as you configure your model as mentioned above, `meilisearch-rails` will keep your database table data in sync with your Meilisearch instance using the `ActiveRecord` callbacks automatically.
|
127
140
|
|
128
141
|
#### Basic Backend Search <!-- omit in toc -->
|
129
142
|
|
@@ -191,11 +204,11 @@ class Book < ApplicationRecord
|
|
191
204
|
end
|
192
205
|
```
|
193
206
|
|
194
|
-
Check the dedicated section of the documentation, for more information on the [settings](https://
|
207
|
+
Check the dedicated section of the documentation, for more information on the [settings](https://www.meilisearch.com/docs/reference/api/settings#settings_parameters).
|
195
208
|
|
196
209
|
## 🔍 Custom search
|
197
210
|
|
198
|
-
All the supported options are described in the [search parameters](https://
|
211
|
+
All the supported options are described in the [search parameters](https://www.meilisearch.com/docs/reference/api/search#search-parameters) section of the documentation.
|
199
212
|
|
200
213
|
```ruby
|
201
214
|
Book.search('Harry', attributes_to_highlight: ['*'])
|
data/meilisearch-rails.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meilisearch-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Meili
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: meilisearch
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.25.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.25.0
|
27
27
|
description: Meilisearch integration for Ruby on Rails. See https://github.com/meilisearch/meilisearch
|
28
28
|
email: bonjour@meilisearch.com
|
29
29
|
executables: []
|