Summary

The initial filter state on the d.o search result page does not reflect the actual results.

Reproduction

  1. Go to any d.o page except «front» with the header search field enabled.
  2. Enter a search term, e. g. "blog" and hit enter
  3. Now on the result page, narrow the search to e. g. "themes" with the prepared link.

Expected behavior

Search results in the same order as indicated by the project specific filters, or the filters reflect the actual order.

Actual result

The search results are ordered by "created DESC", while the filters indicate "most installed".

Additional info

  • With JS disabled, this can be worked around by one click ("search" in the sub filter form)
  • With JS enabled, this is not possible (since the submit button is hidden); so you need to first change to any other value, and then back again, if you really want "by most installed".

Comments

doitDave created an issue. See original summary.

doitDave’s picture

Issue summary: View changes
drumm’s picture

Project: Drupal.org customizations » Project ApacheSolr integration
Version: 7.x-3.x-dev » 7.x-1.x-dev
Issue tags: +affects drupal.org

Confirmed this issue. In project_solr_browse_projects_form(), I see the default value is forced:

  if (module_exists('project_usage')) {
    $form['solrsort']['#options']['iss_project_release_usage desc'] = t('Most installed');
    $form['solrsort']['#default_value'] = 'iss_project_release_usage desc';
  }

For site search, I'm tempted to keep relevancy as the default since search has improved in the last 6 months. Especially if we were to add usage in as a factor for relevance calculation.

doitDave’s picture

Whatever you decide, my point was actually just the inconsistency. It is a bit irritating.

drumm’s picture

Assigned: Unassigned » drumm

  • drumm committed b60dff1 on 7.x-1.x
    Issue #2664408: Populate default sort from Solr query
    
drumm’s picture

Status: Active » Fixed
Issue tags: +needs drupal.org deployment
drumm’s picture

Issue tags: -needs drupal.org deployment

This has been deployed to Drupal.org.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.