Add scoring factor controls to advanced search form

Created on 31 March 2007, over 18 years ago
Updated 16 April 2025, 4 months ago

In this article I described how important the scoring factor settings are in ranking search results. I also demonstrate that it is useful to have the scoring factor controls available directly in the advanced search form. This allows users to decide for every search whether recency, number of comments, page views, or keyword relevance is most important to them. Since these values are only applied at search time, not when the index is created, there is no performance overhead for exposing this feature. If the user doesn't choose to use the feature, the administrative defaults are used.

This patch takes the approach of storing the values in the user's session between the two requests, and deleting the session values when the search is actually run. This makes it so that the search URL doesn't become polluted with scoring factor query information, but also makes it so that bookmarking such a search will not capture the scoring factor information. This point is open for debate and I'll be happy to rewrite the code if it is deemed better to have them in the query string (in fact, that is how I initially wrote the code).

The patch is currently rolled against D5, so it will probably need to be re-rolled for D6.

✨ Feature request
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

search.module

Created by

πŸ‡©πŸ‡ͺGermany robertdouglass

Live updates comments and jobs are added and updated live.
  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thank you for sharing your idea for improving Drupal.

    We are working to decide if this proposal meets the Criteria for evaluating proposed changes. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or there is no community support. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

  • Status changed to Closed: outdated 7 days ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Since there's been no follow up on this feature request going to close this one out. If still desired please feel free to re-open.

Production build 0.71.5 2024