@@ -109,7 +109,12 @@ update_settings_1: |-
109
109
'wolverine': ['xmen', 'logan'],
110
110
'logan': ['wolverine']
111
111
},
112
- 'acceptNewFields': False
112
+ 'typoTolerance': {
113
+ 'minWordSizeForTypos': {
114
+ 'oneTypo': 8,
115
+ 'twoTypos': 10
116
+ 'disableOnAttributes': ['title']
117
+ }
113
118
})
114
119
reset_settings_1 : |-
115
120
client.index('movies').reset_settings()
@@ -180,6 +185,20 @@ update_displayed_attributes_1: |-
180
185
])
181
186
reset_displayed_attributes_1 : |-
182
187
client.index('movies').reset_displayed_attributes()
188
+ get_typo_tolerance_1 :
189
+ client.index('books').get_typo_tolerance()
190
+ update_typo_tolerance_1 : |-
191
+ client.index('books').update_typo_tolerance({
192
+ 'minWordSizeForTypos': {
193
+ 'oneTypo': 4,
194
+ 'twoTypos': 10
195
+ },
196
+ 'disableOnAttributes': [
197
+ 'title'
198
+ ]
199
+ })
200
+ reset_typo_tolerance_1 : |-
201
+ client.index('books').reset_typo_tolerance()
183
202
get_sortable_attributes_1 : |-
184
203
client.index('books').get_sortable_attributes()
185
204
update_sortable_attributes_1 : |-
@@ -243,12 +262,23 @@ search_parameter_guide_retrieve_1: |-
243
262
search_parameter_guide_crop_1 : |-
244
263
client.index('movies').search('shifu', {
245
264
'attributesToCrop': ['overview'],
246
- 'cropLength': 10
265
+ 'cropLength': 5
266
+ })
267
+ search_parameter_guide_crop_marker_1 : |-
268
+ client.index('movies').search('shifu', {
269
+ 'attributesToCrop': ['overview'],
270
+ 'cropMarker': '[…]'
247
271
})
248
272
search_parameter_guide_highlight_1 : |-
249
273
client.index('movies').search('winter feast', {
250
274
'attributesToHighlight': ['overview']
251
275
})
276
+ search_parameter_guide_highlight_tag_1 : |-
277
+ client.index('movies').search('winter feast', {
278
+ 'attributesToHighlight': ['overview'],
279
+ 'highlightPreTag': '<span class=\"highlight\">',
280
+ 'highlightPostTag': '</span>'
281
+ })
252
282
search_parameter_guide_matches_1 : |-
253
283
client.index('movies').search('winter feast', {
254
284
'matches': 'true'
@@ -309,6 +339,34 @@ settings_guide_sortable_1: |-
309
339
'author'
310
340
]
311
341
})
342
+ settings_guide_typo_tolerance_1 : |-
343
+ client.index('movies').update_typo_tolerance({
344
+ 'minWordSizeForTypos': {
345
+ 'twoTypos': 12
346
+ },
347
+ 'disableOnAttributes': [
348
+ 'title'
349
+ ]
350
+ })
351
+ typo_tolerance_guide_1 : |-
352
+ client.index('movies').update_typo_tolerance({
353
+ 'enabled': False
354
+ })
355
+ typo_tolerance_guide_2 : |-
356
+ client.index('movies').update_typo_tolerance({
357
+ 'disableOnAttributes': ['title']
358
+ })
359
+ typo_tolerance_guide_3 : |-
360
+ client.index('movies').update_typo_tolerance({
361
+ 'disableOnWords': ['shrek']
362
+ })
363
+ typo_tolerance_guide_4 : |-
364
+ client.index('movies').update_typo_tolerance({
365
+ 'minWordSizeForTypos': {
366
+ 'oneTypo': 4,
367
+ 'twoTypos': 10
368
+ }
369
+ })
312
370
add_movies_json_1 : |-
313
371
import json
314
372
0 commit comments