Last active
December 20, 2015 11:49
-
-
Save dergachev/6126195 to your computer and use it in GitHub Desktop.
Testing indexing of apachesolr.module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## Solr index testing tricks | |
## | |
## Tested with apachesolr-6.x-2.x (more recent versions might have different drush syntax | |
# to delete an index outside of drupal, after `drush solr-index` ran | |
rm -Rf /opt/solr/solr-home/data | |
service tomcat6 restart | |
# undo drush solr-reindex | |
drush sqlq "UPDATE apachesolr_search_node SET changed = 0 WHERE status=1;" | |
# mark the latest 100 published nodes for re-indexing | |
drush sqlq 'UPDATE apachesolr_search_node SET changed = UNIX_TIMESTAMP(NOW()) WHERE status = 1 ORDER BY nid DESC LIMIT 100;' | |
# index ~200 nodes | |
drush -d php-eval 'apachesolr_search_cron();' | |
# commit to ensure the new docs appear in queries right away | |
curl 'http://localhost:8080/solr/update?commit=true\&waitFlush=true\&waitSearcher=true' | |
# most results seem to contain health | |
drush solr-search health | |
# batch index everything | |
drush solr-index |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment