change_attributes method

change_attributes

Applies the specified batch of attribute changes to indexed documents without reindexing during the update operation.

def change_attributes(self, batch):
    ...
Parameter Type Description
batch AttributeChangeBatch The attribute change batch.

Example

import os

from groupdocs.search import Index
from groupdocs.search.common import AttributeChangeBatch

with Index("./index") as index:
    index.add("./documents")

    batch = AttributeChangeBatch()
    batch.add([os.path.abspath("./documents/lecture.txt")], ["main"])
    index.change_attributes(batch)

Aliases

These names call change_attributes too, limited to the overloads listed.

Alias Accepts
change_attributes_attribute_change_batch change_attributes_attribute_change_batch(batch)

See Also