<p>As of Craft 3, there is a <a href="https://github.com/craftcms/cms/blob/develop/src/base/Element.php#L332-L336" rel="nofollow noreferrer">RegisterElementSearchableAttributesEvent</a> event that a plugin can listen to to change modify what gets saved to the search index table when an element is saved.</p>

CC BY-SA 3.0
2016-02-01T14:41:27.407Z
Thanks I have done :) http://feedback.craftcms.com/forums/285221-feature-requests/suggestions/11672139-exclude-items-from-the-indexer
dave_agilepixel
CC BY-SA 4.0
2018-10-16T09:52:16.117Z
I had big issues on a Craft 2 multilingual site with dozens of thousands of entries with Matrix fields. The site had become extremely slow (almost unusable), especially when recording new data. This was certainly caused by the searchindex table with massive records. I am currently working on a Craft 3 site using PostgreSQL and fear the same kind of issues. Has the situation changed since this post? Is there finally a way to exclude fields from the search index?
Romain P.
CC BY-SA 4.0
2018-10-16T17:10:34.930Z
@RomainPoirier Updated answer.
Brad Bell
CC BY-SA 4.0
2018-10-18T08:45:46.177Z
Thank you @BradBell. But are you sure that this new Event can set fields to ignore by the search index? I'm stuck [here](https://craftcms.stackexchange.com/q/28118/131).
Romain P.
CC BY-SA 4.0
2016-02-01T14:15:10.290Z
2018-10-16T17:10:20.107Z
2018-10-16T17:10:20.107Z
Brad Bell
<p>I have a site with ~ 25000 entries, and around 130 custom fields.  I tried to rebuild the search index and it didn't complete after 8hours of running none stop.  Whilst I'm sure this can be blamed on the Server to some degree, I can see that my search index table has just short of 700000 rows, which I'm guessing takes a reasonable amount of time to create.</p>

<p>I was sure that I'd seen somewhere a way to hide/exclude fields from the search index, but looking now I can't find anyway to omit specific fields from the search index, which I would expect to reduce the load on the search indexer, there are only very few fields that I actually want the system to actually search by so I'm hoping there's a solution to this, I can reduce the load on the server and speed up the reindexing.</p>

<p>Thanks</p>

CC BY-SA 3.0
2016-01-14T10:07:20.047Z
I'm keen to see if there is a solution to this too ... I have an index with upwards of 2.5m rows currently and am terrified of rebuilding it just in case it never completes. Not that I think it needs it as the element API takes care of updating it but still - housekeeping!
Josh Angell
<search>
Ignore fields in search index
# Ignore fields in search index

(Asked by: username_0 on 2015-11-23)

I have a site with ~ 25000 entries, and around 130 custom fields. I tried to rebuild the search index and it didn't complete after 8hours of running none stop. Whilst I'm sure this can be blamed on the Server to some degree, I can see that my search index table has just short of 700000 rows, which I'm guessing takes a reasonable amount of time to create.

I was sure that I'd seen somewhere a way to hide/exclude fields from the search index, but looking now I can't find anyway to omit specific fields from the search index, which I would expect to reduce the load on the search indexer, there are only very few fields that I actually want the system to actually search by so I'm hoping there's a solution to this, I can reduce the load on the server and speed up the reindexing.

Thanks

**Tags:** search
> **Comments:**
> **username_1**: I'm keen to see if there is a solution to this too ... I have an index with upwards of 2.5m rows currently and am terrified of rebuilding it just in case it never completes. Not that I think it needs it as the element API takes care of updating it but still - housekeeping!  

---

## 1 answers

### Answer by username_2 on 2016-02-01. Score: 5 | Accepted answer

As of Craft 3, there is a [RegisterElementSearchableAttributesEvent](https://github.com/craftcms/cms/blob/develop/src/base/Element.php#L332-L336) event that a plugin can listen to to change modify what gets saved to the search index table when an element is saved.

> **Comments:**
> **username_0**: Thanks I have done :) http://feedback.craftcms.com/forums/285221-feature-requests/suggestions/11672139-exclude-items-from-the-indexer  
> **username_3**: I had big issues on a Craft 2 multilingual site with dozens of thousands of entries with Matrix fields. The site had become extremely slow (almost unusable), especially when recording new data. This was certainly caused by the searchindex table with massive records. I am currently working on a Craft 3 site using PostgreSQL and fear the same kind of issues. Has the situation changed since this post? Is there finally a way to exclude fields from the search index?  
> **username_2**: @RomainPoirier Updated answer.  
> **username_3**: Thank you @BradBell. But are you sure that this new Event can set fields to ignore by the search index? I'm stuck [here](https://craftcms.stackexchange.com/q/28118/131).  

---

