mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
FEATURE: Change very high/low search priority to rank at absolute ends.
Prior to this change, we had weights for very_high, high, low and very_low. This means there were 4 weights to tweak and what weights to use for `very_high/high` and `very_low/low` pair was hard to explain. This change makes it such that `very_high` search priority will always ensure that the posts are ranked at the top while `very_low` search priority will ensure that the posts are ranked at the very bottom.
This commit is contained in:
@ -0,0 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class DeleteStaleCategorySearchPrioritiesFromSiteSettings < ActiveRecord::Migration[6.0]
|
||||
def up
|
||||
execute <<~SQL
|
||||
DELETE FROM site_settings WHERE name IN ('category_search_priority_very_low_weight', 'category_search_priority_very_high_weight')
|
||||
SQL
|
||||
end
|
||||
|
||||
def down
|
||||
raise ActiveRecord::IrreversibleMigration
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user