craft-freeform icon indicating copy to clipboard operation
craft-freeform copied to clipboard

Searchindex: 100 000 000 rows of freeform submissions in the searchIndex table

Open ragnarfrosti opened this issue 1 month ago • 1 comments

What happened?

One of our clients has a multisite website with 5 languages. There are 72 Freeform forms with almost 200 000 submissions in the database.

These 200 000 submissions have created 100 000 000 (one hundred million) rows in the search index table.

Image

It seems that each new submission creates ~1400 rows in the searchindex table. It basically creates a row for each field that exists in freeform for all the 5 languages. So a form that has 4 fields it still creates rows in the searchindex for alot of other fields that are not used by the form.

Errors and Stack Trace (if available)


How can we reproduce this?

Freeform Edition

Pro

Freeform Version

5.11.11

Craft Version

5.8.15

When did this issue start?

  • [x] Unsure
  • [ ] Fresh install of Freeform
  • [ ] After upgrading from older Freeform version
  • [ ] After upgrading from older Craft version
  • [ ] After a change to hosting configuration

Previous Freeform Version

No response

ragnarfrosti avatar Nov 17 '25 13:11 ragnarfrosti

Hi @ragnarfrosti

Thanks so much for reporting this and for including all the helpful details. We really appreciate the time you took to dig into it.

We've reviewed this internally and it does look like the issue might be related to our defineSearchableAttributes on Submission element type.

We'll plan to include a fix in an upcoming release.

Thanks again for the thorough report! 🙂

seandelaney avatar Nov 19 '25 13:11 seandelaney

This should now be resolved in Freeform 5.13.6+ 🙂

After updating, we also recommend reindexing all submissions with php craft freeform/submissions/reindex.

kjmartens avatar Nov 27 '25 19:11 kjmartens