diff --git a/common-app-lib/src/cmr/common_app/services/kms_lookup.clj b/common-app-lib/src/cmr/common_app/services/kms_lookup.clj index 0e3fe3da18..1807d10301 100644 --- a/common-app-lib/src/cmr/common_app/services/kms_lookup.clj +++ b/common-app-lib/src/cmr/common_app/services/kms_lookup.clj @@ -156,7 +156,7 @@ "Takes a kms-index, the keyword scheme, and a short name and returns the full KMS hierarchy for that short name. Comparison is made case insensitively." [kms-index keyword-scheme short-name] - (get-in kms-index [:short-name-index keyword-scheme (str/lower-case short-name)])) + (get-in kms-index [:short-name-index keyword-scheme (util/safe-lowercase short-name)])) (defn lookup-by-location-string "Takes a kms-index and a location string and returns the full KMS hierarchy for that location diff --git a/indexer-app/src/cmr/indexer/services/autocomplete.clj b/indexer-app/src/cmr/indexer/services/autocomplete.clj index d13762068e..4766bd20b9 100644 --- a/indexer-app/src/cmr/indexer/services/autocomplete.clj +++ b/indexer-app/src/cmr/indexer/services/autocomplete.clj @@ -203,6 +203,8 @@ flatten (remove anti-value-suggestion?)))) +(def REINDEX_BATCH_SIZE 100) + (defn-timed reindex-autocomplete-suggestions-for-provider "Reindex autocomplete suggestion for a given provider" [context provider-id] @@ -210,7 +212,7 @@ (let [latest-collection-batches (meta-db/find-in-batches context :collection - service/REINDEX_BATCH_SIZE + REINDEX_BATCH_SIZE {:provider-id provider-id :latest true})] (reduce (fn [num-indexed coll-batch] (let [batch (collections->suggestion-docs context coll-batch provider-id)]