NOTE: You need to have
- Access to install solr server
- Admin access to Moodle test site.
- Follow only 'Installation' section in https://docs.moodle.org/31/en/Global_search
- Login as admin
- Go to Site administration > Plugins > Search -> Manage global search
- Enable search should be disabled by default
- Open a new tab and go to your dashboard, press 'Customise this page' and add a global search block
- You should be able to add the block and you should see the following message inside of it 'Global searching is not enabled.'
- Leave this tab open, return to Manage global search and "Enable global search"
- Return to your dashboard, now you should see a search form.
- Type something and press search
- You should be redirected to search/index.php and you should see 'No results'
- You should also see filter by area and time.
- Close this tab and return to the previous one
- Go to site admin -> plugins -> search -> solr and save changes (basically set host to localhost, port to the default 8983 and indexname to what you have in solr core)
- Go to Site administration -> Reports -> Global search info
- Use tool_generator to generate a few courses with forums if your site don't have much data (we will need forum posts)
- Tick recreate index and save changes. I hope you don't have many many forum_posts this will send them to the search engine, may take a bit of time if you have thousands and thousands posts, take a break, you deserve it
- At some point this will finish and will show a 'Indexing finished' and the screen last run numbers will be updated with some numbers
- Open your dashboard in a new tab and use the global search block to search something you know that your forum post contain, for example 'forum'
- You should see the list of results including that search string
- Click all links in one of these results, they should all be valid results
- When you have more than 10 results you will see pagination links, try that these pagination links work
- Search something else with valid results and check that you can see results
- Search something else with a crazy query string like dfsghuasdguhisdfgui and check that you can not see results
- If will be nice if you can look at the query field help and try some combinations