Page MenuHomePhabricator

Enable the wmf_capped doc size limiter in the mediawiki-config for CirrusSearch
Closed, ResolvedPublic2 Estimated Story Points

Description

We should enable this wmf_capped profile so that the documents we index remains under reasonable size.

It does not seem that we need a per-wiki approach to this so adding this config option in CirrusSearch-common.php seems appropriate.

The config var is CirrusSearchDocumentSizeLimiterProfile and the value to set it to is wmf_capped.

For testing: the request https://test.wikipedia.org/w/api.php?action=query&format=json&prop=cirrusbuilddoc&titles=Template%3ALong&formatversion=2&cbbuilders=content should work and produce the same output as https://test.wikipedia.org/w/api.php?action=query&format=json&prop=cirrusbuilddoc&titles=Template%3ALong&formatversion=2&cbbuilders=content&cblimiterprofile=wmf_capped

Once this profile is enabled we might be able to drop the wgCirrusSearchMaxFileTextLength config entry in wmf-config/InitialiseSettings.php as it should be taken care of by the limiter.

AC:

Event Timeline

Change 861897 had a related patch set uploaded (by Ebernhardson; author: Ebernhardson):

[operations/mediawiki-config@master] cirrus: Enable document size limiting

https://gerrit.wikimedia.org/r/861897

It does not seem that we need a per-wiki approach to this so adding this config option in CirrusSearch-common.php seems appropriate.

I still placed it in IS.php since the longer term goal is to move all configuration out of separate files and into a static setup. A bit aspirational, but the intent is to get there some day.

Change 861897 merged by jenkins-bot:

[operations/mediawiki-config@master] cirrus: Enable document size limiting

https://gerrit.wikimedia.org/r/861897

Mentioned in SAL (#wikimedia-operations) [2022-11-29T22:12:35Z] <ebernhardson@deploy1002> Started scap: Backport for [[gerrit:861897|cirrus: Enable document size limiting (T323687)]]

Mentioned in SAL (#wikimedia-operations) [2022-11-29T22:13:37Z] <ebernhardson@deploy1002> ebernhardson and ebernhardson: Backport for [[gerrit:861897|cirrus: Enable document size limiting (T323687)]] synced to the testservers: mwdebug2002.codfw.wmnet, mwdebug1001.eqiad.wmnet, mwdebug1002.eqiad.wmnet, mwdebug2001.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2022-11-29T22:18:40Z] <ebernhardson@deploy1002> Finished scap: Backport for [[gerrit:861897|cirrus: Enable document size limiting (T323687)]] (duration: 06m 03s)