AttributeChangeBatch class
Leave feedback
On this page
Represents a container for attribute changes.
Learn more
- Document attributes: https://docs.groupdocs.com/search/python-net/document-attributes/
- Document filtering in search result: https://docs.groupdocs.com/search/python-net/document-filtering-in-search-result/
The AttributeChangeBatch type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new instance of the AttributeChangeBatch class. |
| Method | Description |
|---|---|
| add | Adds the specified attributes to the specified indexed document. |
| add | Adds the specified attributes to the specified indexed documents. |
| add_to_all | Adds the specified attributes to all documents in the index. |
| clear | Removes all attributes from all documents in the index. |
| remove | Removes the specified attributes from the specified indexed document. |
| remove | Removes the specified attributes from the specified indexed documents. |
| remove_all | Removes all attributes from the specified indexed document. |
| remove_all | Removes all attributes from the specified indexed documents. |
| remove_from_all | Removes the specified attributes from all documents in the index. |
import os
from groupdocs.search.common import AttributeChangeBatch
# Create a batch of attribute changes
batch = AttributeChangeBatch()
batch.add(os.path.abspath("./documents/relativity-lecture.pdf"), ["main"])
batch.add(os.path.abspath("./documents/einstein-biography.txt"), ["main", "biography"])
# Apply the changes to the index
index.change_attributes(batch)
- module
groupdocs.search.common
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.