   * false - only the latest revisions will be indexed"
   ([context provider-ids]
    (reindex-provider-collections
-    context provider-ids {:all-revisions-index? nil :refresh-acls? true :force-version? false}))
+     context provider-ids {:all-revisions-index? nil :refresh-acls? true :force-version? false}))
   ([context provider-ids {:keys [all-revisions-index? refresh-acls? force-version?]}]
 
    ;; We refresh this cache because it is fairly lightweight to do once for each provider and because

  [context concept-id revision-id]
  (let [concept-type (cs/concept-id->type concept-id)
        index-names (idx-set/get-concept-index-names
                     context concept-id revision-id {:all-revisions-index? true})
        concept-mapping-types (idx-set/get-concept-mapping-types context)
        elastic-options {:ignore-conflict? false
                         :all-revisions-index? true}]
    (es/delete-document
     context
     index-names
     (concept-mapping-types concept-type)
     concept-id
     revision-id
     nil ;; Null is sent in as the elastic version because we don't want to set a version for this
     ;; delete. The concept is going to be gone now and should never be indexed again.
     elastic-options)))

(defn delete-provider
  "Delete all the concepts within the given provider"

    ;; delete collections
    (doseq [index (vals (:collection index-names))]
      (es/delete-by-query
        context
        index
        ccmt
        {:term {(query-field->elastic-field :provider-id :collection) provider-id}}))

    ;; delete the granules
    (doseq [index-name (idx-set/get-granule-index-names-for-provider context provider-id)]
      (es/delete-by-query
        context
        index-name
        (concept-mapping-types :granule)
        {:term {(query-field->elastic-field :provider-id :granule) provider-id}}))

    ;; delete the variables
    (doseq [index (vals (:variable index-names))]
      (es/delete-by-query
        context
        index
        (concept-mapping-types :variable)
        {:term {(query-field->elastic-field :provider-id :variable) provider-id}}))

    ;; delete the services
    (doseq [index (vals (:service index-names))]
      (es/delete-by-query
        context
        index
        (concept-mapping-types :service)
        {:term {(query-field->elastic-field :provider-id :service) provider-id}}))))

(defn publish-provider-event
  "Put a provider event on the message queue."
