rebuildSearchIndex seems slow

Hello all,

Two days ago I was able to succesfully run a test upgrade for my OJS from 3.1.2 to 3.3.0-14. The next step was to run rebuildSearchIndex. The problem here is that rebuildSearchIndex is running for almost two days and indexed around 5000 articles so far, which is maybe half of our content. I think this is slow.

My system specs are:

Ubuntu 18.04.6 LTS
4 cores Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz
8Gb RAM
300GB HDD
OJS 3.3.0-14
MySQL 5.7.41
PHP 7.4.33

I recently changed the database engine to InnoDB, the charset is utf8mb4 and the collation is utf8mb4_unicode_ci (some tables are still using utf8_general_ci, which is something I have to correct), so maybe my MySQL is not configured the best way. The CPU load doesn’t seem high, around 15% to MySQL and 5-10% to PHP most of the time. Is there a way to find out if the process really is slow? Is there a way to speed this up?

Regards,

Oberdan

Hello again,

Just to let you know, the articles are now indexed. It took 4 days to index 13.387 articles.

Regards,

Oberdan

Hi Oberdan,

How did you manage to do it? Did you rebuild the search index in a local pc? I’m trying to rebuild the search index in a server with AlmaLinux. However, after an hour it stops in the 1st journal out of 4. Your tips will be very helpful.

Best regards,
Humberto

Something must indeed be slow.
On our environment, where we have installed the Lucene/Solr plugin and search engine (which also excerpts and indexes all the full texts), indexing of 2600 articles takes about 30 minutes.
On another environment (also with Lucene/Solr), indexing of 6000 articles takes about 1 hour.

I remember that before, when only the internal MySQL indexing was used, that this was slower than indexing with Lucene/Solr.

Also, I have observed that with OJS 3.3.0-17, updating article keywords and publishing the article is now much faster compared to previous versions (near immediate compared to sometimes half a minute depending on the size of the article and the length of the keyword list).
So, you might consider to update to OJS 3.3.0-17 and maybe also to try out Lucene/Solr.