bloodhound-0.11.1.0: ElasticSearch client library for Haskell

Copyright(C) 2014 2015 2016 Chris Allen
LicenseBSD-style (see the file LICENSE)
MaintainerChris Allen <cma@bitemyapp.com
Stabilityprovisional
PortabilityDeriveGeneric, RecordWildCards
Safe HaskellNone
LanguageHaskell2010

Database.Bloodhound.Types

Description

Data types for describing actions and data structures performed to interact with Elasticsearch. The two main buckets your queries against Elasticsearch will fall into are Querys and Filters. Filters are more like traditional database constraints and often have preferable performance properties. Querys support human-written textual queries, such as fuzzy queries.

Synopsis

Documentation

defaultIndexDocumentSettings :: IndexDocumentSettings Source #

Reasonable default settings. Chooses no version control and no parent.

mkSort :: FieldName -> SortOrder -> DefaultSort Source #

mkSort defaults everything but the FieldName and the SortOrder so that you can concisely describe the usual kind of SortSpecs you want.

showText :: Show a => a -> Text Source #

unpackId :: DocId -> Text Source #

unpackId is a silly convenience function that gets used once.

mkMatchQuery :: FieldName -> QueryString -> MatchQuery Source #

mkMatchQuery is a convenience function that defaults the less common parameters, enabling you to provide only the FieldName and QueryString to make a MatchQuery

mkMultiMatchQuery :: [FieldName] -> QueryString -> MultiMatchQuery Source #

mkMultiMatchQuery is a convenience function that defaults the less common parameters, enabling you to provide only the list of FieldNames and QueryString to make a MultiMatchQuery.

mkDocVersion :: Int -> Maybe DocVersion Source #

Smart constructor for in-range doc version

newtype BH m a Source #

Constructors

BH 

Fields

Instances

MonadTrans BH Source # 

Methods

lift :: Monad m => m a -> BH m a #

MonadError e m => MonadError e (BH m) Source # 

Methods

throwError :: e -> BH m a #

catchError :: BH m a -> (e -> BH m a) -> BH m a #

MonadReader r m => MonadReader r (BH m) Source # 

Methods

ask :: BH m r #

local :: (r -> r) -> BH m a -> BH m a #

reader :: (r -> a) -> BH m a #

MonadState s m => MonadState s (BH m) Source # 

Methods

get :: BH m s #

put :: s -> BH m () #

state :: (s -> (a, s)) -> BH m a #

MonadWriter w m => MonadWriter w (BH m) Source # 

Methods

writer :: (a, w) -> BH m a #

tell :: w -> BH m () #

listen :: BH m a -> BH m (a, w) #

pass :: BH m (a, w -> w) -> BH m a #

Monad m => Monad (BH m) Source # 

Methods

(>>=) :: BH m a -> (a -> BH m b) -> BH m b #

(>>) :: BH m a -> BH m b -> BH m b #

return :: a -> BH m a #

fail :: String -> BH m a #

Functor m => Functor (BH m) Source # 

Methods

fmap :: (a -> b) -> BH m a -> BH m b #

(<$) :: a -> BH m b -> BH m a #

MonadFix m => MonadFix (BH m) Source # 

Methods

mfix :: (a -> BH m a) -> BH m a #

Applicative m => Applicative (BH m) Source # 

Methods

pure :: a -> BH m a #

(<*>) :: BH m (a -> b) -> BH m a -> BH m b #

(*>) :: BH m a -> BH m b -> BH m b #

(<*) :: BH m a -> BH m b -> BH m a #

Alternative m => Alternative (BH m) Source # 

Methods

empty :: BH m a #

(<|>) :: BH m a -> BH m a -> BH m a #

some :: BH m a -> BH m [a] #

many :: BH m a -> BH m [a] #

MonadPlus m => MonadPlus (BH m) Source # 

Methods

mzero :: BH m a #

mplus :: BH m a -> BH m a -> BH m a #

MonadIO m => MonadIO (BH m) Source # 

Methods

liftIO :: IO a -> BH m a #

MonadThrow m => MonadThrow (BH m) Source # 

Methods

throwM :: Exception e => e -> BH m a #

MonadCatch m => MonadCatch (BH m) Source # 

Methods

catch :: Exception e => BH m a -> (e -> BH m a) -> BH m a #

MonadMask m => MonadMask (BH m) Source # 

Methods

mask :: ((forall a. BH m a -> BH m a) -> BH m b) -> BH m b #

uninterruptibleMask :: ((forall a. BH m a -> BH m a) -> BH m b) -> BH m b #

(Functor m, Applicative m, MonadIO m) => MonadBH (BH m) Source # 

Methods

getBHEnv :: BH m BHEnv Source #

runBH :: BHEnv -> BH m a -> m a Source #

data BHEnv Source #

Common environment for Elasticsearch calls. Connections will be pipelined according to the provided HTTP connection manager.

bhRequestHook :: BHEnv -> Request -> IO Request Source #

Low-level hook that is run before every request is sent. Used to implement custom authentication strategies. Defaults to return with mkBHEnv.

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 }

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

getBHEnv

Methods

getBHEnv :: m BHEnv Source #

data Version Source #

Version is embedded in Status

data Status Source #

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.

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-status.html#indices-status

Constructors

Status 

Fields

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

data UpdatableIndexSetting Source #

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 

Instances

Eq UpdatableIndexSetting Source # 
Show UpdatableIndexSetting Source # 
Generic UpdatableIndexSetting Source # 
ToJSON UpdatableIndexSetting Source # 
FromJSON UpdatableIndexSetting Source # 
type Rep UpdatableIndexSetting Source # 
type Rep UpdatableIndexSetting = D1 (MetaData "UpdatableIndexSetting" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "NumberOfReplicas" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ReplicaCount))) ((:+:) (C1 (MetaCons "AutoExpandReplicas" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ReplicaBounds))) (C1 (MetaCons "BlocksReadOnly" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool))))) ((:+:) ((:+:) (C1 (MetaCons "BlocksRead" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool))) (C1 (MetaCons "BlocksWrite" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)))) ((:+:) (C1 (MetaCons "BlocksMetaData" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool))) (C1 (MetaCons "RefreshInterval" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 NominalDiffTime)))))) ((:+:) ((:+:) (C1 (MetaCons "IndexConcurrency" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))) ((:+:) (C1 (MetaCons "FailOnMergeFailure" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool))) (C1 (MetaCons "TranslogFlushThresholdOps" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))))) ((:+:) ((:+:) (C1 (MetaCons "TranslogFlushThresholdSize" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bytes))) (C1 (MetaCons "TranslogFlushThresholdPeriod" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 NominalDiffTime)))) ((:+:) (C1 (MetaCons "TranslogDisableFlush" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool))) (C1 (MetaCons "CacheFilterMaxSize" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Bytes)))))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "CacheFilterExpire" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe NominalDiffTime)))) ((:+:) (C1 (MetaCons "GatewaySnapshotInterval" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 NominalDiffTime))) (C1 (MetaCons "RoutingAllocationInclude" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (NonEmpty NodeAttrFilter)))))) ((:+:) ((:+:) (C1 (MetaCons "RoutingAllocationExclude" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (NonEmpty NodeAttrFilter)))) (C1 (MetaCons "RoutingAllocationRequire" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (NonEmpty NodeAttrFilter))))) ((:+:) (C1 (MetaCons "RoutingAllocationEnable" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 AllocationPolicy))) (C1 (MetaCons "RoutingAllocationShardsPerNode" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ShardCount)))))) ((:+:) ((:+:) (C1 (MetaCons "RecoveryInitialShards" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 InitialShardCount))) ((:+:) (C1 (MetaCons "GCDeletes" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 NominalDiffTime))) (C1 (MetaCons "TTLDisablePurge" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool))))) ((:+:) ((:+:) (C1 (MetaCons "TranslogFSType" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FSType))) (C1 (MetaCons "IndexCompoundFormat" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 CompoundFormat)))) ((:+:) (C1 (MetaCons "IndexCompoundOnFlush" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool))) (C1 (MetaCons "WarmerEnabled" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool))))))))

data IndexSettingsSummary Source #

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 #

newtype Bytes Source #

Constructors

Bytes Int 

Instances

Eq Bytes Source # 

Methods

(==) :: Bytes -> Bytes -> Bool #

(/=) :: Bytes -> Bytes -> Bool #

Ord Bytes Source # 

Methods

compare :: Bytes -> Bytes -> Ordering #

(<) :: Bytes -> Bytes -> Bool #

(<=) :: Bytes -> Bytes -> Bool #

(>) :: Bytes -> Bytes -> Bool #

(>=) :: Bytes -> Bytes -> Bool #

max :: Bytes -> Bytes -> Bytes #

min :: Bytes -> Bytes -> Bytes #

Read Bytes Source # 
Show Bytes Source # 

Methods

showsPrec :: Int -> Bytes -> ShowS #

show :: Bytes -> String #

showList :: [Bytes] -> ShowS #

Generic Bytes Source # 

Associated Types

type Rep Bytes :: * -> * #

Methods

from :: Bytes -> Rep Bytes x #

to :: Rep Bytes x -> Bytes #

ToJSON Bytes Source # 
FromJSON Bytes Source # 
type Rep Bytes Source # 
type Rep Bytes = D1 (MetaData "Bytes" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" True) (C1 (MetaCons "Bytes" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))

data FSType Source #

Constructors

FSSimple 
FSBuffered 

Instances

Eq FSType Source # 

Methods

(==) :: FSType -> FSType -> Bool #

(/=) :: FSType -> FSType -> Bool #

Ord FSType Source # 
Read FSType Source # 
Show FSType Source # 
Generic FSType Source # 

Associated Types

type Rep FSType :: * -> * #

Methods

from :: FSType -> Rep FSType x #

to :: Rep FSType x -> FSType #

ToJSON FSType Source # 
FromJSON FSType Source # 
type Rep FSType Source # 
type Rep FSType = D1 (MetaData "FSType" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) ((:+:) (C1 (MetaCons "FSSimple" PrefixI False) U1) (C1 (MetaCons "FSBuffered" PrefixI False) U1))

data InitialShardCount Source #

Instances

Eq InitialShardCount Source # 
Read InitialShardCount Source # 
Show InitialShardCount Source # 
Generic InitialShardCount Source # 
ToJSON InitialShardCount Source # 
FromJSON InitialShardCount Source # 
type Rep InitialShardCount Source # 
type Rep InitialShardCount = D1 (MetaData "InitialShardCount" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) ((:+:) ((:+:) (C1 (MetaCons "QuorumShards" PrefixI False) U1) (C1 (MetaCons "QuorumMinus1Shards" PrefixI False) U1)) ((:+:) (C1 (MetaCons "FullShards" PrefixI False) U1) ((:+:) (C1 (MetaCons "FullMinus1Shards" PrefixI False) U1) (C1 (MetaCons "ExplicitShards" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))))))

