File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ from meilisearch .models .index import TypoTolerance
2+
3+
14DEFAULT_TYPO_TOLERANCE = {
25 "enabled" : True ,
6+ "disableOnNumbers" : False ,
37 "minWordSizeForTypos" : {
48 "oneTypo" : 5 ,
59 "twoTypos" : 9 ,
1014
1115NEW_TYPO_TOLERANCE = {
1216 "enabled" : True ,
17+ "disableOnNumbers" : False ,
1318 "minWordSizeForTypos" : {
1419 "oneTypo" : 6 ,
1520 "twoTypos" : 10 ,
@@ -65,3 +70,16 @@ def test_reset_typo_tolerance(empty_index):
6570 )
6671 assert update2 .status == "succeeded"
6772 assert response_last .model_dump (by_alias = True ) == DEFAULT_TYPO_TOLERANCE
73+
74+
75+ def test_disable_numbers_true (empty_index ):
76+ index = empty_index ()
77+
78+ # Update settings
79+ response_update = index .update_typo_tolerance ({"disableOnNumbers" : True })
80+ update = index .wait_for_task (response_update .task_uid )
81+ assert update .status == "succeeded"
82+
83+ # Fetch updated settings
84+ tolerance : TypoTolerance = index .get_typo_tolerance ()
85+ assert tolerance .disable_on_numbers
You can’t perform that action at this time.
0 commit comments