Skip to content

Commit 3d0cefa

Browse files
bors[bot]meili-botcurquizaalallema
authored
Merge #169
169: Changes related to the next MeiliSearch release (v0.21.0) r=curquiza a=meili-bot Related to this issue: meilisearch/integration-guides#117 This PR: - gathers the changes related to the next MeiliSearch release (v0.21.0) so that this package is ready when the official release is out. - should pass the tests against the [latest pre-release of MeiliSearch](https://github.com/meilisearch/MeiliSearch/releases). Until there is an RC version, the tests should be valid against the [alpha versions of transplant](https://github.com/meilisearch/transplant/releases). - might eventually contain test failures until the MeiliSearch v0.21.0 is out. ⚠️ This PR should NOT be merged until the next release of MeiliSearch (v0.21.0) is out. _This PR is auto-generated for the [pre-release week](https://github.com/meilisearch/integration-guides/blob/master/guides/pre-release-week.md) purpose. Exceptionally for this release, the pre-release time will be more than just one week._ ---- Done: - Update README - Update `wait_for_pending_update` #191 - Rename `attributes_for_faceting` into `filterable_attributes` #192 -> BREAKING - Filtering #193 - Rename FieldsDsitribution into FieldDistribution #194 - Fix part of the tests #195 - Add missing tests according to new features #196 - Fix facetsDistribution tests #197 Co-authored-by: meili-bot <[email protected]> Co-authored-by: Clémentine Urquizar <[email protected]> Co-authored-by: Amélie <[email protected]>
2 parents 06a4528 + e558dcc commit 3d0cefa

21 files changed

+232
-267
lines changed