data NodeAttrFilter Source #

Instances

Eq NodeAttrFilter Source # 
Ord NodeAttrFilter Source # 
Read NodeAttrFilter Source # 
Show NodeAttrFilter Source # 
Generic NodeAttrFilter Source # 

Associated Types

type Rep NodeAttrFilter :: * -> * #

type Rep NodeAttrFilter Source # 
type Rep NodeAttrFilter = D1 (MetaData "NodeAttrFilter" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) (C1 (MetaCons "NodeAttrFilter" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "nodeAttrFilterName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 NodeAttrName)) (S1 (MetaSel (Just Symbol "nodeAttrFilterValues") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (NonEmpty Text)))))

data CompoundFormat Source #

Constructors

CompoundFileFormat Bool 
MergeSegmentVsTotalIndex Double

percentage between 0 and 1 where 0 is false, 1 is true

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

newtype Server Source #

Server is used with the client functions to point at the ES instance

Constructors

Server Text 

Instances

Eq Server Source # 

Methods

(==) :: Server -> Server -> Bool #

(/=) :: Server -> Server -> Bool #

Show Server Source # 
Generic Server Source # 

Associated Types

type Rep Server :: * -> * #

Methods

from :: Server -> Rep Server x #

to :: Rep Server x -> Server #

type Rep Server Source # 
type Rep Server = D1 (MetaData "Server" "Database.Bloodhound.Types.Internal" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" True) (C1 (MetaCons "Server" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))

type Reply = Response ByteString Source #

Reply and Method are type synonyms from Method

data EsResult a Source #

EsResult describes the standard wrapper JSON document that you see in successful Elasticsearch lookups or lookups that couldn't find the document.

Constructors

EsResult 

Instances

Eq a => Eq (EsResult a) Source # 

Methods

(==) :: EsResult a -> EsResult a -> Bool #

(/=) :: EsResult a -> EsResult a -> Bool #

Read a => Read (EsResult a) Source # 
Show a => Show (EsResult a) Source # 

Methods

showsPrec :: Int -> EsResult a -> ShowS #

show :: EsResult a -> String #

showList :: [EsResult a] -> ShowS #

Generic (EsResult a) Source # 

Associated Types

type Rep (EsResult a) :: * -> * #

Methods

from :: EsResult a -> Rep (EsResult a) x #

to :: Rep (EsResult a) x -> EsResult a #

FromJSON a => FromJSON (EsResult a) Source # 

Methods

parseJSON :: Value -> Parser (EsResult a) #

type Rep (EsResult a) Source # 

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 # 
Read a => Read (EsResultFound a) Source # 
Show a => Show (EsResultFound a) Source # 
Generic (EsResultFound a) Source # 

Associated Types

type Rep (EsResultFound a) :: * -> * #

FromJSON a => FromJSON (EsResultFound a) Source # 
type Rep (EsResultFound a) Source # 
type Rep (EsResultFound a) = D1 (MetaData "EsResultFound" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) (C1 (MetaCons "EsResultFound" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_version") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 DocVersion)) (S1 (MetaSel (Just Symbol "_source") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))))

data EsError 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 

Instances

Eq EsError Source # 

Methods

(==) :: EsError -> EsError -> Bool #

(/=) :: EsError -> EsError -> Bool #

Read EsError Source # 
Show EsError Source # 
Generic EsError Source # 

Associated Types

type Rep EsError :: * -> * #

Methods

from :: EsError -> Rep EsError x #

to :: Rep EsError x -> EsError #

FromJSON EsError Source # 
type Rep EsError Source # 
type Rep EsError = D1 (MetaData "EsError" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) (C1 (MetaCons "EsError" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "errorStatus") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) (S1 (MetaSel (Just Symbol "errorMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))))

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.

data IndexAliasAction Source #

data IndexAliasCreate Source #

data AliasRouting Source #

data DocVersion Source #

DocVersion is an integer version number for a document between 1 and 9.2e+18 used for .

Instances

Bounded DocVersion Source # 
Enum DocVersion Source # 
Eq DocVersion Source # 
Ord DocVersion Source # 
Read DocVersion Source # 
Show DocVersion Source # 
Generic DocVersion Source # 

Associated Types

type Rep DocVersion :: * -> * #

ToJSON DocVersion Source # 
FromJSON DocVersion Source # 
type Rep DocVersion Source # 
type Rep DocVersion = D1 (MetaData "DocVersion" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" True) (C1 (MetaCons "DocVersion" PrefixI True) (S1 (MetaSel (Just Symbol "docVersionNumber") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))

newtype ExternalDocVersion Source #

ExternalDocVersion is a convenience wrapper if your code uses its own version numbers instead of ones from ES.

Instances

Bounded ExternalDocVersion Source # 
Enum ExternalDocVersion Source # 
Eq ExternalDocVersion Source # 
Ord ExternalDocVersion Source # 
Read ExternalDocVersion Source # 
Show ExternalDocVersion Source # 
Generic ExternalDocVersion Source # 
ToJSON ExternalDocVersion Source # 
type Rep ExternalDocVersion Source # 
type Rep ExternalDocVersion = D1 (MetaData "ExternalDocVersion" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" True) (C1 (MetaCons "ExternalDocVersion" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 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

Eq VersionControl Source # 
Ord VersionControl Source # 
Read VersionControl Source # 
Show VersionControl Source # 
Generic VersionControl Source # 

Associated Types

type Rep VersionControl :: * -> * #

type Rep VersionControl Source # 

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

data Query Source #

Instances

Eq Query Source # 

Methods

(==) :: Query -> Query -> Bool #

(/=) :: Query -> Query -> Bool #

Read Query Source # 
Show Query Source # 

Methods

showsPrec :: Int -> Query -> ShowS #

show :: Query -> String #

showList :: [Query] -> ShowS #

Generic Query Source # 

Associated Types

type Rep Query :: * -> * #

Methods

from :: Query -> Rep Query x #

to :: Rep Query x -> Query #

ToJSON Query Source # 
FromJSON Query Source # 
type Rep Query Source # 
type Rep Query = D1 (MetaData "Query" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "TermQuery" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Term)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Boost))))) ((:+:) (C1 (MetaCons "TermsQuery" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (NonEmpty Text))))) (C1 (MetaCons "QueryMatchQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 MatchQuery))))) ((:+:) (C1 (MetaCons "QueryMultiMatchQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 MultiMatchQuery))) ((:+:) (C1 (MetaCons "QueryBoolQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 BoolQuery))) (C1 (MetaCons "QueryBoostingQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 BoostingQuery)))))) ((:+:) ((:+:) (C1 (MetaCons "QueryCommonTermsQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 CommonTermsQuery))) ((:+:) (C1 (MetaCons "ConstantScoreFilter" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Filter)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Boost)))) (C1 (MetaCons "ConstantScoreQuery" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Query)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Boost)))))) ((:+:) ((:+:) (C1 (MetaCons "QueryDisMaxQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 DisMaxQuery))) (C1 (MetaCons "QueryFilteredQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilteredQuery)))) ((:+:) (C1 (MetaCons "QueryFuzzyLikeThisQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FuzzyLikeThisQuery))) (C1 (MetaCons "QueryFuzzyLikeFieldQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FuzzyLikeFieldQuery))))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "QueryFuzzyQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FuzzyQuery))) ((:+:) (C1 (MetaCons "QueryHasChildQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 HasChildQuery))) (C1 (MetaCons "QueryHasParentQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 HasParentQuery))))) ((:+:) ((:+:) (C1 (MetaCons "IdsQuery" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 MappingName)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [DocId])))) (C1 (MetaCons "QueryIndicesQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IndicesQuery)))) ((:+:) (C1 (MetaCons "MatchAllQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Boost)))) (C1 (MetaCons "QueryMoreLikeThisQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 MoreLikeThisQuery)))))) ((:+:) ((:+:) (C1 (MetaCons "QueryMoreLikeThisFieldQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 MoreLikeThisFieldQuery))) ((:+:) (C1 (MetaCons "QueryNestedQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 NestedQuery))) (C1 (MetaCons "QueryPrefixQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PrefixQuery))))) ((:+:) ((:+:) (C1 (MetaCons "QueryQueryStringQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 QueryStringQuery))) (C1 (MetaCons "QuerySimpleQueryStringQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SimpleQueryStringQuery)))) ((:+:) (C1 (MetaCons "QueryRangeQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 RangeQuery))) (C1 (MetaCons "QueryRegexpQuery" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 RegexpQuery))))))))

data Search Source #

Instances

Eq Search Source # 

Methods

(==) :: Search -> Search -> Bool #

(/=) :: Search -> Search -> Bool #

Read Search Source # 
Show Search Source # 
Generic Search Source # 

Associated Types

type Rep Search :: * -> * #

Methods

from :: Search -> Rep Search x #

to :: Rep Search x -> Search #

ToJSON Search Source # 
type Rep Search Source # 

data SearchType Source #

Instances

Eq SearchType Source # 
Read SearchType Source # 
Show SearchType Source # 
Generic SearchType Source # 

Associated Types

type Rep SearchType :: * -> * #

type Rep SearchType Source # 
type Rep SearchType = D1 (MetaData "SearchType" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) ((:+:) ((:+:) (C1 (MetaCons "SearchTypeQueryThenFetch" PrefixI False) U1) ((:+:) (C1 (MetaCons "SearchTypeDfsQueryThenFetch" PrefixI False) U1) (C1 (MetaCons "SearchTypeCount" PrefixI False) U1))) ((:+:) (C1 (MetaCons "SearchTypeScan" PrefixI False) U1) ((:+:) (C1 (MetaCons "SearchTypeQueryAndFetch" PrefixI False) U1) (C1 (MetaCons "SearchTypeDfsQueryAndFetch" PrefixI False) U1))))

data SearchResult a Source #

Instances

Eq a => Eq (SearchResult a) Source # 
Read a => Read (SearchResult a) Source # 
Show a => Show (SearchResult a) Source # 
Generic (SearchResult a) Source # 

Associated Types

type Rep (SearchResult a) :: * -> * #

Methods

from :: SearchResult a -> Rep (SearchResult a) x #

to :: Rep (SearchResult a) x -> SearchResult a #

FromJSON a => FromJSON (SearchResult a) Source # 
type Rep (SearchResult a) Source # 

data SearchHits a Source #

Constructors

SearchHits 

Fields

Instances

Eq a => Eq (SearchHits a) Source # 

Methods

(==) :: SearchHits a -> SearchHits a -> Bool #

(/=) :: SearchHits a -> SearchHits a -> Bool #

Read a => Read (SearchHits a) Source # 
Show a => Show (SearchHits a) Source # 
Generic (SearchHits a) Source # 

Associated Types

type Rep (SearchHits a) :: * -> * #

Methods

from :: SearchHits a -> Rep (SearchHits a) x #

to :: Rep (SearchHits a) x -> SearchHits a #

Monoid (SearchHits a) Source # 
FromJSON a => FromJSON (SearchHits a) Source # 

Methods

parseJSON :: Value -> Parser (SearchHits a) #

type Rep (SearchHits a) Source # 
type Rep (SearchHits a) = D1 (MetaData "SearchHits" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) (C1 (MetaCons "SearchHits" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "hitsTotal") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) ((:*:) (S1 (MetaSel (Just Symbol "maxScore") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Score)) (S1 (MetaSel (Just Symbol "hits") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Hit a])))))

