public function tika($file)
    {
        $text = null;
        try {
            /** @var Response $response */
            $response = $this->put(
                'tika',
                $this->getGuzzleOptions([
                    'headers' => [
                        'Accept' => 'text/plain',
                    ],
                    'body' => file_get_contents($file),
                ])
            );
            $text = $response->getBody();
        } catch (RequestException $e) {
            $msg = sprintf(
                'TikaRestClient was not able to process %s. Response: %s %s.',
                $file,
                $e->getResponse()->getStatusCode(),
                $e->getResponse()->getReasonPhrase()
            );
            // Only available if tika-server was started with --includeStack
            $body = $e->getResponse()->getBody();
            if ($body) {
                $msg .= ' Body: ' . $body;
            }

            Injector::inst()->get(LoggerInterface::class)->info($msg);
        }

        return (string) $text;
    }