meilisearch-rails 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +17 -3
- data/lib/meilisearch/configuration.rb +5 -1
- data/lib/meilisearch/utilities.rb +1 -1
- data/lib/meilisearch/version.rb +1 -1
- data/meilisearch-rails.gemspec +2 -2
- 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: e9d980447aeb2f250944f90bb5f4b3d3a9f331dfe05eebe7c60408e728deeaf9
|
4
|
+
data.tar.gz: 75bf6d2db221921786720f7563cbe7371b164d223c3af42295bd8716e32005e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f07ded69841b317d70a3cdbbfd266276500b67e415d147bdb620523e203f6ca7a7a1ad10b3460aa2d6827c5417cc24dddc72427815d2fb648cdc48021e96d385
|
7
|
+
data.tar.gz: 168f2e51985ba54159565ab4b1eb0f7c205a3e32a61a5bdd8335179c37fe97f89fc25f34580316acae3a7b40df24e898b8a9a270b704da0a7013e1631284aa21
|
data/README.md
CHANGED
@@ -104,8 +104,8 @@ Create a new file `config/initializers/meilisearch.rb` to setup your `MEILISEARC
|
|
104
104
|
|
105
105
|
```ruby
|
106
106
|
MeiliSearch.configuration = {
|
107
|
-
|
108
|
-
|
107
|
+
meilisearch_host: 'YourMeiliSearchHost',
|
108
|
+
meilisearch_api_key: 'YourMeiliSearchAPIKey',
|
109
109
|
}
|
110
110
|
```
|
111
111
|
|
@@ -183,7 +183,21 @@ The **number of hits per page defaults to 20**, you can customize it by adding t
|
|
183
183
|
Book.search('harry potter', hitsPerPage: 10)
|
184
184
|
```
|
185
185
|
|
186
|
-
|
186
|
+
#### Extra Configuration <!-- omit in toc -->
|
187
|
+
|
188
|
+
Requests made to MeiliSearch may timeout and retry. To adapt the behavior to
|
189
|
+
your needs, you can change the parameters during configuration:
|
190
|
+
|
191
|
+
```ruby
|
192
|
+
MeiliSearch.configuration = {
|
193
|
+
meilisearch_host: 'YourMeiliSearchHost',
|
194
|
+
meilisearch_api_key: 'YourMeiliSearchAPIKey',
|
195
|
+
timeout: 2,
|
196
|
+
max_retries: 1,
|
197
|
+
}
|
198
|
+
```
|
199
|
+
|
200
|
+
## ⚙️ Settings
|
187
201
|
|
188
202
|
You can configure the index settings by adding them inside the `meilisearch` block as shown below:
|
189
203
|
|
@@ -9,7 +9,11 @@ module MeiliSearch
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def client
|
12
|
-
::MeiliSearch::Client.new(
|
12
|
+
::MeiliSearch::Client.new(
|
13
|
+
configuration[:meilisearch_host],
|
14
|
+
configuration[:meilisearch_api_key],
|
15
|
+
configuration.slice(:timeout, :max_retries)
|
16
|
+
)
|
13
17
|
end
|
14
18
|
end
|
15
19
|
end
|
data/lib/meilisearch/version.rb
CHANGED
data/meilisearch-rails.gemspec
CHANGED
@@ -41,6 +41,6 @@ Gem::Specification.new do |s|
|
|
41
41
|
s.licenses = ["MIT"]
|
42
42
|
s.require_paths = ["lib"]
|
43
43
|
s.summary = "MeiliSearch integration for Ruby on Rails."
|
44
|
-
s.add_dependency(
|
45
|
-
s.add_dependency(
|
44
|
+
s.add_dependency("json", [">= 1.5.1"])
|
45
|
+
s.add_dependency("meilisearch", [">= 0.15.4"])
|
46
46
|
end
|
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.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Meili
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.15.
|
33
|
+
version: 0.15.4
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.15.
|
40
|
+
version: 0.15.4
|
41
41
|
description: MeiliSearch integration for Ruby on Rails. See https://github.com/meilisearch/MeiliSearch
|
42
42
|
email: bonjour@meilisearch.com
|
43
43
|
executables: []
|