Adds the specified attributes to the specified indexed documents.
defadd(self,paths,attributes):...
Parameter
Type
Description
paths
list[str]
The documents paths.
attributes
list[str]
The attributes to add.
Example
importosfromgroupdocs.searchimportIndexfromgroupdocs.search.commonimportAttributeChangeBatchindex=Index("./index")index.add("./documents")batch=AttributeChangeBatch()batch.add([os.path.abspath("./documents/relativity-lecture.pdf")],["main"])# Apply the changes to the indexindex.change_attributes(batch)
Aliases
These names call add too, limited to the overloads listed.