Sep 20, 2024
Update a configuration
Updates a QuerySuggestions configuration.
Usage
Required ACL:
editSettings
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using Algolia.Search.Clients;
using Algolia.Search.Http;
using Algolia.Search.Models.QuerySuggestions;
var client = new QuerySuggestionsClient(
new QuerySuggestionsConfig(
"ALGOLIA_APPLICATION_ID",
"ALGOLIA_API_KEY",
"ALGOLIA_APPLICATION_REGION"
)
);
var response = await client.UpdateConfigAsync(
"ALGOLIA_INDEX_NAME",
new Configuration
{
SourceIndices = new List<SourceIndex>
{
new SourceIndex
{
IndexName = "ALGOLIA_INDEX_NAME",
Facets = new List<Facet> { new Facet { Attribute = "test" } },
Generate = new List<List<string>>
{
new List<string> { "facetA", "facetB" },
new List<string> { "facetC" },
},
},
},
Languages = new Languages(new List<string> { "french" }),
Exclude = new List<string> { "test" },
}
);
Did you find this page helpful?