add_range method
Leave feedback
On this page
Adds the specified collection of words to this StopWordDictionary.
Stop words are excluded from indexing when the use_stop_words index setting is enabled.
def add_range(self, words):
...
| Parameter | Type | Description |
|---|---|---|
| words | Iterable[str] |
The collection of words to add to the dictionary. |
| Raises | Description |
|---|---|
RuntimeError |
The call changes the dictionary of an index that contains documents, is not in the IndexStatus.ready status, or is disposed. |
from groupdocs.search import Index
index = Index("./index")
stop_words = index.dictionaries.stop_word_dictionary
stop_words.add_range(["a", "an", "the", "but", "by"])
Adds the specified collection of words to the StopWordDictionary instance.
def add_range(self, words):
...
| Parameter | Type | Description |
|---|---|---|
| words | list[str] |
The collection of words to add to the dictionary. |
| Raises | Description |
|---|---|
RuntimeError |
The call changes the dictionary of an index that contains documents, is not in the IndexStatus.ready status, or is disposed. |
# Add stop words to the dictionary of an existing index
index.dictionaries.stop_word_dictionary.add_range(["physics", "chemistry"])
These names call add_range too, limited to the overloads listed.
| Alias | Accepts |
|---|---|
add_range_files |
add_range_files(words)add_range_files(words) |
add_range_strings |
add_range_strings(words)add_range_strings(words) |
add_range_ienumerable |
add_range_ienumerable(words) |
- class
StopWordDictionary
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.