---
title: "Acquia Search: Index Attachments API"
date: "2024-11-25T20:38:31+00:00"
summary:
image:
type: "article"
url: "/content-optimization/help/90396-acquia-search-index-attachments-api"
id: "e7a8b0c2-6c74-4e3b-b22e-45dc4d410bbf"
---

Goal
----

Index file attachments such as PDFs and Word documents in Acquia Search using the Search API Attachments module.

Note

This tutorial applies only to Acquia Search powered by Solr. If you use Acquia Search Powered by SearchStax, the process is different.

**Prerequisites**

*   Drupal 10 or later
    
*   [Acquia Search installed and configured](/acquia-cloud-platform/getting-started "Getting started")
    
*   Acquia Connector module installed and active
    

**Step 1: Install and enable the Search API Attachments module**

1.  Confirm the Acquia Search and Acquia Connector modules are installed and working as expected.
    
2.  Add the [Search API Attachments](https://www.drupal.org/project/search_api_attachments "https://www.drupal.org/project/search_api_attachments") module to your codebase.
    
3.  Sign in with administrator credentials.
    
4.  Navigate to **Manage > Extend**.
    
5.  Select the **Search API Attachments** checkbox.
    
6.  Click **Install**.
    

**Step 2: Configure Search API Attachments to use Acquia Search**

1.  Navigate to **Manage > Configuration > Search and metadata > Search API attachments**.
    
2.  Select **Solr Extractor** from the **Extraction method** dropdown.
    
3.  From the **Solr server** dropdown, select the server with an Acquia Search configuration. The name is **Acquia Search API Solr server**, or similar.
    
4.  Click **Submit and test extraction**.
    
5.  Verify that the system displays a success message such as "Congratulations! The extraction seems working! Yay!"
    

**Step 3: Reconfigure the search index**

1.  Navigate to **Manage > Configuration > Search and metadata > Search API**.
    
2.  In the **Index** row, click **Edit**.
    
3.  Select the **Processors** tab.
    
4.  Select the **File attachments** processor checkbox to enable it.
    
    ![Acquia-Search\_processors](https://acquia.widen.net/content/miz3vzzecq/web/b8589_url_fbe08cfbc5f9c4fef614aa28fb6cfc48.webp?w=720&v=1034fb9f-5a60-480e-b11d-45596b6ba334&itok=ezbTF0BU)
    
5.  Configure the attachment processor to exclude specific file types or apply size limits as needed.
    
    ![Acquia-Search\_processor-query](https://acquia.widen.net/content/sxnv4nlqig/web/63363_url_f07fe2bb4ef341ba6a4537206e056e8f.webp?w=720&v=c2c35073-f306-4037-bcd9-11bda2ab4b01&itok=ms7JVP22)
    
6.  Click **Save**.
    
7.  Select the **Fields** tab, then click **Add fields**.
    
    ![Acquia-Search\_fields](https://acquia.widen.net/content/zieusbn7zu/web/07f57_url_45013449ff9cf58a1f658381ec869c4c.webp?w=720&v=cd33c837-a776-4646-8589-d16c41361849&itok=WNz6lF-u)
    
8.  Select the relevant attachment fields to index. Configure indexing options such as boosting factors.
    
    ![Acquia-Search\_add-fields](https://acquia.widen.net/content/skz0ltqk08/web/be707_url_65d4376831106395888e78ffd5c35551.webp?w=720&v=683dde3f-f643-4035-9d5c-c7a8dd573cfb&itok=--zfAx23)
    
9.  Click **Save changes**.
    
10.  Reindex the search index for the changes to take effect.
     
     1.  Navigate to the SearchStax index.
         
     2.  Click **Queue all items for Reindexing**.
         
     3.  Click **Index now**.
         

**Step 4: Update the search view**

1.  Navigate to **Manage > Structure > Views**.
    
2.  Find and edit the **Search** view.
    
3.  In the **Filter Criteria** section, add the newly indexed attachment fields to the search.
    
4.  Use Ctrl (Command on macOS) to multi-select: add to the existing fields rather than replacing them.
    
5.  Save the view.
    

Note

For a Fulltext filter, add attachment fields to enable fuzzy search across multiple Solr fields. Alternatively, add a separate search field to search solely within attachment contents.

6\. Clear the site caches and reindex to ensure that the updates appear in search results.