.code-samples.meilisearch.yaml

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,10 @@ get_settings_1: |-
5454
update_settings_1: |-
5555
client.index('movies').update_settings({
5656
rankingRules: [
57-
'typo',
5857
'words',
58+
'typo',
5959
'proximity',
6060
'attribute',
61-
'wordsPosition',
6261
'exactness',
6362
'desc(release_date)',
6463
'desc(rank)'
@@ -107,11 +106,10 @@ get_ranking_rules_1: |-
107106
client.index('movies').ranking_rules
108107
update_ranking_rules_1: |-
109108
client.index('movies').update_ranking_rules([
110-
'typo',
111109
'words',
110+
'typo',
112111
'proximity',
113112
'attribute',
114-
'wordsPosition',
115113
'exactness',
116114
'asc(release_date)',
117115
'desc(rank)'
@@ -134,15 +132,15 @@ update_searchable_attributes_1: |-
134132
])
135133
reset_searchable_attributes_1: |-
136134
client.index('movies').reset_searchable_attributes
137-
get_attributes_for_faceting_1: |-
138-
client.index('movies').attributes_for_faceting
139-
update_attributes_for_faceting_1: |-
140-
client.index('movies').update_attributes_for_faceting([
135+
get_filterable_attributes_1: |-
136+
client.index('movies').filterable_attributes
137+
update_filterable_attributes_1: |-
138+
client.index('movies').update_filterable_attributes([
141139
'genres',
142140
'director'
143141
])
144-
reset_attributes_for_faceting_1: |-
145-
client.index('movies').reset_attributes_for_faceting
142+
reset_filterable_attributes_1: |-
143+
client.index('movies').reset_filterable_attributes
146144
get_displayed_attributes_1: |-
147145
client.index('movies').get_displayed_attributes
148146
update_displayed_attributes_1: |-
@@ -180,16 +178,16 @@ field_properties_guide_displayed_1: |-
180178
]
181179
})
182180
filtering_guide_1: |-
183-
client.index('movies').search('Avengers', { filters: 'release_date > 795484800' })
181+
client.index('movies').search('Avengers', { filter: 'release_date > 795484800' })
184182
filtering_guide_2: |-
185183
client.index('movies').search('Batman', {
186-
filters: 'release_date > 795484800 AND (director = "Tim Burton" OR director = "Christopher Nolan")'
184+
filter: 'release_date > 795484800 AND (director = "Tim Burton" OR director = "Christopher Nolan")'
187185
})
188186
filtering_guide_3: |-
189-
client.index('movies').search('horror', { filters: 'director = "Jordan Peele"' })
187+
client.index('movies').search('horror', { filter: 'director = "Jordan Peele"' })
190188
filtering_guide_4: |-
191189
client.index('movies').search('Planet of the Apes', {
192-
filters: 'rating >= 3 AND (NOT director = "Tim Burton")'
190+
filter: 'rating >= 3 AND (NOT director = "Tim Burton")'
193191
})
194192
search_parameter_guide_query_1: |-
195193
client.index('movies').search('shifu')
@@ -211,25 +209,23 @@ search_parameter_guide_crop_1: |-
211209
cropLength: 10
212210
})
213211
search_parameter_guide_highlight_1: |-
214-
client.index('movies').search('shifu', {
212+
client.index('movies').search('winter feast', {
215213
attributesToHighlight: ['overview']
216214
})
217215
search_parameter_guide_matches_1: |-
218-
client.index('movies').search('n', {
219-
filters: 'title="Kung Fu Panda"',
220-
attributesToHighlight: ['overview'],
216+
client.index('movies').search('winter feast', {
221217
matches: true
222218
})
223219
search_parameter_guide_filter_1: |-
224220
client.index('movies').search('n', {
225-
filters: 'title = Nightshift'
221+
filter: 'title = Nightshift'
226222
})
227223
search_parameter_guide_filter_2: |-
228-
client.index('movies').search('n', {
229-
filters: 'title="Kung Fu Panda"'
224+
client.index('movies').search('shifu', {
225+
filter: 'title="Kung Fu Panda"'
230226
})
231227
settings_guide_synonyms_1: |-
232-
client.index('movies').update_settings({
228+
client.index('tops').update_settings({
233229
synonyms: {
234230
sweater: ['jumper'],
235231
jumper: ['sweater']
@@ -246,11 +242,10 @@ settings_guide_stop_words_1: |-
246242
settings_guide_ranking_rules_1: |-
247243
client.index('movies').update_settings({
248244
rankingRules: [
249-
'typo',
250245
'words',
246+
'typo',
251247
'proximity',
252248
'attribute',
253-
'wordsPosition',
254249
'exactness',
255250
'asc(release_date)',
256251
'desc(rank)'
@@ -293,7 +288,7 @@ search_guide_1: |-
293288
})
294289
search_guide_2: |-
295290
client.index('movies').search('Avengers', {
296-
filters: 'release_date > 795484800'
291+
filter: 'release_date > 795484800'
297292
})
298293
getting_started_add_documents_md: |-
299294
```bash
@@ -320,28 +315,28 @@ getting_started_search_md: |-
320315
321316
[About this SDK](https://www.github.com/meilisearch/meilisearch-ruby)
322317
faceted_search_update_settings_1: |-
323-
client.index('movies').update_attributes_for_faceting([
318+
client.index('movies').update_filterable_attributes([
324319
'director',
325320
'genres'
326321
])
327-
faceted_search_facet_filters_1: |-
322+
faceted_search_filter_1: |-
328323
client.index('movies').search('thriller', {
329-
facetFilters: [['genres:Horror', 'genres:Mystery'], 'director:Jordan Peele']
324+
filter: [['genres = Horror', 'genres = Mystery'], 'director = "Jordan Peele"']
330325
})
331326
faceted_search_facets_distribution_1: |-
332327
client.index('movies').search('Batman', {
333328
facetsDistribution: ['genres']
334329
})
335-
faceted_search_walkthrough_attributes_for_faceting_1: |-
336-
client.index('movies').update_attributes_for_faceting([
330+
faceted_search_walkthrough_filterable_attributes_1: |-
331+
client.index('movies').update_filterable_attributes([
337332
'director',
338333
'producer',
339334
'genres',
340335
'production_companies'
341336
])
342-
faceted_search_walkthrough_facet_filters_1: |-
337+
faceted_search_walkthrough_filter_1: |-
343338
client.index('movies').search('thriller', {
344-
facetFilters: [['genres:Horror', 'genres:Mystery'], 'director:Jordan Peele']
339+
filter: [['genres = Horror', 'genres = Mystery'], 'director = "Jordan Peele"']
345340
})
346341
faceted_search_walkthrough_facets_distribution_1: |-
347342
client.index('movies').search('Batman', {
@@ -351,3 +346,5 @@ post_dump_1: |-
351346
client.create_dump
352347
get_dump_status_1: |-
353348
client.get_dump_status(20201006-053243949)
349+
phrase_search_1: |-
350+
client.index('movies').search('"african american" horror')

.rubocop_todo.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2021-05-05 07:48:22 UTC using RuboCop version 1.13.0.
3+
# on 2021-06-23 16:19:20 UTC using RuboCop version 1.16.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -14,16 +14,16 @@ Gemspec/DateAssignment:
1414
Exclude:
1515
- 'meilisearch.gemspec'
1616

17-
# Offense count: 34
17+
# Offense count: 32
1818
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
1919
# IgnoredMethods: refine
2020
Metrics/BlockLength:
21-
Max: 445
21+
Max: 460
2222

2323
# Offense count: 1
2424
# Configuration parameters: CountComments, CountAsOne.
2525
Metrics/ClassLength:
26-
Max: 212
26+
Max: 215
2727

2828
# Offense count: 1
2929
Naming/AccessorMethodName:

CONTRIBUTING.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contributing
1+
# Contributing <!-- omit in toc -->
22

33
First of all, thank you for contributing to MeiliSearch! The goal of this document is to provide everything you need to know in order to contribute to MeiliSearch and its different integrations.
44

@@ -23,20 +23,20 @@ First of all, thank you for contributing to MeiliSearch! The goal of this docume
2323
1. Make sure that the contribution you want to make is explained or detailed in a GitHub issue! Find an [existing issue](https://github.com/meilisearch/meilisearch-ruby/issues/) or [open a new one](https://github.com/meilisearch/meilisearch-ruby/issues/new).
2424
2. Once done, [fork the meilisearch-ruby repository](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) in your own GitHub account. Ask a maintainer if you want your issue to be checked before making a PR.
2525
3. [Create a new Git branch](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository).
26-
4. Review the [Development Workflow](#workflow) section that describes the steps to maintain the repository.
26+
4. Review the [Development Workflow](#development-workflow) section that describes the steps to maintain the repository.
2727
5. Make the changes on your branch.
2828
6. [Submit the branch as a PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) pointing to the `main` branch of the main meilisearch-ruby repository. A maintainer should comment and/or review your Pull Request within a few days. Although depending on the circumstances, it may take longer.<br>
2929
We do not enforce a naming convention for the PRs, but **please use something descriptive of your changes**, having in mind that the title of your PR will be automatically added to the next [release changelog](https://github.com/meilisearch/meilisearch-ruby/releases/).
3030

3131
## Development Workflow
3232

33-
### Setup
33+
### Setup <!-- omit in toc -->
3434

3535
```bash
3636
bundle install
3737
```
3838

39-
### Tests
39+
### Tests <!-- omit in toc -->
4040

4141
Each PR should pass the tests to be accepted.
4242

@@ -59,7 +59,7 @@ To launch a single test in a specific file:
5959
bundle exec rspec spec/meilisearch/index/search_spec.rb -e 'does a basic search in index'
6060
```
6161

62-
### Linter
62+
### Linter <!-- omit in toc -->
6363

6464
Each PR should pass the linter to be accepted.
6565

@@ -78,7 +78,7 @@ To update it, run the following command:
7878
bundle exec rubocop --auto-gen-config
7979
```
8080

81-
### Want to debug?
81+
### Want to debug? <!-- omit in toc -->
8282

8383
You can use the [`byebug` gem](https://github.com/deivid-rodriguez/byebug).
8484

@@ -99,12 +99,12 @@ require 'byebug'
9999

100100
## Git Guidelines
101101

102-
### Git Branches
102+
### Git Branches <!-- omit in toc -->
103103

104104
All changes must be made in a branch and submitted as PR.
105105
We do not enforce any branch naming style, but please use something descriptive of your changes.
106106

107-
### Git Commits
107+
### Git Commits <!-- omit in toc -->
108108

109109
As minimal requirements, your commit message should:
110110
- be capitalized
@@ -114,7 +114,7 @@ As minimal requirements, your commit message should:
114114

115115
We don't follow any other convention, but if you want to use one, we recommend [this one](https://chris.beams.io/posts/git-commit/).
116116

117-
### GitHub Pull Requests
117+
### GitHub Pull Requests <!-- omit in toc -->
118118

119119
Some notes on GitHub PRs:
120120

@@ -128,17 +128,17 @@ Some notes on GitHub PRs:
128128

129129
MeiliSearch tools follow the [Semantic Versioning Convention](https://semver.org/).
130130

131-
### Automation to Rebase and Merge the PRs
131+
### Automation to Rebase and Merge the PRs <!-- omit in toc -->
132132

133133
This project integrates a bot that helps us manage pull requests merging.<br>
134134
_[Read more about this](https://github.com/meilisearch/integration-guides/blob/main/guides/bors.md)._
135135

136-
### Automated Changelogs
136+
### Automated Changelogs <!-- omit in toc -->
137137

138138
This project integrates a tool to create automated changelogs.<br>
139139
_[Read more about this](https://github.com/meilisearch/integration-guides/blob/main/guides/release-drafter.md)._
140140

141-
### How to Publish the Release
141+
### How to Publish the Release <!-- omit in toc -->
142142

143143
⚠️ Before doing anything, make sure you got through the guide about [Releasing an Integration](https://github.com/meilisearch/integration-guides/blob/main/guides/integration-release.md).
144144

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ documents = [
9292
index.add_documents(documents) # => { "updateId": 0 }
9393
```
9494

95-
With the `updateId`, you can check the status (`enqueued`, `processed` or `failed`) of your documents addition using the [update endpoint](https://docs.meilisearch.com/reference/api/updates.html#get-an-update-status).
95+
With the `updateId`, you can check the status (`enqueued`, `processing`, `processed` or `failed`) of your documents addition using the [update endpoint](https://docs.meilisearch.com/reference/api/updates.html#get-an-update-status).
9696

9797
💡 To customize the `Client`, for example, increasing the default timeout, please check out [this section](https://github.com/meilisearch/meilisearch-ruby/wiki/Client-Options) of the Wiki.
9898

@@ -122,11 +122,9 @@ Output:
122122
All the supported options are described in the [search parameters](https://docs.meilisearch.com/reference/features/search_parameters.html) section of the documentation.
123123

124124
```ruby
125-
index.search('prince',
126-
{
127-
filters: 'book_id > 10',
128-
attributesToHighlight: ['*']
129-
}
125+
index.search(
126+
'hob',
127+
attributesToHighlight: ['*']
130128
)
131129
```
132130

@@ -136,24 +134,24 @@ JSON output:
136134
{
137135
"hits": [
138136
{
139-
"book_id": 456,
140-
"title": "Le Petit Prince",
137+
"book_id": 1344,
138+
"title": "The Hobbit",
141139
"_formatted": {
142-
"book_id": 456,
143-
"title": "Le Petit <em>Prince</em>"
140+
"book_id": 1344,
141+
"title": "The <em>Hob</em>bit"
144142
}
145143
}
146144
],
147145
"offset": 0,
148146
"limit": 20,
149147
"processingTimeMs": 0,
150-
"query": "prince"
148+
"query": "hob"
151149
}
152150
```
153151

154152
## 🤖 Compatibility with MeiliSearch
155153

156-
This package only guarantees the compatibility with the [version v0.20.0 of MeiliSearch](https://github.com/meilisearch/MeiliSearch/releases/tag/v0.20.0).
154+
This package only guarantees the compatibility with the [version v0.21.0 of MeiliSearch](https://github.com/meilisearch/MeiliSearch/releases/tag/v0.21.0).
157155

158156
## 💡 Learn More
159157

0 commit comments

Comments
 (0)