<p><strong>Craft 3:</strong></p>

<p>In Craft 3, a plugin can listen to the <code>Element::EVENT_REGISTER_SEARCHABLE_ATTRIBUTES</code> event to modify the searchable attribute list of an element before it is indexed.</p>

<p><strong>Craft 2:</strong></p>

<p>Currently the answer is no.</p>

<p>Maybe it <a href="http://feedback.craftcms.com" rel="nofollow noreferrer">makes the case</a> for some sort of <code>onBeforeSearchIndex</code> event a plugin could listen to and influence what Craft adds to the search index, but given that manually updating the search index isn't meant to be a common occurrence (Craft keeps them up to date in normal element saving operations), I'd probably add the workflow you're using that requires frequent updates to the feature request.</p>

CC BY-SA 4.0
2019-10-08T13:45:10.260Z
Is that for Craft 3 as well?
Frank Lämmer
CC BY-SA 4.0
2019-10-14T18:18:36.480Z
@FrankLämmer Updated answer for Craft 3.
Brad Bell
CC BY-SA 4.0
2016-09-28T18:51:19.403Z
2019-10-14T18:18:21.907Z
2019-10-14T18:18:21.907Z
Brad Bell
<p>Our search index table (craft_searchindex) is over 500,000 rows and it takes a few hours to index. We have 11 languages, and each is being fully indexed. It takes a few hours to complete.</p>

<p>Are there any ways we can reduce the search index size (e.g. only one language, or specific sections?</p>

CC BY-SA 3.0
2017-03-05T13:25:23.300Z
Mine is currently sitting at ~1.1M, taking up around 93MB, or half the database size. This is killing performance
William Isted
<search>
Is there a way to reduce the search index?
# Is there a way to reduce the search index?

(Asked by: username_0 on 2016-09-28)

Our search index table (craft\_searchindex) is over 500,000 rows and it takes a few hours to index. We have 11 languages, and each is being fully indexed. It takes a few hours to complete.

Are there any ways we can reduce the search index size (e.g. only one language, or specific sections?

**Tags:** search
> **Comments:**
> **username_1**: Mine is currently sitting at ~1.1M, taking up around 93MB, or half the database size. This is killing performance  

---

## 1 answers

### Answer by username_2 on 2016-09-28. Score: 3 | Accepted answer

**Craft 3:**

In Craft 3, a plugin can listen to the `Element::EVENT_REGISTER_SEARCHABLE_ATTRIBUTES` event to modify the searchable attribute list of an element before it is indexed.

**Craft 2:**

Currently the answer is no.

Maybe it [makes the case](http://feedback.craftcms.com) for some sort of `onBeforeSearchIndex` event a plugin could listen to and influence what Craft adds to the search index, but given that manually updating the search index isn't meant to be a common occurrence (Craft keeps them up to date in normal element saving operations), I'd probably add the workflow you're using that requires frequent updates to the feature request.

> **Comments:**
> **username_3**: Is that for Craft 3 as well?  
> **username_2**: @FrankLämmer Updated answer for Craft 3.  

---

