 
 (deftest search-by-platform-short-names
   (let [p0 (dc/platform "platform_Inherit")
+        p01 (dc/platform "platform_ONE")
         p1 (dc/platform "platform_Sn A")
         p2 (dc/platform "platform_Sn a")
         p3 (dc/platform "platform_SnA")

        pr2 (dg/platform-ref "platform_Sn a")
        pr3 (dg/platform-ref "platform_SnA")
        pr4 (dg/platform-ref "platform_Snx")
        coll1 (d/ingest "CMR_PROV1" (dc/collection {:platforms [p1 p2 p3 p4]}))
        coll2 (d/ingest "CMR_PROV1" (dc/collection {:platforms [p0]}))
        gran1 (d/ingest "CMR_PROV1" (dg/granule coll1 {:platform-refs [pr1]}))
        gran2 (d/ingest "CMR_PROV1" (dg/granule coll1 {:platform-refs [pr1 pr2]}))
        gran3 (d/ingest "CMR_PROV1" (dg/granule coll1 {:platform-refs [pr2]}))
        gran4 (d/ingest "CMR_PROV1" (dg/granule coll1 {:platform-refs [pr3]}))
        gran5 (d/ingest "CMR_PROV1" (dg/granule coll1 {:platform-refs [pr4]}))
        gran6 (d/ingest "CMR_PROV1" (dg/granule coll2 {}))]

    (index/flush-elastic-index)



(deftest search-by-instrument-short-names
  (let [i0 (dc/instrument "instrument_Inherit")
        i01 (dc/instrument "instrument_ONE")
        p0 (dc/platform "collection_platform" i0 i01)
        i1 (dg/instrument-ref "instrument_Sn A")
        i2 (dg/instrument-ref "instrument_Sn a")
        i3 (dg/instrument-ref "instrument_SnA")
        i4 (dg/instrument-ref "instrument_Snx")
        i5 (dg/instrument-ref "instrument_ONE")
        pr1 (dg/platform-ref "platform_1" i1)
        pr2 (dg/platform-ref "platform_2" i2)
        pr3 (dg/platform-ref "platform_3" i3)
        pr4 (dg/platform-ref "platform_4" i4)
        pr5 (dg/platform-ref "platform_5" i1 i2)
        pr6 (dg/platform-ref "platform_6" i5)
        coll1 (d/ingest "CMR_PROV1" (dc/collection {}))
        coll2 (d/ingest "CMR_PROV1" (dc/collection {:platforms [p0]}))
        gran1 (d/ingest "CMR_PROV1" (dg/granule coll1 {:platform-refs [pr1]}))