newtype From Source #

Constructors

From Int 

Instances

Eq From Source # 

Methods

(==) :: From -> From -> Bool #

(/=) :: From -> From -> Bool #

Read From Source # 
Show From Source # 

Methods

showsPrec :: Int -> From -> ShowS #

show :: From -> String #

showList :: [From] -> ShowS #

Generic From Source # 

Associated Types

type Rep From :: * -> * #

Methods

from :: From -> Rep From x #

to :: Rep From x -> From #

ToJSON From Source # 
type Rep From Source # 
type Rep From = D1 (MetaData "From" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" True) (C1 (MetaCons "From" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))

newtype Size Source #

Constructors

Size Int 

Instances

Eq Size Source # 

Methods

(==) :: Size -> Size -> Bool #

(/=) :: Size -> Size -> Bool #

Read Size Source # 
Show Size Source # 

Methods

showsPrec :: Int -> Size -> ShowS #

show :: Size -> String #

showList :: [Size] -> ShowS #

Generic Size Source # 

Associated Types

type Rep Size :: * -> * #

Methods

from :: Size -> Rep Size x #

to :: Rep Size x -> Size #

ToJSON Size Source # 
type Rep Size Source # 
type Rep Size = D1 (MetaData "Size" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" True) (C1 (MetaCons "Size" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))

data Include Source #

Constructors

Include [Pattern] 

Instances

Eq Include Source # 

Methods

(==) :: Include -> Include -> Bool #

(/=) :: Include -> Include -> Bool #

Read Include Source # 
Show Include Source # 
Generic Include Source # 

Associated Types

type Rep Include :: * -> * #

Methods

from :: Include -> Rep Include x #

to :: Rep Include x -> Include #

ToJSON Include Source # 
type Rep Include Source # 
type Rep Include = D1 (MetaData "Include" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) (C1 (MetaCons "Include" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Pattern])))

data Exclude Source #

Constructors

Exclude [Pattern] 

Instances

Eq Exclude Source # 

Methods

(==) :: Exclude -> Exclude -> Bool #

(/=) :: Exclude -> Exclude -> Bool #

Read Exclude Source # 
Show Exclude Source # 
Generic Exclude Source # 

Associated Types

type Rep Exclude :: * -> * #

Methods

from :: Exclude -> Rep Exclude x #

to :: Rep Exclude x -> Exclude #

ToJSON Exclude Source # 
type Rep Exclude Source # 
type Rep Exclude = D1 (MetaData "Exclude" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) (C1 (MetaCons "Exclude" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Pattern])))

newtype Pattern Source #

Constructors

Pattern Text 

Instances

Eq Pattern Source # 

Methods

(==) :: Pattern -> Pattern -> Bool #

(/=) :: Pattern -> Pattern -> Bool #

Read Pattern Source # 
Show Pattern Source # 
Generic Pattern Source # 

Associated Types

type Rep Pattern :: * -> * #

Methods

from :: Pattern -> Rep Pattern x #

to :: Rep Pattern x -> Pattern #

ToJSON Pattern Source # 
type Rep Pattern Source # 
type Rep Pattern = D1 (MetaData "Pattern" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" True) (C1 (MetaCons "Pattern" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))

data Hit a Source #

Instances

Eq a => Eq (Hit a) Source # 

Methods

(==) :: Hit a -> Hit a -> Bool #

(/=) :: Hit a -> Hit a -> Bool #

Read a => Read (Hit a) Source # 
Show a => Show (Hit a) Source # 

Methods

showsPrec :: Int -> Hit a -> ShowS #

show :: Hit a -> String #

showList :: [Hit a] -> ShowS #

Generic (Hit a) Source # 

Associated Types

type Rep (Hit a) :: * -> * #

Methods

from :: Hit a -> Rep (Hit a) x #

to :: Rep (Hit a) x -> Hit a #

FromJSON a => FromJSON (Hit a) Source # 

Methods

parseJSON :: Value -> Parser (Hit a) #

type Rep (Hit a) Source # 

data Filter Source #

class Monoid a => Seminearring a where Source #

Minimal complete definition

(<||>)

Methods

(<||>) :: a -> a -> a infixr 5 Source #

(<&&>) :: a -> a -> a infixr 5 Source #

data BoolMatch Source #

Instances

Eq BoolMatch Source # 
Read BoolMatch Source # 
Show BoolMatch Source # 
Generic BoolMatch Source # 

Associated Types

type Rep BoolMatch :: * -> * #

ToJSON BoolMatch Source # 
FromJSON BoolMatch Source # 
type Rep BoolMatch Source # 

data Term Source #

Constructors

Term 

Fields

Instances

Eq Term Source # 

Methods

(==) :: Term -> Term -> Bool #

(/=) :: Term -> Term -> Bool #

Read Term Source # 
Show Term Source # 

Methods

showsPrec :: Int -> Term -> ShowS #

show :: Term -> String #

showList :: [Term] -> ShowS #

Generic Term Source # 

Associated Types

type Rep Term :: * -> * #

Methods

from :: Term -> Rep Term x #

to :: Rep Term x -> Term #

ToJSON Term Source # 
FromJSON Term Source # 

Methods

parseJSON :: Value -> Parser Term #

type Rep Term Source # 
type Rep Term = D1 (MetaData "Term" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) (C1 (MetaCons "Term" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "termField") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)) (S1 (MetaSel (Just Symbol "termValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))))

data GeoBoundingBoxConstraint Source #

Instances

Eq GeoBoundingBoxConstraint Source # 
Read GeoBoundingBoxConstraint Source # 
Show GeoBoundingBoxConstraint Source # 
Generic GeoBoundingBoxConstraint Source # 
ToJSON GeoBoundingBoxConstraint Source # 
FromJSON GeoBoundingBoxConstraint Source # 
type Rep GeoBoundingBoxConstraint Source # 
type Rep GeoBoundingBoxConstraint = D1 (MetaData "GeoBoundingBoxConstraint" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) (C1 (MetaCons "GeoBoundingBoxConstraint" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "geoBBField") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FieldName)) (S1 (MetaSel (Just Symbol "constraintBox") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 GeoBoundingBox))) ((:*:) (S1 (MetaSel (Just Symbol "bbConstraintcache") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Cache)) (S1 (MetaSel (Just Symbol "geoType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 GeoFilterType)))))

data DistanceUnit Source #

data LatLon Source #

Constructors

LatLon 

Fields

Instances

data RangeValue Source #

Instances

Eq RangeValue Source # 
Read RangeValue Source # 
Show RangeValue Source # 
Generic RangeValue Source # 

Associated Types

type Rep RangeValue :: * -> * #

FromJSON RangeValue Source # 
type Rep RangeValue Source # 
type Rep RangeValue = D1 (MetaData "RangeValue" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "RangeDateLte" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 LessThanEqD))) (C1 (MetaCons "RangeDateLt" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 LessThanD)))) ((:+:) (C1 (MetaCons "RangeDateGte" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 GreaterThanEqD))) (C1 (MetaCons "RangeDateGt" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 GreaterThanD))))) ((:+:) ((:+:) (C1 (MetaCons "RangeDateGtLt" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 GreaterThanD)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 LessThanD)))) (C1 (MetaCons "RangeDateGteLte" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 GreaterThanEqD)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 LessThanEqD))))) ((:+:) (C1 (MetaCons "RangeDateGteLt" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 GreaterThanEqD)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 LessThanD)))) (C1 (MetaCons "RangeDateGtLte" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 GreaterThanD)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 LessThanEqD))))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "RangeDoubleLte" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 LessThanEq))) (C1 (MetaCons "RangeDoubleLt" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 LessThan)))) ((:+:) (C1 (MetaCons "RangeDoubleGte" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 GreaterThanEq))) (C1 (MetaCons "RangeDoubleGt" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 GreaterThan))))) ((:+:) ((:+:) (C1 (MetaCons "RangeDoubleGtLt" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 GreaterThan)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 LessThan)))) (C1 (MetaCons "RangeDoubleGteLte" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 GreaterThanEq)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 LessThanEq))))) ((:+:) (C1 (MetaCons "RangeDoubleGteLt" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 GreaterThanEq)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 LessThan)))) (C1 (MetaCons "RangeDoubleGtLte" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 GreaterThan)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 LessThanEq))))))))

