PartitionedTextExtractorInterface

interface \TYPO3\CMS\IndexedSearch\TextExtraction\PartitionedTextExtractorInterface

Extends
StructuredTextExtractorInterface

A text extractor for documents which are indexed in several parts, such as the page ranges of a PDF. Every part becomes an index entry of its own.

Only PDF files are grouped by their parts in the search result, so this is no extension point for other file types.

Table of Contents

Methods

extractStructuredText()  : ExtractedText
The actual text extraction, returning the text and the metadata of the resource
getSupportedMimeTypes()  : array<int, string>
Lowercase MIME types which this extractor can currently handle. Generic detections, such as "application/zip" for a Word document, are resolved to the concrete MIME type by the file extension via $GLOBALS['TYPO3_CONF_VARS']['SYS']['FileInfo']['mimeTypeCompatibility'], so an extractor does not need to declare them.
withPartitionedDocument()  : T
Provides the document divided into parts to the callback. The file is read once for all parts which the callback extracts.

Methods

getSupportedMimeTypes()

Lowercase MIME types which this extractor can currently handle. Generic detections, such as "application/zip" for a Word document, are resolved to the concrete MIME type by the file extension via $GLOBALS['TYPO3_CONF_VARS']['SYS']['FileInfo']['mimeTypeCompatibility'], so an extractor does not need to declare them.

public getSupportedMimeTypes() : array<int, string>

An extractor depending on an external tool or on a PHP extension returns an empty list as long as that dependency is not available, so that consumers can list only the file types that are actually supported without having a resource at hand.

Return values

array<int, string>
On this page