<commit_before>(ns cmr.search.data.elastic-search-index
  "Implements the search index protocols for searching against Elasticsearch."
  (:require
   [clojure.string :as s]
   [clojurewerkz.elastisch.query :as q]
   [clojurewerkz.elastisch.rest.document :as esd]
   [cmr.common-app.services.search.elastic-search-index :as common-esi]
   [cmr.common-app.services.search.query-model :as qm]
   [cmr.common-app.services.search.query-to-elastic :as q2e]
   [cmr.common.cache :as cache]
   [cmr.common.concepts :as concepts]
   [cmr.common.config :as cfg :refer [defconfig]]
   [cmr.common.jobs :refer [defjob]]
   [cmr.common.lifecycle :as lifecycle]
   [cmr.common.log :refer (debug info warn error)]
   [cmr.common.services.errors :as e]
   [cmr.common.util :as util]
   ;; Required to be available at runtime.
   [cmr.search.data.query-to-elastic]
   [cmr.search.services.query-walkers.collection-concept-id-extractor :as cex]
   [cmr.search.services.query-walkers.provider-id-extractor :as pex]
   [cmr.transmit.index-set :as index-set]))

;; id of the index-set that CMR is using, hard code for now
(def index-set-id 1)

(defconfig collections-index-alias
  "The alias to use for the collections index."
  {:default "collection_search_alias" :type String})


(defn- fetch-concept-type-index-names
  "Fetch index names for each concept type from index-set app"<commit_msg>CMR-4499: Attempt to fix failing tests in CI by including relevancy namespace<commit_after>(ns cmr.search.data.elastic-search-index
  "Implements the search index protocols for searching against Elasticsearch."
  (:require
   [clojure.string :as s]
   [clojurewerkz.elastisch.query :as q]
   [clojurewerkz.elastisch.rest.document :as esd]
   [cmr.common-app.services.search.elastic-search-index :as common-esi]
   [cmr.common-app.services.search.query-model :as qm]
   [cmr.common-app.services.search.query-to-elastic :as q2e]
   [cmr.common.cache :as cache]
   [cmr.common.concepts :as concepts]
   [cmr.common.config :as cfg :refer [defconfig]]
   [cmr.common.jobs :refer [defjob]]
   [cmr.common.lifecycle :as lifecycle]
   [cmr.common.log :refer (debug info warn error)]
   [cmr.common.services.errors :as e]
   [cmr.common.util :as util]
   ;; Required to be available at runtime.
   [cmr.search.data.query-to-elastic]
   [cmr.search.data.elastic-relevancy-scoring]
   [cmr.search.services.query-walkers.collection-concept-id-extractor :as cex]
   [cmr.search.services.query-walkers.provider-id-extractor :as pex]
   [cmr.transmit.index-set :as index-set]))

;; id of the index-set that CMR is using, hard code for now
(def index-set-id 1)

(defconfig collections-index-alias
  "The alias to use for the collections index."
  {:default "collection_search_alias" :type String})


(defn- fetch-concept-type-index-names
  "Fetch index names for each concept type from index-set app"
{'fraction_non_alphanumeric': 0.12705635281764088, 'fraction_numerical': 0.00280014000700035, 'mean_word_length': 3.9965034965034967, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3951894', 'n_tokens_mistral': 1026, 'n_tokens_neox': 1007, 'n_words': 243}