Sep 20, 2024
Add or delete dictionary entries
Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
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
from algoliasearch.search.client import SearchClientSync
from json import loads
# In an asynchronous context, you can use SearchClient instead, which exposes the exact same methods.
client = SearchClientSync("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY")
response = client.batch_dictionary_entries(
dictionary_name="plurals",
batch_dictionary_entries_params={
"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?