Page MenuHomePhabricator

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

Description

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"}}'
EOF
fi

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
debt claimed this task.
debt subscribed.

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