Making PDF Content Searchable in Drupal 11 with Solr and Tika
Part 3 of the ongoing Automated Librarian series sees Ron Ferguson move beyond importing eBooks into Drupal 11 and tackle the real challenge: making thousands of PDF pages searchable. In a Drupal Odyssey post, he shows that while Drupal’s database search can index filenames and metadata, it remains blind to the actual text in binary files unless paired with the right search stack.
Ron explains how Apache Tika extracts text and hidden metadata from PDFs and hands it to Apache Solr for indexing, enabling deep-text search beyond filenames or basic metadata. Using Drupal’s Search API and the Search API Attachments module, he configures extraction through the “Solr Extractor” method, offloading processing to Solr’s Tika pipeline rather than the web server. This approach keeps CPU usage low while handling large documents efficiently.
He maps both the Title and the extracted text as Fulltext fields and applies weighted boosts to influence relevance, prioritising title matches with a boost value of 8.0 over body content set to 5.0. Within Views, he exposes the Fulltext search filter and switches the parse mode to “Direct query,” enabling operator-based searches such as excluding keywords. The result is precise retrieval of passages buried deep within multi-page PDFs, turning a static media library into a functional search index.

