@@ -867,6 +867,167 @@ public struct Indexes {
867
867
_ completion: @escaping ( Result < TaskInfo , Swift . Error > ) -> Void ) {
868
868
self . settings. resetSortableAttributes ( self . uid, completion)
869
869
}
870
+
871
+ // MARK: Separator Tokens
872
+
873
+ /**
874
+ Fetch the `separatorTokens` setting of a Meilisearch index.
875
+
876
+ - parameter completion: The completion closure is used to notify when the server
877
+ completes the query request, it returns a `Result` object that contains an `[String]`
878
+ value if the request was successful, or `Error` if a failure occurred.
879
+ */
880
+ public func getSeparatorTokens(
881
+ _ completion: @escaping ( Result < [ String ] , Swift . Error > ) -> Void ) {
882
+ self . settings. getSeparatorTokens ( self . uid, completion)
883
+ }
884
+
885
+ /**
886
+ Modify the `separatorTokens` setting of a Meilisearch index.
887
+
888
+ - parameter attributes: List of tokens that will be considered as word separators
889
+ - parameter completion: The completion closure is used to notify when the server
890
+ completes the query request, it returns a `Result` object that contains `TaskInfo`
891
+ value if the request was successful, or `Error` if a failure occurred.
892
+ */
893
+ public func updateSeparatorTokens(
894
+ _ attributes: [ String ] ,
895
+ _ completion: @escaping ( Result < TaskInfo , Swift . Error > ) -> Void ) {
896
+ self . settings. updateSeparatorTokens ( self . uid, attributes, completion)
897
+ }
898
+
899
+ /**
900
+ Reset the `separatorTokens` setting of a Meilisearch index to the default value `[]`.
901
+
902
+ - parameter completion: The completion closure is used to notify when the server
903
+ completes the query request, it returns a `Result` object that contains `TaskInfo`
904
+ value if the request was successful, or `Error` if a failure occurred.
905
+ */
906
+ public func resetSeparatorTokens(
907
+ _ completion: @escaping ( Result < TaskInfo , Swift . Error > ) -> Void ) {
908
+ self . settings. resetSeparatorTokens ( self . uid, completion)
909
+ }
910
+
911
+ // MARK: Non Separator Tokens
912
+
913
+ /**
914
+ Fetch the `nonSeparatorTokens` setting of a Meilisearch index.
915
+
916
+ - parameter completion: The completion closure is used to notify when the server
917
+ completes the query request, it returns a `Result` object that contains an `[String]`
918
+ value if the request was successful, or `Error` if a failure occurred.
919
+ */
920
+ public func getNonSeparatorTokens(
921
+ _ completion: @escaping ( Result < [ String ] , Swift . Error > ) -> Void ) {
922
+ self . settings. getNonSeparatorTokens ( self . uid, completion)
923
+ }
924
+
925
+ /**
926
+ Modify the `nonSeparatorTokens` setting of a Meilisearch index.
927
+
928
+ - parameter attributes: List of tokens that will not be considered as word separators
929
+ - parameter completion: The completion closure is used to notify when the server
930
+ completes the query request, it returns a `Result` object that contains `TaskInfo`
931
+ value if the request was successful, or `Error` if a failure occurred.
932
+ */
933
+ public func updateNonSeparatorTokens(
934
+ _ attributes: [ String ] ,
935
+ _ completion: @escaping ( Result < TaskInfo , Swift . Error > ) -> Void ) {
936
+ self . settings. updateNonSeparatorTokens ( self . uid, attributes, completion)
937
+ }
938
+
939
+ /**
940
+ Reset the `nonSeparatorTokens` setting of a Meilisearch index to the default value `[]`.
941
+
942
+ - parameter completion: The completion closure is used to notify when the server
943
+ completes the query request, it returns a `Result` object that contains `TaskInfo`
944
+ value if the request was successful, or `Error` if a failure occurred.
945
+ */
946
+ public func resetNonSeparatorTokens(
947
+ _ completion: @escaping ( Result < TaskInfo , Swift . Error > ) -> Void ) {
948
+ self . settings. resetNonSeparatorTokens ( self . uid, completion)
949
+ }
950
+
951
+ // MARK: Dictionary
952
+
953
+ /**
954
+ Fetch the `dictionary` setting of a Meilisearch index.
955
+
956
+ - parameter completion: The completion closure is used to notify when the server
957
+ completes the query request, it returns a `Result` object that contains an `[String]`
958
+ value if the request was successful, or `Error` if a failure occurred.
959
+ */
960
+ public func getDictionary(
961
+ _ completion: @escaping ( Result < [ String ] , Swift . Error > ) -> Void ) {
962
+ self . settings. getDictionary ( self . uid, completion)
963
+ }
964
+
965
+ /**
966
+ Modify the `dictionary` setting of a Meilisearch index.
967
+
968
+ - parameter attributes: List of words on which the segmentation will be overridden
969
+ - parameter completion: The completion closure is used to notify when the server
970
+ completes the query request, it returns a `Result` object that contains `TaskInfo`
971
+ value if the request was successful, or `Error` if a failure occurred.
972
+ */
973
+ public func updateDictionary(
974
+ _ attributes: [ String ] ,
975
+ _ completion: @escaping ( Result < TaskInfo , Swift . Error > ) -> Void ) {
976
+ self . settings. updateDictionary ( self . uid, attributes, completion)
977
+ }
978
+
979
+ /**
980
+ Reset the `dictionary` setting of a Meilisearch index to the default value `[]`.
981
+
982
+ - parameter completion: The completion closure is used to notify when the server
983
+ completes the query request, it returns a `Result` object that contains `TaskInfo`
984
+ value if the request was successful, or `Error` if a failure occurred.
985
+ */
986
+ public func resetDictionary(
987
+ _ completion: @escaping ( Result < TaskInfo , Swift . Error > ) -> Void ) {
988
+ self . settings. resetDictionary ( self . uid, completion)
989
+ }
990
+
991
+ // MARK: Pagination
992
+
993
+ /**
994
+ Get the pagination settings for the current index.
995
+
996
+ - parameter completion: The completion closure is used to notify when the server
997
+ completes the query request, it returns a `Result` object that contains an `Pagination`
998
+ value if the request was successful, or `Error` if a failure occurred.
999
+ */
1000
+ public func getPaginationSettings(
1001
+ _ completion: @escaping ( Result < Pagination , Swift . Error > ) -> Void ) {
1002
+ self . settings. getPaginationSettings ( self . uid, completion)
1003
+ }
1004
+
1005
+ /**
1006
+ Updates the pagination setting for the index.
1007
+
1008
+ - parameter settings: The new preferences to use for pagination.
1009
+ - parameter completion: The completion closure is used to notify when the server
1010
+ completes the query request, it returns a `Result` object that contains `TaskInfo`
1011
+ value if the request was successful, or `Error` if a failure occurred.
1012
+ */
1013
+ public func updatePaginationSettings(
1014
+ _ settings: Pagination ,
1015
+ _ completion: @escaping ( Result < TaskInfo , Swift . Error > ) -> Void ) {
1016
+ self . settings. updatePaginationSettings ( self . uid, settings, completion)
1017
+ }
1018
+
1019
+ /**
1020
+ Reset the pagination settings for the index.
1021
+
1022
+ - parameter completion: The completion closure is used to notify when the server
1023
+ completes the query request, it returns a `Result` object that contains `TaskInfo`
1024
+ value if the request was successful, or `Error` if a failure occurred.
1025
+ */
1026
+ public func resetPaginationSettings(
1027
+ _ completion: @escaping ( Result < TaskInfo , Swift . Error > ) -> Void ) {
1028
+ self . settings. resetPaginationSettings ( self . uid, completion)
1029
+ }
1030
+
870
1031
// MARK: Stats
871
1032
872
1033
/**
0 commit comments