newtype LessThan Source #

Constructors

LessThan Double 

Instances

Eq LessThan Source # 
Read LessThan Source # 
Show LessThan Source # 
Generic LessThan Source # 

Associated Types

type Rep LessThan :: * -> * #

Methods

from :: LessThan -> Rep LessThan x #

to :: Rep LessThan x -> LessThan #

type Rep LessThan Source # 
type Rep LessThan = D1 (MetaData "LessThan" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" True) (C1 (MetaCons "LessThan" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Double)))

newtype LessThanD Source #

Constructors

LessThanD UTCTime 

Instances

newtype Regexp Source #

Constructors

Regexp Text 

Instances

Eq Regexp Source # 

Methods

(==) :: Regexp -> Regexp -> Bool #

(/=) :: Regexp -> Regexp -> Bool #

Read Regexp Source # 
Show Regexp Source # 
Generic Regexp Source # 

Associated Types

type Rep Regexp :: * -> * #

Methods

from :: Regexp -> Rep Regexp x #

to :: Rep Regexp x -> Regexp #

FromJSON Regexp Source # 
type Rep Regexp Source # 
type Rep Regexp = D1 (MetaData "Regexp" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" True) (C1 (MetaCons "Regexp" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))

data RegexpFlag Source #

Instances

Eq RegexpFlag Source # 
Read RegexpFlag Source # 
Show RegexpFlag Source # 
Generic RegexpFlag Source # 

Associated Types

type Rep RegexpFlag :: * -> * #

FromJSON RegexpFlag Source # 
type Rep RegexpFlag Source # 
type Rep RegexpFlag = D1 (MetaData "RegexpFlag" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) ((:+:) ((:+:) (C1 (MetaCons "AnyString" PrefixI False) U1) ((:+:) (C1 (MetaCons "Automaton" PrefixI False) U1) (C1 (MetaCons "Complement" PrefixI False) U1))) ((:+:) (C1 (MetaCons "Empty" PrefixI False) U1) ((:+:) (C1 (MetaCons "Intersection" PrefixI False) U1) (C1 (MetaCons "Interval" PrefixI False) U1))))

newtype FieldName Source #

FieldName is used all over the place wherever a specific field within a document needs to be specified, usually in Querys or Filters.

Constructors

FieldName Text 

newtype Script Source #

Script is often used in place of FieldName to specify more complex ways of extracting a value from a document.

Constructors

Script 

Fields

Instances

Eq Script Source # 

Methods

(==) :: Script -> Script -> Bool #

(/=) :: Script -> Script -> Bool #

Read Script Source # 
Show Script Source # 
Generic Script Source # 

Associated Types

type Rep Script :: * -> * #

Methods

from :: Script -> Rep Script x #

to :: Rep Script x -> Script #

type Rep Script Source # 
type Rep Script = D1 (MetaData "Script" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" True) (C1 (MetaCons "Script" PrefixI True) (S1 (MetaSel (Just Symbol "scriptText") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))

newtype IndexName Source #

IndexName is used to describe which index to querycreatedelete

Constructors

IndexName Text 

data IndexSelection Source #

IndexSelection is used for APIs which take a single index, a list of indexes, or the special _all index.

data IndexOptimizationSettings Source #

Constructors

IndexOptimizationSettings 

Fields

  • maxNumSegments :: Maybe Int

    Number of segments to optimize to. 1 will fully optimize the index. If omitted, the default behavior is to only optimize if the server deems it necessary.

  • onlyExpungeDeletes :: Bool

    Should the optimize process only expunge segments with deletes in them? If the purpose of the optimization is to free disk space, this should be set to True.

  • flushAfterOptimize :: Bool

    Should a flush be performed after the optimize.

defaultIndexOptimizationSettings :: IndexOptimizationSettings Source #

defaultIndexOptimizationSettings implements the default settings that ElasticSearch uses for index optimization. maxNumSegments is Nothing, onlyExpungeDeletes is False, and flushAfterOptimize is True.

newtype MappingName Source #

MappingName is part of mappings which are how ES describes and schematizes the data in the indices.

Constructors

MappingName Text 

newtype DocId Source #

DocId is a generic wrapper value for expressing unique Document IDs. Can be set by the user or created by ES itself. Often used in client functions for poking at specific documents.

Constructors

DocId Text 

Instances

Eq DocId Source # 

Methods

(==) :: DocId -> DocId -> Bool #

(/=) :: DocId -> DocId -> Bool #

Read DocId Source # 
Show DocId Source # 

Methods

showsPrec :: Int -> DocId -> ShowS #

show :: DocId -> String #

showList :: [DocId] -> ShowS #

Generic DocId Source # 

Associated Types

type Rep DocId :: * -> * #

Methods

from :: DocId -> Rep DocId x #

to :: Rep DocId x -> DocId #

ToJSON DocId Source # 
FromJSON DocId Source # 
type Rep DocId Source # 
type Rep DocId = D1 (MetaData "DocId" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" True) (C1 (MetaCons "DocId" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))

newtype CacheName Source #

CacheName is used in RegexpFilter for describing the CacheKey keyed caching behavior.

Constructors

CacheName Text 

newtype CacheKey Source #

CacheKey is used in RegexpFilter to key regex caching.

Constructors

CacheKey Text 

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

Instances

Eq BulkOperation Source # 
Read BulkOperation Source # 
Show BulkOperation Source # 
Generic BulkOperation Source # 

Associated Types

type Rep BulkOperation :: * -> * #

type Rep BulkOperation Source # 
type Rep BulkOperation = D1 (MetaData "BulkOperation" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) ((:+:) ((:+:) (C1 (MetaCons "BulkIndex" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IndexName)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 MappingName))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 DocId)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Value))))) (C1 (MetaCons "BulkCreate" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IndexName)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 MappingName))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 DocId)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Value)))))) ((:+:) (C1 (MetaCons "BulkDelete" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IndexName)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 MappingName)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 DocId))))) (C1 (MetaCons "BulkUpdate" PrefixI False) ((:*:) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IndexName)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 MappingName))) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 DocId)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Value)))))))

type Sort = [SortSpec] Source #

Sort is a synonym for a list of SortSpecs. Sort behavior is order dependent with later sorts acting as tie-breakers for earlier sorts.

data SortMode Source #

Constructors

SortMin 
SortMax 
SortSum 
SortAvg 

Instances

Eq SortMode Source # 
Read SortMode Source # 
Show SortMode Source # 
Generic SortMode Source # 

Associated Types

type Rep SortMode :: * -> * #

Methods

from :: SortMode -> Rep SortMode x #

to :: Rep SortMode x -> SortMode #

ToJSON SortMode Source # 
type Rep SortMode Source # 
type Rep SortMode = D1 (MetaData "SortMode" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) ((:+:) ((:+:) (C1 (MetaCons "SortMin" PrefixI False) U1) (C1 (MetaCons "SortMax" PrefixI False) U1)) ((:+:) (C1 (MetaCons "SortSum" PrefixI False) U1) (C1 (MetaCons "SortAvg" PrefixI False) U1)))

data SortOrder Source #

Constructors

Ascending 
Descending 

Instances

Eq SortOrder Source # 
Read SortOrder Source # 
Show SortOrder Source # 
Generic SortOrder Source # 

Associated Types

type Rep SortOrder :: * -> * #

ToJSON SortOrder Source # 
type Rep SortOrder Source # 
type Rep SortOrder = D1 (MetaData "SortOrder" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) ((:+:) (C1 (MetaCons "Ascending" PrefixI False) U1) (C1 (MetaCons "Descending" PrefixI False) U1))

data SortSpec Source #

The two main kinds of SortSpec are DefaultSortSpec and GeoDistanceSortSpec. The latter takes a SortOrder, GeoPoint, and DistanceUnit to express "nearness" to a single geographical point as a sort specification.

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-sort.html#search-request-sort

data DefaultSort Source #

DefaultSort is usually the kind of SortSpec you'll want. There's a mkSort convenience function for when you want to specify only the most common parameters.

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-sort.html#search-request-sort

Instances

Eq DefaultSort Source # 
Read DefaultSort Source # 
Show DefaultSort Source # 
Generic DefaultSort Source # 

Associated Types

type Rep DefaultSort :: * -> * #

type Rep DefaultSort Source # 

data Missing Source #

Missing prescribes how to handle missing fields. A missing field can be sorted last, first, or using a custom value as a substitute.

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-sort.html#_missing_values

Instances

Eq Missing Source # 

Methods

(==) :: Missing -> Missing -> Bool #

(/=) :: Missing -> Missing -> Bool #

Read Missing Source # 
Show Missing Source # 
Generic Missing Source # 

Associated Types

type Rep Missing :: * -> * #

Methods

from :: Missing -> Rep Missing x #

to :: Rep Missing x -> Missing #

ToJSON Missing Source # 
type Rep Missing Source # 
type Rep Missing = D1 (MetaData "Missing" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) ((:+:) (C1 (MetaCons "LastMissing" PrefixI False) U1) ((:+:) (C1 (MetaCons "FirstMissing" PrefixI False) U1) (C1 (MetaCons "CustomMissing" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))))

newtype Boost Source #

Constructors

Boost Double 

Instances

Eq Boost Source # 

Methods

(==) :: Boost -> Boost -> Bool #

(/=) :: Boost -> Boost -> Bool #

Read Boost Source # 
Show Boost Source # 

Methods

showsPrec :: Int -> Boost -> ShowS #

show :: Boost -> String #

showList :: [Boost] -> ShowS #

Generic Boost Source # 

Associated Types

type Rep Boost :: * -> * #

Methods

from :: Boost -> Rep Boost x #

to :: Rep Boost x -> Boost #

