File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
algoliasearch-common/src/main/java/com/algolia/search/objects
algoliasearch-tests/src/test/java/com/algolia/search/objects Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ public class IndexSettings implements Serializable {
1919 private Integer minProximity ;
2020 private List <String > responseFields ;
2121 private Integer maxFacetHits ;
22+ private String keepDiacriticsOnCharacters ;
2223
2324 /* attributes */
2425 /** Deprecated: use {@link #searchableAttributes} */
@@ -580,6 +581,15 @@ public IndexSettings setSortFacetValuesBy(String sortFacetValuesBy) {
580581 return this ;
581582 }
582583
584+ public String getKeepDiacriticsOnCharacters () {
585+ return keepDiacriticsOnCharacters ;
586+ }
587+
588+ public IndexSettings setKeepDiacriticsOnCharacters (String keepDiacriticsOnCharacters ) {
589+ this .keepDiacriticsOnCharacters = keepDiacriticsOnCharacters ;
590+ return this ;
591+ }
592+
583593 @ JsonAnySetter
584594 public IndexSettings setCustomSetting (String key , Object value ) {
585595 this .customSettings .put (key , value );
@@ -707,6 +717,9 @@ public String toString() {
707717 + ", separatorsToIndex='"
708718 + separatorsToIndex
709719 + '\''
720+ + ", keepDiacriticsOnCharacters='"
721+ + keepDiacriticsOnCharacters
722+ + '\''
710723 + ", customSettings="
711724 + customSettings
712725 + '}' ;
Original file line number Diff line number Diff line change @@ -32,6 +32,14 @@ public void typoToleranceBoolean() throws IOException {
3232 assertThat (result .getTypoTolerance ()).isEqualTo (TypoTolerance .of (false ));
3333 }
3434
35+ @ Test
36+ public void keepDiacriticsOnCharacters () throws IOException {
37+ IndexSettings settings = new IndexSettings ().setKeepDiacriticsOnCharacters ("øé" );
38+ IndexSettings result = serializeDeserialize (settings );
39+ assertThat (result ).isEqualToComparingFieldByField (settings );
40+ assertThat (result .getKeepDiacriticsOnCharacters ()).isEqualTo ("øé" );
41+ }
42+
3543 @ Test
3644 public void typoToleranceString () throws IOException {
3745 IndexSettings settings = new IndexSettings ().setTypoTolerance (TypoTolerance .of ("min" ));
You can’t perform that action at this time.
0 commit comments