Topic on Extension talk:CirrusSearch

ForceSearchIndex.php isn't populating ES

Corin12355 (talkcontribs)

Recently migrated a wiki from one server to another, everything seems to be working fine except for Cirrus.

When re-running ForceSearchIndex.php in order to repopulate the fresh elasticsearch install after UpdateSearchIndexConfig etc, I doesn't seem to be populating anything.

[            x] Indexed 9 pages ending at 946 at 55/second

[            x] Indexed 10 pages ending at 968 at 85/second

[            x] Indexed 9 pages ending at 986 at 99/second

[            x] Indexed 10 pages ending at 999 at 50/second

[            x] Indexed 10 pages ending at 1012 at 58/second

[            x] Indexed 10 pages ending at 1024 at 66/second

[            x] Indexed 10 pages ending at 1035 at 72/second

[            x] Indexed 10 pages ending at 1046 at 79/second

[            x] Indexed 10 pages ending at 1058 at 84/second

It runs through the pages as if it was correctly doing it and finishes with no errors, however attempting to do a search will always return no results.

And after running CirrusNeedsToBeBuilt.php just to verify there's data, I'm getting

Elasticsearch status:  green

No pages in the content index.  Indexes were probably wiped.

Is there something I've done wrong?


Ciencia Al Poder (talkcontribs)

You need to set $wgDisableSearchUpdate = true; before running updateSearchIndexConfig.php, then set $wgDisableSearchUpdate = false; before running forceSearchIndex.php, which needs to be run in 2 stages (--skipLinks --indexOnSkip first, and --skipParse next)

Corin12355 (talkcontribs)

Performed that before but tried it again just to be sure I didn't mix up anything and same deal sadly.

Forgot to mention my versions as well:

MediaWiki: 1.35.0 (c1e34e3)

PHP: 7.3.19-1~deb10u1 (fpm-fcgi)

MariaDB: 10.5.6-MariaDB-1:10.5.6+maria~buster

Elasticsearch: 6.5.4

I downgraded from 6.8.12 to the same version Wikipedia uses just to be sure it wasn't that and unfortunately there was no difference either.

Appreciate the help though!

Corin12355 (talkcontribs)

Mystery solved. "Indexed x pages" was a bit misleading, it had actually added them to the job queue, not actually indexed them.

The problem I had was the cronjob for the queue wasn't moved over with the website (forgot about it), as a result nothing was being submitted to ES!