Page MenuHomeMiraheze

Search issues caused by rebuildtextindex.php data too long error
Closed, ResolvedPublic


In order to avoid multiple tasks on the same topic, it's probably better to have a single task for search issues.

Currently the issue is that rebuildtextindex.php cannot be ran as errors are received when doing so:

Wikimedia\Rdbms\DBQueryError from line 1809 of /srv/mediawiki/w/includes/libs/rdbms/database/Database.php: Error 1406: Data too long for column 'si_title' at row 1 (db101)

Event Timeline

Reception123 triaged this task as Normal priority.Feb 1 2022, 16:44
Reception123 created this task.
Reception123 renamed this task from Search issues / rebuildtextindex.php not working to Search issues caused by rebuildtextindex.php data too long error.Feb 1 2022, 16:44
Reception123 added a subscriber: Looney_Toons.
Reception123 added a subscriber: Victorigpa.

The best thing we can do is catch it and skip rather than fail hard

The best thing we can do is catch it and skip rather than fail hard

Hm, how could we do that?

Fork the script and catch the error the same way you would any php exception

For future reference,

ALTER TABLE searchindex ADD FULLTEXT INDEX si_title (si_title), ADD FULLTEXT INDEX si_text (si_text);

Would fix the problem on wikis with a searchindex without the need to run rebuildtextindex when they experience an error regarding not having a FULLTEXT index.

Thanks @John, that's noted and in the future I'll be using that.

In the meantime my question is, is there really absolutely nothing that we can do for wikis that have unfortunately already been rebuilt?

It would seem then that we could do ALTER TABLE searchindex MODIFY COLUMN si_title MEDIUMTEXT; to resolve the issue on affected wikis?

Diverging from core schema is not a fun idea for me when I get to do releases

Reception123 claimed this task.

I agree, it is not ideal at all but at the same time it is unlikely that upstream will do it any time soon and obviously wikis (especially as large as ATT) are harmed by not having a functional search. As such, I've decided to make the change for now. Of course it should be exceptional and avoided as much as possible (which can be done by doing what John suggested rather than rebuildtextindex.php immediately).

@Victorigpa Search works again on your wiki. @Looney_Toons Search is being progressively rebuild on ATT and should hopefully be working by tomorrow.