IndexGetIndexedDocumentItems Method
Gets an array of nested items of the specified document (for container documents such as ZIP, OST, PST).

Namespace: GroupDocs.Search
Assembly: GroupDocs.Search (in GroupDocs.Search.dll) Version: 20.6
Syntax
public DocumentInfo[] GetIndexedDocumentItems(
	DocumentInfo documentInfo
)

Parameters

documentInfo
Type: GroupDocs.Search.ResultsDocumentInfo
The document info.

Return Value

Type: DocumentInfo
An array of a document items.
Examples
The example demonstrates how to get a list of items 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();
for (int i = 0; i < documents.Length; i++)
{
    DocumentInfo document = documents[i];
    Console.WriteLine(document.FilePath);
    DocumentInfo[] items = index.GetIndexedDocumentItems(document); // Getting list of document items
    for (int j = 0; j < items.Length; j++)
    {
        DocumentInfo item = items[j];
        Console.WriteLine("\t" + item.InnerPath);
    }
}
See Also