Sep 20, 2024
Create a configuration
Creates a new Query Suggestions configuration.
You can have up to 100 configurations per Algolia application.
Usage
Required ACL:
editSettings
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
import { algoliasearch } from 'algoliasearch';
// Replace 'us' with your Algolia Application Region
const client = algoliasearch('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY').initQuerySuggestions({ region: 'us' });
const response = await client.createConfig({
indexName: 'theIndexName',
sourceIndices: [
{ indexName: 'testIndex', facets: [{ attribute: 'test' }], generate: [['facetA', 'facetB'], ['facetC']] },
],
languages: ['french'],
exclude: ['test'],
});
Did you find this page helpful?