       (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"

    (is (= ["Relevancy 2" "Relevancy 3" "Relevancy 1"] (map :name results)))))

(deftest change-metrics
  (config/set-config-value! :sort-use-relevancy-score true)
  (ingest-community-usage-metrics)

  (d/ingest "PROV1" (dc/collection {:short-name "AMSR-L1A"

    (index/wait-until-indexed))))

(deftest community-usage-relevancy-scoring
  (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"
