Page MenuHomePhabricator

Reindex default namespaces that were moved from general to content indices
Closed, ResolvedPublic


After switching namespaces searched by default to the content indices we need to reindex these wikis to avoid waiting for the saneitizer to catch up.
One technique is to send a reindex on these namespaces, I've prepared few bash script to send from terbium.
The script to generate them is :

namespace=`echo '$ar = []; foreach($wgNamespacesToBeSearchedDefault as $k => $v) {if ($v && !in_array($k, $wgContentNamespaces)) { $ar[] = "\"" . $k ."\"";}} print (implode(",", $ar));' | mwscript eval.php --wiki $1`
if [ ! -z "$namespace" ]; then
cat <<EOF
curl -XPOST elastic1020.eqiad.wmnet:9200/_reindex -d '{"source": { "index": "$1_general", "type": "page", "query": {"terms": {"namespace": [$namespace]}}}, "dest": {"index": "$1_content"}}'
curl -XPOST elastic2020.codfw.wmnet:9200/_reindex -d '{"source": { "index": "$1_general", "type": "page", "query": {"terms": {"namespace": [$namespace]}}}, "dest": {"index": "$1_content"}}'

Event Timeline

dcausse created this task.Sep 21 2017, 9:54 AM
Restricted Application added a project: Discovery. · View Herald TranscriptSep 21 2017, 9:54 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Mentioned in SAL (#wikimedia-operations) [2017-09-21T09:54:51Z] <dcausse> reindexing group0 wikis T176397

Mentioned in SAL (#wikimedia-operations) [2017-09-21T09:59:39Z] <dcausse> reindexing group1 wikis T176397

debt closed this task as Resolved.Sep 22 2017, 2:06 PM
debt claimed this task.
debt added a subscriber: debt.

This will be enabled in production when T147505 is done next (re-indexing).