How do I install Apache Tika with Solr


Install Apache Tika with Solr on



Apache Tika allows you to extract information from binary files (e.g. PDF files) and make them searchable in Solr.


1. Install search modules using composer

Install and configure search_api and search_api_solr:

composer require drupal/search_api
composer require drupal/search_api_solr

More information is available for setting up Solr with Drupal 8 in the public documentation.

2. Install search attachments module

Install search_api_attachments using composer

composer require drupal/search_api_attachments

Search API Attachments enable pointing at the tika jar file to index PDF documents.

3. Install the Tika jar

Modify or include a build hook to download the Tika jar file to the project by editing

    build: |
      mkdir -p /app/srv/bin
      cd /app/srv/bin && curl -OL

The build hook creates the directory /srv/bin and downloads the Tika jar executable into it. An example project is available where the full can be found.

Consult the documentation for more information about build and deploy hooks on

4. Configure the search API attachments

Visit /admin/config/search/search_api_attachments in a browser and add the method, java executable, and Tika paths configuration.

These paths correspond to the paths entered in the file for the build step.


Apache Tika is now setup with Solr on

Does this installation also work for Drupal 7 and the associated apachesolr, apachesolr_file and search_api modules? I currently have solr 7.6 installed and working with content, now I want to add the search to attachments like Word and PDF files.