Install Apache Tika with Solr on Platform.sh
Apache Tika allows you to extract information from binary files (e.g. PDF files) and make them searchable in Solr.
Install and configure
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.
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.
Modify or include a build hook to download the Tika jar file to the project by editing
# .platform.app.yaml hooks: build: | mkdir -p /app/srv/bin cd /app/srv/bin && curl -OL http://download.nextag.com/apache/tika/tika-app-1.16.jar
The build hook creates the directory
/srv/bin and downloads the Tika jar executable into it. An example project is available where the full
.platform.app.yaml can be found.
/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
.platform.app.yaml file for the
Apache Tika is now setup with Solr on Platform.sh.