What configuration either in the database, WordPress admin or on your admin site do I have to do so that the search engine works on any URL that I copy that database onto? What do I need to do either in the code, WordPress admin, database or the admin side to get this to work.
If you copy the database from one WP site to another, you need to go through the api key setup process. As you copy the database, the settings (which has result page url) is pulled for old search engine.
Solution is to reset the configuration on the new test site and put the api key and do reindexing.