OL: reindexing the Solr search

To reindex the OpenLibrary’s Solr search index making it consistent with the db data we can use the script:


here you can find the source.

Here same basic usage:

/olsystem/bin/olenv python /opt/openlibrary/openlibrary/scripts/ol-solr-indexer.py --config /olsystem/etc/openlibrary.yml --bookmark ol-solr-indexer.bookmark --backward --days 2

/olsystem/bin/olenv is the script to load the right virtualenv.
--config /olsystem/etc/openlibrary.yml is the OpenLibrary yml configuration file.
--bookmark ol-solr-indexer.bookmark is the location of the last scan timestamp (YYYY-MM-DD hh:mm:ss) bookmarked.
--backward / --forward the direction to do the reindexing
--days the number of days to reindex.

the script can run in daemon mode. At the moment we still using the new-solr-updater for the partial updates…