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