Original - DO NOT REPORT TEST RESULTS HERE
NOTE: You need to have
- Access to install solr server
- Admin access to Moodle test site.
- Follow the instructions in the section 'Installation' in the documentation Global search
- Log in 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 it 'Global searching is not enabled.'
- Leave this tab open, return to Manage global search and "Enable global search"
- Return to your dashboard and verify that you now see a search form.
- Type something and press search
- Verify that you are redirected to search/index.php and you see 'No results'
- Verify that you also see filter by area and time.
- Close this tab and return to the previous one
- Go to Site administration > 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)
Indexing & searching
- Go to Site administration > Development > Make test course to generate a few courses with forums if your site doesn't have much data (we will need forum posts).
- Go to Site administration > Plugins > Search > Manage global search.
- Click on Index data.
- Click on the button "Reindex all the site contents". I hope you don't have many many forum posts, as this will send them to the search engine, and may take a bit of time if you have thousands and thousands of posts. Take a break, you deserve it
- At some point this will finish and will show an 'All site contents have been reindexed. ' and the screen last run numbers will be updated
- Open your dashboard in a new tab and use the global search block to search for something you know that is included in a forum post
- Verify that you see the list of results including the search string
- Click all links in one of these results, and verify that they are valid results
- When you have more than 10 results you will see pagination links. Verify that these pagination links work
- Search for something else with a crazy query string like dfsghuasdguhisdfgui and verify that no results are returned
- Look at the query field help and try some search combinations
- Go to the Site administration > Plugins > Search > Search areas page and for the forum posts search area click the 'Gradual reindex' button on that row.
- On the confirm page, click the Continue button.
- Verify that you see a message like 'Reindexing has been requested for Forum - posts (N contexts). This indexing will be carried out by the "Global search indexing" scheduled task.', where N is the number of contexts added to the indexing queue.
- Click the Continue button, then on the search areas page at the bottom, verify that you see an 'Additional indexing queue' heading and table.
- Verify that the heading shows the number of contexts you just set up for reindexing. The table should list up to 10 forums, with links. If there are more than 10, there will be an additional last row which only contains '...'.
- Go to a course page and find an existing activity that is searchable and won't take long to duplicate (e.g. a Page).
- Duplicate the activity.
- Go to Site administration > Server > Tasks > Scheduled tasks and run "Global search indexing " again.
- Go to the Site administration > Plugins > Search > Search areas.
- Depending on the number of forums, the time limit for indexing, etc., verify that the indexing queue has disappeared (as the queue is empty), or has fewer items on it, and/or shows some progress (indicated as a search area and date) against the first item.