@@ -56,6 +56,7 @@ module Database.Bloodhound.Types
56 , Existence(..)
56 , Existence(..)
57 , NullValue(..)
57 , NullValue(..)
58 , IndexSettings(..)
58 , IndexSettings(..)
59+ , IndexSettingUpdate(..)
59 , IndexTemplate(..)
60 , IndexTemplate(..)
60 , Server(..)
61 , Server(..)
@@ -245,7 +246,7 @@ import qualified Data.Map.Strict as M
245import Data.Maybe
246import Data.Maybe
246import Data.Text (Text)
247import Data.Text (Text)
247import qualified Data.Text as T
248import qualified Data.Text as T
248−import Data.Time.Clock (UTCTime)
249+import Data.Time.Clock (UTCTime, NominalDiffTime)
249import qualified Data.Vector as V
250import qualified Data.Vector as V
250import GHC.Enum
251import GHC.Enum
251import GHC.Generics (Generic)
252import GHC.Generics (Generic)
@@ -347,6 +348,45 @@ data IndexSettings =
347defaultIndexSettings :: IndexSettings
348defaultIndexSettings :: IndexSettings
348defaultIndexSettings = IndexSettings (ShardCount 3) (ReplicaCount 2)
349defaultIndexSettings = IndexSettings (ShardCount 3) (ReplicaCount 2)
351+data IndexSettingUpdate = NumberOfReplicas Int
352+ | AutoExpandReplicas ReplicaBounds
353+ | BlocksReadOnly 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
374+ | TTLDisablePurge Bool
375+ | TranslogFSType FSType
376+ | TranslogCompoundFormat
377+ | TranslogCompoundOnFlush
378+ | WarmerEnabled Bool
379+ --TODO: figure out allocation options
381+data AllocationPolicy = AllocAll
386+data ReplicaBounds = ReplicasBounded Int Int
387+ | ReplicasLowerBounded Int
350{-| 'Reply' and 'Method' are type synonyms from 'Network.HTTP.Types.Method.Method' -}
390{-| 'Reply' and 'Method' are type synonyms from 'Network.HTTP.Types.Method.Method' -}
351type Reply = Network.HTTP.Client.Response L.ByteString
391type Reply = Network.HTTP.Client.Response L.ByteString
352type Method = NHTM.Method
392type Method = NHTM.Method