Skip to content

Commit

Permalink
restore lambdas for subject specialists post-rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
magibney committed Jun 11, 2020
1 parent d16cec9 commit cad65fc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,15 @@ def self.generate_cluster_fq(index, limit, elvl = false)
a.params.dig(:f, :format_f)&.include?('Database & Article Index')
}

get_hits = lambda { |v|
r1 = v[:r1]
r1.nil? ? 0 : (r1[:relatedness].to_f * 100000).to_i
}

post_sort = lambda { |items|
items.sort { |a,b| b.hits <=> a.hits }
}

local_only = lambda { |a, b, c|
'Include Partner Libraries' != a.params.dig(:f, :cluster, 0)
}
Expand Down

0 comments on commit cad65fc

Please sign in to comment.