       (is (= "Relevancy 4" (:name (last results))))))
 
   (testing "Turn off using relevancy score"
-    (config/set-config-value! :sort-use-relevancy-score false)
+    (query-to-elastic/set-sort-use-relevancy-score! false)
     (let [results (:refs (search/find-refs :collection {:keyword "Relevancy"}))]
       (is (= ["Relevancy 4" "Relevancy 3" "Relevancy 2" "Relevancy 1"] (map :name results))))))
 
 (deftest keyword-relevancy-takes-precedence
-  (config/set-config-value! :sort-use-relevancy-score true)
+  (query-to-elastic/set-sort-use-relevancy-score! true)
   (ingest-community-usage-metrics)
   (d/ingest "PROV1" (dc/collection {:short-name "AMSR-L1A"
                                     :entry-title "Relevancy 1"

       "AG_MAPSS,2,30\n"))

(deftest community-usage-not-provided-versions
  (config/set-config-value! :sort-use-relevancy-score true)
  (ingest-community-usage-metrics sample-csv-not-provided-versions)
  (d/ingest "PROV1" (dc/collection {:short-name "AMSR-L1A"
                                    :entry-title "AMSR-L1A V3 Relevancy"


;; Outside of keyword search, allow the user to sort by community usage
(deftest sort-by-community-usage
  (query-to-elastic/set-sort-use-relevancy-score! true)
  (ingest-community-usage-metrics)
  (d/ingest "PROV1" (dc/collection {:short-name "AMSR-L1A" ;10
                                    :entry-title "Relevancy 1"
