@@ -100,6 +100,8 @@ data EsScribeCfg = EsScribeCfg {
100-- * Pool size of 2
100-- * Pool size of 2
102-- * Annotate types set to False
102-- * Annotate types set to False
103defaultEsScribeCfg :: EsScribeCfg
105defaultEsScribeCfg :: EsScribeCfg
104defaultEsScribeCfg = EsScribeCfg {
106defaultEsScribeCfg = EsScribeCfg {
105 essManagerSettings = defaultManagerSettings
107 essManagerSettings = defaultManagerSettings
@@ -125,21 +127,24 @@ defaultEsScribeCfg = EsScribeCfg {
125-- EveryMinuteIndexSharding will generate indexes based on the time of
127-- EveryMinuteIndexSharding will generate indexes based on the time of
126-- the log. Index name is treated as a prefix. So if your index name
128-- the log. Index name is treated as a prefix. So if your index name
127-- is @foo@ and DailySharding is used, logs will be stored in
129-- is @foo@ and DailySharding is used, logs will be stored in
128−-- @foo-2016-02-25@, @foo-2016-02-26@ and so on. Index templating will
130+-- @foo-2016-2-25@, @foo-2016-2-26@ and so on. Index templating will
129-- be used to set up mappings automatically. Deletes based on date are
131-- be used to set up mappings automatically. Deletes based on date are
130-- very fast and queries can be restricted to date ranges for better
132-- very fast and queries can be restricted to date ranges for better
131-- performance. Queries against all dates should use @foo-*@ as an
133-- performance. Queries against all dates should use @foo-*@ as an
132-- index name. Note that index aliasing's glob feature is not suitable
134-- index name. Note that index aliasing's glob feature is not suitable
133-- for these date ranges as it matches index names as they are
135-- for these date ranges as it matches index names as they are
134-- declared, so new dates will be excluded. DailyIndexSharding is a
136-- declared, so new dates will be excluded. DailyIndexSharding is a
135−-- reasonable choice. Changing index sharding strategies is a *bad
137+-- reasonable choice. Changing index sharding strategies is not
136−-- idea*.
138+-- advisable.
138-- * CustomSharding: supply your own function that decomposes an item
140-- * CustomSharding: supply your own function that decomposes an item
139-- into its index name heirarchy which will be appended to the index
141-- into its index name heirarchy which will be appended to the index
140-- name. So for instance if your function return ["arbitrary",
142-- name. So for instance if your function return ["arbitrary",
141-- "prefix"], the index will be @foo-arbitrary-prefix@ and the index
143-- "prefix"], the index will be @foo-arbitrary-prefix@ and the index
142−-- template will be set to match @foo-*@
144+-- template will be set to match @foo-*@. In general, you want to use
145+-- segments of increasing granularity (like year, month, day for
146+-- dates). This makes it easier to address groups of indexes
147+-- (e.g. @foo-2016-*@).
143data IndexShardingPolicy = NoIndexSharding
148data IndexShardingPolicy = NoIndexSharding
144 | MonthlyIndexSharding
149 | MonthlyIndexSharding
145 | DailyIndexSharding
150 | DailyIndexSharding