get_document_text method

get_document_text

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

def get_document_text(self, document_info, adapter):
    ...
Parameter Type Description
document_info NetworkDocumentInfo The indexed document info.
adapter OutputAdapter The output adapter.

Example

from groupdocs.search import Index
from groupdocs.search.common import StringOutputAdapter
from groupdocs.search.options import OutputFormat

index = Index("./index")
index.add("./documents")
doc = index.get_indexed_documents()[0]

adapter = StringOutputAdapter(OutputFormat.PLAIN_TEXT)
index.get_document_text(doc, adapter)
print(adapter.get_result()[:200])

Aliases

These names call get_document_text too, limited to the overloads listed.

Alias Accepts
get_document_text_network_document_info get_document_text_network_document_info(document_info, adapter)

See Also