Skip to content

Changes related to the next Meilisearch release (v0.27.0) #439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
May 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
90ee4f3
Update README.md
meili-bot Apr 11, 2022
e459c96
Update CONTRIBUTING.md
meili-bot Apr 11, 2022
c30b069
Update .github/workflows/tests.yml
meili-bot Apr 11, 2022
acd6e14
Update .github/workflows/pre-release-tests.yml
meili-bot Apr 11, 2022
9781980
Merge pull request #440 from meilisearch/meili-bot/new-docker-bin
brunoocasali Apr 11, 2022
88093dc
Add typo tolerance settings
alallema Apr 20, 2022
f0eca61
Fix tests
alallema Apr 20, 2022
a5efa10
Add support nested fields
alallema Apr 20, 2022
cfbc532
Add tests for cropping and highlighting
alallema Apr 20, 2022
db06fc6
Fix field naming in typo tolerance
alallema Apr 21, 2022
336e548
Trigger Build
alallema Apr 21, 2022
58caa51
Merge pull request #444 from meilisearch/support-nested-field
alallema Apr 22, 2022
ffd9664
Merge pull request #445 from meilisearch/cropping_highlighting
alallema Apr 25, 2022
21b221b
Add typo tolerance check in general settings tests
alallema Apr 25, 2022
b17f1a8
Typo
alallema Apr 25, 2022
1530d5e
Correct defaut by default
alallema Apr 25, 2022
96cbf24
Add test to check the value in typo tolerance setting
alallema Apr 25, 2022
91b4265
Improve tests typo tolerance
alallema Apr 25, 2022
b45b004
Updateing code-sample for v0.27.0
alallema Apr 27, 2022
9f6c48a
Update .code-samples.meilisearch.yaml
alallema Apr 27, 2022
cb7f921
Add space to tests for readability
alallema Apr 28, 2022
e8f075a
Update .code-samples.meilisearch.yaml
alallema Apr 28, 2022
9b05fb3
Merge pull request #450 from meilisearch/code-sample-v0.27.0
alallema Apr 28, 2022
9d008a7
Improve test readability
alallema Apr 28, 2022
5b28d58
Merge pull request #443 from meilisearch/typo-tolerance
alallema Apr 28, 2022
55527d2
Merge branch 'main' into bump-meilisearch-v0.27.0
alallema May 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 61 additions & 2 deletions .code-samples.meilisearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,13 @@ update_settings_1: |-
'wolverine': ['xmen', 'logan'],
'logan': ['wolverine']
},
'acceptNewFields': False
'typoTolerance': {
'minWordSizeForTypos': {
'oneTypo': 8,
'twoTypos': 10
},
'disableOnAttributes': ['title']
}
})
reset_settings_1: |-
client.index('movies').reset_settings()
Expand Down Expand Up @@ -180,6 +186,20 @@ update_displayed_attributes_1: |-
])
reset_displayed_attributes_1: |-
client.index('movies').reset_displayed_attributes()
get_typo_tolerance_1:
client.index('books').get_typo_tolerance()
update_typo_tolerance_1: |-
client.index('books').update_typo_tolerance({
'minWordSizeForTypos': {
'oneTypo': 4,
'twoTypos': 10
},
'disableOnAttributes': [
'title'
]
})
reset_typo_tolerance_1: |-
client.index('books').reset_typo_tolerance()
get_sortable_attributes_1: |-
client.index('books').get_sortable_attributes()
update_sortable_attributes_1: |-
Expand Down Expand Up @@ -243,12 +263,23 @@ search_parameter_guide_retrieve_1: |-
search_parameter_guide_crop_1: |-
client.index('movies').search('shifu', {
'attributesToCrop': ['overview'],
'cropLength': 10
'cropLength': 5
})
search_parameter_guide_crop_marker_1: |-
client.index('movies').search('shifu', {
'attributesToCrop': ['overview'],
'cropMarker': '[…]'
})
search_parameter_guide_highlight_1: |-
client.index('movies').search('winter feast', {
'attributesToHighlight': ['overview']
})
search_parameter_guide_highlight_tag_1: |-
client.index('movies').search('winter feast', {
'attributesToHighlight': ['overview'],
'highlightPreTag': '<span class="highlight">',
'highlightPostTag': '</span>'
})
search_parameter_guide_matches_1: |-
client.index('movies').search('winter feast', {
'matches': 'true'
Expand Down Expand Up @@ -309,6 +340,34 @@ settings_guide_sortable_1: |-
'author'
]
})
settings_guide_typo_tolerance_1: |-
client.index('movies').update_typo_tolerance({
'minWordSizeForTypos': {
'twoTypos': 12
},
'disableOnAttributes': [
'title'
]
})
typo_tolerance_guide_1: |-
client.index('movies').update_typo_tolerance({
'enabled': False
})
typo_tolerance_guide_2: |-
client.index('movies').update_typo_tolerance({
'disableOnAttributes': ['title']
})
typo_tolerance_guide_3: |-
client.index('movies').update_typo_tolerance({
'disableOnWords': ['shrek']
})
typo_tolerance_guide_4: |-
client.index('movies').update_typo_tolerance({
'minWordSizeForTypos': {
'oneTypo': 4,
'twoTypos': 10
}
})
add_movies_json_1: |-
import json

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-release-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ jobs:
- name: Get the latest Meilisearch RC
run: echo "MEILISEARCH_VERSION=$(curl https://raw.githubusercontent.com/meilisearch/integration-guides/main/scripts/get-latest-meilisearch-rc.sh | bash)" >> $GITHUB_ENV
- name: Meilisearch (${{ env.MEILISEARCH_VERSION }}) setup with Docker
run: docker run -d -p 7700:7700 getmeili/meilisearch:${{ env.MEILISEARCH_VERSION }} ./meilisearch --master-key=masterKey --no-analytics
run: docker run -d -p 7700:7700 getmeili/meilisearch:${{ env.MEILISEARCH_VERSION }} meilisearch --master-key=masterKey --no-analytics
- name: Test with pytest
run: pipenv run pytest
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Install dependencies
run: pipenv install --dev
- name: Meilisearch (latest version) setup with Docker
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --no-analytics --master-key=masterKey
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest meilisearch --no-analytics --master-key=masterKey
- name: Test with pytest
run: pipenv run pytest

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Optionally tox can be used to run test on all supported version of Python, mypy,

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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ index.search(

## 🤖 Compatibility with Meilisearch

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

## 💡 Learn More

Expand Down
54 changes: 54 additions & 0 deletions datasets/nested_movies.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[
{
"id": 1,
"title": "Pride and Prejudice",
"info": {
"comment": "A great book",
"reviewNb": 50
}
},
{
"id": 2,
"title": "Le Petit Prince",
"info": {
"comment": "A french book",
"reviewNb": 600
}
},
{
"id": 3,
"title": "Le Rouge et le Noir",
"info": {
"comment": "Another french book",
"reviewNb": 700
}
},
{
"id": 4,
"title": "Alice In Wonderland",
"comment": "A weird book",
"info": {
"comment": "A weird book",
"reviewNb": 800
}
},
{
"id": 5,
"title": "The Hobbit",
"info": {
"comment": "An awesome book",
"reviewNb": 900
}
},
{
"id": 6,
"title": "Harry Potter and the Half-Blood Prince",
"info": {
"comment": "The best book",
"reviewNb": 1000
}
},
{ "id": 7,
"title": "The Hitchhiker's Guide to the Galaxy"
}
]
1 change: 1 addition & 0 deletions meilisearch/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class Paths():
accept_new_fields = 'accept-new-fields'
filterable_attributes = 'filterable-attributes'
sortable_attributes = 'sortable-attributes'
typo_tolerance = 'typo-tolerance'
dumps = 'dumps'

def __init__(
Expand Down
Loading