@@ -47,6 +47,10 @@ import Katip.Scribes.ElasticSearch.Annotations
4747-------------------------------------------------------------------------------
4848
4949
50+-- | EsScribeCfg now carries a type variable for the version of
51+-- ElasticSearch it targets, either 'ESV1' or 'ESV5'. You can use
52+-- 'defaultEsScribeCfgV1' and 'defaultESScribeCfgV5' for a good
53+-- starting point depending on the ES version you have.
5054data EsScribeCfg v = EsScribeCfg {
5155 essRetryPolicy :: RetryPolicy
5256 -- ^ Retry policy when there are errors sending logs to the server
@@ -68,6 +72,9 @@ data EsScribeCfg v = EsScribeCfg {
6872 -- querying transparently remove the type annotations if this is
6973 -- enabled.
7074 , essIndexSettings :: IndexSettings v
75+ -- ^ This will be the IndexSettings type from the appropriate
76+ -- bloodhound module, either @Database.V1.Bloodhound@ or
77+ -- @Database.V5.Bloodhound@
7178 , essIndexSharding :: IndexShardingPolicy
7279 } deriving (Typeable)
7380
@@ -239,6 +246,12 @@ instance Exception EsScribeSetupError
239246
240247
241248-------------------------------------------------------------------------------
249+-- | The Any field tagged with a @v@ corresponds to the type of the
250+-- same name in the corresponding @bloodhound@ module. For instance,
251+-- if you are configuring for ElasticSearch version 1, import
252+-- @Database.V1.Bloodhound@ and @BHEnv v@ will refer to @BHEnv@ from
253+-- that module, @IndexName v@ will repsond to @IndexName@ from that
254+-- module, etc.
242255mkEsScribe
243256 :: forall v. ( ESVersion v
244257 , MonadIO (BH v IO)