@@ -192,6 +192,24 @@ update_displayed_attributes_1: |-
192192 });
193193reset_displayed_attributes_1 : |-
194194 client.index("movies").resetDisplayedAttributesSettings();
195+ get_typo_tolerance_1 :
196+ client.index("books").getTypoToleranceSettings();
197+ update_typo_tolerance_1 : |-
198+ TypoTolerance typoTolerance = new TypoTolerance();
199+ HashMap<String, Integer> minWordSizeTypos =
200+ new HashMap<String, Integer>() {
201+ {
202+ put("oneTypo", 4);
203+ put("twoTypos", 10);
204+ }
205+ };
206+
207+ typoTolerance.setMinWordSizeForTypos(minWordSizeTypos);
208+ typoTolerance.setDisableOnAttributes(new String[] {"title"});
209+
210+ client.index("books").updateTypoToleranceSettings(typoTolerance);
211+ reset_typo_tolerance_1 : |-
212+ client.index("books").resetTypoToleranceSettings();
195213get_index_stats_1 : |-
196214 client.index("movies").getStats();
197215get_indexes_stats_1 : |-
@@ -334,6 +352,42 @@ settings_guide_sortable_1: |-
334352 "author",
335353 });
336354 client.index("books").updateSettings(settings);
355+ settings_guide_typo_tolerance_1 : |-
356+ TypoTolerance typoTolerance = new TypoTolerance();
357+ HashMap<String, Integer> minWordSizeTypos =
358+ new HashMap<String, Integer>() {
359+ {
360+ put("twoTypos", 12);
361+ }
362+ };
363+
364+ typoTolerance.setMinWordSizeForTypos(minWordSizeTypos);
365+ typoTolerance.setDisableOnAttributes(new String[] {"title"});
366+
367+ client.index("movies").updateTypoToleranceSettings(typoTolerance);
368+ typo_tolerance_guide_1 : |-
369+ TypoTolerance typoTolerance = new TypoTolerance();
370+ typoTolerance.setEnabled(false);
371+ client.index("movies").updateTypoToleranceSettings(typoTolerance);
372+ typo_tolerance_guide_2 : |-
373+ TypoTolerance typoTolerance = new TypoTolerance();
374+ typoTolerance.setDisableOnAttributes(new String[] {"title"});
375+ client.index("movies").updateTypoToleranceSettings(typoTolerance);
376+ typo_tolerance_guide_3 : |-
377+ TypoTolerance typoTolerance = new TypoTolerance();
378+ typoTolerance.setDisableOnWords(new String[] {"shrek"});
379+ client.index("movies").updateTypoToleranceSettings(typoTolerance);
380+ typo_tolerance_guide_4 : |-
381+ TypoTolerance typoTolerance = new TypoTolerance();
382+ HashMap<String, Integer> minWordSizeTypos =
383+ new HashMap<String, Integer>() {
384+ {
385+ put("oneTypo", 4);
386+ put("twoTypos", 10);
387+ }
388+ };
389+ typoTolerance.setMinWordSizeForTypos(minWordSizeTypos);
390+ client.index("movies").updateTypoToleranceSettings(typoTolerance);
337391documents_guide_add_movie_1 : |-
338392 client.index("movies").addDocuments("[{"
339393 + "\"movie_id\": 123sq178,"
0 commit comments