Skip to content

Instantly share code, notes, and snippets.

@skwashd
Created August 13, 2011 08:35
Show Gist options
  • Save skwashd/1143626 to your computer and use it in GitHub Desktop.
Save skwashd/1143626 to your computer and use it in GitHub Desktop.
Index all of your articles
#!/bin/bash
#
# Add all of your Drupal nodes to the search index.
#
# NOTE:
# * This should work when you have around 10 000 nodes.
# * I assume you have set search to add 500 nodes per cron run.
# * There are better ways of doing this, but it does the job.
#
# Change this to the url of your site
MY_SITE="http://example.com"
i=0
while [ $i -lt 30 ]; do
wget -q $MY_SITE/cron.php
# wait 2 mins.
sleep 120
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment