The extract method of the Indexer class only extracts data from documents using the extraction services of the network, without indexing. The data extracted from each document are passed to the data_extracted event, and the completion of the operation is reported by the extraction_completed event.
defextract(self,documents,passwords,options):...
Parameter
Type
Description
documents
List[Document]
The documents to be extracted.
passwords
List[str]
The document passwords.
options
IndexingOptions
The extraction options.
Example
importthreadingfromgroupdocs.search.optionsimportIndexingOptions# `node` is the master node of a configured and started search network;# `documents` and `passwords` are the lists Indexer.add takesextracted_data=[]lock=threading.Lock()defon_data_extracted(sender,args):withlock:# raised on engine worker threadsextracted_data.append(args.data)node.events.data_extracted+=on_data_extractednode.events.extraction_completed+=lambdasender,args:print("Extraction completed")node.indexer.extract(documents,passwords,IndexingOptions())
Aliases
These names call extract too, limited to the overloads listed.