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

Global Search: results order selection does not display when no context

XMLWordPrintable

    • MOODLE_35_STABLE
    • MOODLE_35_STABLE
    • master_MDL-62705_results_order_no_context
    • Hide

      To test you will need to install a search plugin that supports more search ordering options than 'relevance' and 'location'. I have used search_elastic for this: https://github.com/catalyst/moodle-search_elastic

      To test:

      • Install a Moodle 3.5
      • Install a search plugin (like search_elastic) that supports multiple search result ordering options.
      • As a site administrator via the Moodle UI, enable global search and configure it to use the installed search plugin. (You do not need to index site data)
      • Navigate to '/search/index.php' in your Moodle UI

      Current behavior (before patch)

      The 'Results order' select dropdown will not be displayed

      Expected behavior (with patch applied)

      The 'Results order' select dropdown will be displayed showing the relevance and addition sort order options

      Show
      To test you will need to install a search plugin that supports more search ordering options than 'relevance' and 'location'. I have used search_elastic for this: https://github.com/catalyst/moodle-search_elastic To test: Install a Moodle 3.5 Install a search plugin (like search_elastic) that supports multiple search result ordering options. As a site administrator via the Moodle UI, enable global search and configure it to use the installed search plugin. (You do not need to index site data) Navigate to '/search/index.php' in your Moodle UI Current behavior (before patch) The 'Results order' select dropdown will not be displayed Expected behavior (with patch applied) The 'Results order' select dropdown will be displayed showing the relevance and addition sort order options

      As of 3.5 a search plugin can define the result orders it supports. The built in Solr search plugin defines relevance and location, however, there can be others.

      The default result order is relevance.

      However, when a search plugin defines multiple sort orders such as modified date and the search is conducted without a context (no context query param in the URL), the code to load the available sort orders from the enabled search backend is never called.

            mattp@catalyst-au.net Matt Porritt
            mattp@catalyst-au.net Matt Porritt
            Victor Déniz Falcón Victor Déniz Falcón
            Andrew Lyons Andrew Lyons
            Jun Pataleta Jun Pataleta
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.