ToJSON Boost Source # 
FromJSON Boost Source # 
type Rep Boost Source # 
type Rep Boost = D1 (MetaData "Boost" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" True) (C1 (MetaCons "Boost" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Double)))

data MatchQuery Source #

Instances

Eq MatchQuery Source # 
Read MatchQuery Source # 
Show MatchQuery Source # 
Generic MatchQuery Source # 

Associated Types

type Rep MatchQuery :: * -> * #

ToJSON MatchQuery Source # 
FromJSON MatchQuery Source # 
type Rep MatchQuery Source # 
type Rep MatchQuery = D1 (MetaData "MatchQuery" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) (C1 (MetaCons "MatchQuery" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "matchQueryField") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FieldName)) (S1 (MetaSel (Just Symbol "matchQueryQueryString") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 QueryString))) ((:*:) (S1 (MetaSel (Just Symbol "matchQueryOperator") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 BooleanOperator)) ((:*:) (S1 (MetaSel (Just Symbol "matchQueryZeroTerms") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ZeroTermsQuery)) (S1 (MetaSel (Just Symbol "matchQueryCutoffFrequency") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe CutoffFrequency)))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "matchQueryMatchType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe MatchQueryType))) (S1 (MetaSel (Just Symbol "matchQueryAnalyzer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Analyzer)))) ((:*:) (S1 (MetaSel (Just Symbol "matchQueryMaxExpansions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe MaxExpansions))) ((:*:) (S1 (MetaSel (Just Symbol "matchQueryLenient") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Lenient))) (S1 (MetaSel (Just Symbol "matchQueryBoost") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Boost))))))))

data MultiMatchQuery Source #

Instances

Eq MultiMatchQuery Source # 
Read MultiMatchQuery Source # 
Show MultiMatchQuery Source # 
Generic MultiMatchQuery Source # 
ToJSON MultiMatchQuery Source # 
FromJSON MultiMatchQuery Source # 
type Rep MultiMatchQuery Source # 
type Rep MultiMatchQuery = D1 (MetaData "MultiMatchQuery" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) (C1 (MetaCons "MultiMatchQuery" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "multiMatchQueryFields") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [FieldName])) (S1 (MetaSel (Just Symbol "multiMatchQueryString") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 QueryString))) ((:*:) (S1 (MetaSel (Just Symbol "multiMatchQueryOperator") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 BooleanOperator)) ((:*:) (S1 (MetaSel (Just Symbol "multiMatchQueryZeroTerms") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ZeroTermsQuery)) (S1 (MetaSel (Just Symbol "multiMatchQueryTiebreaker") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Tiebreaker)))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "multiMatchQueryType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe MultiMatchQueryType))) (S1 (MetaSel (Just Symbol "multiMatchQueryCutoffFrequency") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe CutoffFrequency)))) ((:*:) (S1 (MetaSel (Just Symbol "multiMatchQueryAnalyzer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Analyzer))) ((:*:) (S1 (MetaSel (Just Symbol "multiMatchQueryMaxExpansions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe MaxExpansions))) (S1 (MetaSel (Just Symbol "multiMatchQueryLenient") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Lenient))))))))

data BoolQuery Source #

Instances

Eq BoolQuery Source # 
Read BoolQuery Source # 
Show BoolQuery Source # 
Generic BoolQuery Source # 

Associated Types

type Rep BoolQuery :: * -> * #

ToJSON BoolQuery Source # 
FromJSON BoolQuery Source # 
type Rep BoolQuery Source # 
type Rep BoolQuery = D1 (MetaData "BoolQuery" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) (C1 (MetaCons "BoolQuery" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "boolQueryMustMatch") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Query])) ((:*:) (S1 (MetaSel (Just Symbol "boolQueryMustNotMatch") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Query])) (S1 (MetaSel (Just Symbol "boolQueryShouldMatch") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Query])))) ((:*:) (S1 (MetaSel (Just Symbol "boolQueryMinimumShouldMatch") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe MinimumMatch))) ((:*:) (S1 (MetaSel (Just Symbol "boolQueryBoost") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Boost))) (S1 (MetaSel (Just Symbol "boolQueryDisableCoord") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe DisableCoord)))))))

data BoostingQuery Source #

data CommonTermsQuery Source #

Instances

Eq CommonTermsQuery Source # 
Read CommonTermsQuery Source # 
Show CommonTermsQuery Source # 
Generic CommonTermsQuery Source # 
ToJSON CommonTermsQuery Source # 
FromJSON CommonTermsQuery Source # 
type Rep CommonTermsQuery Source # 

data DisMaxQuery Source #

data FuzzyLikeThisQuery Source #

Instances

Eq FuzzyLikeThisQuery Source # 
Read FuzzyLikeThisQuery Source # 
Show FuzzyLikeThisQuery Source # 
Generic FuzzyLikeThisQuery Source # 
ToJSON FuzzyLikeThisQuery Source # 
FromJSON FuzzyLikeThisQuery Source # 
type Rep FuzzyLikeThisQuery Source # 

data FuzzyLikeFieldQuery Source #

Instances

Eq FuzzyLikeFieldQuery Source # 
Read FuzzyLikeFieldQuery Source # 
Show FuzzyLikeFieldQuery Source # 
Generic FuzzyLikeFieldQuery Source # 
ToJSON FuzzyLikeFieldQuery Source # 
FromJSON FuzzyLikeFieldQuery Source # 
type Rep FuzzyLikeFieldQuery Source # 
type Rep FuzzyLikeFieldQuery = D1 (MetaData "FuzzyLikeFieldQuery" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) (C1 (MetaCons "FuzzyLikeFieldQuery" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "fuzzyLikeField") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FieldName)) (S1 (MetaSel (Just Symbol "fuzzyLikeFieldText") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))) ((:*:) (S1 (MetaSel (Just Symbol "fuzzyLikeFieldMaxQueryTerms") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 MaxQueryTerms)) (S1 (MetaSel (Just Symbol "fuzzyLikeFieldIgnoreTermFrequency") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IgnoreTermFrequency)))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "fuzzyLikeFieldFuzziness") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Fuzziness)) (S1 (MetaSel (Just Symbol "fuzzyLikeFieldPrefixLength") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PrefixLength))) ((:*:) (S1 (MetaSel (Just Symbol "fuzzyLikeFieldBoost") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Boost)) (S1 (MetaSel (Just Symbol "fuzzyLikeFieldAnalyzer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Analyzer)))))))

data FuzzyQuery Source #

Instances

Eq FuzzyQuery Source # 
Read FuzzyQuery Source # 
Show FuzzyQuery Source # 
Generic FuzzyQuery Source # 

Associated Types

type Rep FuzzyQuery :: * -> * #

ToJSON FuzzyQuery Source # 
FromJSON FuzzyQuery Source # 
type Rep FuzzyQuery Source # 

data HasChildQuery Source #

data HasParentQuery Source #

data IndicesQuery Source #

data MoreLikeThisQuery Source #

Instances

Eq MoreLikeThisQuery Source # 
Read MoreLikeThisQuery Source # 
Show MoreLikeThisQuery Source # 
Generic MoreLikeThisQuery Source # 
ToJSON MoreLikeThisQuery Source # 
FromJSON MoreLikeThisQuery Source # 
type Rep MoreLikeThisQuery Source # 
type Rep MoreLikeThisQuery = D1 (MetaData "MoreLikeThisQuery" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) (C1 (MetaCons "MoreLikeThisQuery" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "moreLikeThisText") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)) ((:*:) (S1 (MetaSel (Just Symbol "moreLikeThisFields") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (NonEmpty FieldName)))) (S1 (MetaSel (Just Symbol "moreLikeThisPercentMatch") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe PercentMatch))))) ((:*:) (S1 (MetaSel (Just Symbol "moreLikeThisMinimumTermFreq") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe MinimumTermFrequency))) ((:*:) (S1 (MetaSel (Just Symbol "moreLikeThisMaxQueryTerms") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe MaxQueryTerms))) (S1 (MetaSel (Just Symbol "moreLikeThisStopWords") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (NonEmpty StopWord))))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "moreLikeThisMinDocFrequency") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe MinDocFrequency))) ((:*:) (S1 (MetaSel (Just Symbol "moreLikeThisMaxDocFrequency") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe MaxDocFrequency))) (S1 (MetaSel (Just Symbol "moreLikeThisMinWordLength") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe MinWordLength))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "moreLikeThisMaxWordLength") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe MaxWordLength))) (S1 (MetaSel (Just Symbol "moreLikeThisBoostTerms") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe BoostTerms)))) ((:*:) (S1 (MetaSel (Just Symbol "moreLikeThisBoost") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Boost))) (S1 (MetaSel (Just Symbol "moreLikeThisAnalyzer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Analyzer))))))))

data MoreLikeThisFieldQuery Source #

Instances

Eq MoreLikeThisFieldQuery Source # 
Read MoreLikeThisFieldQuery Source # 
Show MoreLikeThisFieldQuery Source # 
Generic MoreLikeThisFieldQuery Source # 
ToJSON MoreLikeThisFieldQuery Source # 
FromJSON MoreLikeThisFieldQuery Source # 
type Rep MoreLikeThisFieldQuery Source # 
type Rep MoreLikeThisFieldQuery = D1 (MetaData "MoreLikeThisFieldQuery" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) (C1 (MetaCons "MoreLikeThisFieldQuery" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "moreLikeThisFieldText") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)) ((:*:) (S1 (MetaSel (Just Symbol "moreLikeThisFieldFields") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FieldName)) (S1 (MetaSel (Just Symbol "moreLikeThisFieldPercentMatch") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe PercentMatch))))) ((:*:) (S1 (MetaSel (Just Symbol "moreLikeThisFieldMinimumTermFreq") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe MinimumTermFrequency))) ((:*:) (S1 (MetaSel (Just Symbol "moreLikeThisFieldMaxQueryTerms") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe MaxQueryTerms))) (S1 (MetaSel (Just Symbol "moreLikeThisFieldStopWords") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (NonEmpty StopWord))))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "moreLikeThisFieldMinDocFrequency") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe MinDocFrequency))) ((:*:) (S1 (MetaSel (Just Symbol "moreLikeThisFieldMaxDocFrequency") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe MaxDocFrequency))) (S1 (MetaSel (Just Symbol "moreLikeThisFieldMinWordLength") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe MinWordLength))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "moreLikeThisFieldMaxWordLength") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe MaxWordLength))) (S1 (MetaSel (Just Symbol "moreLikeThisFieldBoostTerms") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe BoostTerms)))) ((:*:) (S1 (MetaSel (Just Symbol "moreLikeThisFieldBoost") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Boost))) (S1 (MetaSel (Just Symbol "moreLikeThisFieldAnalyzer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Analyzer))))))))

data NestedQuery Source #

data PrefixQuery Source #

data QueryStringQuery Source #

Instances

Eq QueryStringQuery Source # 
Read QueryStringQuery Source # 
Show QueryStringQuery Source # 
Generic QueryStringQuery Source # 
ToJSON QueryStringQuery Source # 
FromJSON QueryStringQuery Source # 
type Rep QueryStringQuery Source # 
type Rep QueryStringQuery = D1 (MetaData "QueryStringQuery" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) (C1 (MetaCons "QueryStringQuery" PrefixI True) ((:*:) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "queryStringQuery") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 QueryString)) (S1 (MetaSel (Just Symbol "queryStringDefaultField") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe FieldName)))) ((:*:) (S1 (MetaSel (Just Symbol "queryStringOperator") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe BooleanOperator))) (S1 (MetaSel (Just Symbol "queryStringAnalyzer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Analyzer))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "queryStringAllowLeadingWildcard") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe AllowLeadingWildcard))) (S1 (MetaSel (Just Symbol "queryStringLowercaseExpanded") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe LowercaseExpanded)))) ((:*:) (S1 (MetaSel (Just Symbol "queryStringEnablePositionIncrements") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe EnablePositionIncrements))) (S1 (MetaSel (Just Symbol "queryStringFuzzyMaxExpansions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe MaxExpansions)))))) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "queryStringFuzziness") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Fuzziness))) (S1 (MetaSel (Just Symbol "queryStringFuzzyPrefixLength") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe PrefixLength)))) ((:*:) (S1 (MetaSel (Just Symbol "queryStringPhraseSlop") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe PhraseSlop))) (S1 (MetaSel (Just Symbol "queryStringBoost") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Boost))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "queryStringAnalyzeWildcard") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe AnalyzeWildcard))) (S1 (MetaSel (Just Symbol "queryStringGeneratePhraseQueries") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe GeneratePhraseQueries)))) ((:*:) (S1 (MetaSel (Just Symbol "queryStringMinimumShouldMatch") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe MinimumMatch))) ((:*:) (S1 (MetaSel (Just Symbol "queryStringLenient") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Lenient))) (S1 (MetaSel (Just Symbol "queryStringLocale") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Locale)))))))))

