add method
Leave feedback
On this page
Adds the specified pair of alias and associated text to this instance of the AliasDictionary.
def add(self, alias, text):
...
| Parameter | Type | Description |
|---|---|---|
| alias | str |
The alias to add to the dictionary. |
| text | str |
The text to be associated with the alias. |
| Raises | Description |
|---|---|
ValueError |
If alias contains characters outside the ranges a‑z and 0‑9. |
from groupdocs.search import Index
index = Index("./MyIndex")
aliases = index.dictionaries.alias_dictionary
aliases.add("usa", "United States of America")
These names call add too, limited to the overloads listed.
| Alias | Accepts |
|---|---|
add_file |
add_file(alias, text) |
add_string |
add_string(alias, text) |
- class
AliasDictionary
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.