Create a configuration

Creates a new Query Suggestions configuration.

You can have up to 100 configurations per Algolia application.

Usage

Required ACL: editSettings
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import QuerySuggestions

let client = try QuerySuggestionsClient(appID: "ALGOLIA_APPLICATION_ID", apiKey: "ALGOLIA_API_KEY", region: .us)

let response = try await client.createConfig(configurationWithIndex: ConfigurationWithIndex(
    sourceIndices: [SourceIndex(
        indexName: "ALGOLIA_INDEX_NAME",
        facets: [Facet(attribute: "test")],
        generate: [["facetA", "facetB"], ["facetC"]]
    )],
    languages: QuerySuggestionsLanguages.arrayOfString(["french"]),
    exclude: ["test"],
    indexName: "ALGOLIA_INDEX_NAME"
))
Did you find this page helpful?