GetDocumentText

GetDocumentText(DocumentInfo, OutputAdapter)

Generates the text of an indexed document and passes it through an output adapter.

public void GetDocumentText(DocumentInfo documentInfo, OutputAdapter adapter)
Parameter Type Description
documentInfo DocumentInfo The indexed document info.
adapter OutputAdapter The output adapter.

Examples

The example demonstrates how to get the text of an indexed document from an index.

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


GetDocumentText(DocumentInfo, OutputAdapter, TextOptions)

Generates HTML formatted text for indexed document and transfers it through the output adapter.

public void GetDocumentText(DocumentInfo documentInfo, OutputAdapter adapter, TextOptions options)
Parameter Type Description
documentInfo DocumentInfo The indexed document info.
adapter OutputAdapter The output adapter.
options TextOptions The text retrieving options.

See Also