data SimpleQueryStringQuery Source #

Instances

Eq SimpleQueryStringQuery Source # 
Read SimpleQueryStringQuery Source # 
Show SimpleQueryStringQuery Source # 
Generic SimpleQueryStringQuery Source # 
ToJSON SimpleQueryStringQuery Source # 
FromJSON SimpleQueryStringQuery Source # 
type Rep SimpleQueryStringQuery Source # 
type Rep SimpleQueryStringQuery = D1 (MetaData "SimpleQueryStringQuery" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) (C1 (MetaCons "SimpleQueryStringQuery" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "simpleQueryStringQuery") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 QueryString)) ((:*:) (S1 (MetaSel (Just Symbol "simpleQueryStringField") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe FieldOrFields))) (S1 (MetaSel (Just Symbol "simpleQueryStringOperator") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe BooleanOperator))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "simpleQueryStringAnalyzer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Analyzer))) (S1 (MetaSel (Just Symbol "simpleQueryStringFlags") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (NonEmpty SimpleQueryFlag))))) ((:*:) (S1 (MetaSel (Just Symbol "simpleQueryStringLowercaseExpanded") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe LowercaseExpanded))) (S1 (MetaSel (Just Symbol "simpleQueryStringLocale") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Locale)))))))

data RegexpQuery Source #

Instances

newtype QueryString Source #

QueryString is used to wrap query text bodies, be they human written or not.

Constructors

QueryString Text 

newtype Lenient Source #

Lenient, if set to true, will cause format based failures to be ignored. I don't know what the bloody default is, Elasticsearch documentation didn't say what it was. Let me know if you figure it out.

Constructors

Lenient Bool 

Instances

data MultiMatchQueryType Source #

Instances

newtype MinimumMatch Source #

MinimumMatch controls how many should clauses in the bool query should match. Can be an absolute value (2) or a percentage (30%) or a combination of both.

Constructors

MinimumMatch Int 

data CommonMinimumMatch Source #

Instances

data ScoreType Source #

Instances

Eq ScoreType Source # 
Read ScoreType Source # 
Show ScoreType Source # 
Generic ScoreType Source # 

Associated Types

type Rep ScoreType :: * -> * #

ToJSON ScoreType Source # 
FromJSON ScoreType Source # 
type Rep ScoreType Source # 
type Rep ScoreType = D1 (MetaData "ScoreType" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) ((:+:) ((:+:) (C1 (MetaCons "ScoreTypeMax" PrefixI False) U1) (C1 (MetaCons "ScoreTypeSum" PrefixI False) U1)) ((:+:) (C1 (MetaCons "ScoreTypeAvg" PrefixI False) U1) (C1 (MetaCons "ScoreTypeNone" PrefixI False) U1)))

type Cache = Bool Source #

Cache is for telling ES whether it should cache a Filter not. Querys cannot be cached.

newtype PhraseSlop Source #

PhraseSlop sets the default slop for phrases, 0 means exact phrase matches. Default is 0.

Constructors

PhraseSlop Int 

data Mapping Source #

Support for type reification of Mappings is currently incomplete, for now the mapping API verbiage expects a ToJSONable 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 

Instances

Eq Mapping Source # 

Methods

(==) :: Mapping -> Mapping -> Bool #

(/=) :: Mapping -> Mapping -> Bool #

Read Mapping Source # 
Show Mapping Source # 
Generic Mapping Source # 

Associated Types

type Rep Mapping :: * -> * #

Methods

from :: Mapping -> Rep Mapping x #

to :: Rep Mapping x -> Mapping #

type Rep Mapping Source # 
type Rep Mapping = D1 (MetaData "Mapping" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) (C1 (MetaCons "Mapping" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "typeName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 TypeName)) (S1 (MetaSel (Just Symbol "mappingFields") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [MappingField]))))

newtype AllowLeadingWildcard Source #

Allowing a wildcard at the beginning of a word (eg "*ing") is particularly heavy, because all terms in the index need to be examined, just in case they match. Leading wildcards can be disabled by setting AllowLeadingWildcard to false.

newtype GeneratePhraseQueries Source #

GeneratePhraseQueries defaults to false.

newtype Locale Source #

Locale is used for string conversions - defaults to ROOT.

Constructors

Locale Text 

Instances

Eq Locale Source # 

Methods

(==) :: Locale -> Locale -> Bool #

(/=) :: Locale -> Locale -> Bool #

Read Locale Source # 
Show Locale Source # 
Generic Locale Source # 

Associated Types

type Rep Locale :: * -> * #

Methods

from :: Locale -> Rep Locale x #

to :: Rep Locale x -> Locale #

ToJSON Locale Source # 
FromJSON Locale Source # 
type Rep Locale Source # 
type Rep Locale = D1 (MetaData "Locale" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" True) (C1 (MetaCons "Locale" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))

newtype EnablePositionIncrements Source #

data SimpleQueryFlag Source #

Instances

Eq SimpleQueryFlag Source # 
Read SimpleQueryFlag Source # 
Show SimpleQueryFlag Source # 
Generic SimpleQueryFlag Source # 
ToJSON SimpleQueryFlag Source # 
FromJSON SimpleQueryFlag Source # 
type Rep SimpleQueryFlag Source # 
type Rep SimpleQueryFlag = D1 (MetaData "SimpleQueryFlag" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "SimpleQueryAll" PrefixI False) U1) ((:+:) (C1 (MetaCons "SimpleQueryNone" PrefixI False) U1) (C1 (MetaCons "SimpleQueryAnd" PrefixI False) U1))) ((:+:) (C1 (MetaCons "SimpleQueryOr" PrefixI False) U1) ((:+:) (C1 (MetaCons "SimpleQueryPrefix" PrefixI False) U1) (C1 (MetaCons "SimpleQueryPhrase" PrefixI False) U1)))) ((:+:) ((:+:) (C1 (MetaCons "SimpleQueryPrecedence" PrefixI False) U1) ((:+:) (C1 (MetaCons "SimpleQueryEscape" PrefixI False) U1) (C1 (MetaCons "SimpleQueryWhitespace" PrefixI False) U1))) ((:+:) (C1 (MetaCons "SimpleQueryFuzzy" PrefixI False) U1) ((:+:) (C1 (MetaCons "SimpleQueryNear" PrefixI False) U1) (C1 (MetaCons "SimpleQuerySlop" PrefixI False) U1)))))

class Monoid a where #

The class of monoids (types with an associative binary operation that has an identity). Instances should satisfy the following laws:

  • mappend mempty x = x
  • mappend x mempty = x
  • mappend x (mappend y z) = mappend (mappend x y) z
  • mconcat = foldr mappend mempty

The method names refer to the monoid of lists under concatenation, but there are many other instances.

Some types can be viewed as a monoid in more than one way, e.g. both addition and multiplication on numbers. In such cases we often define newtypes and make those instances of Monoid, e.g. Sum and Product.

Minimal complete definition

mempty, mappend

Methods

mempty :: a #

Identity of mappend

mappend :: a -> a -> a #

An associative operation

mconcat :: [a] -> a #

Fold a list using the monoid. For most types, the default definition for mconcat will be used, but the function is included in the class definition so that an optimized version can be provided for specific types.

Instances

Monoid Ordering 
Monoid () 

Methods

mempty :: () #

mappend :: () -> () -> () #

