-
Notifications
You must be signed in to change notification settings - Fork 39
How to configure the Search.gov search engine in a new environment
Martha Thompson edited this page Sep 26, 2018
·
6 revisions
- In the search-gov rails console, create an I14y drawer with the handle 'searchgov':
> I14yDrawer.create!(handle: 'searchgov', description: 'drawer containing documents for the Search.gov search engine')
That should generate a new Elasticsearch index:
$ curl localhost:9256/_cat/indices/*searchgov*/?v
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
yellow open development-i14y-documents-searchgov-v1 7Xam03R8RzOyEzinjV3rcA 1 1 0 0 162b 162b
- Populate the drawer
- With Resque running, add a new domain on the Search.gov Domains super admin page.
- The
SearchgovDomainPreparerJob
will run in the background to set the domain scheme and status, and begin indexing the sitemap urls. (Note, when testing, it helps to test a domain with a limited number of sitemap URLs, such assearch.gov
.) - Refresh the "Search.gov Domains" page to verify that the "URLs count" for your domain has increased. The "Unfetched URLs Count" will decrease as the URLs are indexed.
- Create a test affiliate
- On the "Sites" super admin page, create a new affiliate.
- Edit that affiliate and set the search engine to "SearchGov".
- Visit the site admin Domains page for that affiliate (
/sites/<affiliate id>/domains
), and add your test domain. - Visit the search page for your test affiliate (
/search?affiliate=<affiliate name>
), and run a test search. You should see search results for your test domain, and "Powered by Search.gov" in the bottom right.