         :snowball-filter {:type "snowball"
                           :language "English"}
         :synonym-filter {:type "synonym"
-                         :synonyms
-                         ;; ["romex,nm"]
-                         ["romex,nm" "so,seoow" "so,seow" "so,soow" "so,sow" "pipe,conduit" "gfi,gfci" "bx,mc"]
-                         ;;(synonyms)
-                         }
+                         :synonyms (synonyms)}
         }
 
        :tokenizer

               :manufacturer-name snowball
               :product-class snowball
               :matnr {:type "string"}
               ;; :matnr {:type "string" :tokenizer "keyword"}
               ;; :matnr long
               ;; :matnr {:type "string" :analyzer "not_analyzed" :search_analyzer "not_analyzed"}

               :manufacturer-part-number part-num
               :summit-part-number part-num

  []
  (let [groups (map #(string/split % #" ") synonym-list)
        syns (map (fn [[main & others]] (map #(string/join #"," [main %]) others)) groups)]
    (vec (flatten syns))))

;; (synonyms)

(def ecommerce-mapping-types
  (let [;; analyzers
        snowball {:type "string" :analyzer "synonym-snowball"}
        part-num {:type "string" :analyzer "part-num-analyzer"}
        string {:type "string"}
        integer {:type "integer"}
        long {:type "long"}
        ignore-int {:type "integer" :include_in_all false}
        path {:type "string" :analyzer "path-analyzer"}
        date {:type "date", :format "strict_date_optional_time||epoch_millis"}
        upc {:type "string" :analyzer "upc-analyzer"}