mconcat :: [()] -> () #

Monoid ByteString 
Monoid ByteString 
Monoid Builder 
Monoid Encoding 
Monoid Series 
Monoid Buffer 

Methods

mempty :: Buffer #

mappend :: Buffer -> Buffer -> Buffer #

mconcat :: [Buffer] -> Buffer #

Monoid Buffer 

Methods

mempty :: Buffer #

mappend :: Buffer -> Buffer -> Buffer #

mconcat :: [Buffer] -> Buffer #

Monoid More 

Methods

mempty :: More #

mappend :: More -> More -> More #

mconcat :: [More] -> More #

Monoid All 

Methods

mempty :: All #

mappend :: All -> All -> All #

mconcat :: [All] -> All #

Monoid Any 

Methods

mempty :: Any #

mappend :: Any -> Any -> Any #

mconcat :: [Any] -> Any #

Monoid ShortByteString 
Monoid IntSet 
Monoid CookieJar

Since 1.9

Monoid RequestBody 
Monoid Filter # 
Monoid [a] 

Methods

mempty :: [a] #

mappend :: [a] -> [a] -> [a] #

mconcat :: [[a]] -> [a] #

Monoid a => Monoid (Maybe a)

Lift a semigroup into Maybe forming a Monoid according to http://en.wikipedia.org/wiki/Monoid: "Any semigroup S may be turned into a monoid simply by adjoining an element e not in S and defining e*e = e and e*s = s = s*e for all s ∈ S." Since there is no "Semigroup" typeclass providing just mappend, we use Monoid instead.

Methods

mempty :: Maybe a #

mappend :: Maybe a -> Maybe a -> Maybe a #

mconcat :: [Maybe a] -> Maybe a #

Monoid a => Monoid (IO a) 

Methods

mempty :: IO a #

mappend :: IO a -> IO a -> IO a #

mconcat :: [IO a] -> IO a #

Monoid (IResult a) 

Methods

mempty :: IResult a #

mappend :: IResult a -> IResult a -> IResult a #

mconcat :: [IResult a] -> IResult a #

Monoid (Result a) 

Methods

mempty :: Result a #

mappend :: Result a -> Result a -> Result a #

mconcat :: [Result a] -> Result a #

Monoid (Parser a) 

Methods

mempty :: Parser a #

mappend :: Parser a -> Parser a -> Parser a #

mconcat :: [Parser a] -> Parser a #

Ord a => Monoid (Max a) 

Methods

mempty :: Max a #

mappend :: Max a -> Max a -> Max a #

mconcat :: [Max a] -> Max a #

Ord a => Monoid (Min a) 

Methods

mempty :: Min a #

mappend :: Min a -> Min a -> Min a #

mconcat :: [Min a] -> Min a #

Monoid a => Monoid (Identity a) 

Methods

mempty :: Identity a #

mappend :: Identity a -> Identity a -> Identity a #

mconcat :: [Identity a] -> Identity a #

(Ord a, Bounded a) => Monoid (Min a) 

Methods

mempty :: Min a #

mappend :: Min a -> Min a -> Min a #

mconcat :: [Min a] -> Min a #

(Ord a, Bounded a) => Monoid (Max a) 

Methods

mempty :: Max a #

mappend :: Max a -> Max a -> Max a #

mconcat :: [Max a] -> Max a #

Monoid m => Monoid (WrappedMonoid m) 
Semigroup a => Monoid (Option a) 

Methods

mempty :: Option a #

mappend :: Option a -> Option a -> Option a #

mconcat :: [Option a] -> Option a #

Monoid a => Monoid (Dual a) 

Methods

mempty :: Dual a #

mappend :: Dual a -> Dual a -> Dual a #

mconcat :: [Dual a] -> Dual a #

Monoid (Endo a) 

Methods

mempty :: Endo a #

mappend :: Endo a -> Endo a -> Endo a #

mconcat :: [Endo a] -> Endo a #

Num a => Monoid (Sum a) 

Methods

mempty :: Sum a #

mappend :: Sum a -> Sum a -> Sum a #

mconcat :: [Sum a] -> Sum a #

Num a => Monoid (Product a) 

Methods

mempty :: Product a #

mappend :: Product a -> Product a -> Product a #

mconcat :: [Product a] -> Product a #

Monoid (First a) 

Methods

mempty :: First a #

mappend :: First a -> First a -> First a #

mconcat :: [First a] -> First a #

Monoid (Last a) 

Methods

mempty :: Last a #

mappend :: Last a -> Last a -> Last a #

mconcat :: [Last a] -> Last a #

Monoid (IntMap a) 

Methods

mempty :: IntMap a #

mappend :: IntMap a -> IntMap a -> IntMap a #

mconcat :: [IntMap a] -> IntMap a #

Monoid (Seq a) 

Methods

mempty :: Seq a #

mappend :: Seq a -> Seq a -> Seq a #

mconcat :: [Seq a] -> Seq a #

Ord a => Monoid (Set a) 

Methods

mempty :: Set a #

mappend :: Set a -> Set a -> Set a #

mconcat :: [Set a] -> Set a #

Monoid (DList a) 

Methods

mempty :: DList a #

mappend :: DList a -> DList a -> DList a #

mconcat :: [DList a] -> DList a #

(Hashable a, Eq a) => Monoid (HashSet a) 

Methods

mempty :: HashSet a #

mappend :: HashSet a -> HashSet a -> HashSet a #

mconcat :: [HashSet a] -> HashSet a #

Monoid (Vector a) 

Methods

mempty :: Vector a #

mappend :: Vector a -> Vector a -> Vector a #

mconcat :: [Vector a] -> Vector a #

Storable a => Monoid (Vector a) 

Methods

mempty :: Vector a #

mappend :: Vector a -> Vector a -> Vector a #

mconcat :: [Vector a] -> Vector a #

Prim a => Monoid (Vector a) 

Methods

mempty :: Vector a #

mappend :: Vector a -> Vector a -> Vector a #

mconcat :: [Vector a] -> Vector a #

Monoid (SearchHits a) # 
Monoid b => Monoid (a -> b) 

Methods

mempty :: a -> b #

mappend :: (a -> b) -> (a -> b) -> a -> b #

mconcat :: [a -> b] -> a -> b #

(Monoid a, Monoid b) => Monoid (a, b) 

Methods

mempty :: (a, b) #

mappend :: (a, b) -> (a, b) -> (a, b) #

mconcat :: [(a, b)] -> (a, b) #

(Eq k, Hashable k) => Monoid (HashMap k v) 

Methods

mempty :: HashMap k v #

mappend :: HashMap k v -> HashMap k v -> HashMap k v #

mconcat :: [HashMap k v] -> HashMap k v #

Ord k => Monoid (Map k v) 

Methods

mempty :: Map k v #

mappend :: Map k v -> Map k v -> Map k v #

mconcat :: [Map k v] -> Map k v #

Monoid (Parser i a) 

Methods

mempty :: Parser i a #

mappend :: Parser i a -> Parser i a -> Parser i a #

mconcat :: [Parser i a] -> Parser i a #

Monoid (Proxy k s) 

Methods

mempty :: Proxy k s #

mappend :: Proxy k s -> Proxy k s -> Proxy k s #

mconcat :: [Proxy k s] -> Proxy k s #

(Monoid a, Monoid b, Monoid c) => Monoid (a, b, c) 

Methods

mempty :: (a, b, c) #

mappend :: (a, b, c) -> (a, b, c) -> (a, b, c) #

mconcat :: [(a, b, c)] -> (a, b, c) #

Monoid a => Monoid (Const k a b) 

Methods

mempty :: Const k a b #

mappend :: Const k a b -> Const k a b -> Const k a b #

mconcat :: [Const k a b] -> Const k a b #

Alternative f => Monoid (Alt * f a) 

Methods

mempty :: Alt * f a #

mappend :: Alt * f a -> Alt * f a -> Alt * f a #

mconcat :: [Alt * f a] -> Alt * f a #

(Semigroup a, Monoid a) => Monoid (Tagged k s a) 

Methods

mempty :: Tagged k s a #

mappend :: Tagged k s a -> Tagged k s a -> Tagged k s a #

mconcat :: [Tagged k s a] -> Tagged k s a #

(Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d) 

Methods

mempty :: (a, b, c, d) #

mappend :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

mconcat :: [(a, b, c, d)] -> (a, b, c, d) #

(Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e) 

Methods

mempty :: (a, b, c, d, e) #

mappend :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

mconcat :: [(a, b, c, d, e)] -> (a, b, c, d, e) #

class ToJSON a where #

A type that can be converted to JSON.

An example type and instance:

