Safe Haskell | None |
---|---|
Language | Haskell2010 |
- 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.
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.
>>>
: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 }
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 # | |
newtype VersionNumber Source #
Traditional software versioning number
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.
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
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.
IndexOptimizationSettings | |
|
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
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 #
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 #
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 #
Typically a 7 character hex string.
data NodeAttrFilter Source #
newtype NodeAttrName Source #
data InitialShardCount Source #
data CompoundFormat Source #
CompoundFileFormat Bool | |
MergeSegmentVsTotalIndex Double | percentage between 0 and 1 where 0 is false, 1 is true |
parseAttrFilter :: Value -> Parser (NonEmpty NodeAttrFilter) Source #
newtype NominalDiffTimeJSON Source #
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
data FieldDefinition Source #
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
data MappingField Source #
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.
Mapping | |
|
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
EsResult
describes the standard wrapper JSON document that you see in
successful Elasticsearch lookups or lookups that couldn't find the document.
EsResult | |
|
data EsResultFound a Source #
EsResultFound
contains the document and its metadata inside of an
EsResult
when the document was successfully found.
EsResultFound | |
|
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.
EsError | |
|
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.
EsProtocolException | |
|
data IndexAlias Source #
newtype DocVersion Source #
DocVersion
is an integer version number for a document between 1
and 9.2e+18 used for .
mkDocVersion :: Int -> Maybe DocVersion Source #
Smart constructor for in-range doc version
data IndexAliasAction Source #
data IndexAliasCreate Source #
data AliasRouting Source #
newtype SearchAliasRouting Source #
newtype IndexAliasRouting Source #
newtype RoutingValue Source #
newtype IndexAliasesSummary Source #
data IndexAliasSummary Source #
IndexAliasSummary
is a summary of an index alias configured for a server.
newtype ExternalDocVersion Source #
ExternalDocVersion
is a convenience wrapper if your code uses its
own version numbers instead of ones from ES.
data VersionControl Source #
VersionControl
is specified when indexing documents as a
optimistic concurrency control.
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. |
newtype DocumentParent Source #
DocumentParent
is used to specify a parent document.
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
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.
data NodeSelection Source #
NodeSelection
is used for most cluster APIs. See here for more details.
LocalNode | Whatever node receives this request |
NodeList (NonEmpty NodeSelector) | |
AllNodes |
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.
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. |
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.
newtype EsUsername Source #
Username type used for HTTP Basic authentication. See basicAuthHook
.
newtype EsPassword Source #
Password type used for HTTP Basic authentication. See basicAuthHook
.
data SnapshotRepoSelection Source #
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
newtype SnapshotRepoName Source #
The unique name of a snapshot repository.
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
class SnapshotRepo r where Source #
Law: fromGSnapshotRepo (toGSnapshotRepo r) == Right r
data SnapshotRepoConversionError Source #
RepoTypeMismatch SnapshotRepoType SnapshotRepoType | Expected type and actual type |
OtherRepoConversionError Text |
newtype SnapshotRepoType Source #
newtype GenericSnapshotRepoSettings Source #
Opaque representation of snapshot repo settings. Instances of
SnapshotRepo
will produce this.
newtype SnapshotVerification Source #
The result of running verifySnapshotRepo
.
data SnapshotNodeVerification Source #
A node that has verified a snapshot
newtype ClusterName Source #
data NodesStats Source #
data NodeHTTPStats Source #
data NodeDataPathStats Source #
data NodeFSTotalStats Source #
data NodeThreadPoolsStats Source #
data NodeJVMStats Source #
data JVMGCStats Source #
data NodeOSStats Source #
LoadAvgs | |
|
data NodeIndicesStats Source #
NodeInfo | |
|
data NodePluginInfo Source #
NodePluginInfo | |
|
data NodeHTTPInfo Source #
data BoundTransportAddress Source #
newtype MacAddress Source #
newtype NetworkInterfaceName Source #
data NodeThreadPoolsInfo Source #
data ThreadPoolSize Source #
data ThreadPoolType Source #
data NodeJVMInfo Source #
NodeJVMInfo | |
|
newtype JVMVersion Source #
Handles quirks in the way JVM versions are rendered (1.7.0_101 -> 1.7.0.101)
newtype JVMMemoryPool Source #
newtype JVMGCCollector Source #
data NodeOSInfo Source #
CPUInfo | |
|
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.
newtype PluginName Source #
data ShardResult Source #
ShardResult | |
|
data SnapshotState Source #
data SnapshotRestoreSettings Source #
SnapshotRestoreSettings | |
|
newtype RestoreRenamePattern Source #
Regex-stype pattern, e.g. "index_(.+)" to match index names
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.
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 |
newtype RRGroupRefNum Source #
A group number for regex matching. Only values from 1-9 are
supported. Construct with mkRRGroupRefNum
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.
data SnapshotRepoUpdateSettings Source #
SnapshotRepoUpdateSettings | |
|
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
FsSnapshotRepo | |
|
data SnapshotCreateSettings Source #
SnapshotCreateSettings | |
|
defaultSnapshotCreateSettings :: SnapshotCreateSettings Source #
Reasonable defaults for snapshot creation
- snapWaitForCompletion False
- snapIndices Nothing
- snapIgnoreUnavailable False
- snapIncludeGlobalState True
- snapPartial False
data SnapshotSelection Source #
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
data SnapshotInfo Source #
General information about the state of a snapshot. Has some
redundancies with SnapshotStatus
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 #
data PatternOrPatterns Source #