Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-62735

Simple Search does not obey global search on/off setting

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Master and 35 only

      1. Go to manage global search and select the 'Solr' search engine (Step 1).
      2. Make sure global search is disabled (Step 5 in the setup steps should be marked as No)
      3. Confirm that "Step 2. Enable search areas" is listed as "Yes".
      4. Click "Step 3. Setup search engine", remove any text from the "Solr host name" field (if present) and save
      5. Back on the Manage global search page, confirm that you see the "No Solr configuration found" next to "Step 3. Setup search engine"
      6. Click "Step 4. Index data"
      7. Confirm that you see an error notification stating "The search engine is not available. Please contact your administrator."
      8. Confirm that you see the text "Search is not available" next to each search area in the table.
      9. Confirm that all buttons are disabled.
      10. Confirm that you can still enable/disable search areas using the eye icon.
      11. Now, go back to the manage global search page and change the engine to simple search
      12. Again, click "Step 4. Index data"
      13. Confirm that you see an error notification on the page stating "Indexing is currently not permitted when search is disabled."
      14. Confirm that you see the text "Indexing is not available" next to each search area in the table.
      15. Confirm that all buttons are disabled.
      16. Confirm that you can still enable/disable search areas using the eye icon.
      17. Now, go back to the manage global search page again
      18. Now, set the value of 'index when disabled' to true (check the box) and save.
      19. Again, click "Step 4. Index data".
      20. Confirm that you see an info notification (blue) stating "The recommended way to..."
      21. Confirm that all buttons are enabled and that each row has a "Delete index" and "Gradual reindex" next to them in the right col.
      22. Click 'Reindex all site contents" and confirm you're prompted.
      23. Confirm the action and Confirm that this completes and that you now see data in the 'Last run' column.
      24. Click 'Delete all indexed contents" and confirm when prompted.
      25. Confirm that the 'Last run' column is now empty again.
      26. Click the "Delete index" link next to an index
      27. Confirm that you see a notification stating "Index deleted"
      28. Confirm that you can hide and show the indexes using the eye.

      34 only

      1. Go to manage global search and select the 'Solr' search engine (Step 1).
      2. Make sure global search is disabled (step 5 in the setup steps should be marked as No)
      3. Confirm that "Step 2. Enable search areas" is listed as "Yes".
      4. Click "Step 3. Setup search engine", remove any text from the "Solr host name" field (if present) and save
      5. Back on the Manage global search page, confirm that you see the "No Solr configuration found" next to "Step 3. Setup search engine"
      6. Click "Step 4. Index data"
      7. Confirm that you see an error notification stating "The search engine is not available. Please contact your administrator."
      8. Confirm that you see the text "Search is not available" next to each search area in the table.
      9. Confirm that all buttons are disabled.
      10. Confirm that you can still enable/disable search areas using the eye icon.
      11. Now, go back to the manage global search page and set the Solr host to 127.0.0.1 (Step 3) and save
      12. Confirm you see a "Yes" next to "Step 3. Setup search engine" on the manage global search page.
      13. Again, click "Step 4. Index data"
      14. Confirm that you see an error notification on the page stating "Indexing is currently not permitted when search is disabled."
      15. Confirm that you see the text "Indexing is not available" next to each search area in the table.
      16. Confirm that all buttons are disabled.
      17. Confirm that you can still enable/disable search areas using the eye icon.
      18. Now, go back to the manage global search page again
      19. Now, set the value of 'index when disabled' to true (check the box) and save.
      20. Again, click "Step 4. Index data".
      21. Confirm that you see an info notification (blue) stating "The recommended way to..."
      22. Confirm that all buttons are enabled and that each row has a "Delete index" link in the right col.
      23. Click 'Reindex all site contents"
      24. Confirm that it succeeds, you see a success notification and that you now see data in the 'Last run' column.
      25. Click 'Delete all indexed contents"
      26. Confirm that it succeeds, you see a success notification and that the 'Last run' column is now empty again.
      27. Click the "Delete index" link next to an index
      28. Confirm that you see a notification stating "Index deleted"
      29. Confirm that you can hide and show the indexes using the eye.
      Show
      Master and 35 only Go to manage global search and select the 'Solr' search engine (Step 1). Make sure global search is disabled (Step 5 in the setup steps should be marked as No) Confirm that "Step 2. Enable search areas" is listed as "Yes". Click "Step 3. Setup search engine", remove any text from the "Solr host name" field (if present) and save Back on the Manage global search page, confirm that you see the "No Solr configuration found" next to "Step 3. Setup search engine" Click "Step 4. Index data" Confirm that you see an error notification stating "The search engine is not available. Please contact your administrator." Confirm that you see the text "Search is not available" next to each search area in the table. Confirm that all buttons are disabled. Confirm that you can still enable/disable search areas using the eye icon. Now, go back to the manage global search page and change the engine to simple search Again, click "Step 4. Index data" Confirm that you see an error notification on the page stating "Indexing is currently not permitted when search is disabled." Confirm that you see the text "Indexing is not available" next to each search area in the table. Confirm that all buttons are disabled. Confirm that you can still enable/disable search areas using the eye icon. Now, go back to the manage global search page again Now, set the value of 'index when disabled' to true (check the box) and save. Again, click "Step 4. Index data". Confirm that you see an info notification (blue) stating "The recommended way to..." Confirm that all buttons are enabled and that each row has a "Delete index" and "Gradual reindex" next to them in the right col. Click 'Reindex all site contents" and confirm you're prompted. Confirm the action and Confirm that this completes and that you now see data in the 'Last run' column. Click 'Delete all indexed contents" and confirm when prompted. Confirm that the 'Last run' column is now empty again. Click the "Delete index" link next to an index Confirm that you see a notification stating "Index deleted" Confirm that you can hide and show the indexes using the eye. 34 only Go to manage global search and select the 'Solr' search engine (Step 1). Make sure global search is disabled (step 5 in the setup steps should be marked as No) Confirm that "Step 2. Enable search areas" is listed as "Yes". Click "Step 3. Setup search engine", remove any text from the "Solr host name" field (if present) and save Back on the Manage global search page, confirm that you see the "No Solr configuration found" next to "Step 3. Setup search engine" Click "Step 4. Index data" Confirm that you see an error notification stating "The search engine is not available. Please contact your administrator." Confirm that you see the text "Search is not available" next to each search area in the table. Confirm that all buttons are disabled. Confirm that you can still enable/disable search areas using the eye icon. Now, go back to the manage global search page and set the Solr host to 127.0.0.1 (Step 3) and save Confirm you see a "Yes" next to "Step 3. Setup search engine" on the manage global search page. Again, click "Step 4. Index data" Confirm that you see an error notification on the page stating "Indexing is currently not permitted when search is disabled." Confirm that you see the text "Indexing is not available" next to each search area in the table. Confirm that all buttons are disabled. Confirm that you can still enable/disable search areas using the eye icon. Now, go back to the manage global search page again Now, set the value of 'index when disabled' to true (check the box) and save. Again, click "Step 4. Index data". Confirm that you see an info notification (blue) stating "The recommended way to..." Confirm that all buttons are enabled and that each row has a "Delete index" link in the right col. Click 'Reindex all site contents" Confirm that it succeeds, you see a success notification and that you now see data in the 'Last run' column. Click 'Delete all indexed contents" Confirm that it succeeds, you see a success notification and that the 'Last run' column is now empty again. Click the "Delete index" link next to an index Confirm that you see a notification stating "Index deleted" Confirm that you can hide and show the indexes using the eye.
    • Affected Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
      MDL-62735-35-refactor
    • Pull Master Branch:
      MDL-62735-master-refactor

      Description

      When Global Search is turned off via $CFG->enableglobalsearch and indexing is disabled via $CFG->searchindexwhendisabled, the site admin can still perform a manual index of the whole site if Simple Search is selected as the search engine.

      The indexing seems to be performed by the webserver, which can put some serious stress on a shared hosting environment such as MoodleCloud if the site has enough content.

      I feel this engine should obey the global on/off switches here, and prevent a manual index if global search is turned off site wide.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Jul/18