Lift documentation from ES for IndexSettingUpdate

This commit is contained in:
Michael Xavier 2015-10-18 21:06:32 -07:00
parent 0a667b820e
commit ee5cd9326a
2 changed files with 26 additions and 5 deletions

View File

@ -274,7 +274,8 @@ deleteIndex (IndexName indexName) =
-- | 'updateIndexSettings' will apply a non-empty list of setting updates to an index
--
-- >>> response <- runBH' $ updateIndexSettings (BlocksWrite False :| []) testIndex
-- >>> _ <- runBH' $ createIndex defaultIndexSettings (IndexName "unconfiguredindex")
-- >>> response <- runBH' $ updateIndexSettings (BlocksWrite False :| []) (IndexName "unconfiguredindex")
-- >>> respIsTwoHunna response
-- True
updateIndexSettings :: MonadBH m => NonEmpty IndexSettingUpdate -> IndexName -> m Reply

View File

@ -362,42 +362,62 @@ defaultIndexSettings = IndexSettings (ShardCount 3) (ReplicaCount 2)
<https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html>
-}
data IndexSettingUpdate = NumberOfReplicas Int
-- ^ The number of replicas each shard has.
| AutoExpandReplicas ReplicaBounds
| BlocksReadOnly Bool
-- ^ Set to True to have the index read only. False to allow writes and metadata changes.
| BlocksRead Bool
-- ^ Set to True to disable read operations against the index.
| BlocksWrite Bool
-- ^ Set to True to disable write operations against the index.
| BlocksMetaData Bool
-- ^ Set to True to disable metadata operations against the index.
| RefreshInterval NominalDiffTime
-- ^ The async refresh interval of a shard
| IndexConcurrency Int
| FailOnMergeFailure Bool
| TranslogFlushThresholdOps Int
-- ^ When to flush on operations.
| TranslogFlushThresholdSize Bytes
-- ^ When to flush based on translog (bytes) size.
| TranslogFlushThresholdPeriod NominalDiffTime
-- ^ When to flush based on a period of not flushing.
| TranslogDisableFlush Bool
-- ^ Disables flushing. Note, should be set for a short interval and then enabled.
| CacheFilterMaxSize (Maybe Bytes)
-- ^ The maximum size of filter cache (per segment in shard).
| CacheFilterExpire (Maybe NominalDiffTime)
-- ^ The expire after access time for filter cache.
| GatewaySnapshotInterval NominalDiffTime
-- ^ The gateway snapshot interval (only applies to shared gateways).
| RoutingAllocationInclude (NonEmpty NodeAttrFilter)
-- ^ A node matching any rule will be allowed to host shards from the index.
| RoutingAllocationExclude (NonEmpty NodeAttrFilter)
-- ^ A node matching any rule will NOT be allowed to host shards from the index.
| RoutingAllocationRequire (NonEmpty NodeAttrFilter)
| RoutingAllocationDisable Bool
| RoutingAllocationDisableNew Bool
| RoutingAllocationDisableReplica Bool
-- ^ Only nodes matching all rules will be allowed to host shards from the index.
| RoutingAllocationEnable AllocationPolicy
-- ^ Enables shard allocation for a specific index.
| RoutingAllocationShardsPerNode ShardCount
-- ^ Controls the total number of shards (replicas and primaries) allowed to be allocated on a single node.
| RecoveryInitialShards InitialShardCount
-- ^ When using local gateway a particular shard is recovered only if there can be allocated quorum shards in the cluster.
| GCDeletes NominalDiffTime
| TTLDisablePurge Bool
-- ^ Disables temporarily the purge of expired docs.
| TranslogFSType FSType
| IndexCompoundFormat CompoundFormat
| IndexCompoundOnFlush Bool
| WarmerEnabled Bool
--TODO: figure out allocation options
data AllocationPolicy = AllocAll
-- ^ Allows shard allocation for all shards.
| AllocPrimaries
-- ^ Allows shard allocation only for primary shards.
| AllocNewPrimaries
-- ^ Allows shard allocation only for primary shards for new indices.
| AllocNone
-- ^ No shard allocation is allowed
data ReplicaBounds = ReplicasBounded Int Int
| ReplicasLowerBounded Int