Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Aggregations = Map Key Aggregation
- emptyAggregations :: Aggregations
- mkAggregations :: Key -> Aggregation -> Aggregations
- data Aggregation
- = TermsAgg TermsAggregation
- | CardinalityAgg CardinalityAggregation
- | DateHistogramAgg DateHistogramAggregation
- | ValueCountAgg ValueCountAggregation
- | FilterAgg FilterAggregation
- | DateRangeAgg DateRangeAggregation
- | MissingAgg MissingAggregation
- | TopHitsAgg TopHitsAggregation
- | StatsAgg StatisticsAggregation
- data TopHitsAggregation = TopHitsAggregation {}
- data MissingAggregation = MissingAggregation {}
- data TermsAggregation = TermsAggregation {
- term :: Either Text Text
- termInclude :: Maybe TermInclusion
- termExclude :: Maybe TermInclusion
- termOrder :: Maybe TermOrder
- termMinDocCount :: Maybe Int
- termSize :: Maybe Int
- termShardSize :: Maybe Int
- termCollectMode :: Maybe CollectionMode
- termExecutionHint :: Maybe ExecutionHint
- termAggs :: Maybe Aggregations
- data CardinalityAggregation = CardinalityAggregation {}
- data DateHistogramAggregation = DateHistogramAggregation {}
- data DateRangeAggregation = DateRangeAggregation {}
- data DateRangeAggRange
- data ValueCountAggregation
- data FilterAggregation = FilterAggregation {}
- data StatisticsAggregation = StatisticsAggregation {}
- data StatsType
- mkTermsAggregation :: Text -> TermsAggregation
- mkTermsScriptAggregation :: Text -> TermsAggregation
- mkDateHistogram :: FieldName -> Interval -> DateHistogramAggregation
- mkCardinalityAggregation :: FieldName -> CardinalityAggregation
- mkStatsAggregation :: FieldName -> StatisticsAggregation
- mkExtendedStatsAggregation :: FieldName -> StatisticsAggregation
- type AggregationResults = Map Key Value
- class BucketAggregation a where
- key :: a -> BucketValue
- docCount :: a -> Int
- aggs :: a -> Maybe AggregationResults
- data Bucket a = Bucket {
- buckets :: [a]
- data BucketValue
- data TermInclusion
- data TermOrder = TermOrder {}
- data CollectionMode
- data ExecutionHint
- data DateMathExpr = DateMathExpr DateMathAnchor [DateMathModifier]
- data DateMathAnchor
- data DateMathModifier
- data DateMathUnit
- data TermsResult = TermsResult {}
- data DateHistogramResult = DateHistogramResult {}
- data DateRangeResult = DateRangeResult {}
- toTerms :: Key -> AggregationResults -> Maybe (Bucket TermsResult)
- toDateHistogram :: Key -> AggregationResults -> Maybe (Bucket DateHistogramResult)
- toMissing :: Key -> AggregationResults -> Maybe MissingResult
- toTopHits :: FromJSON a => Key -> AggregationResults -> Maybe (TopHitResult a)
- toAggResult :: FromJSON a => Key -> AggregationResults -> Maybe a
- getNamedSubAgg :: Object -> [Key] -> Maybe AggregationResults
- data MissingResult = MissingResult {}
- data TopHitResult a = TopHitResult {
- tarHits :: SearchHits a
- data HitsTotalRelation
- data HitsTotal = HitsTotal {}
- data SearchHits a = SearchHits {}
- type SearchAfterKey = [Value]
- data Hit a = Hit {
- hitIndex :: IndexName
- hitDocId :: DocId
- hitScore :: Score
- hitSource :: Maybe a
- hitSort :: Maybe SearchAfterKey
- hitFields :: Maybe HitFields
- hitHighlight :: Maybe HitHighlight
- hitInnerHits :: Maybe (KeyMap (TopHitResult Value))
Documentation
type Aggregations = Map Key Aggregation Source #
mkAggregations :: Key -> Aggregation -> Aggregations Source #
data Aggregation Source #
Instances
Eq Aggregation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation (==) :: Aggregation -> Aggregation -> Bool # (/=) :: Aggregation -> Aggregation -> Bool # | |
Show Aggregation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> Aggregation -> ShowS # show :: Aggregation -> String # showList :: [Aggregation] -> ShowS # | |
ToJSON Aggregation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation toJSON :: Aggregation -> Value # toEncoding :: Aggregation -> Encoding # toJSONList :: [Aggregation] -> Value # toEncodingList :: [Aggregation] -> Encoding # |
data TopHitsAggregation Source #
Instances
Eq TopHitsAggregation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation (==) :: TopHitsAggregation -> TopHitsAggregation -> Bool # (/=) :: TopHitsAggregation -> TopHitsAggregation -> Bool # | |
Show TopHitsAggregation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> TopHitsAggregation -> ShowS # show :: TopHitsAggregation -> String # showList :: [TopHitsAggregation] -> ShowS # |
data MissingAggregation Source #
Instances
Eq MissingAggregation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation (==) :: MissingAggregation -> MissingAggregation -> Bool # (/=) :: MissingAggregation -> MissingAggregation -> Bool # | |
Show MissingAggregation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> MissingAggregation -> ShowS # show :: MissingAggregation -> String # showList :: [MissingAggregation] -> ShowS # |
data TermsAggregation Source #
Instances
Eq TermsAggregation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation (==) :: TermsAggregation -> TermsAggregation -> Bool # (/=) :: TermsAggregation -> TermsAggregation -> Bool # | |
Show TermsAggregation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> TermsAggregation -> ShowS # show :: TermsAggregation -> String # showList :: [TermsAggregation] -> ShowS # |
data CardinalityAggregation Source #
Instances
Eq CardinalityAggregation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation | |
Show CardinalityAggregation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> CardinalityAggregation -> ShowS # show :: CardinalityAggregation -> String # showList :: [CardinalityAggregation] -> ShowS # |
data DateHistogramAggregation Source #
Instances
data DateRangeAggregation Source #
Instances
Eq DateRangeAggregation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation (==) :: DateRangeAggregation -> DateRangeAggregation -> Bool # (/=) :: DateRangeAggregation -> DateRangeAggregation -> Bool # | |
Show DateRangeAggregation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> DateRangeAggregation -> ShowS # show :: DateRangeAggregation -> String # showList :: [DateRangeAggregation] -> ShowS # | |
ToJSON DateRangeAggregation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation toJSON :: DateRangeAggregation -> Value # toEncoding :: DateRangeAggregation -> Encoding # toJSONList :: [DateRangeAggregation] -> Value # toEncodingList :: [DateRangeAggregation] -> Encoding # |
data DateRangeAggRange Source #
Instances
Eq DateRangeAggRange Source # | |
Defined in Database.Bloodhound.Internal.Aggregation (==) :: DateRangeAggRange -> DateRangeAggRange -> Bool # (/=) :: DateRangeAggRange -> DateRangeAggRange -> Bool # | |
Show DateRangeAggRange Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> DateRangeAggRange -> ShowS # show :: DateRangeAggRange -> String # showList :: [DateRangeAggRange] -> ShowS # | |
ToJSON DateRangeAggRange Source # | |
Defined in Database.Bloodhound.Internal.Aggregation toJSON :: DateRangeAggRange -> Value # toEncoding :: DateRangeAggRange -> Encoding # toJSONList :: [DateRangeAggRange] -> Value # toEncodingList :: [DateRangeAggRange] -> Encoding # |
data ValueCountAggregation Source #
See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-valuecount-aggregation.html for more information.
Instances
Eq ValueCountAggregation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation (==) :: ValueCountAggregation -> ValueCountAggregation -> Bool # (/=) :: ValueCountAggregation -> ValueCountAggregation -> Bool # | |
Show ValueCountAggregation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> ValueCountAggregation -> ShowS # show :: ValueCountAggregation -> String # showList :: [ValueCountAggregation] -> ShowS # |
data FilterAggregation Source #
Single-bucket filter aggregations. See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-filter-aggregation.html#search-aggregations-bucket-filter-aggregation for more information.
Instances
Eq FilterAggregation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation (==) :: FilterAggregation -> FilterAggregation -> Bool # (/=) :: FilterAggregation -> FilterAggregation -> Bool # | |
Show FilterAggregation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> FilterAggregation -> ShowS # show :: FilterAggregation -> String # showList :: [FilterAggregation] -> ShowS # |
data StatisticsAggregation Source #
Instances
Eq StatisticsAggregation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation (==) :: StatisticsAggregation -> StatisticsAggregation -> Bool # (/=) :: StatisticsAggregation -> StatisticsAggregation -> Bool # | |
Show StatisticsAggregation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> StatisticsAggregation -> ShowS # show :: StatisticsAggregation -> String # showList :: [StatisticsAggregation] -> ShowS # |
class BucketAggregation a where Source #
key :: a -> BucketValue Source #
aggs :: a -> Maybe AggregationResults Source #
Instances
data BucketValue Source #
Instances
Read BucketValue Source # | |
Defined in Database.Bloodhound.Internal.Aggregation readsPrec :: Int -> ReadS BucketValue # readList :: ReadS [BucketValue] # readPrec :: ReadPrec BucketValue # readListPrec :: ReadPrec [BucketValue] # | |
Show BucketValue Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> BucketValue -> ShowS # show :: BucketValue -> String # showList :: [BucketValue] -> ShowS # | |
FromJSON BucketValue Source # | |
Defined in Database.Bloodhound.Internal.Aggregation parseJSON :: Value -> Parser BucketValue # parseJSONList :: Value -> Parser [BucketValue] # |
data TermInclusion Source #
Instances
Eq TermInclusion Source # | |
Defined in Database.Bloodhound.Internal.Aggregation (==) :: TermInclusion -> TermInclusion -> Bool # (/=) :: TermInclusion -> TermInclusion -> Bool # | |
Show TermInclusion Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> TermInclusion -> ShowS # show :: TermInclusion -> String # showList :: [TermInclusion] -> ShowS # | |
ToJSON TermInclusion Source # | |
Defined in Database.Bloodhound.Internal.Aggregation toJSON :: TermInclusion -> Value # toEncoding :: TermInclusion -> Encoding # toJSONList :: [TermInclusion] -> Value # toEncodingList :: [TermInclusion] -> Encoding # |
data CollectionMode Source #
Instances
Eq CollectionMode Source # | |
Defined in Database.Bloodhound.Internal.Aggregation (==) :: CollectionMode -> CollectionMode -> Bool # (/=) :: CollectionMode -> CollectionMode -> Bool # | |
Show CollectionMode Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> CollectionMode -> ShowS # show :: CollectionMode -> String # showList :: [CollectionMode] -> ShowS # | |
ToJSON CollectionMode Source # | |
Defined in Database.Bloodhound.Internal.Aggregation toJSON :: CollectionMode -> Value # toEncoding :: CollectionMode -> Encoding # toJSONList :: [CollectionMode] -> Value # toEncodingList :: [CollectionMode] -> Encoding # |
data ExecutionHint Source #
Instances
Eq ExecutionHint Source # | |
Defined in Database.Bloodhound.Internal.Aggregation (==) :: ExecutionHint -> ExecutionHint -> Bool # (/=) :: ExecutionHint -> ExecutionHint -> Bool # | |
Show ExecutionHint Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> ExecutionHint -> ShowS # show :: ExecutionHint -> String # showList :: [ExecutionHint] -> ShowS # | |
ToJSON ExecutionHint Source # | |
Defined in Database.Bloodhound.Internal.Aggregation toJSON :: ExecutionHint -> Value # toEncoding :: ExecutionHint -> Encoding # toJSONList :: [ExecutionHint] -> Value # toEncodingList :: [ExecutionHint] -> Encoding # |
data DateMathExpr Source #
See https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#date-math for more information.
Instances
Eq DateMathExpr Source # | |
Defined in Database.Bloodhound.Internal.Aggregation (==) :: DateMathExpr -> DateMathExpr -> Bool # (/=) :: DateMathExpr -> DateMathExpr -> Bool # | |
Show DateMathExpr Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> DateMathExpr -> ShowS # show :: DateMathExpr -> String # showList :: [DateMathExpr] -> ShowS # | |
ToJSON DateMathExpr Source # | |
Defined in Database.Bloodhound.Internal.Aggregation toJSON :: DateMathExpr -> Value # toEncoding :: DateMathExpr -> Encoding # toJSONList :: [DateMathExpr] -> Value # toEncodingList :: [DateMathExpr] -> Encoding # |
data DateMathAnchor Source #
Starting point for a date range. This along with the DateMathModifiers
gets you the date ES will start from.
Instances
Eq DateMathAnchor Source # | |
Defined in Database.Bloodhound.Internal.Aggregation (==) :: DateMathAnchor -> DateMathAnchor -> Bool # (/=) :: DateMathAnchor -> DateMathAnchor -> Bool # | |
Show DateMathAnchor Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> DateMathAnchor -> ShowS # show :: DateMathAnchor -> String # showList :: [DateMathAnchor] -> ShowS # |
data DateMathModifier Source #
Instances
Eq DateMathModifier Source # | |
Defined in Database.Bloodhound.Internal.Aggregation (==) :: DateMathModifier -> DateMathModifier -> Bool # (/=) :: DateMathModifier -> DateMathModifier -> Bool # | |
Show DateMathModifier Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> DateMathModifier -> ShowS # show :: DateMathModifier -> String # showList :: [DateMathModifier] -> ShowS # |
data DateMathUnit Source #
Instances
Eq DateMathUnit Source # | |
Defined in Database.Bloodhound.Internal.Aggregation (==) :: DateMathUnit -> DateMathUnit -> Bool # (/=) :: DateMathUnit -> DateMathUnit -> Bool # | |
Show DateMathUnit Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> DateMathUnit -> ShowS # show :: DateMathUnit -> String # showList :: [DateMathUnit] -> ShowS # |
data TermsResult Source #
Instances
Read TermsResult Source # | |
Defined in Database.Bloodhound.Internal.Aggregation readsPrec :: Int -> ReadS TermsResult # readList :: ReadS [TermsResult] # readPrec :: ReadPrec TermsResult # readListPrec :: ReadPrec [TermsResult] # | |
Show TermsResult Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> TermsResult -> ShowS # show :: TermsResult -> String # showList :: [TermsResult] -> ShowS # | |
FromJSON TermsResult Source # | |
Defined in Database.Bloodhound.Internal.Aggregation parseJSON :: Value -> Parser TermsResult # parseJSONList :: Value -> Parser [TermsResult] # | |
BucketAggregation TermsResult Source # | |
Defined in Database.Bloodhound.Internal.Aggregation key :: TermsResult -> BucketValue Source # docCount :: TermsResult -> Int Source # |
data DateHistogramResult Source #
DateHistogramResult | |
|
Instances
Show DateHistogramResult Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> DateHistogramResult -> ShowS # show :: DateHistogramResult -> String # showList :: [DateHistogramResult] -> ShowS # | |
FromJSON DateHistogramResult Source # | |
Defined in Database.Bloodhound.Internal.Aggregation parseJSON :: Value -> Parser DateHistogramResult # parseJSONList :: Value -> Parser [DateHistogramResult] # | |
BucketAggregation DateHistogramResult Source # | |
Defined in Database.Bloodhound.Internal.Aggregation |
data DateRangeResult Source #
Instances
Eq DateRangeResult Source # | |
Defined in Database.Bloodhound.Internal.Aggregation (==) :: DateRangeResult -> DateRangeResult -> Bool # (/=) :: DateRangeResult -> DateRangeResult -> Bool # | |
Show DateRangeResult Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> DateRangeResult -> ShowS # show :: DateRangeResult -> String # showList :: [DateRangeResult] -> ShowS # | |
FromJSON DateRangeResult Source # | |
Defined in Database.Bloodhound.Internal.Aggregation parseJSON :: Value -> Parser DateRangeResult # parseJSONList :: Value -> Parser [DateRangeResult] # | |
BucketAggregation DateRangeResult Source # | |
Defined in Database.Bloodhound.Internal.Aggregation key :: DateRangeResult -> BucketValue Source # docCount :: DateRangeResult -> Int Source # aggs :: DateRangeResult -> Maybe AggregationResults Source # |
toTerms :: Key -> AggregationResults -> Maybe (Bucket TermsResult) Source #
toMissing :: Key -> AggregationResults -> Maybe MissingResult Source #
toTopHits :: FromJSON a => Key -> AggregationResults -> Maybe (TopHitResult a) Source #
toAggResult :: FromJSON a => Key -> AggregationResults -> Maybe a Source #
getNamedSubAgg :: Object -> [Key] -> Maybe AggregationResults Source #
data MissingResult Source #
Instances
Show MissingResult Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> MissingResult -> ShowS # show :: MissingResult -> String # showList :: [MissingResult] -> ShowS # | |
FromJSON MissingResult Source # | |
Defined in Database.Bloodhound.Internal.Aggregation parseJSON :: Value -> Parser MissingResult # parseJSONList :: Value -> Parser [MissingResult] # |
data TopHitResult a Source #
Instances
Eq a => Eq (TopHitResult a) Source # | |
Defined in Database.Bloodhound.Internal.Aggregation (==) :: TopHitResult a -> TopHitResult a -> Bool # (/=) :: TopHitResult a -> TopHitResult a -> Bool # | |
Show a => Show (TopHitResult a) Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> TopHitResult a -> ShowS # show :: TopHitResult a -> String # showList :: [TopHitResult a] -> ShowS # | |
FromJSON a => FromJSON (TopHitResult a) Source # | |
Defined in Database.Bloodhound.Internal.Aggregation parseJSON :: Value -> Parser (TopHitResult a) # parseJSONList :: Value -> Parser [TopHitResult a] # |
data HitsTotalRelation Source #
Instances
Eq HitsTotalRelation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation (==) :: HitsTotalRelation -> HitsTotalRelation -> Bool # (/=) :: HitsTotalRelation -> HitsTotalRelation -> Bool # | |
Show HitsTotalRelation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation showsPrec :: Int -> HitsTotalRelation -> ShowS # show :: HitsTotalRelation -> String # showList :: [HitsTotalRelation] -> ShowS # | |
FromJSON HitsTotalRelation Source # | |
Defined in Database.Bloodhound.Internal.Aggregation parseJSON :: Value -> Parser HitsTotalRelation # parseJSONList :: Value -> Parser [HitsTotalRelation] # |
data SearchHits a Source #
Instances
type SearchAfterKey = [Value] Source #
Hit | |
|