importdatetimeimportosfromgroupdocs.search.commonimportDocumentfromgroupdocs.search.optionsimportIndexingOptions# `node` is the master node of a configured and started search networkindexer=node.indexerfile_path="./documents/document.pdf"withopen(file_path,"rb")asstream:document=Document.create_from_stream(os.path.basename(file_path),datetime.datetime.fromtimestamp(os.path.getmtime(file_path)),".pdf",stream)# One password per document; None for a document without oneindexer.add([document],[None],IndexingOptions())
add
Performs an indexing operation and adds the extracted data to the search network.
defadd(self,data,options):...
Parameter
Type
Description
data
List[ExtractedData]
The extracted data.
options
IndexingOptions
The indexing options.
Aliases
These names call add too, limited to the overloads listed.