@@ -56,6 +56,7 @@ module Database.Bloodhound.Types
5656 , Existence(..)
5757 , NullValue(..)
5858 , IndexSettings(..)
59+ , IndexSettingUpdate(..)
5960 , IndexTemplate(..)
6061 , Server(..)
6162 , Reply
@@ -245,7 +246,7 @@ import qualified Data.Map.Strict as M
245246import Data.Maybe
246247import Data.Text (Text)
247248import qualified Data.Text as T
248−import Data.Time.Clock (UTCTime)
249+import Data.Time.Clock (UTCTime, NominalDiffTime)
249250import qualified Data.Vector as V
250251import GHC.Enum
251252import GHC.Generics (Generic)
@@ -347,6 +348,45 @@ data IndexSettings =
347348defaultIndexSettings :: IndexSettings
348349defaultIndexSettings = IndexSettings (ShardCount 3) (ReplicaCount 2)
349350
351+data IndexSettingUpdate = NumberOfReplicas Int
352+ | AutoExpandReplicas ReplicaBounds
353+ | BlocksReadOnly Bool
354+ | BlocksRead Bool
355+ | BlocksWrite Bool
356+ | BlocksMetaData Bool
357+ | RefreshInterval NominalDiffTime
358+ | IndexConcurrency Int
359+ | FailOnMergeFailure Bool
360+ | TranslogFlushThresholdOps Int
361+ | TranslogFlushThresholdSize Bytes
362+ | TranslogFlushThresholdPeriod NominalDiffTime
363+ | TranslogDisableFlush Bool
364+ | CacheFilterMaxSize (Maybe Bytes)
365+ | CacheFilterExpire (Maybe NominalDiffTime)
366+ | GatewaySnapshotInterval NominalDiffTime
367+ | RoutingAllocationDisable Bool
368+ | RoutingAllocationDisableNew Bool
369+ | RoutingAllocationDisableReplica Bool
370+ | RoutingAllocationEnable AllocationPolicy
371+ | RoutingAllocationShardsPerNode ShardCount
372+ | RecoveryInitialShards --TODO: shard count or quorum specifications
373+ | GCDeletes
374+ | TTLDisablePurge Bool
375+ | TranslogFSType FSType
376+ | TranslogCompoundFormat
377+ | TranslogCompoundOnFlush
378+ | WarmerEnabled Bool
379+ --TODO: figure out allocation options
380+
381+data AllocationPolicy = AllocAll
382+ | AllocPrimaries
383+ | AllocNewPrimaries
384+ | AllocNone
385+
386+data ReplicaBounds = ReplicasBounded Int Int
387+ | ReplicasLowerBounded Int
388+ | ReplicasUnbounded
389+
350390{-| 'Reply' and 'Method' are type synonyms from 'Network.HTTP.Types.Method.Method' -}
351391type Reply = Network.HTTP.Client.Response L.ByteString
352392type Method = NHTM.Method