Use a deterministic string hash
This commit is contained in:
committed by
Mike Dalessio
parent
97444f2d32
commit
b8baeadf66
@@ -2,7 +2,7 @@ module Searchable
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
def self.search_index_table_name(account_id)
|
||||
"search_index_#{account_id.hash.abs % 16}"
|
||||
"search_index_#{Zlib.crc32(account_id) % 16}"
|
||||
end
|
||||
|
||||
included do
|
||||
|
||||
Reference in New Issue
Block a user