Safe Haskell | None |
---|---|
Language | Haskell2010 |
Database.V1.Bloodhound.Internal.Client
- data BHEnv = BHEnv {}
- newtype Server = Server Text
- class (Functor m, Applicative m, MonadIO m) => MonadBH m where
- mkBHEnv :: Server -> Manager -> BHEnv
- newtype BH m a = BH {}
- runBH :: BHEnv -> BH m a -> m a
- data Version = Version {}
- newtype VersionNumber = VersionNumber {}
- data Status = Status {}
- data IndexSettings = IndexSettings {}
- defaultIndexSettings :: IndexSettings
- data IndexOptimizationSettings = IndexOptimizationSettings {}
- defaultIndexOptimizationSettings :: IndexOptimizationSettings
- data UpdatableIndexSetting
- = NumberOfReplicas ReplicaCount
- | AutoExpandReplicas ReplicaBounds
- | BlocksReadOnly Bool
- | BlocksRead Bool
- | BlocksWrite Bool
- | BlocksMetaData Bool
- | RefreshInterval NominalDiffTime
- | IndexConcurrency Int
- | FailOnMergeFailure Bool
- | TranslogFlushThresholdOps Int
- | TranslogFlushThresholdSize Bytes
- | TranslogFlushThresholdPeriod NominalDiffTime
- | TranslogDisableFlush Bool
- | CacheFilterMaxSize (Maybe Bytes)
- | CacheFilterExpire (Maybe NominalDiffTime)
- | GatewaySnapshotInterval NominalDiffTime
- | RoutingAllocationInclude (NonEmpty NodeAttrFilter)
- | RoutingAllocationExclude (NonEmpty NodeAttrFilter)
- | RoutingAllocationRequire (NonEmpty NodeAttrFilter)
- | RoutingAllocationEnable AllocationPolicy
- | RoutingAllocationShardsPerNode ShardCount
- | RecoveryInitialShards InitialShardCount
- | GCDeletes NominalDiffTime
- | TTLDisablePurge Bool
- | TranslogFSType FSType
- | IndexCompoundFormat CompoundFormat
- | IndexCompoundOnFlush Bool
- | WarmerEnabled Bool
- data AllocationPolicy
- data ReplicaBounds
- newtype Bytes = Bytes Int
- gigabytes :: Int -> Bytes
- megabytes :: Int -> Bytes
- kilobytes :: Int -> Bytes
- data Interval
- data TimeInterval
- newtype BuildHash = BuildHash {}
- data NodeAttrFilter = NodeAttrFilter {}
- newtype NodeAttrName = NodeAttrName Text
- data InitialShardCount
- data FSType
- data CompoundFormat
- attrFilterJSON :: NonEmpty NodeAttrFilter -> Value
- parseAttrFilter :: Value -> Parser (NonEmpty NodeAttrFilter)
- newtype NominalDiffTimeJSON = NominalDiffTimeJSON {}
- data IndexSettingsSummary = IndexSettingsSummary {}
- parseSettings :: Object -> Parser [UpdatableIndexSetting]
- data OpenCloseIndex
- data FieldType
- data FieldDefinition = FieldDefinition {}
- data IndexTemplate = IndexTemplate {}
- data MappingField = MappingField {}
- data Mapping = Mapping {}
- data BulkOperation
- data EsResult a = EsResult {
- _index :: Text
- _type :: Text
- _id :: Text
- foundResult :: Maybe (EsResultFound a)
- data EsResultFound a = EsResultFound {
- _version :: DocVersion
- _source :: a
- data EsError = EsError {
- errorStatus :: Int
- errorMessage :: Text
- data EsProtocolException = EsProtocolException {
- esProtoExBody :: LByteString
- data IndexAlias = IndexAlias {}
- newtype DocVersion = DocVersion {}
- mkDocVersion :: Int -> Maybe DocVersion
- data IndexAliasAction
- data IndexAliasCreate = IndexAliasCreate {}
- data AliasRouting
- newtype SearchAliasRouting = SearchAliasRouting (NonEmpty RoutingValue)
- newtype IndexAliasRouting = IndexAliasRouting RoutingValue
- newtype RoutingValue = RoutingValue {
- routingValue :: Text
- newtype IndexAliasesSummary = IndexAliasesSummary {}
- data IndexAliasSummary = IndexAliasSummary {}
- newtype ExternalDocVersion = ExternalDocVersion DocVersion
- data VersionControl
- newtype DocumentParent = DocumentParent DocId
- data IndexDocumentSettings = IndexDocumentSettings {}
- defaultIndexDocumentSettings :: IndexDocumentSettings
- data IndexSelection
- data NodeSelection
- data NodeSelector
- newtype NodeName = NodeName {}
- newtype FullNodeId = FullNodeId {
- fullNodeId :: Text
- newtype EsUsername = EsUsername {
- esUsername :: Text
- newtype EsPassword = EsPassword {
- esPassword :: Text
- data SnapshotRepoSelection
- data SnapshotRepoPattern
- newtype SnapshotRepoName = SnapshotRepoName {}
- data GenericSnapshotRepo = GenericSnapshotRepo {}
- class SnapshotRepo r where
- data SnapshotRepoConversionError
- newtype SnapshotRepoType = SnapshotRepoType {}
- newtype GenericSnapshotRepoSettings = GenericSnapshotRepoSettings {}
- newtype SnapshotVerification = SnapshotVerification {}
- data SnapshotNodeVerification = SnapshotNodeVerification {}
- newtype ClusterName = ClusterName {
- clusterName :: Text
- data NodesInfo = NodesInfo {}
- data NodesStats = NodesStats {}
- data NodeStats = NodeStats {
- nodeStatsName :: NodeName
- nodeStatsFullId :: FullNodeId
- nodeStatsBreakersStats :: Maybe NodeBreakersStats
- nodeStatsHTTP :: NodeHTTPStats
- nodeStatsTransport :: NodeTransportStats
- nodeStatsFS :: NodeFSStats
- nodeStatsNetwork :: NodeNetworkStats
- nodeStatsThreadPool :: NodeThreadPoolsStats
- nodeStatsJVM :: NodeJVMStats
- nodeStatsProcess :: NodeProcessStats
- nodeStatsOS :: NodeOSStats
- nodeStatsIndices :: NodeIndicesStats
- data NodeBreakersStats = NodeBreakersStats {}
- data NodeBreakerStats = NodeBreakerStats {}
- data NodeHTTPStats = NodeHTTPStats {}
- data NodeTransportStats = NodeTransportStats {}
- data NodeFSStats = NodeFSStats {}
- data NodeDataPathStats = NodeDataPathStats {
- nodeDataPathDiskServiceTime :: Maybe Double
- nodeDataPathDiskQueue :: Maybe Double
- nodeDataPathIOSize :: Maybe Bytes
- nodeDataPathWriteSize :: Maybe Bytes
- nodeDataPathReadSize :: Maybe Bytes
- nodeDataPathIOOps :: Maybe Int
- nodeDataPathWrites :: Maybe Int
- nodeDataPathReads :: Maybe Int
- nodeDataPathAvailable :: Bytes
- nodeDataPathFree :: Bytes
- nodeDataPathTotal :: Bytes
- nodeDataPathType :: Maybe Text
- nodeDataPathDevice :: Text
- nodeDataPathMount :: Text
- nodeDataPathPath :: Text
- data NodeFSTotalStats = NodeFSTotalStats {
- nodeFSTotalDiskServiceTime :: Maybe Double
- nodeFSTotalDiskQueue :: Maybe Double
- nodeFSTotalIOSize :: Maybe Bytes
- nodeFSTotalWriteSize :: Maybe Bytes
- nodeFSTotalReadSize :: Maybe Bytes
- nodeFSTotalIOOps :: Maybe Int
- nodeFSTotalWrites :: Maybe Int
- nodeFSTotalReads :: Maybe Int
- nodeFSTotalAvailable :: Bytes
- nodeFSTotalFree :: Bytes
- nodeFSTotalTotal :: Bytes
- data NodeNetworkStats = NodeNetworkStats {}
- data NodeThreadPoolsStats = NodeThreadPoolsStats {
- nodeThreadPoolsStatsSnapshot :: NodeThreadPoolStats
- nodeThreadPoolsStatsBulk :: NodeThreadPoolStats
- nodeThreadPoolsStatsMerge :: NodeThreadPoolStats
- nodeThreadPoolsStatsGet :: NodeThreadPoolStats
- nodeThreadPoolsStatsManagement :: NodeThreadPoolStats
- nodeThreadPoolsStatsFetchShardStore :: Maybe NodeThreadPoolStats
- nodeThreadPoolsStatsOptimize :: NodeThreadPoolStats
- nodeThreadPoolsStatsFlush :: NodeThreadPoolStats
- nodeThreadPoolsStatsSearch :: NodeThreadPoolStats
- nodeThreadPoolsStatsWarmer :: NodeThreadPoolStats
- nodeThreadPoolsStatsGeneric :: NodeThreadPoolStats
- nodeThreadPoolsStatsSuggest :: NodeThreadPoolStats
- nodeThreadPoolsStatsRefresh :: NodeThreadPoolStats
- nodeThreadPoolsStatsIndex :: NodeThreadPoolStats
- nodeThreadPoolsStatsListener :: Maybe NodeThreadPoolStats
- nodeThreadPoolsStatsFetchShardStarted :: Maybe NodeThreadPoolStats
- nodeThreadPoolsStatsPercolate :: NodeThreadPoolStats
- data NodeThreadPoolStats = NodeThreadPoolStats {}
- data NodeJVMStats = NodeJVMStats {
- nodeJVMStatsMappedBufferPool :: JVMBufferPoolStats
- nodeJVMStatsDirectBufferPool :: JVMBufferPoolStats
- nodeJVMStatsGCOldCollector :: JVMGCStats
- nodeJVMStatsGCYoungCollector :: JVMGCStats
- nodeJVMStatsPeakThreadsCount :: Int
- nodeJVMStatsThreadsCount :: Int
- nodeJVMStatsOldPool :: JVMPoolStats
- nodeJVMStatsSurvivorPool :: JVMPoolStats
- nodeJVMStatsYoungPool :: JVMPoolStats
- nodeJVMStatsNonHeapCommitted :: Bytes
- nodeJVMStatsNonHeapUsed :: Bytes
- nodeJVMStatsHeapMax :: Bytes
- nodeJVMStatsHeapCommitted :: Bytes
- nodeJVMStatsHeapUsedPercent :: Int
- nodeJVMStatsHeapUsed :: Bytes
- nodeJVMStatsUptime :: NominalDiffTime
- nodeJVMStatsTimestamp :: UTCTime
- data JVMBufferPoolStats = JVMBufferPoolStats {}
- data JVMGCStats = JVMGCStats {}
- data JVMPoolStats = JVMPoolStats {}
- data NodeProcessStats = NodeProcessStats {}
- data NodeOSStats = NodeOSStats {
- nodeOSSwapFree :: Bytes
- nodeOSSwapUsed :: Bytes
- nodeOSMemActualUsed :: Bytes
- nodeOSMemActualFree :: Bytes
- nodeOSMemUsedPercent :: Int
- nodeOSMemFreePercent :: Int
- nodeOSMemUsed :: Bytes
- nodeOSMemFree :: Bytes
- nodeOSCPUStolen :: Int
- nodeOSCPUUsage :: Int
- nodeOSCPUIdle :: Int
- nodeOSCPUUser :: Int
- nodeOSCPUSys :: Int
- nodeOSLoad :: Maybe LoadAvgs
- nodeOSUptime :: NominalDiffTime
- nodeOSTimestamp :: UTCTime
- data LoadAvgs = LoadAvgs {}
- data NodeIndicesStats = NodeIndicesStats {
- nodeIndicesStatsRecoveryThrottleTime :: Maybe NominalDiffTime
- nodeIndicesStatsRecoveryCurrentAsTarget :: Maybe Int
- nodeIndicesStatsRecoveryCurrentAsSource :: Maybe Int
- nodeIndicesStatsQueryCacheMisses :: Maybe Int
- nodeIndicesStatsQueryCacheHits :: Maybe Int
- nodeIndicesStatsQueryCacheEvictions :: Maybe Int
- nodeIndicesStatsQueryCacheSize :: Maybe Bytes
- nodeIndicesStatsSuggestCurrent :: Int
- nodeIndicesStatsSuggestTime :: NominalDiffTime
- nodeIndicesStatsSuggestTotal :: Int
- nodeIndicesStatsTranslogSize :: Bytes
- nodeIndicesStatsTranslogOps :: Int
- nodeIndicesStatsSegFixedBitSetMemory :: Maybe Bytes
- nodeIndicesStatsSegVersionMapMemory :: Bytes
- nodeIndicesStatsSegIndexWriterMaxMemory :: Maybe Bytes
- nodeIndicesStatsSegIndexWriterMemory :: Bytes
- nodeIndicesStatsSegMemory :: Bytes
- nodeIndicesStatsSegCount :: Int
- nodeIndicesStatsCompletionSize :: Bytes
- nodeIndicesStatsPercolateQueries :: Int
- nodeIndicesStatsPercolateMemory :: Bytes
- nodeIndicesStatsPercolateCurrent :: Int
- nodeIndicesStatsPercolateTime :: NominalDiffTime
- nodeIndicesStatsPercolateTotal :: Int
- nodeIndicesStatsFieldDataEvictions :: Int
- nodeIndicesStatsFieldDataMemory :: Bytes
- nodeIndicesStatsIDCacheMemory :: Bytes
- nodeIndicesStatsFilterCacheEvictions :: Int
- nodeIndicesStatsFilterCacheMemory :: Bytes
- nodeIndicesStatsWarmerTotalTime :: NominalDiffTime
- nodeIndicesStatsWarmerTotal :: Int
- nodeIndicesStatsWarmerCurrent :: Int
- nodeIndicesStatsFlushTotalTime :: NominalDiffTime
- nodeIndicesStatsFlushTotal :: Int
- nodeIndicesStatsRefreshTotalTime :: NominalDiffTime
- nodeIndicesStatsRefreshTotal :: Int
- nodeIndicesStatsMergesTotalSize :: Bytes
- nodeIndicesStatsMergesTotalDocs :: Int
- nodeIndicesStatsMergesTotalTime :: NominalDiffTime
- nodeIndicesStatsMergesTotal :: Int
- nodeIndicesStatsMergesCurrentSize :: Bytes
- nodeIndicesStatsMergesCurrentDocs :: Int
- nodeIndicesStatsMergesCurrent :: Int
- nodeIndicesStatsSearchFetchCurrent :: Int
- nodeIndicesStatsSearchFetchTime :: NominalDiffTime
- nodeIndicesStatsSearchFetchTotal :: Int
- nodeIndicesStatsSearchQueryCurrent :: Int
- nodeIndicesStatsSearchQueryTime :: NominalDiffTime
- nodeIndicesStatsSearchQueryTotal :: Int
- nodeIndicesStatsSearchOpenContexts :: Int
- nodeIndicesStatsGetCurrent :: Int
- nodeIndicesStatsGetMissingTime :: NominalDiffTime
- nodeIndicesStatsGetMissingTotal :: Int
- nodeIndicesStatsGetExistsTime :: NominalDiffTime
- nodeIndicesStatsGetExistsTotal :: Int
- nodeIndicesStatsGetTime :: NominalDiffTime
- nodeIndicesStatsGetTotal :: Int
- nodeIndicesStatsIndexingThrottleTime :: Maybe NominalDiffTime
- nodeIndicesStatsIndexingIsThrottled :: Maybe Bool
- nodeIndicesStatsIndexingNoopUpdateTotal :: Maybe Int
- nodeIndicesStatsIndexingDeleteCurrent :: Int
- nodeIndicesStatsIndexingDeleteTime :: NominalDiffTime
- nodeIndicesStatsIndexingDeleteTotal :: Int
- nodeIndicesStatsIndexingIndexCurrent :: Int
- nodeIndicesStatsIndexingIndexTime :: NominalDiffTime
- nodeIndicesStatsIndexingTotal :: Int
- nodeIndicesStatsStoreThrottleTime :: NominalDiffTime
- nodeIndicesStatsStoreSize :: Bytes
- nodeIndicesStatsDocsDeleted :: Int
- nodeIndicesStatsDocsCount :: Int
- data NodeInfo = NodeInfo {
- nodeInfoHTTPAddress :: EsAddress
- nodeInfoBuild :: BuildHash
- nodeInfoESVersion :: VersionNumber
- nodeInfoIP :: Server
- nodeInfoHost :: Server
- nodeInfoTransportAddress :: EsAddress
- nodeInfoName :: NodeName
- nodeInfoFullId :: FullNodeId
- nodeInfoPlugins :: [NodePluginInfo]
- nodeInfoHTTP :: NodeHTTPInfo
- nodeInfoTransport :: NodeTransportInfo
- nodeInfoNetwork :: NodeNetworkInfo
- nodeInfoThreadPool :: NodeThreadPoolsInfo
- nodeInfoJVM :: NodeJVMInfo
- nodeInfoProcess :: NodeProcessInfo
- nodeInfoOS :: NodeOSInfo
- nodeInfoSettings :: Object
- data NodePluginInfo = NodePluginInfo {}
- data NodeHTTPInfo = NodeHTTPInfo {}
- data NodeTransportInfo = NodeTransportInfo {}
- data BoundTransportAddress = BoundTransportAddress {}
- data NodeNetworkInfo = NodeNetworkInfo {}
- newtype MacAddress = MacAddress {
- macAddress :: Text
- newtype NetworkInterfaceName = NetworkInterfaceName {}
- data NodeNetworkInterface = NodeNetworkInterface {}
- data NodeThreadPoolsInfo = NodeThreadPoolsInfo {
- nodeThreadPoolsRefresh :: NodeThreadPoolInfo
- nodeThreadPoolsManagement :: NodeThreadPoolInfo
- nodeThreadPoolsPercolate :: NodeThreadPoolInfo
- nodeThreadPoolsListener :: Maybe NodeThreadPoolInfo
- nodeThreadPoolsFetchShardStarted :: Maybe NodeThreadPoolInfo
- nodeThreadPoolsSearch :: NodeThreadPoolInfo
- nodeThreadPoolsFlush :: NodeThreadPoolInfo
- nodeThreadPoolsWarmer :: NodeThreadPoolInfo
- nodeThreadPoolsOptimize :: NodeThreadPoolInfo
- nodeThreadPoolsBulk :: NodeThreadPoolInfo
- nodeThreadPoolsSuggest :: NodeThreadPoolInfo
- nodeThreadPoolsMerge :: NodeThreadPoolInfo
- nodeThreadPoolsSnapshot :: NodeThreadPoolInfo
- nodeThreadPoolsGet :: NodeThreadPoolInfo
- nodeThreadPoolsFetchShardStore :: Maybe NodeThreadPoolInfo
- nodeThreadPoolsIndex :: NodeThreadPoolInfo
- nodeThreadPoolsGeneric :: NodeThreadPoolInfo
- data NodeThreadPoolInfo = NodeThreadPoolInfo {}
- data ThreadPoolSize
- data ThreadPoolType
- data NodeJVMInfo = NodeJVMInfo {}
- newtype JVMVersion = JVMVersion {}
- data JVMMemoryInfo = JVMMemoryInfo {}
- newtype JVMMemoryPool = JVMMemoryPool {}
- newtype JVMGCCollector = JVMGCCollector {}
- newtype PID = PID {}
- data NodeOSInfo = NodeOSInfo {}
- data CPUInfo = CPUInfo {
- cpuCacheSize :: Bytes
- cpuCoresPerSocket :: Int
- cpuTotalSockets :: Int
- cpuTotalCores :: Int
- cpuMHZ :: Int
- cpuModel :: Text
- cpuVendor :: Text
- data NodeProcessInfo = NodeProcessInfo {}
- newtype EsAddress = EsAddress {}
- newtype PluginName = PluginName {
- pluginName :: Text
- data ShardResult = ShardResult {
- shardTotal :: Int
- shardsSuccessful :: Int
- shardsFailed :: Int
- data SnapshotState
- data SnapshotRestoreSettings = SnapshotRestoreSettings {
- snapRestoreWaitForCompletion :: Bool
- snapRestoreIndices :: Maybe IndexSelection
- snapRestoreIgnoreUnavailable :: Bool
- snapRestoreIncludeGlobalState :: Bool
- snapRestoreRenamePattern :: Maybe RestoreRenamePattern
- snapRestoreRenameReplacement :: Maybe (NonEmpty RestoreRenameToken)
- snapRestorePartial :: Bool
- snapRestoreIncludeAliases :: Bool
- snapRestoreIndexSettingsOverrides :: Maybe RestoreIndexSettings
- snapRestoreIgnoreIndexSettings :: Maybe (NonEmpty Text)
- newtype RestoreRenamePattern = RestoreRenamePattern {}
- data RestoreRenameToken
- newtype RRGroupRefNum = RRGroupRefNum {
- rrGroupRefNum :: Int
- mkRRGroupRefNum :: Int -> Maybe RRGroupRefNum
- data RestoreIndexSettings = RestoreIndexSettings {}
- data SnapshotRepoUpdateSettings = SnapshotRepoUpdateSettings {}
- defaultSnapshotRepoUpdateSettings :: SnapshotRepoUpdateSettings
- data FsSnapshotRepo = FsSnapshotRepo {}
- data SnapshotCreateSettings = SnapshotCreateSettings {}
- defaultSnapshotCreateSettings :: SnapshotCreateSettings
- data SnapshotSelection
- data SnapshotPattern
- data SnapshotInfo = SnapshotInfo {}
- data SnapshotShardFailure = SnapshotShardFailure {}
- parseRepo :: Parser a -> Either SnapshotRepoConversionError a
- parseNodeStats :: FullNodeId -> Object -> Parser NodeStats
- parseNodeInfo :: FullNodeId -> Object -> Parser NodeInfo
- defaultSnapshotRestoreSettings :: SnapshotRestoreSettings
- fsRepoType :: SnapshotRepoType
- type Reply = Response LByteString
- parseStringInterval :: Monad m => String -> m NominalDiffTime
- data Source
- data PatternOrPatterns
- data Include = Include [Pattern]
- data Exclude = Exclude [Pattern]
- newtype Pattern = Pattern Text
- newtype ScrollId = ScrollId Text
Documentation
Common environment for Elasticsearch calls. Connections will be pipelined according to the provided HTTP connection manager.
Constructors
BHEnv | |
Server
is used with the client functions to point at the ES instance
class (Functor m, Applicative m, MonadIO m) => MonadBH m where Source #
All API calls to Elasticsearch operate within
MonadBH
. The idea is that it can be easily embedded in your
own monad transformer stack. A default instance for a ReaderT and
alias BH
is provided for the simple case.
Minimal complete definition
>>>
:set -XOverloadedStrings
>>>
import Data.Aeson
>>>
import Database.V1.Bloodhound
>>>
let testServer = (Server "http://localhost:9200")
>>>
let testIndex = IndexName "twitter"
>>>
let testMapping = MappingName "tweet"
>>>
let defaultIndexSettings = IndexSettings (ShardCount 3) (ReplicaCount 2)
mkBHEnv :: Server -> Manager -> BHEnv Source #
Create a BHEnv
with all optional fields defaulted. HTTP hook
will be a noop. You can use the exported fields to customize it further, e.g.:
> (mkBHEnv myServer myManager) { bhRequestHook = customHook }
Instances
MonadTrans BH Source # | |
MonadWriter w m => MonadWriter w (BH m) Source # | |
MonadState s m => MonadState s (BH m) Source # | |
MonadReader r m => MonadReader r (BH m) Source # | |
MonadError e m => MonadError e (BH m) Source # | |
Monad m => Monad (BH m) Source # | |
Functor m => Functor (BH m) Source # | |
MonadFix m => MonadFix (BH m) Source # | |
Applicative m => Applicative (BH m) Source # | |
Alternative m => Alternative (BH m) Source # | |
MonadPlus m => MonadPlus (BH m) Source # | |
MonadIO m => MonadIO (BH m) Source # | |
MonadThrow m => MonadThrow (BH m) Source # | |
MonadCatch m => MonadCatch (BH m) Source # | |
MonadMask m => MonadMask (BH m) Source # | |
(Functor m, Applicative m, MonadIO m) => MonadBH (BH m) Source # | |
Constructors
Version | |
Fields |
newtype VersionNumber Source #
Traditional software versioning number
Constructors
VersionNumber | |
Fields |
Status
is a data type for describing the JSON body returned by
Elasticsearch when you query its status. This was deprecated in 1.2.0.
Constructors
Status | |
data IndexSettings Source #
IndexSettings
is used to configure the shards and replicas when you create
an Elasticsearch Index.
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-create-index.html
Constructors
IndexSettings | |
Fields |
Instances
defaultIndexSettings :: IndexSettings Source #
defaultIndexSettings
is an IndexSettings
with 3 shards and 2 replicas.
data IndexOptimizationSettings Source #
IndexOptimizationSettings
is used to configure index optimization. See
https://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-optimize.html
for more info.
Constructors
IndexOptimizationSettings | |
Fields
|
defaultIndexOptimizationSettings :: IndexOptimizationSettings Source #
defaultIndexOptimizationSettings
implements the default settings that
Elasticsearch uses for index optimization. maxNumSegments
is Nothing,
onlyExpungeDeletes
is False, and flushAfterOptimize is True.
data UpdatableIndexSetting Source #
UpdatableIndexSetting
are settings which may be updated after an index is created.
https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html
Constructors
NumberOfReplicas ReplicaCount | 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) | 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 |
data AllocationPolicy Source #
Constructors
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 Source #
Constructors
ReplicasBounded Int Int | |
ReplicasLowerBounded Int | |
ReplicasUnbounded |
Instances
A measure of bytes used for various configurations. You may want
to use smart constructors like gigabytes
for larger values.
>>>
gigabytes 9
Bytes 9000000000
>>>
megabytes 9
Bytes 9000000
>>>
kilobytes 9
Bytes 9000
data TimeInterval Source #
Instances
Typically a 7 character hex string.
data InitialShardCount Source #
Constructors
FSSimple | |
FSBuffered |
data CompoundFormat Source #
Constructors
CompoundFileFormat Bool | |
MergeSegmentVsTotalIndex Double | percentage between 0 and 1 where 0 is false, 1 is true |
parseAttrFilter :: Value -> Parser (NonEmpty NodeAttrFilter) Source #
data IndexSettingsSummary Source #
Constructors
IndexSettingsSummary | |
data OpenCloseIndex Source #
OpenCloseIndex
is a sum type for opening and closing indices.
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-open-close.html
Constructors
OpenIndex | |
CloseIndex |
Instances
Constructors
GeoPointType | |
GeoShapeType | |
FloatType | |
IntegerType | |
LongType | |
ShortType | |
ByteType |
data IndexTemplate Source #
An IndexTemplate
defines a template that will automatically be
applied to new indices created. The templates include both
IndexSettings
and mappings, and a simple TemplatePattern
that
controls if the template will be applied to the index created.
Specify mappings as follows: [toJSON TweetMapping, ...]
https://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-templates.html
Constructors
IndexTemplate | |
Fields |
Instances
Support for type reification of Mapping
s is currently incomplete, for
now the mapping API verbiage expects a ToJSON
able blob.
Indexes have mappings, mappings are schemas for the documents contained in the index. I'd recommend having only one mapping per index, always having a mapping, and keeping different kinds of documents separated if possible.
Constructors
Mapping | |
Fields
|
data BulkOperation Source #
BulkOperation
is a sum type for expressing the four kinds of bulk
operation index, create, delete, and update. BulkIndex
behaves like an
"upsert", BulkCreate
will fail if a document already exists at the DocId.
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-bulk.html#docs-bulk
Constructors
BulkIndex IndexName MappingName DocId Value | |
BulkCreate IndexName MappingName DocId Value | |
BulkDelete IndexName MappingName DocId | |
BulkUpdate IndexName MappingName DocId Value |
Instances
EsResult
describes the standard wrapper JSON document that you see in
successful Elasticsearch lookups or lookups that couldn't find the document.
Constructors
EsResult | |
Fields
|
data EsResultFound a Source #
EsResultFound
contains the document and its metadata inside of an
EsResult
when the document was successfully found.
Constructors
EsResultFound | |
Fields
|
Instances
Eq a => Eq (EsResultFound a) Source # | |
Show a => Show (EsResultFound a) Source # | |
FromJSON a => FromJSON (EsResultFound a) Source # | |
EsError
is the generic type that will be returned when there was a
problem. If you can't parse the expected response, its a good idea to
try parsing this.
Constructors
EsError | |
Fields
|
data EsProtocolException Source #
EsProtocolException
will be thrown if Bloodhound cannot parse a response
returned by the Elasticsearch server. If you encounter this error, please
verify that your domain data types and FromJSON instances are working properly
(for example, the a
of '[Hit a]' in 'SearchResult.searchHits.hits'). If you're
sure that your mappings are correct, then this error may be an indication of an
incompatibility between Bloodhound and Elasticsearch. Please open a bug report
and be sure to include the exception body.
Constructors
EsProtocolException | |
Fields
|
newtype DocVersion Source #
DocVersion
is an integer version number for a document between 1
and 9.2e+18 used for .
Constructors
DocVersion | |
Fields |
mkDocVersion :: Int -> Maybe DocVersion Source #
Smart constructor for in-range doc version
data IndexAliasAction Source #
Constructors
AddAlias IndexAlias IndexAliasCreate | |
RemoveAlias IndexAlias |
Instances
data IndexAliasCreate Source #
Constructors
IndexAliasCreate | |
Fields |
data AliasRouting Source #
Constructors
AllAliasRouting RoutingValue | |
GranularAliasRouting (Maybe SearchAliasRouting) (Maybe IndexAliasRouting) |
Instances
newtype SearchAliasRouting Source #
Constructors
SearchAliasRouting (NonEmpty RoutingValue) |
newtype IndexAliasRouting Source #
Constructors
IndexAliasRouting RoutingValue |
newtype IndexAliasesSummary Source #
Constructors
IndexAliasesSummary | |
Fields |
data IndexAliasSummary Source #
IndexAliasSummary
is a summary of an index alias configured for a server.
Constructors
IndexAliasSummary | |
Instances
newtype ExternalDocVersion Source #
ExternalDocVersion
is a convenience wrapper if your code uses its
own version numbers instead of ones from ES.
Constructors
ExternalDocVersion DocVersion |
data VersionControl Source #
VersionControl
is specified when indexing documents as a
optimistic concurrency control.
Constructors
NoVersionControl | Don't send a version. This is a pure overwrite. |
InternalVersion DocVersion | Use the default ES versioning scheme. Only index the document if the version is the same as the one specified. Only applicable to updates, as you should be getting Version from a search result. |
ExternalGT ExternalDocVersion | Use your own version numbering. Only index the document if the version is strictly higher OR the document doesn't exist. The given version will be used as the new version number for the stored document. N.B. All updates must increment this number, meaning there is some global, external ordering of updates. |
ExternalGTE ExternalDocVersion | Use your own version numbering. Only index the document if the version is equal or higher than the stored version. Will succeed if there is no existing document. The given version will be used as the new version number for the stored document. Use with care, as this could result in data loss. |
ForceVersion ExternalDocVersion | The document will always be indexed and the given version will be the new version. This is typically used for correcting errors. Use with care, as this could result in data loss. |
Instances
newtype DocumentParent Source #
DocumentParent
is used to specify a parent document.
Constructors
DocumentParent DocId |
Instances
data IndexDocumentSettings Source #
IndexDocumentSettings
are special settings supplied when indexing
a document. For the best backwards compatiblity when new fields are
added, you should probably prefer to start with defaultIndexDocumentSettings
Constructors
IndexDocumentSettings | |
Fields |
Instances
defaultIndexDocumentSettings :: IndexDocumentSettings Source #
Reasonable default settings. Chooses no version control and no parent.
data IndexSelection Source #
IndexSelection
is used for APIs which take a single index, a list of
indexes, or the special _all
index.
Constructors
IndexList (NonEmpty IndexName) | |
AllIndexes |
Instances
data NodeSelection Source #
NodeSelection
is used for most cluster APIs. See here for more details.
Constructors
LocalNode | Whatever node receives this request |
NodeList (NonEmpty NodeSelector) | |
AllNodes |
Instances
data NodeSelector Source #
An exact match or pattern to identify a node. Note that All of these options support wildcarding, so your node name, server, attr name can all contain * characters to be a fuzzy match.
Constructors
NodeByName NodeName | |
NodeByFullNodeId FullNodeId | |
NodeByHost Server | e.g. 10.0.0.1 or even 10.0.0.* |
NodeByAttribute NodeAttrName Text | NodeAttrName can be a pattern, e.g. rack*. The value can too. |
Instances
A human-readable node name that is supplied by the user in the node config or automatically generated by Elasticsearch.
newtype FullNodeId Source #
Unique, automatically-generated name assigned to nodes that are usually returned in node-oriented APIs.
Constructors
FullNodeId | |
Fields
|
Instances
newtype EsUsername Source #
Username type used for HTTP Basic authentication. See basicAuthHook
.
Constructors
EsUsername | |
Fields
|
Instances
newtype EsPassword Source #
Password type used for HTTP Basic authentication. See basicAuthHook
.
Constructors
EsPassword | |
Fields
|
Instances
data SnapshotRepoSelection Source #
Constructors
SnapshotRepoList (NonEmpty SnapshotRepoPattern) | |
AllSnapshotRepos |
Instances
data SnapshotRepoPattern Source #
Either specifies an exact repo name or one with globs in it,
e.g. RepoPattern "foo*"
NOTE: Patterns are not supported on ES < 1.7
Constructors
ExactRepo SnapshotRepoName | |
RepoPattern Text |
Instances
newtype SnapshotRepoName Source #
The unique name of a snapshot repository.
Constructors
SnapshotRepoName | |
Fields |
data GenericSnapshotRepo Source #
A generic representation of a snapshot repo. This is what gets
sent to and parsed from the server. For repo types enabled by
plugins that aren't exported by this library, consider making a
custom type which implements SnapshotRepo
. If it is a common repo
type, consider submitting a pull request to have it included in the
library proper
Constructors
GenericSnapshotRepo | |
class SnapshotRepo r where Source #
Law: fromGSnapshotRepo (toGSnapshotRepo r) == Right r
Minimal complete definition
Methods
toGSnapshotRepo :: r -> GenericSnapshotRepo Source #
fromGSnapshotRepo :: GenericSnapshotRepo -> Either SnapshotRepoConversionError r Source #
data SnapshotRepoConversionError Source #
Constructors
RepoTypeMismatch SnapshotRepoType SnapshotRepoType | Expected type and actual type |
OtherRepoConversionError Text |
newtype SnapshotRepoType Source #
Constructors
SnapshotRepoType | |
Fields |
newtype GenericSnapshotRepoSettings Source #
Opaque representation of snapshot repo settings. Instances of
SnapshotRepo
will produce this.
Constructors
GenericSnapshotRepoSettings | |
Fields |
newtype SnapshotVerification Source #
The result of running verifySnapshotRepo
.
Constructors
SnapshotVerification | |
data SnapshotNodeVerification Source #
A node that has verified a snapshot
Constructors
SnapshotNodeVerification | |
Fields |
Instances
Constructors
NodesInfo | |
Fields
|
Constructors
data NodeBreakersStats Source #
Constructors
NodeBreakersStats | |
data NodeTransportStats Source #
Constructors
NodeTransportStats | |
Fields |
data NodeDataPathStats Source #
Constructors
data NodeFSTotalStats Source #
Constructors
Instances
data NodeThreadPoolsStats Source #
Constructors
data NodeThreadPoolStats Source #
Constructors
NodeThreadPoolStats | |
data NodeJVMStats Source #
Constructors
Instances
data JVMBufferPoolStats Source #
Constructors
JVMBufferPoolStats | |
data NodeOSStats Source #
Constructors
NodeOSStats | |
Fields
|
Instances
Constructors
LoadAvgs | |
Fields
|
data NodeIndicesStats Source #
Constructors
Instances
Constructors
NodeInfo | |
Fields
|
data NodePluginInfo Source #
Constructors
NodePluginInfo | |
Fields
|
Instances
data NodeTransportInfo Source #
Constructors
NodeTransportInfo | |
data BoundTransportAddress Source #
Constructors
BoundTransportAddress | |
Fields |
newtype NetworkInterfaceName Source #
Constructors
NetworkInterfaceName | |
Fields |
data NodeNetworkInterface Source #
Constructors
NodeNetworkInterface | |
data NodeThreadPoolsInfo Source #
Constructors
data NodeThreadPoolInfo Source #
Constructors
NodeThreadPoolInfo | |
data ThreadPoolType Source #
Constructors
ThreadPoolScaling | |
ThreadPoolFixed | |
ThreadPoolCached |
Instances
data NodeJVMInfo Source #
Constructors
NodeJVMInfo | |
Fields
|
Instances
newtype JVMVersion Source #
Handles quirks in the way JVM versions are rendered (1.7.0_101 -> 1.7.0.101)
Constructors
JVMVersion | |
Fields |
Instances
Constructors
CPUInfo | |
Fields
|
A quirky address format used throughout Elasticsearch. An example would be inet[/1.1.1.1:9200]. inet may be a placeholder for a FQDN.
data ShardResult Source #
Constructors
ShardResult | |
Fields
|
Instances
data SnapshotState Source #
Constructors
SnapshotInit | |
SnapshotStarted | |
SnapshotSuccess | |
SnapshotFailed | |
SnapshotAborted | |
SnapshotMissing | |
SnapshotWaiting |
Instances
data SnapshotRestoreSettings Source #
Constructors
SnapshotRestoreSettings | |
Fields
|
Instances
newtype RestoreRenamePattern Source #
Regex-stype pattern, e.g. "index_(.+)" to match index names
Constructors
RestoreRenamePattern | |
data RestoreRenameToken Source #
A single token in a index renaming scheme for a restore. These are concatenated into a string before being sent to Elasticsearch. Check out these Java docs to find out more if you're into that sort of thing.
Constructors
RRTLit Text | Just a literal string of characters |
RRSubWholeMatch | Equivalent to $0. The entire matched pattern, not any subgroup |
RRSubGroup RRGroupRefNum | A specific reference to a group number |
Instances
newtype RRGroupRefNum Source #
A group number for regex matching. Only values from 1-9 are
supported. Construct with mkRRGroupRefNum
Constructors
RRGroupRefNum | |
Fields
|
Instances
mkRRGroupRefNum :: Int -> Maybe RRGroupRefNum Source #
Only allows valid group number references (1-9).
data RestoreIndexSettings Source #
Index settings that can be overridden. The docs only mention you can update number of replicas, but there may be more. You definitely cannot override shard count.
Constructors
RestoreIndexSettings | |
Fields |
data SnapshotRepoUpdateSettings Source #
Constructors
SnapshotRepoUpdateSettings | |
Fields
|
defaultSnapshotRepoUpdateSettings :: SnapshotRepoUpdateSettings Source #
Reasonable defaults for repo creation/update
- repoUpdateVerify True
data FsSnapshotRepo Source #
A filesystem-based snapshot repo that ships with
Elasticsearch. This is an instance of SnapshotRepo
so it can be
used with updateSnapshotRepo
Constructors
FsSnapshotRepo | |
Fields
|
Instances
data SnapshotCreateSettings Source #
Constructors
SnapshotCreateSettings | |
Fields
|
Instances
defaultSnapshotCreateSettings :: SnapshotCreateSettings Source #
Reasonable defaults for snapshot creation
- snapWaitForCompletion False
- snapIndices Nothing
- snapIgnoreUnavailable False
- snapIncludeGlobalState True
- snapPartial False
data SnapshotSelection Source #
Constructors
SnapshotList (NonEmpty SnapshotPattern) | |
AllSnapshots |
Instances
data SnapshotPattern Source #
Either specifies an exact snapshot name or one with globs in it,
e.g. SnapPattern "foo*"
NOTE: Patterns are not supported on
ES < 1.7
Constructors
ExactSnap SnapshotName | |
SnapPattern Text |
Instances
data SnapshotInfo Source #
General information about the state of a snapshot. Has some
redundancies with SnapshotStatus
Constructors
SnapshotInfo | |
Instances
data SnapshotShardFailure Source #
Constructors
SnapshotShardFailure | |
parseNodeStats :: FullNodeId -> Object -> Parser NodeStats Source #
parseNodeInfo :: FullNodeId -> Object -> Parser NodeInfo Source #
defaultSnapshotRestoreSettings :: SnapshotRestoreSettings Source #
Reasonable defaults for snapshot restores
- snapRestoreWaitForCompletion False
- snapRestoreIndices Nothing
- snapRestoreIgnoreUnavailable False
- snapRestoreIncludeGlobalState True
- snapRestoreRenamePattern Nothing
- snapRestoreRenameReplacement Nothing
- snapRestorePartial False
- snapRestoreIncludeAliases True
- snapRestoreIndexSettingsOverrides Nothing
- snapRestoreIgnoreIndexSettings Nothing
parseStringInterval :: Monad m => String -> m NominalDiffTime Source #