@@ -28,7 +28,7 @@ import Control.Retry (RetryPolicy,
2828 recovering)
2929import Data.Aeson
3030import Data.ByteString.Lazy (ByteString)
31−import Data.List.NonEmpty (NonEmpty(..))
31+import Data.List.NonEmpty (NonEmpty (..))
3232import Data.Monoid ((<>))
3333import Data.Text (Text)
3434import qualified Data.Text as T
@@ -266,13 +266,14 @@ mkEsScribe
266266 )
267267 => EsScribeCfg v
268268 -> BHEnv v
269+ -> (ESVersion v => proxy v -> MappingName v -> Value)
269270 -> IndexName v
270271 -- ^ Treated as a prefix if index sharding is enabled
271272 -> MappingName v
272273 -> Severity
273274 -> Verbosity
274275 -> IO Scribe
275−mkEsScribe cfg@EsScribeCfg {..} env ix mapping sev verb = do
276+mkEsScribe cfg@EsScribeCfg {..} env indexMapper ix mapping sev verb = do
276277 q <- newTBMQueueIO $ unEsQueueSize essQueueSize
277278 endSig <- newEmptyMVar
278279
@@ -320,7 +321,7 @@ mkEsScribe cfg@EsScribeCfg {..} env ix mapping sev verb = do
320321 NoIndexSharding -> False
321322 _ -> True
322323 tpl = toIndexTemplate prx (toTemplatePattern prx (ixn <> "-*")) (Just essIndexSettings) [toJSON base]
323− base = baseMapping prx mapping
324+ base = indexMapper prx mapping
324325 ixn = fromIndexName prx ix
325326 itemJson' :: LogItem a => Item a -> Value
326327 itemJson' i