@@ -109,7 +109,13 @@ 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
+ },
117
+ 'disableOnAttributes': ['title']
118
+ }
113
119
})
114
120
reset_settings_1 : |-
115
121
client.index('movies').reset_settings()
@@ -180,6 +186,20 @@ update_displayed_attributes_1: |-
180
186
])
181
187
reset_displayed_attributes_1 : |-
182
188
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()
183
203
get_sortable_attributes_1 : |-
184
204
client.index('books').get_sortable_attributes()
185
205
update_sortable_attributes_1 : |-
@@ -243,12 +263,23 @@ search_parameter_guide_retrieve_1: |-
243
263
search_parameter_guide_crop_1 : |-
244
264
client.index('movies').search('shifu', {
245
265
'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': '[…]'
247
272
})
248
273
search_parameter_guide_highlight_1 : |-
249
274
client.index('movies').search('winter feast', {
250
275
'attributesToHighlight': ['overview']
251
276
})
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
+ })
252
283
search_parameter_guide_matches_1 : |-
253
284
client.index('movies').search('winter feast', {
254
285
'matches': 'true'
@@ -309,6 +340,34 @@ settings_guide_sortable_1: |-
309
340
'author'
310
341
]
311
342
})
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
+ })
312
371
add_movies_json_1 : |-
313
372
import json
314
373
0 commit comments