<commit_before>package algoliasearch

func checkSettings(settings Map) error {
	for k, v := range settings {
		switch k {
		case "altCorrections":
			if _, ok := v.([]Alternative); !ok {
				return invalidType(k, "[]Alternative")
			}

		case "synonyms":
			if _, ok := v.([][]string); !ok {
				return invalidType(k, "[][]string")
			}

		case "attributesForDistinct",
			"attributesForFaceting",
			"attributesToIndex",
			"numericAttributesToIndex",
			"ranking",
			"slaves",
			"unretrievableAttributes",
			"disableTypoToleranceOnAttributes",
			"disableTypoToleranceOnWords",
			"attributesToHighlight",
			"attributesToRetrieve",
			"attributesToSnippet",
			"optionalWords":
			if _, ok := v.([]string); !ok {
				return invalidType(k, "[]string")
			}

		case "allowCompressionOfIntegerArray",
			"advancedSyntax",
			"allowTyposOnNumericTokens",
			"ignorePlurals",
			"removeStopWords",
			"replaceSynonymsInHighlight":
			if _, ok := v.(bool); !ok {
				return invalidType(k, "bool")
			}

		case "distinct",
			"hitsPerPage",
			"maxValuesPerFacet",<commit_msg>Add missing `customRanking` field checking in `checkSettings`<commit_after>package algoliasearch

func checkSettings(settings Map) error {
	for k, v := range settings {
		switch k {
		case "altCorrections":
			if _, ok := v.([]Alternative); !ok {
				return invalidType(k, "[]Alternative")
			}

		case "synonyms":
			if _, ok := v.([][]string); !ok {
				return invalidType(k, "[][]string")
			}

		case "attributesForDistinct",
			"attributesForFaceting",
			"attributesToIndex",
			"numericAttributesToIndex",
			"ranking",
			"customRanking",
			"slaves",
			"unretrievableAttributes",
			"disableTypoToleranceOnAttributes",
			"disableTypoToleranceOnWords",
			"attributesToHighlight",
			"attributesToRetrieve",
			"attributesToSnippet",
			"optionalWords":
			if _, ok := v.([]string); !ok {
				return invalidType(k, "[]string")
			}

		case "allowCompressionOfIntegerArray",
			"advancedSyntax",
			"allowTyposOnNumericTokens",
			"ignorePlurals",
			"removeStopWords",
			"replaceSynonymsInHighlight":
			if _, ok := v.(bool); !ok {
				return invalidType(k, "bool")
			}

		case "distinct",
			"hitsPerPage",
			"maxValuesPerFacet",
{'fraction_non_alphanumeric': 0.14652840396753833, 'fraction_numerical': 0.0, 'mean_word_length': 4.19672131147541, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6488148', 'n_tokens_mistral': 907, 'n_tokens_neox': 728, 'n_words': 146}