Skip to content

Commit 4f0cc2a

Browse files
bors[bot]meili-botbrunoocasalialallema
authored
Merge #439
439: Changes related to the next Meilisearch release (v0.27.0) r=curquiza a=meili-bot Related to this issue: meilisearch/integration-guides#190 This PR: - gathers the changes related to the next Meilisearch release (v0.27.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). - might eventually contain test failures until the Meilisearch v0.27.0 is out. ⚠️ This PR should NOT be merged until the next release of Meilisearch (v0.27.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._ Done: - #440 - #443 - #444 - #445 - #450 Co-authored-by: meili-bot <[email protected]> Co-authored-by: Bruno Casali <[email protected]> Co-authored-by: alallema <[email protected]> Co-authored-by: Amélie <[email protected]>
2 parents a0e4b74 + 55527d2 commit 4f0cc2a

12 files changed

+412
-63
lines changed

.code-samples.meilisearch.yaml

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,13 @@ update_settings_1: |-
109109
'wolverine': ['xmen', 'logan'],
110110
'logan': ['wolverine']
111111
},
112-
'acceptNewFields': False
112+
'typoTolerance': {
113+
'minWordSizeForTypos': {
114+
'oneTypo': 8,
115+
'twoTypos': 10
116+
},
117+
'disableOnAttributes': ['title']
118+
}
113119
})
114120
reset_settings_1: |-
115121
client.index('movies').reset_settings()
@@ -180,6 +186,20 @@ update_displayed_attributes_1: |-
180186
])
181187
reset_displayed_attributes_1: |-
182188
client.index('movies').reset_displayed_attributes()
189+
get_typo_tolerance_1:
190+
client.index('books').get_typo_tolerance()
191+
update_typo_tolerance_1: |-
192+
client.index('books').update_typo_tolerance({
193+
'minWordSizeForTypos': {
194+
'oneTypo': 4,
195+
'twoTypos': 10
196+
},
197+
'disableOnAttributes': [
198+
'title'
199+
]
200+
})
201+
reset_typo_tolerance_1: |-
202+
client.index('books').reset_typo_tolerance()
183203
get_sortable_attributes_1: |-
184204
client.index('books').get_sortable_attributes()
185205
update_sortable_attributes_1: |-
@@ -243,12 +263,23 @@ search_parameter_guide_retrieve_1: |-
243263
search_parameter_guide_crop_1: |-
244264
client.index('movies').search('shifu', {
245265
'attributesToCrop': ['overview'],
246-
'cropLength': 10
266+
'cropLength': 5
267+
})
268+
search_parameter_guide_crop_marker_1: |-
269+
client.index('movies').search('shifu', {
270+
'attributesToCrop': ['overview'],
271+
'cropMarker': '[…]'
247272
})
248273
search_parameter_guide_highlight_1: |-
249274
client.index('movies').search('winter feast', {
250275
'attributesToHighlight': ['overview']
251276
})
277+
search_parameter_guide_highlight_tag_1: |-
278+
client.index('movies').search('winter feast', {
279+
'attributesToHighlight': ['overview'],
280+
'highlightPreTag': '<span class="highlight">',
281+
'highlightPostTag': '</span>'
282+
})
252283
search_parameter_guide_matches_1: |-
253284
client.index('movies').search('winter feast', {
254285
'matches': 'true'
@@ -309,6 +340,34 @@ settings_guide_sortable_1: |-
309340
'author'
310341
]
311342
})
343+
settings_guide_typo_tolerance_1: |-
344+
client.index('movies').update_typo_tolerance({
345+
'minWordSizeForTypos': {
346+
'twoTypos': 12
347+
},
348+
'disableOnAttributes': [
349+
'title'
350+
]
351+
})
352+
typo_tolerance_guide_1: |-
353+
client.index('movies').update_typo_tolerance({
354+
'enabled': False
355+
})
356+
typo_tolerance_guide_2: |-
357+
client.index('movies').update_typo_tolerance({
358+
'disableOnAttributes': ['title']
359+
})
360+
typo_tolerance_guide_3: |-
361+
client.index('movies').update_typo_tolerance({
362+
'disableOnWords': ['shrek']
363+
})
364+
typo_tolerance_guide_4: |-
365+
client.index('movies').update_typo_tolerance({
366+
'minWordSizeForTypos': {
367+
'oneTypo': 4,
368+
'twoTypos': 10
369+
}
370+
})
312371
add_movies_json_1: |-
313372
import json
314373

