Add or delete dictionary entries

Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.

Usage

Required ACL: editSettings
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
use Algolia\AlgoliaSearch\Api\SearchClient;

$client = SearchClient::create('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY');

$response = $client->batchDictionaryEntries(
    'plurals',
    ['clearExistingDictionaryEntries' => true,
        'requests' => [
            ['action' => 'addEntry',
                'body' => ['objectID' => '1',
                    'language' => 'en',
                    'word' => 'fancy',
                    'words' => [
                        'believe',

                        'algolia',
                    ],
                    'decomposition' => [
                        'trust',

                        'algolia',
                    ],
                    'state' => 'enabled',
                ],
            ],
        ],
    ],
);
Did you find this page helpful?
PHP API clients v4