Skip to main content

Following is a series of steps to install Tika and have it running for your Solr Search API Attachments.

Java is it running on your server

To begin you must have Java installed on your server/machine.  To check if Java is installed use the command

java -version

Performing the above command will output something similar to:

openjdk version "1.8.0_292"
OpenJDK Runtime Environment (build 1.8.0_292-8u292-b10-0ubuntu1~20.04-b10)
OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)

 

Install Tika

Go to https://tika.apache.org/download.html and download the latest version.  At the time of writing this article tika-app-2.0.0.jar file.

Move this file e.g. inside your drupal installation or somewhere on your server.  For example, under /usr/local/tika-app-2.0.0.jar.

Then in the settings page of the search-file-attachments module set the path where you have the tika .jar file placed.  Using the example above, set in the module settings page the path to "/usr/local" and the jar-name to "tika-app-2.0.0.jar".

 

Adding to Drupal Solr Search API Attachements

In your Drupal admin navigate to the Solr Search API Attachments page - {your_site}/admin/config/search/search_api_attachments

Under extraction method drop down list, select 

Tike Extractor

This action will format the page so you are required to enter a couple of fields:

Path to Java extractable - enter

java

Path to the Tike .jar file - enter the details you created above

/usr/local/tika-app-2.0.0.jar

 

Related articles

Andrew Fletcher04 Apr 2025
Managing .gitignore changes
When working with Git, the .gitignore file plays a critical role in controlling which files and folders are tracked by version control. Yet, many developers are unsure when changes to .gitignore take effect and how to manage files that are already being tracked. This uncertainty can lead to...
Andrew Fletcher26 Mar 2025
How to fix the ‘Undefined function t’ error in Drupal 10 or 11 code
Upgrading to Drupal 10.4+ you might have noticed a warning in their code editor stating “Undefined function ‘t’”. While Drupal’s `t()` function remains valid in procedural code, some language analysis tools — such as Intelephense — do not automatically recognise Drupal’s global functions. This...
Andrew Fletcher17 Mar 2025
Upgrading to PHP 8.4 challenges with Drupal contrib modules
The upgrade from PHP 8.3.14 to PHP 8.4.4 presents challenges for Drupal 10.4 websites, particularly when dealing with contributed modules. While Drupal core operates seamlessly, various contrib modules have not yet been updated to accommodate changes introduced in PHP 8.4.x. This has resulted in...