Required ACL: editSettings
Examples
Replace stopword entries
C#
Go
Java
JavaScript
Kotlin
PHP
Python
Ruby
Scala
Swift
Stopword stopword = new Stopword ()
{
ObjectID = objectId ,
Language = "en" ,
Word = "upper" ,
};
// Synchronous
var replaceDictionaryResponse = DictionaryClient . ReplaceDictionaryEntries ( algoliaDictionary , new List < DictionaryEntry >() { stopword });
// Asynchronous
var replaceDictionaryResponse = DictionaryClient . ReplaceDictionaryEntriesAsync ( algoliaDictionary , new List < DictionaryEntry >() { stopword });
replaceDictionaryResponse . Wait ();
Replace plural entries
C#
Go
Java
JavaScript
Kotlin
PHP
Python
Ruby
Scala
Swift
Plural plural = new Plural ()
{
ObjectID = objectId ,
Language = "fr" ,
Words = new List < String >() { "cheval" , "chevaux" }
};
// Synchronous
DictionaryClient . ReplaceDictionaryEntries ( algoliaDictionary , new List < DictionaryEntry >() { plural });
// Asynchronous
var replaceDictionaryResponse = await DictionaryClient . ReplaceDictionaryEntries ( algoliaDictionary , new List < DictionaryEntry >() { plural });
replaceDictionaryResponse . Wait ();
Replace compound entries
C#
Go
Java
JavaScript
Kotlin
PHP
Python
Ruby
Scala
Swift
Compound compound = new Compound ()
{
ObjectID = objectId ,
Language = "nl" ,
Word = "kopfschmerztablette" ,
Decomposition = new List < String >() { "kopf" , "schmerz" , "tablette" }
};
// Synchronous
var replaceDictionaryResponse = DictionaryClient . ReplaceDictionaryEntries ( algoliaDictionary , new List < DictionaryEntry >() { compound });
// Asynchronous
var replaceDictionaryResponse = await DictionaryClient . ReplaceDictionaryEntriesAsync ( algoliaDictionary , new List < DictionaryEntry >() { compound });
replaceDictionaryResponse . Wait ();
Parameters
Dictionary type. One of: stopword
, plural
, compound
.
The dictionary entries to add. Unique ID of the dictionary entry.
Language ISO code supported by this dictionary,
for example en
for English.
List of decompositions of a word for the compounds
dictionary.
If empty, word
is considered a compound atom.
Otherwise, the compounds that word
is decomposed into.
state
enum<string>
default: "enabled"
Whether this dictionary entry is active:
enabled
: this dictionary entry is active
disabled
: this dictionary entry is inactive
For the stop-word dictionary: the stop word you want to add.
For the compounds dictionary:
Adds the word as compound atom (with empty decomposition
)
Adds the word with a custom decomposition
If the word is already included in Algolia’s standard dictionary,
you can override it by setting its state to disabled
. List of declensions for the plurals
dictionary.
Additional parameters to add to this request.
Response
The task ID used with the waitTask
method.
Date at which the indexing job has been created.
Response as JSON
This section shows the JSON response returned by the API.
Each API client wraps this response in language-specific objects, so the structure may vary.
To view the response, use the getLogs
method.
Don’t rely on the order of properties—JSON objects don’t preserve key order.
{
"updatedAt" : "2013-01-18T15:33:13.556Z" ,
"taskID" : 678
}