IndexGetDocumentText Method (DocumentInfo, OutputAdapter) |
Namespace: GroupDocs.Search
string indexFolder = @"c:\MyIndex\"; string documentsFolder = @"c:\MyDocuments\"; // Creating an index in the specified folder Index index = new Index(indexFolder); // Indexing documents from the specified folder index.Add(documentsFolder); // Getting list of indexed documents DocumentInfo[] documents = index.GetIndexedDocuments(); // Getting a document text if (documents.Length > 0) { FileOutputAdapter outputAdapter = new FileOutputAdapter(@"C:\Text.html"); index.GetDocumentText(documents[0], outputAdapter); }