.github/workflows/pre-release-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ jobs:
2929
- name: Get the latest Meilisearch RC
3030
run: echo "MEILISEARCH_VERSION=$(curl https://raw.githubusercontent.com/meilisearch/integration-guides/main/scripts/get-latest-meilisearch-rc.sh | bash)" >> $GITHUB_ENV
3131
- name: Meilisearch (${{ env.MEILISEARCH_VERSION }}) setup with Docker
32-
run: docker run -d -p 7700:7700 getmeili/meilisearch:${{ env.MEILISEARCH_VERSION }} ./meilisearch --master-key=masterKey --no-analytics
32+
run: docker run -d -p 7700:7700 getmeili/meilisearch:${{ env.MEILISEARCH_VERSION }} meilisearch --master-key=masterKey --no-analytics
3333
- name: Test with pytest
3434
run: pipenv run pytest

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Install dependencies
3232
run: pipenv install --dev
3333
- name: Meilisearch (latest version) setup with Docker
34-
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --no-analytics --master-key=masterKey
34+
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest meilisearch --no-analytics --master-key=masterKey
3535
- name: Test with pytest
3636
run: pipenv run pytest
3737

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Optionally tox can be used to run test on all supported version of Python, mypy,
5151

5252
```bash
5353
docker pull getmeili/meilisearch:latest # Fetch the latest version of Meilisearch image from Docker Hub
54-
docker run -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --master-key=masterKey --no-analytics
54+
docker run -p 7700:7700 getmeili/meilisearch:latest meilisearch --master-key=masterKey --no-analytics
5555
pipenv run tox
5656
```
5757

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ index.search(
197197

198198
## 🤖 Compatibility with Meilisearch
199199

200-
This package only guarantees the compatibility with the [version v0.26.0 of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/v0.26.0).
200+
This package only guarantees the compatibility with the [version v0.27.0 of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/v0.27.0).
201201

202202
## 💡 Learn More
203203

datasets/nested_movies.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
[
2+
{
3+
"id": 1,
4+
"title": "Pride and Prejudice",
5+
"info": {
6+
"comment": "A great book",
7+
"reviewNb": 50
8+
}
9+
},
10+
{
11+
"id": 2,
12+
"title": "Le Petit Prince",
13+
"info": {
14+
"comment": "A french book",
15+
"reviewNb": 600
16+
}
17+
},
18+
{
19+
"id": 3,
20+
"title": "Le Rouge et le Noir",
21+
"info": {
22+
"comment": "Another french book",
23+
"reviewNb": 700
24+
}
25+
},
26+
{
27+
"id": 4,
28+
"title": "Alice In Wonderland",
29+
"comment": "A weird book",
30+
"info": {
31+
"comment": "A weird book",
32+
"reviewNb": 800
33+
}
34+
},
35+
{
36+
"id": 5,
37+
"title": "The Hobbit",
38+
"info": {
39+
"comment": "An awesome book",
40+
"reviewNb": 900
41+
}
42+
},
43+
{
44+
"id": 6,
45+
"title": "Harry Potter and the Half-Blood Prince",
46+
"info": {
47+
"comment": "The best book",
48+
"reviewNb": 1000
49+
}
50+
},
51+
{ "id": 7,
52+
"title": "The Hitchhiker's Guide to the Galaxy"
53+
}
54+
]

meilisearch/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class Paths():
2525
accept_new_fields = 'accept-new-fields'
2626
filterable_attributes = 'filterable-attributes'
2727
sortable_attributes = 'sortable-attributes'
28+
typo_tolerance = 'typo-tolerance'
2829
dumps = 'dumps'
2930

3031
def __init__(

0 commit comments

Comments
 (0)