meilisearch 0.25.0 → 0.25.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 +76 -0
- data/lib/meilisearch/index.rb +3 -0
- data/lib/meilisearch/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64423a34ad9823417a67cf271103db76b41c3895470dbd13a1c90d986792d439
|
4
|
+
data.tar.gz: 1bc5ba4774f7704cc6aefed0458dab6de7f4a4c0b4e45c9bb762b4843fc7c5ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37800a57fffe10aa250adf14af4b34855af7281c4adc7b4c0b62b573ad87ff365095493be04b56c2451de79aac20533625738bee98f70c5c124302bfe6172096
|
7
|
+
data.tar.gz: b15bb586f86ba17e6b7546b246380458c1573c3c2c038e00610e2e83b1ad08dbf06293cdb1180cf309ee4317f0441f0df5edc08273d3f1ffe3b363e8acc09fe1
|
data/README.md
CHANGED
@@ -207,6 +207,82 @@ JSON output:
|
|
207
207
|
}
|
208
208
|
```
|
209
209
|
|
210
|
+
#### Display ranking details at search
|
211
|
+
|
212
|
+
JSON output:
|
213
|
+
|
214
|
+
```json
|
215
|
+
{
|
216
|
+
"hits": [
|
217
|
+
{
|
218
|
+
"id": 15359,
|
219
|
+
"title": "Wonder Woman",
|
220
|
+
"_rankingScoreDetails": {
|
221
|
+
"words": {
|
222
|
+
"order": 0,
|
223
|
+
"matchingWords": 2,
|
224
|
+
"maxMatchingWords": 2,
|
225
|
+
"score": 1.0
|
226
|
+
},
|
227
|
+
"typo": {
|
228
|
+
"order": 1,
|
229
|
+
"typoCount": 0,
|
230
|
+
"maxTypoCount": 2,
|
231
|
+
"score": 1.0
|
232
|
+
},
|
233
|
+
"proximity": {
|
234
|
+
"order": 2,
|
235
|
+
"score": 1.0
|
236
|
+
},
|
237
|
+
"attribute": {
|
238
|
+
"order": 3,
|
239
|
+
"attributeRankingOrderScore": 0.8181818181818182,
|
240
|
+
"queryWordDistanceScore": 1.0,
|
241
|
+
"score": 0.8181818181818182
|
242
|
+
},
|
243
|
+
"exactness": {
|
244
|
+
"order": 4,
|
245
|
+
"matchType": "exactMatch",
|
246
|
+
"score": 1.0
|
247
|
+
}
|
248
|
+
}
|
249
|
+
}
|
250
|
+
]
|
251
|
+
}
|
252
|
+
```
|
253
|
+
|
254
|
+
You can enable it by querying PATCH /experimental-features with { "scoreDetails": true }
|
255
|
+
|
256
|
+
This feature is only available with Meilisearch v1.3 and newer (optional).
|
257
|
+
|
258
|
+
#### Custom Search With attributes on at search time <!-- omit in toc -->
|
259
|
+
|
260
|
+
[Customize attributes to search on at search time](https://www.meilisearch.com/docs/reference/api/search#customize-attributes-to-search-on-at-search-time).
|
261
|
+
|
262
|
+
you can perform the search :
|
263
|
+
|
264
|
+
```ruby
|
265
|
+
index.search('wonder', { attributes_to_search_on: ['genres'] })
|
266
|
+
```
|
267
|
+
|
268
|
+
|
269
|
+
JSON output:
|
270
|
+
|
271
|
+
```json
|
272
|
+
{
|
273
|
+
"hits":[],
|
274
|
+
"query":"wonder",
|
275
|
+
"processingTimeMs":0,
|
276
|
+
"limit":20,
|
277
|
+
"offset":0,
|
278
|
+
"estimatedTotalHits":0,
|
279
|
+
"nbHits":0
|
280
|
+
}
|
281
|
+
```
|
282
|
+
|
283
|
+
This feature is only available with Meilisearch v1.3 and newer (optional).
|
284
|
+
|
285
|
+
|
210
286
|
## 🤖 Compatibility with Meilisearch
|
211
287
|
|
212
288
|
This package guarantees compatibility with [version v1.x of Meilisearch](https://github.com/meilisearch/meilisearch/releases/latest), but some features may not be present. Please check the [issues](https://github.com/meilisearch/meilisearch-ruby/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+label%3Aenhancement) for more info.
|
data/lib/meilisearch/index.rb
CHANGED
@@ -220,6 +220,9 @@ module MeiliSearch
|
|
220
220
|
|
221
221
|
### SEARCH
|
222
222
|
|
223
|
+
# options: A Hash
|
224
|
+
# show_ranking_score - To see the ranking scores for returned documents
|
225
|
+
# attributes_to_search_on - Customize attributes to search on at search time.
|
223
226
|
def search(query, options = {})
|
224
227
|
attributes = { q: query.to_s }.merge(options.compact)
|
225
228
|
|
data/lib/meilisearch/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meilisearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.25.
|
4
|
+
version: 0.25.1
|
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-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|