-- Allow ourselves to write Text literals.
{-# LANGUAGE OverloadedStrings #-}

data Coord = Coord { x :: Double, y :: Double }

instance ToJSON Coord where
  toJSON (Coord x y) = object ["x" .= x, "y" .= y]

  toEncoding (Coord x y) = pairs ("x" .= x <> "y" .= y)

Instead of manually writing your ToJSON instance, there are two options to do it automatically:

  • Data.Aeson.TH provides Template Haskell functions which will derive an instance at compile time. The generated instance is optimized for your type so will probably be more efficient than the following two options:
  • The compiler can provide a default generic implementation for toJSON.

To use the second, simply add a deriving Generic clause to your datatype and declare a ToJSON instance for your datatype without giving definitions for toJSON or toEncoding.

For example, the previous example can be simplified to a more minimal instance:

{-# LANGUAGE DeriveGeneric #-}

import GHC.Generics

data Coord = Coord { x :: Double, y :: Double } deriving Generic

instance ToJSON Coord where
    toEncoding = genericToEncoding defaultOptions

Why do we provide an implementation for toEncoding here? The toEncoding function is a relatively new addition to this class. To allow users of older versions of this library to upgrade without having to edit all of their instances or encounter surprising incompatibilities, the default implementation of toEncoding uses toJSON. This produces correct results, but since it performs an intermediate conversion to a Value, it will be less efficient than directly emitting an Encoding. Our one-liner definition of toEncoding above bypasses the intermediate Value.

If DefaultSignatures doesn't give exactly the results you want, you can customize the generic encoding with only a tiny amount of effort, using genericToJSON and genericToEncoding with your preferred Options:

instance ToJSON Coord where
    toJSON     = genericToJSON defaultOptions
    toEncoding = genericToEncoding defaultOptions

Methods

toJSON :: a -> Value #

Convert a Haskell value to a JSON-friendly intermediate type.

toEncoding :: a -> Encoding #

Encode a Haskell value as JSON.

The default implementation of this method creates an intermediate Value using toJSON. This provides source-level compatibility for people upgrading from older versions of this library, but obviously offers no performance advantage.

To benefit from direct encoding, you must provide an implementation for this method. The easiest way to do so is by having your types implement Generic using the DeriveGeneric extension, and then have GHC generate a method body as follows.

instance ToJSON Coord where
    toEncoding = genericToEncoding defaultOptions

Instances

ToJSON DateMathExpr # 
ToJSON DateRangeAggRange # 
ToJSON DateRangeAggregation # 
ToJSON Aggregation # 
ToJSON Interval # 
ToJSON ExecutionHint # 
ToJSON CollectionMode # 
ToJSON TermInclusion # 
ToJSON TermOrder # 
ToJSON ScrollId # 
ToJSON Distance # 
ToJSON OptimizeBbox # 
ToJSON DistanceType # 
ToJSON DistanceUnit # 
ToJSON GeoPoint # 
ToJSON GeoBoundingBoxConstraint # 
ToJSON GeoBoundingBox # 
ToJSON LatLon # 
ToJSON GeoFilterType # 
ToJSON BoolMatch # 
ToJSON Term # 
ToJSON RegexpFlags # 
ToJSON RangeExecution # 
ToJSON ZeroTermsQuery # 
ToJSON Filter # 
ToJSON CommonMinimumMatch # 
ToJSON CommonTermsQuery # 
ToJSON BoostingQuery # 
ToJSON BoolQuery # 
ToJSON MultiMatchQueryType # 
ToJSON MultiMatchQuery # 
ToJSON MatchQueryType # 
ToJSON MatchQuery # 
ToJSON DisMaxQuery # 
ToJSON FilteredQuery # 
ToJSON FuzzyLikeThisQuery # 
ToJSON FuzzyLikeFieldQuery # 
ToJSON FuzzyQuery # 
ToJSON ScoreType # 
ToJSON HasChildQuery # 
ToJSON HasParentQuery # 
ToJSON IndicesQuery # 
ToJSON MoreLikeThisQuery # 
ToJSON MoreLikeThisFieldQuery # 
ToJSON NestedQuery # 
ToJSON PrefixQuery # 
ToJSON FieldOrFields # 
ToJSON QueryStringQuery # 
ToJSON SimpleQueryFlag # 
ToJSON SimpleQueryStringQuery # 
ToJSON RangeQuery # 
ToJSON RegexpQuery # 
ToJSON Query # 
ToJSON HighlightEncoder # 
ToJSON HighlightSettings # 
ToJSON FieldHighlight # 
ToJSON Highlights # 
ToJSON Pattern # 
ToJSON Exclude # 
ToJSON Include # 
ToJSON PatternOrPatterns # 
ToJSON Source # 
ToJSON Search # 
ToJSON Size # 
ToJSON From # 
ToJSON MaxDocFrequency # 
ToJSON MinDocFrequency # 
ToJSON PhraseSlop # 
ToJSON MinWordLength # 
ToJSON MaxWordLength # 
ToJSON Locale # 
ToJSON GeneratePhraseQueries # 
ToJSON AnalyzeWildcard # 
ToJSON EnablePositionIncrements # 
ToJSON LowercaseExpanded # 
ToJSON AllowLeadingWildcard # 
ToJSON QueryPath # 
ToJSON StopWord # 
ToJSON PercentMatch # 
ToJSON TypeName # 
ToJSON PrefixLength # 
ToJSON Fuzziness # 
ToJSON MaxQueryTerms # 
ToJSON MinimumTermFrequency # 
ToJSON IgnoreTermFrequency # 
ToJSON DisableCoord # 
ToJSON MinimumMatch # 
ToJSON BoostTerms # 
ToJSON Boost # 
ToJSON Tiebreaker # 
ToJSON Lenient # 
ToJSON MaxExpansions # 
ToJSON Analyzer # 
ToJSON CutoffFrequency # 
ToJSON NullValue # 
ToJSON Existence # 
ToJSON CacheKey # 
ToJSON CacheName # 
ToJSON FieldName # 
ToJSON QueryString # 
ToJSON DocId # 
ToJSON MappingName # 
ToJSON TemplatePattern # 
ToJSON TemplateName # 
ToJSON IndexName # 
ToJSON ReplicaCount # 
ToJSON ShardCount # 
ToJSON BooleanOperator # 
ToJSON SortMode # 
ToJSON Missing # 
ToJSON SortOrder # 
ToJSON SortSpec # 
ToJSON ExternalDocVersion # 
ToJSON DocVersion # 
ToJSON RoutingValue # 
ToJSON IndexAliasRouting # 
ToJSON SearchAliasRouting # 
ToJSON AliasRouting # 
ToJSON IndexAliasCreate # 
ToJSON IndexAliasAction # 
ToJSON IndexAliasName # 
ToJSON IndexAlias # 
ToJSON IndexTemplate # 
ToJSON CompoundFormat # 
ToJSON InitialShardCount # 
ToJSON FSType # 
ToJSON Bytes # 
ToJSON ReplicaBounds # 
ToJSON AllocationPolicy # 
ToJSON UpdatableIndexSetting # 
ToJSON IndexSettings # 
ToJSON Version # 

data Interval Source #

data Aggregation Source #

Instances

Eq Aggregation Source # 
Read Aggregation Source # 
Show Aggregation Source # 
Generic Aggregation Source # 

Associated Types

type Rep Aggregation :: * -> * #

ToJSON Aggregation Source # 
type Rep Aggregation Source # 

data Bucket a Source #

Constructors

Bucket 

Fields

Instances

data TermsAggregation Source #

Instances

Eq TermsAggregation Source # 
Read TermsAggregation Source # 
Show TermsAggregation Source # 
Generic TermsAggregation Source # 
type Rep TermsAggregation Source # 

data ValueCountAggregation Source #

data FilterAggregation Source #

data DateHistogramAggregation Source #

Instances

Eq DateHistogramAggregation Source # 
Read DateHistogramAggregation Source # 
Show DateHistogramAggregation Source # 
Generic DateHistogramAggregation Source # 
type Rep DateHistogramAggregation Source # 

data DateRangeAggregation Source #

Instances

Eq DateRangeAggregation Source # 
Read DateRangeAggregation Source # 
Show DateRangeAggregation Source # 
Generic DateRangeAggregation Source # 
ToJSON DateRangeAggregation Source # 
type Rep DateRangeAggregation Source # 
type Rep DateRangeAggregation = D1 (MetaData "DateRangeAggregation" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) (C1 (MetaCons "DateRangeAggregation" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "draField") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FieldName)) ((:*:) (S1 (MetaSel (Just Symbol "draFormat") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "draRanges") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (NonEmpty DateRangeAggRange))))))

data DateRangeAggRange Source #

Instances

Eq DateRangeAggRange Source # 
Read DateRangeAggRange Source # 
Show DateRangeAggRange Source # 
Generic DateRangeAggRange Source # 
ToJSON DateRangeAggRange Source # 
type Rep DateRangeAggRange Source # 

data DateMathAnchor Source #

Starting point for a date range. This along with the DateMathModifiers gets you the date ES will start from.

Constructors

DMNow 
DMDate Day 

data DateMathModifier Source #

Instances

Eq DateMathModifier Source # 
Read DateMathModifier Source # 
Show DateMathModifier Source # 
Generic DateMathModifier Source # 
type Rep DateMathModifier Source # 

data DateMathUnit Source #

Instances

Eq DateMathUnit Source # 
Read DateMathUnit Source # 
Show DateMathUnit Source # 
Generic DateMathUnit Source # 

Associated Types

type Rep DateMathUnit :: * -> * #

type Rep DateMathUnit Source # 
type Rep DateMathUnit = D1 (MetaData "DateMathUnit" "Database.Bloodhound.Types" "bloodhound-0.11.1.0-25Up8GnBOc9ByWs5nyfyve" False) ((:+:) ((:+:) (C1 (MetaCons "DMYear" PrefixI False) U1) ((:+:) (C1 (MetaCons "DMMonth" PrefixI False) U1) (C1 (MetaCons "DMWeek" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "DMDay" PrefixI False) U1) (C1 (MetaCons "DMHour" PrefixI False) U1)) ((:+:) (C1 (MetaCons "DMMinute" PrefixI False) U1) (C1 (MetaCons "DMSecond" PrefixI False) U1))))

data HighlightSettings Source #

Instances

Eq HighlightSettings Source # 
Read HighlightSettings Source # 
Show HighlightSettings Source # 
Generic HighlightSettings Source # 
ToJSON HighlightSettings Source # 
type Rep HighlightSettings Source # 

data FastVectorHighlight Source #

Instances

Eq FastVectorHighlight Source # 
Read FastVectorHighlight Source # 
Show FastVectorHighlight Source # 
Generic FastVectorHighlight Source # 
type Rep FastVectorHighlight Source # 

data CommonHighlight Source #

Instances

Eq CommonHighlight Source # 
Read CommonHighlight Source # 
Show CommonHighlight Source # 
Generic CommonHighlight Source # 
type Rep CommonHighlight Source # 

data DateRangeResult Source #

Instances

Eq DateRangeResult Source # 
Read DateRangeResult Source # 
Show DateRangeResult Source # 
Generic DateRangeResult Source # 
FromJSON DateRangeResult Source # 
BucketAggregation DateRangeResult Source # 
type Rep DateRangeResult Source # 

newtype EsUsername Source #

Username type used for HTTP Basic authentication. See basicAuthHook.

Constructors

EsUsername 

Fields

newtype EsPassword Source #

Password type used for HTTP Basic authentication. See basicAuthHook.

Constructors

EsPassword 

Fields