-
Notifications
You must be signed in to change notification settings - Fork 2
Local Solr Instance
Docker must be installed in your development environment and be running
- Update your
local_settings.py
with the following stanza
if 'test' not in sys.argv and 'jenkins' not in sys.argv and 'validate' not in sys.argv:
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': 'http://localhost:8983/solr/footprints',
'TIMEOUT': 60 * 5,
'INCLUDE_SPELLING': False,
'BATCH_SIZE': 10,
},
}
-
Run
make docker-solr
. (This command pulls down the Docker Solr container and runs the instance, binding to configuration files in the Footprints source tree.) -
Verify the Solr instance is running by navigating to http://localhost:8983 in your browser. The Solr dashboard should appear. Footprints should be listed in the core selector on the left-hand side.
-
From the Footprints source root, run
./manage.py rebuild_index
. This will add data in your local Footprints database to the index. -
Verify the whole thing works by running Footprints (
make runserver
) and navigating to the/search/
endpoint. You should see a list of all indexed items. -
Use
make docker-solr-clean
to turn off the instance and cleanup. The data store will remain resident in your development directory.