IndexGetDocumentText Method (DocumentInfo, OutputAdapter)
Generates HTML formatted text for indexed document and transfers it through the output adapter.

Namespace: GroupDocs.Search
Assembly: GroupDocs.Search (in GroupDocs.Search.dll) Version: 20.11
Syntax
public void GetDocumentText(
	DocumentInfo documentInfo,
	OutputAdapter adapter
)

Parameters

documentInfo
Type: GroupDocs.Search.ResultsDocumentInfo
The indexed document info.
adapter
Type: GroupDocs.Search.CommonOutputAdapter
The output adapter.
Examples
The example demonstrates how to get the text of an indexed document from an index.
C#
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);
}
See Also