alphagov/rummager — pull request #295 by rboulton (2014-09-18 11:52:07+00:00)
Title: Add debug option to down-rank closed organisations

Story at: https://www.pivotaltracker.com/story/show/66655858

This reduces the rank of closed organisations only if
`debug=downweight_closed_orgs` is added to the query parameters. This
is to allow us to experiment with the down-ranking in production, prior
to applying it by default.

The multiplier of 0.3 was chosen, like all the other magic constants in
unified_search_builder, by trial, error, and gut feeling.

Previously, elasticsearch was combining the weights from the list of
filters it got by picking the first matching filter. This is the
default method elasticsearch uses for `custom_filters_score`, but this
PR changes it to multiply the weights from all matching filters
together. Previously only one of the filters would have matched, so
this shouldn't change existing rankings.