bloodhound 0.22.0.0 → 0.23.0.0
raw patch · 114 files changed
+15185/−12108 lines, 114 filesdep +aeson-opticsdep +doctestdep +hspec-discoverdep −microlens-aesondep −semigroupsdep −semverdep ~aesondep ~basedep ~blaze-builderPVP ok
version bump matches the API change (PVP)
Dependencies added: aeson-optics, doctest, hspec-discover, optics, optics-core, template-haskell, versions
Dependencies removed: microlens-aeson, semigroups, semver, transformers
Dependency ranges changed: aeson, base, blaze-builder, bytestring, containers, exceptions, hashable, http-client, http-types, mtl, network-uri, scientific, text, time, unordered-containers, vector
API changes (from Hackage documentation)
- Database.Bloodhound.Client: Accepted :: Bool -> Accepted
- Database.Bloodhound.Client: Acknowledged :: Bool -> Acknowledged
- Database.Bloodhound.Client: DeletedDocuments :: Int -> Bool -> Int -> Int -> Int -> Int -> Int -> DeletedDocumentsRetries -> Int -> Float -> Int -> [Value] -> DeletedDocuments
- Database.Bloodhound.Client: DeletedDocumentsRetries :: Int -> Int -> DeletedDocumentsRetries
- Database.Bloodhound.Client: HealthStatus :: Text -> Text -> Bool -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Float -> HealthStatus
- Database.Bloodhound.Client: IndexedDocument :: Text -> Text -> Text -> Int -> Text -> ShardResult -> Int -> Int -> IndexedDocument
- Database.Bloodhound.Client: [delDocsBatches] :: DeletedDocuments -> Int
- Database.Bloodhound.Client: [delDocsDeleted] :: DeletedDocuments -> Int
- Database.Bloodhound.Client: [delDocsFailures] :: DeletedDocuments -> [Value]
- Database.Bloodhound.Client: [delDocsNoops] :: DeletedDocuments -> Int
- Database.Bloodhound.Client: [delDocsRequestsPerSecond] :: DeletedDocuments -> Float
- Database.Bloodhound.Client: [delDocsRetriesBulk] :: DeletedDocumentsRetries -> Int
- Database.Bloodhound.Client: [delDocsRetriesSearch] :: DeletedDocumentsRetries -> Int
- Database.Bloodhound.Client: [delDocsRetries] :: DeletedDocuments -> DeletedDocumentsRetries
- Database.Bloodhound.Client: [delDocsThrottledMillis] :: DeletedDocuments -> Int
- Database.Bloodhound.Client: [delDocsThrottledUntilMillis] :: DeletedDocuments -> Int
- Database.Bloodhound.Client: [delDocsTimedOut] :: DeletedDocuments -> Bool
- Database.Bloodhound.Client: [delDocsTook] :: DeletedDocuments -> Int
- Database.Bloodhound.Client: [delDocsTotal] :: DeletedDocuments -> Int
- Database.Bloodhound.Client: [delDocsVersionConflicts] :: DeletedDocuments -> Int
- Database.Bloodhound.Client: [healthStatusActivePrimaryShards] :: HealthStatus -> Int
- Database.Bloodhound.Client: [healthStatusActiveShardsPercentAsNumber] :: HealthStatus -> Float
- Database.Bloodhound.Client: [healthStatusActiveShards] :: HealthStatus -> Int
- Database.Bloodhound.Client: [healthStatusClusterName] :: HealthStatus -> Text
- Database.Bloodhound.Client: [healthStatusDelayedUnassignedShards] :: HealthStatus -> Int
- Database.Bloodhound.Client: [healthStatusInitializingShards] :: HealthStatus -> Int
- Database.Bloodhound.Client: [healthStatusNumberOfDataNodes] :: HealthStatus -> Int
- Database.Bloodhound.Client: [healthStatusNumberOfInFlightFetch] :: HealthStatus -> Int
- Database.Bloodhound.Client: [healthStatusNumberOfNodes] :: HealthStatus -> Int
- Database.Bloodhound.Client: [healthStatusNumberOfPendingTasks] :: HealthStatus -> Int
- Database.Bloodhound.Client: [healthStatusRelocatingShards] :: HealthStatus -> Int
- Database.Bloodhound.Client: [healthStatusStatus] :: HealthStatus -> Text
- Database.Bloodhound.Client: [healthStatusTaskMaxWaitingInQueueMillis] :: HealthStatus -> Int
- Database.Bloodhound.Client: [healthStatusTimedOut] :: HealthStatus -> Bool
- Database.Bloodhound.Client: [healthStatusUnassignedShards] :: HealthStatus -> Int
- Database.Bloodhound.Client: [idxDocId] :: IndexedDocument -> Text
- Database.Bloodhound.Client: [idxDocIndex] :: IndexedDocument -> Text
- Database.Bloodhound.Client: [idxDocPrimaryTerm] :: IndexedDocument -> Int
- Database.Bloodhound.Client: [idxDocResult] :: IndexedDocument -> Text
- Database.Bloodhound.Client: [idxDocSeqNo] :: IndexedDocument -> Int
- Database.Bloodhound.Client: [idxDocShards] :: IndexedDocument -> ShardResult
- Database.Bloodhound.Client: [idxDocType] :: IndexedDocument -> Text
- Database.Bloodhound.Client: [idxDocVersion] :: IndexedDocument -> Int
- Database.Bloodhound.Client: [isAccepted] :: Accepted -> Bool
- Database.Bloodhound.Client: [isAcknowledged] :: Acknowledged -> Bool
- Database.Bloodhound.Client: advanceScroll :: (FromJSON a, MonadBH m, MonadThrow m) => ScrollId -> NominalDiffTime -> m (ParsedEsResponse (SearchResult a))
- Database.Bloodhound.Client: basicAuthHook :: Monad m => EsUsername -> EsPassword -> Request -> m Request
- Database.Bloodhound.Client: bulk :: MonadBH m => Vector BulkOperation -> m (BHResponse a)
- Database.Bloodhound.Client: catIndices :: (MonadThrow m, MonadBH m) => m [(IndexName, Int)]
- Database.Bloodhound.Client: closeIndex :: MonadBH m => IndexName -> m (BHResponse Acknowledged)
- Database.Bloodhound.Client: closePointInTime :: (MonadBH m, MonadThrow m) => ClosePointInTime -> m (ParsedEsResponse ClosePointInTimeResponse)
- Database.Bloodhound.Client: countByIndex :: (MonadBH m, MonadThrow m) => IndexName -> CountQuery -> m (ParsedEsResponse CountResponse)
- Database.Bloodhound.Client: createIndex :: MonadBH m => IndexSettings -> IndexName -> m (BHResponse Acknowledged)
- Database.Bloodhound.Client: createIndexWith :: MonadBH m => [UpdatableIndexSetting] -> Int -> IndexName -> m (BHResponse Acknowledged)
- Database.Bloodhound.Client: createSnapshot :: MonadBH m => SnapshotRepoName -> SnapshotName -> SnapshotCreateSettings -> m (BHResponse Acknowledged)
- Database.Bloodhound.Client: data DeletedDocuments
- Database.Bloodhound.Client: data DeletedDocumentsRetries
- Database.Bloodhound.Client: data HealthStatus
- Database.Bloodhound.Client: data IndexedDocument
- Database.Bloodhound.Client: decodeResponse :: FromJSON a => BHResponse a -> Maybe a
- Database.Bloodhound.Client: deleteByQuery :: MonadBH m => IndexName -> Query -> m (BHResponse DeletedDocuments)
- Database.Bloodhound.Client: deleteDocument :: MonadBH m => IndexName -> DocId -> m (BHResponse IndexedDocument)
- Database.Bloodhound.Client: deleteIndex :: MonadBH m => IndexName -> m (BHResponse Acknowledged)
- Database.Bloodhound.Client: deleteIndexAlias :: MonadBH m => IndexAliasName -> m (BHResponse Acknowledged)
- Database.Bloodhound.Client: deleteSearchTemplate :: MonadBH m => SearchTemplateId -> m (BHResponse Acknowledged)
- Database.Bloodhound.Client: deleteSnapshot :: MonadBH m => SnapshotRepoName -> SnapshotName -> m (BHResponse Acknowledged)
- Database.Bloodhound.Client: deleteSnapshotRepo :: MonadBH m => SnapshotRepoName -> m (BHResponse Acknowledged)
- Database.Bloodhound.Client: deleteTemplate :: MonadBH m => TemplateName -> m (BHResponse Acknowledged)
- Database.Bloodhound.Client: documentExists :: MonadBH m => IndexName -> DocId -> m Bool
- Database.Bloodhound.Client: eitherDecodeResponse :: FromJSON a => BHResponse a -> Either String a
- Database.Bloodhound.Client: encodeBulkOperation :: BulkOperation -> ByteString
- Database.Bloodhound.Client: encodeBulkOperations :: Vector BulkOperation -> ByteString
- Database.Bloodhound.Client: flushIndex :: MonadBH m => IndexName -> m (BHResponse ShardResult)
- Database.Bloodhound.Client: forceMergeIndex :: MonadBH m => IndexSelection -> ForceMergeIndexSettings -> m (BHResponse ShardCount)
- Database.Bloodhound.Client: getDocument :: (FromJSON a, MonadBH m) => IndexName -> DocId -> m (BHResponse (EsResult a))
- Database.Bloodhound.Client: getIndexAliases :: (MonadBH m, MonadThrow m) => m (ParsedEsResponse IndexAliasesSummary)
- Database.Bloodhound.Client: getIndexSettings :: (MonadBH m, MonadThrow m) => IndexName -> m (ParsedEsResponse IndexSettingsSummary)
- Database.Bloodhound.Client: getInitialScroll :: (FromJSON a, MonadThrow m, MonadBH m) => IndexName -> Search -> m (ParsedEsResponse (SearchResult a))
- Database.Bloodhound.Client: getInitialSortedScroll :: (FromJSON a, MonadThrow m, MonadBH m) => IndexName -> Search -> m (ParsedEsResponse (SearchResult a))
- Database.Bloodhound.Client: getNodesInfo :: (MonadBH m, MonadThrow m) => NodeSelection -> m (ParsedEsResponse NodesInfo)
- Database.Bloodhound.Client: getNodesStats :: (MonadBH m, MonadThrow m) => NodeSelection -> m (ParsedEsResponse NodesStats)
- Database.Bloodhound.Client: getSearchTemplate :: MonadBH m => SearchTemplateId -> m (BHResponse GetTemplateScript)
- Database.Bloodhound.Client: getSnapshotRepos :: (MonadBH m, MonadThrow m) => SnapshotRepoSelection -> m (ParsedEsResponse [GenericSnapshotRepo])
- Database.Bloodhound.Client: getSnapshots :: (MonadBH m, MonadThrow m) => SnapshotRepoName -> SnapshotSelection -> m (ParsedEsResponse [SnapshotInfo])
- Database.Bloodhound.Client: getStatus :: MonadBH m => m (Either String Status)
- Database.Bloodhound.Client: indexDocument :: (ToJSON doc, MonadBH m) => IndexName -> IndexDocumentSettings -> doc -> DocId -> m (BHResponse IndexedDocument)
- Database.Bloodhound.Client: indexExists :: MonadBH m => IndexName -> m Bool
- Database.Bloodhound.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Client.DeletedDocuments
- Database.Bloodhound.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Client.DeletedDocumentsRetries
- Database.Bloodhound.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Client.GSRs
- Database.Bloodhound.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Client.HealthStatus
- Database.Bloodhound.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Client.IndexedDocument
- Database.Bloodhound.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Client.SIs
- Database.Bloodhound.Client: instance GHC.Classes.Eq Database.Bloodhound.Client.DeletedDocuments
- Database.Bloodhound.Client: instance GHC.Classes.Eq Database.Bloodhound.Client.DeletedDocumentsRetries
- Database.Bloodhound.Client: instance GHC.Classes.Eq Database.Bloodhound.Client.HealthStatus
- Database.Bloodhound.Client: instance GHC.Classes.Eq Database.Bloodhound.Client.IndexedDocument
- Database.Bloodhound.Client: instance GHC.Show.Show Database.Bloodhound.Client.DeletedDocuments
- Database.Bloodhound.Client: instance GHC.Show.Show Database.Bloodhound.Client.DeletedDocumentsRetries
- Database.Bloodhound.Client: instance GHC.Show.Show Database.Bloodhound.Client.HealthStatus
- Database.Bloodhound.Client: instance GHC.Show.Show Database.Bloodhound.Client.IndexedDocument
- Database.Bloodhound.Client: isCreated :: BHResponse a -> Bool
- Database.Bloodhound.Client: isSuccess :: BHResponse a -> Bool
- Database.Bloodhound.Client: isVersionConflict :: BHResponse a -> Bool
- Database.Bloodhound.Client: listIndices :: (MonadThrow m, MonadBH m) => m [IndexName]
- Database.Bloodhound.Client: mkAggregateSearch :: Maybe Query -> Aggregations -> Search
- Database.Bloodhound.Client: mkHighlightSearch :: Maybe Query -> Highlights -> Search
- Database.Bloodhound.Client: mkReplicaCount :: Int -> Maybe ReplicaCount
- Database.Bloodhound.Client: mkSearch :: Maybe Query -> Maybe Filter -> Search
- Database.Bloodhound.Client: mkSearchTemplate :: Either SearchTemplateId SearchTemplateSource -> TemplateQueryKeyValuePairs -> SearchTemplate
- Database.Bloodhound.Client: mkShardCount :: Int -> Maybe ShardCount
- Database.Bloodhound.Client: newtype Accepted
- Database.Bloodhound.Client: newtype Acknowledged
- Database.Bloodhound.Client: openIndex :: MonadBH m => IndexName -> m (BHResponse Acknowledged)
- Database.Bloodhound.Client: openPointInTime :: (MonadBH m, MonadThrow m) => IndexName -> m (ParsedEsResponse OpenPointInTimeResponse)
- Database.Bloodhound.Client: pageSearch :: From -> Size -> Search -> Search
- Database.Bloodhound.Client: parseEsResponse :: (MonadThrow m, FromJSON body) => BHResponse body -> m (ParsedEsResponse body)
- Database.Bloodhound.Client: parseEsResponseWith :: (MonadThrow m, FromJSON body) => (body -> Either String parsed) -> BHResponse body -> m parsed
- Database.Bloodhound.Client: pitSearch :: (FromJSON a, MonadBH m, MonadThrow m, Show a) => IndexName -> Search -> m [Hit a]
- Database.Bloodhound.Client: putMapping :: (MonadBH m, ToJSON a) => IndexName -> a -> m (BHResponse a)
- Database.Bloodhound.Client: putTemplate :: MonadBH m => IndexTemplate -> TemplateName -> m (BHResponse Acknowledged)
- Database.Bloodhound.Client: refreshIndex :: MonadBH m => IndexName -> m (BHResponse ShardResult)
- Database.Bloodhound.Client: restoreSnapshot :: MonadBH m => SnapshotRepoName -> SnapshotName -> SnapshotRestoreSettings -> m (BHResponse Accepted)
- Database.Bloodhound.Client: scanSearch :: (FromJSON a, MonadBH m, MonadThrow m) => IndexName -> Search -> m [Hit a]
- Database.Bloodhound.Client: searchAll :: MonadBH m => Search -> m (BHResponse (SearchResult a))
- Database.Bloodhound.Client: searchByIndex :: MonadBH m => IndexName -> Search -> m (BHResponse (SearchResult a))
- Database.Bloodhound.Client: searchByIndexTemplate :: (FromJSON a, MonadBH m) => IndexName -> SearchTemplate -> m (BHResponse (SearchResult a))
- Database.Bloodhound.Client: searchByIndices :: MonadBH m => NonEmpty IndexName -> Search -> m (BHResponse (SearchResult a))
- Database.Bloodhound.Client: searchByIndicesTemplate :: (FromJSON a, MonadBH m) => NonEmpty IndexName -> SearchTemplate -> m (BHResponse (SearchResult a))
- Database.Bloodhound.Client: storeSearchTemplate :: MonadBH m => SearchTemplateId -> SearchTemplateSource -> m (BHResponse Acknowledged)
- Database.Bloodhound.Client: templateExists :: MonadBH m => TemplateName -> m Bool
- Database.Bloodhound.Client: updateDocument :: (ToJSON patch, MonadBH m) => IndexName -> IndexDocumentSettings -> patch -> DocId -> m (BHResponse IndexedDocument)
- Database.Bloodhound.Client: updateIndexAliases :: MonadBH m => NonEmpty IndexAliasAction -> m (BHResponse Acknowledged)
- Database.Bloodhound.Client: updateIndexSettings :: MonadBH m => NonEmpty UpdatableIndexSetting -> IndexName -> m (BHResponse Acknowledged)
- Database.Bloodhound.Client: updateSnapshotRepo :: (MonadBH m, SnapshotRepo repo) => SnapshotRepoUpdateSettings -> repo -> m (BHResponse Acknowledged)
- Database.Bloodhound.Client: verifySnapshotRepo :: (MonadBH m, MonadThrow m) => SnapshotRepoName -> m (ParsedEsResponse SnapshotVerification)
- Database.Bloodhound.Client: waitForYellowIndex :: MonadBH m => IndexName -> m (BHResponse HealthStatus)
- Database.Bloodhound.Client: withBH :: ManagerSettings -> Server -> BH IO a -> IO a
- Database.Bloodhound.Internal.Aggregation: AddTime :: Int -> DateMathUnit -> DateMathModifier
- Database.Bloodhound.Internal.Aggregation: Basic :: StatsType
- Database.Bloodhound.Internal.Aggregation: BoolValue :: Bool -> BucketValue
- Database.Bloodhound.Internal.Aggregation: BreadthFirst :: CollectionMode
- Database.Bloodhound.Internal.Aggregation: Bucket :: [a] -> Bucket a
- Database.Bloodhound.Internal.Aggregation: CardinalityAgg :: CardinalityAggregation -> Aggregation
- Database.Bloodhound.Internal.Aggregation: CardinalityAggregation :: FieldName -> Maybe Int -> CardinalityAggregation
- Database.Bloodhound.Internal.Aggregation: DMDate :: Day -> DateMathAnchor
- Database.Bloodhound.Internal.Aggregation: DMDay :: DateMathUnit
- Database.Bloodhound.Internal.Aggregation: DMHour :: DateMathUnit
- Database.Bloodhound.Internal.Aggregation: DMMinute :: DateMathUnit
- Database.Bloodhound.Internal.Aggregation: DMMonth :: DateMathUnit
- Database.Bloodhound.Internal.Aggregation: DMNow :: DateMathAnchor
- Database.Bloodhound.Internal.Aggregation: DMSecond :: DateMathUnit
- Database.Bloodhound.Internal.Aggregation: DMWeek :: DateMathUnit
- Database.Bloodhound.Internal.Aggregation: DMYear :: DateMathUnit
- Database.Bloodhound.Internal.Aggregation: DateHistogramAgg :: DateHistogramAggregation -> Aggregation
- Database.Bloodhound.Internal.Aggregation: DateHistogramAggregation :: FieldName -> Interval -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Aggregations -> DateHistogramAggregation
- Database.Bloodhound.Internal.Aggregation: DateHistogramResult :: Int -> Maybe Text -> Int -> Maybe AggregationResults -> DateHistogramResult
- Database.Bloodhound.Internal.Aggregation: DateMathExpr :: DateMathAnchor -> [DateMathModifier] -> DateMathExpr
- Database.Bloodhound.Internal.Aggregation: DateRangeAgg :: DateRangeAggregation -> Aggregation
- Database.Bloodhound.Internal.Aggregation: DateRangeAggregation :: FieldName -> Maybe Text -> NonEmpty DateRangeAggRange -> DateRangeAggregation
- Database.Bloodhound.Internal.Aggregation: DateRangeFrom :: DateMathExpr -> DateRangeAggRange
- Database.Bloodhound.Internal.Aggregation: DateRangeFromAndTo :: DateMathExpr -> DateMathExpr -> DateRangeAggRange
- Database.Bloodhound.Internal.Aggregation: DateRangeResult :: Text -> Maybe UTCTime -> Maybe Text -> Maybe UTCTime -> Maybe Text -> Int -> Maybe AggregationResults -> DateRangeResult
- Database.Bloodhound.Internal.Aggregation: DateRangeTo :: DateMathExpr -> DateRangeAggRange
- Database.Bloodhound.Internal.Aggregation: DepthFirst :: CollectionMode
- Database.Bloodhound.Internal.Aggregation: Extended :: StatsType
- Database.Bloodhound.Internal.Aggregation: FieldValueCount :: FieldName -> ValueCountAggregation
- Database.Bloodhound.Internal.Aggregation: FilterAgg :: FilterAggregation -> Aggregation
- Database.Bloodhound.Internal.Aggregation: FilterAggregation :: Filter -> Maybe Aggregations -> FilterAggregation
- Database.Bloodhound.Internal.Aggregation: GlobalOrdinals :: ExecutionHint
- Database.Bloodhound.Internal.Aggregation: HTR_EQ :: HitsTotalRelation
- Database.Bloodhound.Internal.Aggregation: HTR_GTE :: HitsTotalRelation
- Database.Bloodhound.Internal.Aggregation: Hit :: IndexName -> DocId -> Score -> Maybe a -> Maybe SearchAfterKey -> Maybe HitFields -> Maybe HitHighlight -> Maybe (KeyMap (TopHitResult Value)) -> Hit a
- Database.Bloodhound.Internal.Aggregation: HitsTotal :: Int -> HitsTotalRelation -> HitsTotal
- Database.Bloodhound.Internal.Aggregation: Map :: ExecutionHint
- Database.Bloodhound.Internal.Aggregation: MissingAgg :: MissingAggregation -> Aggregation
- Database.Bloodhound.Internal.Aggregation: MissingAggregation :: Text -> MissingAggregation
- Database.Bloodhound.Internal.Aggregation: MissingResult :: Int -> MissingResult
- Database.Bloodhound.Internal.Aggregation: RoundDownTo :: DateMathUnit -> DateMathModifier
- Database.Bloodhound.Internal.Aggregation: ScientificValue :: Scientific -> BucketValue
- Database.Bloodhound.Internal.Aggregation: ScriptValueCount :: Script -> ValueCountAggregation
- Database.Bloodhound.Internal.Aggregation: SearchHits :: HitsTotal -> Score -> [Hit a] -> SearchHits a
- Database.Bloodhound.Internal.Aggregation: StatisticsAggregation :: StatsType -> FieldName -> StatisticsAggregation
- Database.Bloodhound.Internal.Aggregation: StatsAgg :: StatisticsAggregation -> Aggregation
- Database.Bloodhound.Internal.Aggregation: SubtractTime :: Int -> DateMathUnit -> DateMathModifier
- Database.Bloodhound.Internal.Aggregation: SumAgg :: SumAggregation -> Aggregation
- Database.Bloodhound.Internal.Aggregation: SumAggregation :: FieldName -> SumAggregation
- Database.Bloodhound.Internal.Aggregation: TermInclusion :: Text -> TermInclusion
- Database.Bloodhound.Internal.Aggregation: TermOrder :: Text -> SortOrder -> TermOrder
- Database.Bloodhound.Internal.Aggregation: TermPattern :: Text -> Text -> TermInclusion
- Database.Bloodhound.Internal.Aggregation: TermsAgg :: TermsAggregation -> Aggregation
- Database.Bloodhound.Internal.Aggregation: TermsAggregation :: Either Text Text -> Maybe TermInclusion -> Maybe TermInclusion -> Maybe TermOrder -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe CollectionMode -> Maybe ExecutionHint -> Maybe Aggregations -> TermsAggregation
- Database.Bloodhound.Internal.Aggregation: TermsResult :: BucketValue -> Int -> Maybe AggregationResults -> TermsResult
- Database.Bloodhound.Internal.Aggregation: TextValue :: Text -> BucketValue
- Database.Bloodhound.Internal.Aggregation: TopHitResult :: SearchHits a -> TopHitResult a
- Database.Bloodhound.Internal.Aggregation: TopHitsAgg :: TopHitsAggregation -> Aggregation
- Database.Bloodhound.Internal.Aggregation: TopHitsAggregation :: Maybe From -> Maybe Size -> Maybe Sort -> TopHitsAggregation
- Database.Bloodhound.Internal.Aggregation: ValueCountAgg :: ValueCountAggregation -> Aggregation
- Database.Bloodhound.Internal.Aggregation: [buckets] :: Bucket a -> [a]
- Database.Bloodhound.Internal.Aggregation: [cardinalityField] :: CardinalityAggregation -> FieldName
- Database.Bloodhound.Internal.Aggregation: [dateAggs] :: DateHistogramAggregation -> Maybe Aggregations
- Database.Bloodhound.Internal.Aggregation: [dateDocCount] :: DateHistogramResult -> Int
- Database.Bloodhound.Internal.Aggregation: [dateField] :: DateHistogramAggregation -> FieldName
- Database.Bloodhound.Internal.Aggregation: [dateFormat] :: DateHistogramAggregation -> Maybe Text
- Database.Bloodhound.Internal.Aggregation: [dateHistogramAggs] :: DateHistogramResult -> Maybe AggregationResults
- Database.Bloodhound.Internal.Aggregation: [dateInterval] :: DateHistogramAggregation -> Interval
- Database.Bloodhound.Internal.Aggregation: [dateKeyStr] :: DateHistogramResult -> Maybe Text
- Database.Bloodhound.Internal.Aggregation: [dateKey] :: DateHistogramResult -> Int
- Database.Bloodhound.Internal.Aggregation: [datePostOffset] :: DateHistogramAggregation -> Maybe Text
- Database.Bloodhound.Internal.Aggregation: [datePostZone] :: DateHistogramAggregation -> Maybe Text
- Database.Bloodhound.Internal.Aggregation: [datePreOffset] :: DateHistogramAggregation -> Maybe Text
- Database.Bloodhound.Internal.Aggregation: [datePreZone] :: DateHistogramAggregation -> Maybe Text
- Database.Bloodhound.Internal.Aggregation: [dateRangeAggs] :: DateRangeResult -> Maybe AggregationResults
- Database.Bloodhound.Internal.Aggregation: [dateRangeDocCount] :: DateRangeResult -> Int
- Database.Bloodhound.Internal.Aggregation: [dateRangeFromAsString] :: DateRangeResult -> Maybe Text
- Database.Bloodhound.Internal.Aggregation: [dateRangeFrom] :: DateRangeResult -> Maybe UTCTime
- Database.Bloodhound.Internal.Aggregation: [dateRangeKey] :: DateRangeResult -> Text
- Database.Bloodhound.Internal.Aggregation: [dateRangeToAsString] :: DateRangeResult -> Maybe Text
- Database.Bloodhound.Internal.Aggregation: [dateRangeTo] :: DateRangeResult -> Maybe UTCTime
- Database.Bloodhound.Internal.Aggregation: [draField] :: DateRangeAggregation -> FieldName
- Database.Bloodhound.Internal.Aggregation: [draFormat] :: DateRangeAggregation -> Maybe Text
- Database.Bloodhound.Internal.Aggregation: [draRanges] :: DateRangeAggregation -> NonEmpty DateRangeAggRange
- Database.Bloodhound.Internal.Aggregation: [faAggs] :: FilterAggregation -> Maybe Aggregations
- Database.Bloodhound.Internal.Aggregation: [faFilter] :: FilterAggregation -> Filter
- Database.Bloodhound.Internal.Aggregation: [hitDocId] :: Hit a -> DocId
- Database.Bloodhound.Internal.Aggregation: [hitFields] :: Hit a -> Maybe HitFields
- Database.Bloodhound.Internal.Aggregation: [hitHighlight] :: Hit a -> Maybe HitHighlight
- Database.Bloodhound.Internal.Aggregation: [hitIndex] :: Hit a -> IndexName
- Database.Bloodhound.Internal.Aggregation: [hitInnerHits] :: Hit a -> Maybe (KeyMap (TopHitResult Value))
- Database.Bloodhound.Internal.Aggregation: [hitScore] :: Hit a -> Score
- Database.Bloodhound.Internal.Aggregation: [hitSort] :: Hit a -> Maybe SearchAfterKey
- Database.Bloodhound.Internal.Aggregation: [hitSource] :: Hit a -> Maybe a
- Database.Bloodhound.Internal.Aggregation: [hitsTotal] :: SearchHits a -> HitsTotal
- Database.Bloodhound.Internal.Aggregation: [hits] :: SearchHits a -> [Hit a]
- Database.Bloodhound.Internal.Aggregation: [maField] :: MissingAggregation -> Text
- Database.Bloodhound.Internal.Aggregation: [maxScore] :: SearchHits a -> Score
- Database.Bloodhound.Internal.Aggregation: [missingDocCount] :: MissingResult -> Int
- Database.Bloodhound.Internal.Aggregation: [precisionThreshold] :: CardinalityAggregation -> Maybe Int
- Database.Bloodhound.Internal.Aggregation: [relation] :: HitsTotal -> HitsTotalRelation
- Database.Bloodhound.Internal.Aggregation: [statsField] :: StatisticsAggregation -> FieldName
- Database.Bloodhound.Internal.Aggregation: [statsType] :: StatisticsAggregation -> StatsType
- Database.Bloodhound.Internal.Aggregation: [sumAggregationField] :: SumAggregation -> FieldName
- Database.Bloodhound.Internal.Aggregation: [taFrom] :: TopHitsAggregation -> Maybe From
- Database.Bloodhound.Internal.Aggregation: [taSize] :: TopHitsAggregation -> Maybe Size
- Database.Bloodhound.Internal.Aggregation: [taSort] :: TopHitsAggregation -> Maybe Sort
- Database.Bloodhound.Internal.Aggregation: [tarHits] :: TopHitResult a -> SearchHits a
- Database.Bloodhound.Internal.Aggregation: [termAggs] :: TermsAggregation -> Maybe Aggregations
- Database.Bloodhound.Internal.Aggregation: [termCollectMode] :: TermsAggregation -> Maybe CollectionMode
- Database.Bloodhound.Internal.Aggregation: [termExclude] :: TermsAggregation -> Maybe TermInclusion
- Database.Bloodhound.Internal.Aggregation: [termExecutionHint] :: TermsAggregation -> Maybe ExecutionHint
- Database.Bloodhound.Internal.Aggregation: [termInclude] :: TermsAggregation -> Maybe TermInclusion
- Database.Bloodhound.Internal.Aggregation: [termKey] :: TermsResult -> BucketValue
- Database.Bloodhound.Internal.Aggregation: [termMinDocCount] :: TermsAggregation -> Maybe Int
- Database.Bloodhound.Internal.Aggregation: [termOrder] :: TermsAggregation -> Maybe TermOrder
- Database.Bloodhound.Internal.Aggregation: [termShardSize] :: TermsAggregation -> Maybe Int
- Database.Bloodhound.Internal.Aggregation: [termSize] :: TermsAggregation -> Maybe Int
- Database.Bloodhound.Internal.Aggregation: [termSortField] :: TermOrder -> Text
- Database.Bloodhound.Internal.Aggregation: [termSortOrder] :: TermOrder -> SortOrder
- Database.Bloodhound.Internal.Aggregation: [term] :: TermsAggregation -> Either Text Text
- Database.Bloodhound.Internal.Aggregation: [termsAggs] :: TermsResult -> Maybe AggregationResults
- Database.Bloodhound.Internal.Aggregation: [termsDocCount] :: TermsResult -> Int
- Database.Bloodhound.Internal.Aggregation: [value] :: HitsTotal -> Int
- Database.Bloodhound.Internal.Aggregation: aggs :: BucketAggregation a => a -> Maybe AggregationResults
- Database.Bloodhound.Internal.Aggregation: class BucketAggregation a
- Database.Bloodhound.Internal.Aggregation: data Aggregation
- Database.Bloodhound.Internal.Aggregation: data Bucket a
- Database.Bloodhound.Internal.Aggregation: data BucketValue
- Database.Bloodhound.Internal.Aggregation: data CardinalityAggregation
- Database.Bloodhound.Internal.Aggregation: data CollectionMode
- Database.Bloodhound.Internal.Aggregation: data DateHistogramAggregation
- Database.Bloodhound.Internal.Aggregation: data DateHistogramResult
- Database.Bloodhound.Internal.Aggregation: data DateMathAnchor
- Database.Bloodhound.Internal.Aggregation: data DateMathExpr
- Database.Bloodhound.Internal.Aggregation: data DateMathModifier
- Database.Bloodhound.Internal.Aggregation: data DateMathUnit
- Database.Bloodhound.Internal.Aggregation: data DateRangeAggRange
- Database.Bloodhound.Internal.Aggregation: data DateRangeAggregation
- Database.Bloodhound.Internal.Aggregation: data DateRangeResult
- Database.Bloodhound.Internal.Aggregation: data ExecutionHint
- Database.Bloodhound.Internal.Aggregation: data FilterAggregation
- Database.Bloodhound.Internal.Aggregation: data Hit a
- Database.Bloodhound.Internal.Aggregation: data HitsTotal
- Database.Bloodhound.Internal.Aggregation: data HitsTotalRelation
- Database.Bloodhound.Internal.Aggregation: data MissingAggregation
- Database.Bloodhound.Internal.Aggregation: data MissingResult
- Database.Bloodhound.Internal.Aggregation: data SearchHits a
- Database.Bloodhound.Internal.Aggregation: data StatisticsAggregation
- Database.Bloodhound.Internal.Aggregation: data StatsType
- Database.Bloodhound.Internal.Aggregation: data TermInclusion
- Database.Bloodhound.Internal.Aggregation: data TermOrder
- Database.Bloodhound.Internal.Aggregation: data TermsAggregation
- Database.Bloodhound.Internal.Aggregation: data TermsResult
- Database.Bloodhound.Internal.Aggregation: data TopHitResult a
- Database.Bloodhound.Internal.Aggregation: data TopHitsAggregation
- Database.Bloodhound.Internal.Aggregation: data ValueCountAggregation
- Database.Bloodhound.Internal.Aggregation: docCount :: BucketAggregation a => a -> Int
- Database.Bloodhound.Internal.Aggregation: emptyAggregations :: Aggregations
- Database.Bloodhound.Internal.Aggregation: getNamedSubAgg :: Object -> [Key] -> Maybe AggregationResults
- Database.Bloodhound.Internal.Aggregation: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Aggregation.BucketValue
- Database.Bloodhound.Internal.Aggregation: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Aggregation.DateHistogramResult
- Database.Bloodhound.Internal.Aggregation: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Aggregation.DateRangeResult
- Database.Bloodhound.Internal.Aggregation: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Aggregation.HitsTotal
- Database.Bloodhound.Internal.Aggregation: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Aggregation.HitsTotalRelation
- Database.Bloodhound.Internal.Aggregation: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Aggregation.MissingResult
- Database.Bloodhound.Internal.Aggregation: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Aggregation.TermsResult
- Database.Bloodhound.Internal.Aggregation: instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (Database.Bloodhound.Internal.Aggregation.Bucket a)
- Database.Bloodhound.Internal.Aggregation: instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (Database.Bloodhound.Internal.Aggregation.Hit a)
- Database.Bloodhound.Internal.Aggregation: instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (Database.Bloodhound.Internal.Aggregation.SearchHits a)
- Database.Bloodhound.Internal.Aggregation: instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (Database.Bloodhound.Internal.Aggregation.TopHitResult a)
- Database.Bloodhound.Internal.Aggregation: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Aggregation.Aggregation
- Database.Bloodhound.Internal.Aggregation: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Aggregation.CollectionMode
- Database.Bloodhound.Internal.Aggregation: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Aggregation.DateMathExpr
- Database.Bloodhound.Internal.Aggregation: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Aggregation.DateRangeAggRange
- Database.Bloodhound.Internal.Aggregation: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Aggregation.DateRangeAggregation
- Database.Bloodhound.Internal.Aggregation: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Aggregation.ExecutionHint
- Database.Bloodhound.Internal.Aggregation: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Aggregation.TermInclusion
- Database.Bloodhound.Internal.Aggregation: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Aggregation.TermOrder
- Database.Bloodhound.Internal.Aggregation: instance Database.Bloodhound.Internal.Aggregation.BucketAggregation Database.Bloodhound.Internal.Aggregation.DateHistogramResult
- Database.Bloodhound.Internal.Aggregation: instance Database.Bloodhound.Internal.Aggregation.BucketAggregation Database.Bloodhound.Internal.Aggregation.DateRangeResult
- Database.Bloodhound.Internal.Aggregation: instance Database.Bloodhound.Internal.Aggregation.BucketAggregation Database.Bloodhound.Internal.Aggregation.TermsResult
- Database.Bloodhound.Internal.Aggregation: instance GHC.Base.Monoid (Database.Bloodhound.Internal.Aggregation.SearchHits a)
- Database.Bloodhound.Internal.Aggregation: instance GHC.Base.Semigroup (Database.Bloodhound.Internal.Aggregation.SearchHits a)
- Database.Bloodhound.Internal.Aggregation: instance GHC.Base.Semigroup Database.Bloodhound.Internal.Aggregation.HitsTotal
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.Aggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.CardinalityAggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.CollectionMode
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.DateHistogramAggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.DateMathAnchor
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.DateMathExpr
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.DateMathModifier
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.DateMathUnit
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.DateRangeAggRange
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.DateRangeAggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.DateRangeResult
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.ExecutionHint
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.FilterAggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.HitsTotal
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.HitsTotalRelation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.MissingAggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.StatisticsAggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.StatsType
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.SumAggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.TermInclusion
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.TermOrder
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.TermsAggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.TopHitsAggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq Database.Bloodhound.Internal.Aggregation.ValueCountAggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq a => GHC.Classes.Eq (Database.Bloodhound.Internal.Aggregation.Hit a)
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq a => GHC.Classes.Eq (Database.Bloodhound.Internal.Aggregation.SearchHits a)
- Database.Bloodhound.Internal.Aggregation: instance GHC.Classes.Eq a => GHC.Classes.Eq (Database.Bloodhound.Internal.Aggregation.TopHitResult a)
- Database.Bloodhound.Internal.Aggregation: instance GHC.Read.Read Database.Bloodhound.Internal.Aggregation.BucketValue
- Database.Bloodhound.Internal.Aggregation: instance GHC.Read.Read Database.Bloodhound.Internal.Aggregation.TermsResult
- Database.Bloodhound.Internal.Aggregation: instance GHC.Read.Read a => GHC.Read.Read (Database.Bloodhound.Internal.Aggregation.Bucket a)
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.Aggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.BucketValue
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.CardinalityAggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.CollectionMode
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.DateHistogramAggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.DateHistogramResult
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.DateMathAnchor
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.DateMathExpr
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.DateMathModifier
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.DateMathUnit
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.DateRangeAggRange
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.DateRangeAggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.DateRangeResult
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.ExecutionHint
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.FilterAggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.HitsTotal
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.HitsTotalRelation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.MissingAggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.MissingResult
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.StatisticsAggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.StatsType
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.SumAggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.TermInclusion
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.TermOrder
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.TermsAggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.TermsResult
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.TopHitsAggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show Database.Bloodhound.Internal.Aggregation.ValueCountAggregation
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show a => GHC.Show.Show (Database.Bloodhound.Internal.Aggregation.Bucket a)
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show a => GHC.Show.Show (Database.Bloodhound.Internal.Aggregation.Hit a)
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show a => GHC.Show.Show (Database.Bloodhound.Internal.Aggregation.SearchHits a)
- Database.Bloodhound.Internal.Aggregation: instance GHC.Show.Show a => GHC.Show.Show (Database.Bloodhound.Internal.Aggregation.TopHitResult a)
- Database.Bloodhound.Internal.Aggregation: key :: BucketAggregation a => a -> BucketValue
- Database.Bloodhound.Internal.Aggregation: mkAggregations :: Key -> Aggregation -> Aggregations
- Database.Bloodhound.Internal.Aggregation: mkCardinalityAggregation :: FieldName -> CardinalityAggregation
- Database.Bloodhound.Internal.Aggregation: mkDateHistogram :: FieldName -> Interval -> DateHistogramAggregation
- Database.Bloodhound.Internal.Aggregation: mkExtendedStatsAggregation :: FieldName -> StatisticsAggregation
- Database.Bloodhound.Internal.Aggregation: mkStatsAggregation :: FieldName -> StatisticsAggregation
- Database.Bloodhound.Internal.Aggregation: mkTermsAggregation :: Text -> TermsAggregation
- Database.Bloodhound.Internal.Aggregation: mkTermsScriptAggregation :: Text -> TermsAggregation
- Database.Bloodhound.Internal.Aggregation: newtype SumAggregation
- Database.Bloodhound.Internal.Aggregation: toAggResult :: FromJSON a => Key -> AggregationResults -> Maybe a
- Database.Bloodhound.Internal.Aggregation: toDateHistogram :: Key -> AggregationResults -> Maybe (Bucket DateHistogramResult)
- Database.Bloodhound.Internal.Aggregation: toMissing :: Key -> AggregationResults -> Maybe MissingResult
- Database.Bloodhound.Internal.Aggregation: toTerms :: Key -> AggregationResults -> Maybe (Bucket TermsResult)
- Database.Bloodhound.Internal.Aggregation: toTopHits :: FromJSON a => Key -> AggregationResults -> Maybe (TopHitResult a)
- Database.Bloodhound.Internal.Aggregation: type AggregationResults = Map Key Value
- Database.Bloodhound.Internal.Aggregation: type Aggregations = Map Key Aggregation
- Database.Bloodhound.Internal.Aggregation: type SearchAfterKey = [Value]
- Database.Bloodhound.Internal.Analysis: Analysis :: Map Text AnalyzerDefinition -> Map Text TokenizerDefinition -> Map Text TokenFilterDefinition -> Map Text CharFilterDefinition -> Analysis
- Database.Bloodhound.Internal.Analysis: AnalyzerDefinition :: Maybe Tokenizer -> [TokenFilter] -> [CharFilter] -> AnalyzerDefinition
- Database.Bloodhound.Internal.Analysis: Arabic :: Language
- Database.Bloodhound.Internal.Analysis: Armenian :: Language
- Database.Bloodhound.Internal.Analysis: Basque :: Language
- Database.Bloodhound.Internal.Analysis: Bengali :: Language
- Database.Bloodhound.Internal.Analysis: Brazilian :: Language
- Database.Bloodhound.Internal.Analysis: Bulgarian :: Language
- Database.Bloodhound.Internal.Analysis: Catalan :: Language
- Database.Bloodhound.Internal.Analysis: CharFilterDefinitionMapping :: Map Text Text -> CharFilterDefinition
- Database.Bloodhound.Internal.Analysis: CharFilterDefinitionPatternReplace :: Text -> Text -> Maybe Text -> CharFilterDefinition
- Database.Bloodhound.Internal.Analysis: Cjk :: Language
- Database.Bloodhound.Internal.Analysis: Czech :: Language
- Database.Bloodhound.Internal.Analysis: Danish :: Language
- Database.Bloodhound.Internal.Analysis: Dutch :: Language
- Database.Bloodhound.Internal.Analysis: EdgeNgramFilterSideBack :: EdgeNgramFilterSide
- Database.Bloodhound.Internal.Analysis: EdgeNgramFilterSideFront :: EdgeNgramFilterSide
- Database.Bloodhound.Internal.Analysis: English :: Language
- Database.Bloodhound.Internal.Analysis: Finnish :: Language
- Database.Bloodhound.Internal.Analysis: French :: Language
- Database.Bloodhound.Internal.Analysis: Galician :: Language
- Database.Bloodhound.Internal.Analysis: German :: Language
- Database.Bloodhound.Internal.Analysis: German2 :: Language
- Database.Bloodhound.Internal.Analysis: Greek :: Language
- Database.Bloodhound.Internal.Analysis: Hindi :: Language
- Database.Bloodhound.Internal.Analysis: Hungarian :: Language
- Database.Bloodhound.Internal.Analysis: Indonesian :: Language
- Database.Bloodhound.Internal.Analysis: Irish :: Language
- Database.Bloodhound.Internal.Analysis: Italian :: Language
- Database.Bloodhound.Internal.Analysis: Kp :: Language
- Database.Bloodhound.Internal.Analysis: Latvian :: Language
- Database.Bloodhound.Internal.Analysis: Lithuanian :: Language
- Database.Bloodhound.Internal.Analysis: Lovins :: Language
- Database.Bloodhound.Internal.Analysis: Ngram :: Int -> Int -> [TokenChar] -> Ngram
- Database.Bloodhound.Internal.Analysis: NgramFilter :: Int -> Int -> NgramFilter
- Database.Bloodhound.Internal.Analysis: Norwegian :: Language
- Database.Bloodhound.Internal.Analysis: Persian :: Language
- Database.Bloodhound.Internal.Analysis: Porter :: Language
- Database.Bloodhound.Internal.Analysis: Portuguese :: Language
- Database.Bloodhound.Internal.Analysis: Romanian :: Language
- Database.Bloodhound.Internal.Analysis: Russian :: Language
- Database.Bloodhound.Internal.Analysis: Shingle :: Int -> Int -> Bool -> Bool -> Text -> Text -> Shingle
- Database.Bloodhound.Internal.Analysis: Sorani :: Language
- Database.Bloodhound.Internal.Analysis: Spanish :: Language
- Database.Bloodhound.Internal.Analysis: Swedish :: Language
- Database.Bloodhound.Internal.Analysis: Thai :: Language
- Database.Bloodhound.Internal.Analysis: TokenDigit :: TokenChar
- Database.Bloodhound.Internal.Analysis: TokenFilterDefinitionApostrophe :: TokenFilterDefinition
- Database.Bloodhound.Internal.Analysis: TokenFilterDefinitionEdgeNgram :: NgramFilter -> Maybe EdgeNgramFilterSide -> TokenFilterDefinition
- Database.Bloodhound.Internal.Analysis: TokenFilterDefinitionLowercase :: Maybe Language -> TokenFilterDefinition
- Database.Bloodhound.Internal.Analysis: TokenFilterDefinitionNgram :: NgramFilter -> TokenFilterDefinition
- Database.Bloodhound.Internal.Analysis: TokenFilterDefinitionReverse :: TokenFilterDefinition
- Database.Bloodhound.Internal.Analysis: TokenFilterDefinitionShingle :: Shingle -> TokenFilterDefinition
- Database.Bloodhound.Internal.Analysis: TokenFilterDefinitionSnowball :: Language -> TokenFilterDefinition
- Database.Bloodhound.Internal.Analysis: TokenFilterDefinitionStemmer :: Language -> TokenFilterDefinition
- Database.Bloodhound.Internal.Analysis: TokenFilterDefinitionStop :: Either Language [StopWord] -> TokenFilterDefinition
- Database.Bloodhound.Internal.Analysis: TokenFilterDefinitionUppercase :: Maybe Language -> TokenFilterDefinition
- Database.Bloodhound.Internal.Analysis: TokenFilterTruncate :: Int -> TokenFilterDefinition
- Database.Bloodhound.Internal.Analysis: TokenLetter :: TokenChar
- Database.Bloodhound.Internal.Analysis: TokenPunctuation :: TokenChar
- Database.Bloodhound.Internal.Analysis: TokenSymbol :: TokenChar
- Database.Bloodhound.Internal.Analysis: TokenWhitespace :: TokenChar
- Database.Bloodhound.Internal.Analysis: Tokenizer :: Text -> Tokenizer
- Database.Bloodhound.Internal.Analysis: TokenizerDefinitionEdgeNgram :: Ngram -> TokenizerDefinition
- Database.Bloodhound.Internal.Analysis: TokenizerDefinitionNgram :: Ngram -> TokenizerDefinition
- Database.Bloodhound.Internal.Analysis: Turkish :: Language
- Database.Bloodhound.Internal.Analysis: [analysisAnalyzer] :: Analysis -> Map Text AnalyzerDefinition
- Database.Bloodhound.Internal.Analysis: [analysisCharFilter] :: Analysis -> Map Text CharFilterDefinition
- Database.Bloodhound.Internal.Analysis: [analysisTokenFilter] :: Analysis -> Map Text TokenFilterDefinition
- Database.Bloodhound.Internal.Analysis: [analysisTokenizer] :: Analysis -> Map Text TokenizerDefinition
- Database.Bloodhound.Internal.Analysis: [analyzerDefinitionCharFilter] :: AnalyzerDefinition -> [CharFilter]
- Database.Bloodhound.Internal.Analysis: [analyzerDefinitionFilter] :: AnalyzerDefinition -> [TokenFilter]
- Database.Bloodhound.Internal.Analysis: [analyzerDefinitionTokenizer] :: AnalyzerDefinition -> Maybe Tokenizer
- Database.Bloodhound.Internal.Analysis: [charFilterDefinitionPatternReplaceFlags] :: CharFilterDefinition -> Maybe Text
- Database.Bloodhound.Internal.Analysis: [charFilterDefinitionPatternReplacePattern] :: CharFilterDefinition -> Text
- Database.Bloodhound.Internal.Analysis: [charFilterDefinitionPatternReplaceReplacement] :: CharFilterDefinition -> Text
- Database.Bloodhound.Internal.Analysis: [ngramFilterMaxGram] :: NgramFilter -> Int
- Database.Bloodhound.Internal.Analysis: [ngramFilterMinGram] :: NgramFilter -> Int
- Database.Bloodhound.Internal.Analysis: [ngramMaxGram] :: Ngram -> Int
- Database.Bloodhound.Internal.Analysis: [ngramMinGram] :: Ngram -> Int
- Database.Bloodhound.Internal.Analysis: [ngramTokenChars] :: Ngram -> [TokenChar]
- Database.Bloodhound.Internal.Analysis: [shingleFillerToken] :: Shingle -> Text
- Database.Bloodhound.Internal.Analysis: [shingleMaxSize] :: Shingle -> Int
- Database.Bloodhound.Internal.Analysis: [shingleMinSize] :: Shingle -> Int
- Database.Bloodhound.Internal.Analysis: [shingleOutputUnigramsIfNoShingles] :: Shingle -> Bool
- Database.Bloodhound.Internal.Analysis: [shingleOutputUnigrams] :: Shingle -> Bool
- Database.Bloodhound.Internal.Analysis: [shingleTokenSeparator] :: Shingle -> Text
- Database.Bloodhound.Internal.Analysis: data Analysis
- Database.Bloodhound.Internal.Analysis: data AnalyzerDefinition
- Database.Bloodhound.Internal.Analysis: data CharFilterDefinition
- Database.Bloodhound.Internal.Analysis: data EdgeNgramFilterSide
- Database.Bloodhound.Internal.Analysis: data Language
- Database.Bloodhound.Internal.Analysis: data Ngram
- Database.Bloodhound.Internal.Analysis: data NgramFilter
- Database.Bloodhound.Internal.Analysis: data Shingle
- Database.Bloodhound.Internal.Analysis: data TokenChar
- Database.Bloodhound.Internal.Analysis: data TokenFilterDefinition
- Database.Bloodhound.Internal.Analysis: data TokenizerDefinition
- Database.Bloodhound.Internal.Analysis: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Analysis.Analysis
- Database.Bloodhound.Internal.Analysis: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Analysis.AnalyzerDefinition
- Database.Bloodhound.Internal.Analysis: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Analysis.CharFilterDefinition
- Database.Bloodhound.Internal.Analysis: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Analysis.EdgeNgramFilterSide
- Database.Bloodhound.Internal.Analysis: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Analysis.Language
- Database.Bloodhound.Internal.Analysis: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Analysis.TokenChar
- Database.Bloodhound.Internal.Analysis: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Analysis.TokenFilterDefinition
- Database.Bloodhound.Internal.Analysis: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Analysis.Tokenizer
- Database.Bloodhound.Internal.Analysis: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Analysis.TokenizerDefinition
- Database.Bloodhound.Internal.Analysis: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Analysis.Analysis
- Database.Bloodhound.Internal.Analysis: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Analysis.AnalyzerDefinition
- Database.Bloodhound.Internal.Analysis: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Analysis.CharFilterDefinition
- Database.Bloodhound.Internal.Analysis: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Analysis.EdgeNgramFilterSide
- Database.Bloodhound.Internal.Analysis: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Analysis.Language
- Database.Bloodhound.Internal.Analysis: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Analysis.TokenChar
- Database.Bloodhound.Internal.Analysis: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Analysis.TokenFilterDefinition
- Database.Bloodhound.Internal.Analysis: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Analysis.Tokenizer
- Database.Bloodhound.Internal.Analysis: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Analysis.TokenizerDefinition
- Database.Bloodhound.Internal.Analysis: instance GHC.Classes.Eq Database.Bloodhound.Internal.Analysis.Analysis
- Database.Bloodhound.Internal.Analysis: instance GHC.Classes.Eq Database.Bloodhound.Internal.Analysis.AnalyzerDefinition
- Database.Bloodhound.Internal.Analysis: instance GHC.Classes.Eq Database.Bloodhound.Internal.Analysis.CharFilterDefinition
- Database.Bloodhound.Internal.Analysis: instance GHC.Classes.Eq Database.Bloodhound.Internal.Analysis.EdgeNgramFilterSide
- Database.Bloodhound.Internal.Analysis: instance GHC.Classes.Eq Database.Bloodhound.Internal.Analysis.Language
- Database.Bloodhound.Internal.Analysis: instance GHC.Classes.Eq Database.Bloodhound.Internal.Analysis.Ngram
- Database.Bloodhound.Internal.Analysis: instance GHC.Classes.Eq Database.Bloodhound.Internal.Analysis.NgramFilter
- Database.Bloodhound.Internal.Analysis: instance GHC.Classes.Eq Database.Bloodhound.Internal.Analysis.Shingle
- Database.Bloodhound.Internal.Analysis: instance GHC.Classes.Eq Database.Bloodhound.Internal.Analysis.TokenChar
- Database.Bloodhound.Internal.Analysis: instance GHC.Classes.Eq Database.Bloodhound.Internal.Analysis.TokenFilterDefinition
- Database.Bloodhound.Internal.Analysis: instance GHC.Classes.Eq Database.Bloodhound.Internal.Analysis.Tokenizer
- Database.Bloodhound.Internal.Analysis: instance GHC.Classes.Eq Database.Bloodhound.Internal.Analysis.TokenizerDefinition
- Database.Bloodhound.Internal.Analysis: instance GHC.Generics.Generic Database.Bloodhound.Internal.Analysis.Analysis
- Database.Bloodhound.Internal.Analysis: instance GHC.Generics.Generic Database.Bloodhound.Internal.Analysis.AnalyzerDefinition
- Database.Bloodhound.Internal.Analysis: instance GHC.Generics.Generic Database.Bloodhound.Internal.Analysis.EdgeNgramFilterSide
- Database.Bloodhound.Internal.Analysis: instance GHC.Generics.Generic Database.Bloodhound.Internal.Analysis.Language
- Database.Bloodhound.Internal.Analysis: instance GHC.Generics.Generic Database.Bloodhound.Internal.Analysis.Ngram
- Database.Bloodhound.Internal.Analysis: instance GHC.Generics.Generic Database.Bloodhound.Internal.Analysis.NgramFilter
- Database.Bloodhound.Internal.Analysis: instance GHC.Generics.Generic Database.Bloodhound.Internal.Analysis.Shingle
- Database.Bloodhound.Internal.Analysis: instance GHC.Generics.Generic Database.Bloodhound.Internal.Analysis.TokenChar
- Database.Bloodhound.Internal.Analysis: instance GHC.Generics.Generic Database.Bloodhound.Internal.Analysis.TokenFilterDefinition
- Database.Bloodhound.Internal.Analysis: instance GHC.Generics.Generic Database.Bloodhound.Internal.Analysis.Tokenizer
- Database.Bloodhound.Internal.Analysis: instance GHC.Generics.Generic Database.Bloodhound.Internal.Analysis.TokenizerDefinition
- Database.Bloodhound.Internal.Analysis: instance GHC.Show.Show Database.Bloodhound.Internal.Analysis.Analysis
- Database.Bloodhound.Internal.Analysis: instance GHC.Show.Show Database.Bloodhound.Internal.Analysis.AnalyzerDefinition
- Database.Bloodhound.Internal.Analysis: instance GHC.Show.Show Database.Bloodhound.Internal.Analysis.CharFilterDefinition
- Database.Bloodhound.Internal.Analysis: instance GHC.Show.Show Database.Bloodhound.Internal.Analysis.EdgeNgramFilterSide
- Database.Bloodhound.Internal.Analysis: instance GHC.Show.Show Database.Bloodhound.Internal.Analysis.Language
- Database.Bloodhound.Internal.Analysis: instance GHC.Show.Show Database.Bloodhound.Internal.Analysis.Ngram
- Database.Bloodhound.Internal.Analysis: instance GHC.Show.Show Database.Bloodhound.Internal.Analysis.NgramFilter
- Database.Bloodhound.Internal.Analysis: instance GHC.Show.Show Database.Bloodhound.Internal.Analysis.Shingle
- Database.Bloodhound.Internal.Analysis: instance GHC.Show.Show Database.Bloodhound.Internal.Analysis.TokenChar
- Database.Bloodhound.Internal.Analysis: instance GHC.Show.Show Database.Bloodhound.Internal.Analysis.TokenFilterDefinition
- Database.Bloodhound.Internal.Analysis: instance GHC.Show.Show Database.Bloodhound.Internal.Analysis.Tokenizer
- Database.Bloodhound.Internal.Analysis: instance GHC.Show.Show Database.Bloodhound.Internal.Analysis.TokenizerDefinition
- Database.Bloodhound.Internal.Analysis: languageFromText :: Text -> Maybe Language
- Database.Bloodhound.Internal.Analysis: languageToText :: Language -> Text
- Database.Bloodhound.Internal.Analysis: newtype Tokenizer
- Database.Bloodhound.Internal.Analysis: ngramFilterFromJSONObject :: Object -> Parser NgramFilter
- Database.Bloodhound.Internal.Analysis: ngramFilterToPairs :: NgramFilter -> [Pair]
- Database.Bloodhound.Internal.Client: AddAlias :: IndexAlias -> IndexAliasCreate -> IndexAliasAction
- Database.Bloodhound.Internal.Client: AllAliasRouting :: RoutingValue -> AliasRouting
- Database.Bloodhound.Internal.Client: AllIndexes :: IndexSelection
- Database.Bloodhound.Internal.Client: AllNodes :: NodeSelection
- Database.Bloodhound.Internal.Client: AllSnapshotRepos :: SnapshotRepoSelection
- Database.Bloodhound.Internal.Client: AllSnapshots :: SnapshotSelection
- Database.Bloodhound.Internal.Client: AllocAll :: AllocationPolicy
- Database.Bloodhound.Internal.Client: AllocNewPrimaries :: AllocationPolicy
- Database.Bloodhound.Internal.Client: AllocNone :: AllocationPolicy
- Database.Bloodhound.Internal.Client: AllocPrimaries :: AllocationPolicy
- Database.Bloodhound.Internal.Client: AnalysisSetting :: Analysis -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: AutoExpandReplicas :: ReplicaBounds -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: BH :: ReaderT BHEnv m a -> BH m a
- Database.Bloodhound.Internal.Client: BHEnv :: Server -> Manager -> (Request -> IO Request) -> BHEnv
- Database.Bloodhound.Internal.Client: BlocksMetaData :: Bool -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: BlocksRead :: Bool -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: BlocksReadOnly :: Bool -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: BlocksWrite :: Bool -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: BoundTransportAddress :: EsAddress -> [EsAddress] -> BoundTransportAddress
- Database.Bloodhound.Internal.Client: BuildHash :: Text -> BuildHash
- Database.Bloodhound.Internal.Client: BulkCreate :: IndexName -> DocId -> Value -> BulkOperation
- Database.Bloodhound.Internal.Client: BulkCreateEncoding :: IndexName -> DocId -> Encoding -> BulkOperation
- Database.Bloodhound.Internal.Client: BulkDelete :: IndexName -> DocId -> BulkOperation
- Database.Bloodhound.Internal.Client: BulkIndex :: IndexName -> DocId -> Value -> BulkOperation
- Database.Bloodhound.Internal.Client: BulkIndexAuto :: IndexName -> Value -> BulkOperation
- Database.Bloodhound.Internal.Client: BulkIndexEncodingAuto :: IndexName -> Encoding -> BulkOperation
- Database.Bloodhound.Internal.Client: BulkUpdate :: IndexName -> DocId -> Value -> BulkOperation
- Database.Bloodhound.Internal.Client: BulkUpsert :: IndexName -> DocId -> UpsertPayload -> [UpsertActionMetadata] -> BulkOperation
- Database.Bloodhound.Internal.Client: ByteType :: FieldType
- Database.Bloodhound.Internal.Client: Bytes :: Int -> Bytes
- Database.Bloodhound.Internal.Client: CPUInfo :: Bytes -> Int -> Int -> Int -> Int -> Text -> Text -> CPUInfo
- Database.Bloodhound.Internal.Client: CacheFilterExpire :: Maybe NominalDiffTime -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: CacheFilterMaxSize :: Maybe Bytes -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: ChildDocument :: FieldName -> RelationName -> DocId -> JoinRelation
- Database.Bloodhound.Internal.Client: CloseIndex :: OpenCloseIndex
- Database.Bloodhound.Internal.Client: ClusterName :: Text -> ClusterName
- Database.Bloodhound.Internal.Client: CompoundFileFormat :: Bool -> CompoundFormat
- Database.Bloodhound.Internal.Client: CompressionBest :: Compression
- Database.Bloodhound.Internal.Client: CompressionDefault :: Compression
- Database.Bloodhound.Internal.Client: CompressionSetting :: Compression -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: Day :: Interval
- Database.Bloodhound.Internal.Client: Days :: TimeInterval
- Database.Bloodhound.Internal.Client: EsAddress :: Text -> EsAddress
- Database.Bloodhound.Internal.Client: EsPassword :: Text -> EsPassword
- Database.Bloodhound.Internal.Client: EsUsername :: Text -> EsUsername
- Database.Bloodhound.Internal.Client: ExactRepo :: SnapshotRepoName -> SnapshotRepoPattern
- Database.Bloodhound.Internal.Client: ExactSnap :: SnapshotName -> SnapshotPattern
- Database.Bloodhound.Internal.Client: ExplicitShards :: Int -> InitialShardCount
- Database.Bloodhound.Internal.Client: FSBuffered :: FSType
- Database.Bloodhound.Internal.Client: FSSimple :: FSType
- Database.Bloodhound.Internal.Client: FailOnMergeFailure :: Bool -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: FieldDefinition :: FieldType -> FieldDefinition
- Database.Bloodhound.Internal.Client: FloatType :: FieldType
- Database.Bloodhound.Internal.Client: ForceMergeIndexSettings :: Maybe Int -> Bool -> Bool -> ForceMergeIndexSettings
- Database.Bloodhound.Internal.Client: FsSnapshotRepo :: SnapshotRepoName -> FilePath -> Bool -> Maybe Bytes -> Maybe Bytes -> Maybe Bytes -> FsSnapshotRepo
- Database.Bloodhound.Internal.Client: FullMinus1Shards :: InitialShardCount
- Database.Bloodhound.Internal.Client: FullNodeId :: Text -> FullNodeId
- Database.Bloodhound.Internal.Client: FullShards :: InitialShardCount
- Database.Bloodhound.Internal.Client: GCDeletes :: NominalDiffTime -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: GatewaySnapshotInterval :: NominalDiffTime -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: GenericSnapshotRepo :: SnapshotRepoName -> SnapshotRepoType -> GenericSnapshotRepoSettings -> GenericSnapshotRepo
- Database.Bloodhound.Internal.Client: GenericSnapshotRepoSettings :: Object -> GenericSnapshotRepoSettings
- Database.Bloodhound.Internal.Client: GeoPointType :: FieldType
- Database.Bloodhound.Internal.Client: GeoShapeType :: FieldType
- Database.Bloodhound.Internal.Client: GranularAliasRouting :: Maybe SearchAliasRouting -> Maybe IndexAliasRouting -> AliasRouting
- Database.Bloodhound.Internal.Client: Hour :: Interval
- Database.Bloodhound.Internal.Client: Hours :: TimeInterval
- Database.Bloodhound.Internal.Client: IndexAlias :: IndexName -> IndexAliasName -> IndexAlias
- Database.Bloodhound.Internal.Client: IndexAliasCreate :: Maybe AliasRouting -> Maybe Filter -> IndexAliasCreate
- Database.Bloodhound.Internal.Client: IndexAliasRouting :: RoutingValue -> IndexAliasRouting
- Database.Bloodhound.Internal.Client: IndexAliasSummary :: IndexAlias -> IndexAliasCreate -> IndexAliasSummary
- Database.Bloodhound.Internal.Client: IndexAliasesSummary :: [IndexAliasSummary] -> IndexAliasesSummary
- Database.Bloodhound.Internal.Client: IndexCompoundFormat :: CompoundFormat -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: IndexCompoundOnFlush :: Bool -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: IndexConcurrency :: Int -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: IndexDocumentSettings :: VersionControl -> Maybe JoinRelation -> IndexDocumentSettings
- Database.Bloodhound.Internal.Client: IndexList :: NonEmpty IndexName -> IndexSelection
- Database.Bloodhound.Internal.Client: IndexMappingsLimits :: Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> IndexMappingsLimits
- Database.Bloodhound.Internal.Client: IndexPattern :: Text -> IndexPattern
- Database.Bloodhound.Internal.Client: IndexSettings :: ShardCount -> ReplicaCount -> IndexMappingsLimits -> IndexSettings
- Database.Bloodhound.Internal.Client: IndexSettingsSummary :: IndexName -> IndexSettings -> [UpdatableIndexSetting] -> IndexSettingsSummary
- Database.Bloodhound.Internal.Client: IndexTemplate :: [IndexPattern] -> Maybe IndexSettings -> Value -> IndexTemplate
- Database.Bloodhound.Internal.Client: IntegerType :: FieldType
- Database.Bloodhound.Internal.Client: JVMBufferPoolStats :: Bytes -> Bytes -> Int -> JVMBufferPoolStats
- Database.Bloodhound.Internal.Client: JVMGCCollector :: Text -> JVMGCCollector
- Database.Bloodhound.Internal.Client: JVMGCStats :: NominalDiffTime -> Int -> JVMGCStats
- Database.Bloodhound.Internal.Client: JVMMemoryInfo :: Bytes -> Bytes -> Bytes -> Bytes -> Bytes -> JVMMemoryInfo
- Database.Bloodhound.Internal.Client: JVMMemoryPool :: Text -> JVMMemoryPool
- Database.Bloodhound.Internal.Client: JVMPoolStats :: Bytes -> Bytes -> Bytes -> Bytes -> JVMPoolStats
- Database.Bloodhound.Internal.Client: JVMVersion :: Text -> JVMVersion
- Database.Bloodhound.Internal.Client: LoadAvgs :: Double -> Double -> Double -> LoadAvgs
- Database.Bloodhound.Internal.Client: LocalNode :: NodeSelection
- Database.Bloodhound.Internal.Client: LongType :: FieldType
- Database.Bloodhound.Internal.Client: MacAddress :: Text -> MacAddress
- Database.Bloodhound.Internal.Client: Mapping :: [MappingField] -> Mapping
- Database.Bloodhound.Internal.Client: MappingField :: FieldName -> FieldDefinition -> MappingField
- Database.Bloodhound.Internal.Client: MappingTotalFieldsLimit :: Int -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: MergeSegmentVsTotalIndex :: Double -> CompoundFormat
- Database.Bloodhound.Internal.Client: Minute :: Interval
- Database.Bloodhound.Internal.Client: Minutes :: TimeInterval
- Database.Bloodhound.Internal.Client: Month :: Interval
- Database.Bloodhound.Internal.Client: NetworkInterfaceName :: Text -> NetworkInterfaceName
- Database.Bloodhound.Internal.Client: NodeAttrFilter :: NodeAttrName -> NonEmpty Text -> NodeAttrFilter
- Database.Bloodhound.Internal.Client: NodeAttrName :: Text -> NodeAttrName
- Database.Bloodhound.Internal.Client: NodeBreakerStats :: Int -> Double -> Bytes -> Bytes -> NodeBreakerStats
- Database.Bloodhound.Internal.Client: NodeBreakersStats :: NodeBreakerStats -> NodeBreakerStats -> NodeBreakerStats -> NodeBreakersStats
- Database.Bloodhound.Internal.Client: NodeByAttribute :: NodeAttrName -> Text -> NodeSelector
- Database.Bloodhound.Internal.Client: NodeByFullNodeId :: FullNodeId -> NodeSelector
- Database.Bloodhound.Internal.Client: NodeByHost :: Server -> NodeSelector
- Database.Bloodhound.Internal.Client: NodeByName :: NodeName -> NodeSelector
- Database.Bloodhound.Internal.Client: NodeDataPathStats :: Maybe Double -> Maybe Double -> Maybe Bytes -> Maybe Bytes -> Maybe Bytes -> Maybe Int -> Maybe Int -> Maybe Int -> Bytes -> Bytes -> Bytes -> Maybe Text -> Maybe Text -> Text -> Text -> NodeDataPathStats
- Database.Bloodhound.Internal.Client: NodeFSStats :: [NodeDataPathStats] -> NodeFSTotalStats -> UTCTime -> NodeFSStats
- Database.Bloodhound.Internal.Client: NodeFSTotalStats :: Maybe Double -> Maybe Double -> Maybe Bytes -> Maybe Bytes -> Maybe Bytes -> Maybe Int -> Maybe Int -> Maybe Int -> Bytes -> Bytes -> Bytes -> NodeFSTotalStats
- Database.Bloodhound.Internal.Client: NodeHTTPInfo :: Bytes -> EsAddress -> [EsAddress] -> NodeHTTPInfo
- Database.Bloodhound.Internal.Client: NodeHTTPStats :: Int -> Int -> NodeHTTPStats
- Database.Bloodhound.Internal.Client: NodeIndicesStats :: Maybe NominalDiffTime -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Bytes -> Maybe Int -> Maybe NominalDiffTime -> Maybe Int -> Bytes -> Int -> Maybe Bytes -> Bytes -> Maybe Bytes -> Bytes -> Bytes -> Int -> Bytes -> Maybe Int -> Maybe Bytes -> Maybe Int -> Maybe NominalDiffTime -> Maybe Int -> Int -> Bytes -> NominalDiffTime -> Int -> Int -> NominalDiffTime -> Int -> NominalDiffTime -> Int -> Bytes -> Int -> NominalDiffTime -> Int -> Bytes -> Int -> Int -> Int -> NominalDiffTime -> Int -> Int -> NominalDiffTime -> Int -> Int -> Int -> NominalDiffTime -> Int -> NominalDiffTime -> Int -> NominalDiffTime -> Int -> Maybe NominalDiffTime -> Maybe Bool -> Maybe Int -> Int -> NominalDiffTime -> Int -> Int -> NominalDiffTime -> Int -> Maybe NominalDiffTime -> Bytes -> Int -> Int -> NodeIndicesStats
- Database.Bloodhound.Internal.Client: NodeInfo :: Maybe EsAddress -> BuildHash -> VersionNumber -> Server -> Server -> EsAddress -> NodeName -> FullNodeId -> [NodePluginInfo] -> NodeHTTPInfo -> NodeTransportInfo -> Maybe NodeNetworkInfo -> Map Text NodeThreadPoolInfo -> NodeJVMInfo -> NodeProcessInfo -> NodeOSInfo -> Object -> NodeInfo
- Database.Bloodhound.Internal.Client: NodeJVMInfo :: [JVMMemoryPool] -> [JVMGCCollector] -> JVMMemoryInfo -> UTCTime -> Text -> VMVersion -> Text -> JVMVersion -> PID -> NodeJVMInfo
- Database.Bloodhound.Internal.Client: NodeJVMStats :: JVMBufferPoolStats -> JVMBufferPoolStats -> JVMGCStats -> JVMGCStats -> Int -> Int -> JVMPoolStats -> JVMPoolStats -> JVMPoolStats -> Bytes -> Bytes -> Bytes -> Bytes -> Int -> Bytes -> NominalDiffTime -> UTCTime -> NodeJVMStats
- Database.Bloodhound.Internal.Client: NodeList :: NonEmpty NodeSelector -> NodeSelection
- Database.Bloodhound.Internal.Client: NodeName :: Text -> NodeName
- Database.Bloodhound.Internal.Client: NodeNetworkInfo :: NodeNetworkInterface -> NominalDiffTime -> NodeNetworkInfo
- Database.Bloodhound.Internal.Client: NodeNetworkInterface :: MacAddress -> NetworkInterfaceName -> Server -> NodeNetworkInterface
- Database.Bloodhound.Internal.Client: NodeNetworkStats :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> NodeNetworkStats
- Database.Bloodhound.Internal.Client: NodeOSInfo :: NominalDiffTime -> Text -> Text -> Text -> Int -> Int -> NodeOSInfo
- Database.Bloodhound.Internal.Client: NodeOSStats :: UTCTime -> Int -> Maybe LoadAvgs -> Bytes -> Bytes -> Int -> Bytes -> Int -> Bytes -> Bytes -> Bytes -> NodeOSStats
- Database.Bloodhound.Internal.Client: NodePluginInfo :: Maybe Bool -> Maybe Bool -> Text -> MaybeNA VersionNumber -> PluginName -> NodePluginInfo
- Database.Bloodhound.Internal.Client: NodeProcessInfo :: Bool -> Maybe Int -> PID -> NominalDiffTime -> NodeProcessInfo
- Database.Bloodhound.Internal.Client: NodeProcessStats :: UTCTime -> Int -> Int -> Int -> NominalDiffTime -> Bytes -> NodeProcessStats
- Database.Bloodhound.Internal.Client: NodeStats :: NodeName -> FullNodeId -> Maybe NodeBreakersStats -> NodeHTTPStats -> NodeTransportStats -> NodeFSStats -> Maybe NodeNetworkStats -> Map Text NodeThreadPoolStats -> NodeJVMStats -> NodeProcessStats -> NodeOSStats -> NodeIndicesStats -> NodeStats
- Database.Bloodhound.Internal.Client: NodeThreadPoolInfo :: ThreadPoolSize -> Maybe NominalDiffTime -> Maybe Int -> Maybe Int -> ThreadPoolType -> NodeThreadPoolInfo
- Database.Bloodhound.Internal.Client: NodeThreadPoolStats :: Int -> Int -> Int -> Int -> Int -> Int -> NodeThreadPoolStats
- Database.Bloodhound.Internal.Client: NodeTransportInfo :: [BoundTransportAddress] -> EsAddress -> [EsAddress] -> NodeTransportInfo
- Database.Bloodhound.Internal.Client: NodeTransportStats :: Bytes -> Int -> Bytes -> Int -> Int -> NodeTransportStats
- Database.Bloodhound.Internal.Client: NodesInfo :: [NodeInfo] -> ClusterName -> NodesInfo
- Database.Bloodhound.Internal.Client: NodesStats :: [NodeStats] -> ClusterName -> NodesStats
- Database.Bloodhound.Internal.Client: NominalDiffTimeJSON :: NominalDiffTime -> NominalDiffTimeJSON
- Database.Bloodhound.Internal.Client: NumberOfReplicas :: ReplicaCount -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: OpenIndex :: OpenCloseIndex
- Database.Bloodhound.Internal.Client: OtherRepoConversionError :: Text -> SnapshotRepoConversionError
- Database.Bloodhound.Internal.Client: PID :: Int -> PID
- Database.Bloodhound.Internal.Client: ParentDocument :: FieldName -> RelationName -> JoinRelation
- Database.Bloodhound.Internal.Client: PluginName :: Text -> PluginName
- Database.Bloodhound.Internal.Client: Quarter :: Interval
- Database.Bloodhound.Internal.Client: QuorumMinus1Shards :: InitialShardCount
- Database.Bloodhound.Internal.Client: QuorumShards :: InitialShardCount
- Database.Bloodhound.Internal.Client: RRGroupRefNum :: Int -> RRGroupRefNum
- Database.Bloodhound.Internal.Client: RRSubGroup :: RRGroupRefNum -> RestoreRenameToken
- Database.Bloodhound.Internal.Client: RRSubWholeMatch :: RestoreRenameToken
- Database.Bloodhound.Internal.Client: RRTLit :: Text -> RestoreRenameToken
- Database.Bloodhound.Internal.Client: RecoveryInitialShards :: InitialShardCount -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: RefreshInterval :: NominalDiffTime -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: RemoveAlias :: IndexAlias -> IndexAliasAction
- Database.Bloodhound.Internal.Client: ReplicasBounded :: Int -> Int -> ReplicaBounds
- Database.Bloodhound.Internal.Client: ReplicasLowerBounded :: Int -> ReplicaBounds
- Database.Bloodhound.Internal.Client: ReplicasUnbounded :: ReplicaBounds
- Database.Bloodhound.Internal.Client: RepoPattern :: Text -> SnapshotRepoPattern
- Database.Bloodhound.Internal.Client: RepoTypeMismatch :: SnapshotRepoType -> SnapshotRepoType -> SnapshotRepoConversionError
- Database.Bloodhound.Internal.Client: RestoreIndexSettings :: Maybe ReplicaCount -> RestoreIndexSettings
- Database.Bloodhound.Internal.Client: RestoreRenamePattern :: Text -> RestoreRenamePattern
- Database.Bloodhound.Internal.Client: RoutingAllocationEnable :: AllocationPolicy -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: RoutingAllocationExclude :: NonEmpty NodeAttrFilter -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: RoutingAllocationInclude :: NonEmpty NodeAttrFilter -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: RoutingAllocationRequire :: NonEmpty NodeAttrFilter -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: RoutingAllocationShardsPerNode :: ShardCount -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: RoutingValue :: Text -> RoutingValue
- Database.Bloodhound.Internal.Client: SearchAliasRouting :: NonEmpty RoutingValue -> SearchAliasRouting
- Database.Bloodhound.Internal.Client: Second :: Interval
- Database.Bloodhound.Internal.Client: Seconds :: TimeInterval
- Database.Bloodhound.Internal.Client: ShardResult :: Int -> Int -> Int -> Int -> ShardResult
- Database.Bloodhound.Internal.Client: ShortType :: FieldType
- Database.Bloodhound.Internal.Client: SnapPattern :: Text -> SnapshotPattern
- Database.Bloodhound.Internal.Client: SnapshotAborted :: SnapshotState
- Database.Bloodhound.Internal.Client: SnapshotCreateSettings :: Bool -> Maybe IndexSelection -> Bool -> Bool -> Bool -> SnapshotCreateSettings
- Database.Bloodhound.Internal.Client: SnapshotFailed :: SnapshotState
- Database.Bloodhound.Internal.Client: SnapshotInfo :: ShardResult -> [SnapshotShardFailure] -> NominalDiffTime -> UTCTime -> UTCTime -> SnapshotState -> [IndexName] -> SnapshotName -> SnapshotInfo
- Database.Bloodhound.Internal.Client: SnapshotInit :: SnapshotState
- Database.Bloodhound.Internal.Client: SnapshotList :: NonEmpty SnapshotPattern -> SnapshotSelection
- Database.Bloodhound.Internal.Client: SnapshotMissing :: SnapshotState
- Database.Bloodhound.Internal.Client: SnapshotNodeVerification :: FullNodeId -> NodeName -> SnapshotNodeVerification
- Database.Bloodhound.Internal.Client: SnapshotRepoList :: NonEmpty SnapshotRepoPattern -> SnapshotRepoSelection
- Database.Bloodhound.Internal.Client: SnapshotRepoName :: Text -> SnapshotRepoName
- Database.Bloodhound.Internal.Client: SnapshotRepoType :: Text -> SnapshotRepoType
- Database.Bloodhound.Internal.Client: SnapshotRepoUpdateSettings :: Bool -> SnapshotRepoUpdateSettings
- Database.Bloodhound.Internal.Client: SnapshotRestoreSettings :: Bool -> Maybe IndexSelection -> Bool -> Bool -> Maybe RestoreRenamePattern -> Maybe (NonEmpty RestoreRenameToken) -> Bool -> Bool -> Maybe RestoreIndexSettings -> Maybe (NonEmpty Text) -> SnapshotRestoreSettings
- Database.Bloodhound.Internal.Client: SnapshotShardFailure :: IndexName -> Maybe NodeName -> Text -> ShardId -> SnapshotShardFailure
- Database.Bloodhound.Internal.Client: SnapshotStarted :: SnapshotState
- Database.Bloodhound.Internal.Client: SnapshotSuccess :: SnapshotState
- Database.Bloodhound.Internal.Client: SnapshotVerification :: [SnapshotNodeVerification] -> SnapshotVerification
- Database.Bloodhound.Internal.Client: SnapshotWaiting :: SnapshotState
- Database.Bloodhound.Internal.Client: Status :: Text -> Text -> Text -> Version -> Text -> Status
- Database.Bloodhound.Internal.Client: TTLDisablePurge :: Bool -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: TemplateName :: Text -> TemplateName
- Database.Bloodhound.Internal.Client: ThreadPool :: Text -> NodeThreadPoolInfo -> ThreadPool
- Database.Bloodhound.Internal.Client: ThreadPoolBounded :: Int -> ThreadPoolSize
- Database.Bloodhound.Internal.Client: ThreadPoolCached :: ThreadPoolType
- Database.Bloodhound.Internal.Client: ThreadPoolFixed :: ThreadPoolType
- Database.Bloodhound.Internal.Client: ThreadPoolFixedAutoQueueSize :: ThreadPoolType
- Database.Bloodhound.Internal.Client: ThreadPoolScaling :: ThreadPoolType
- Database.Bloodhound.Internal.Client: ThreadPoolUnbounded :: ThreadPoolSize
- Database.Bloodhound.Internal.Client: TranslogDisableFlush :: Bool -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: TranslogFSType :: FSType -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: TranslogFlushThresholdOps :: Int -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: TranslogFlushThresholdPeriod :: NominalDiffTime -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: TranslogFlushThresholdSize :: Bytes -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: UA_RetryOnConflict :: Int -> UpsertActionMetadata
- Database.Bloodhound.Internal.Client: UA_Version :: Int -> UpsertActionMetadata
- Database.Bloodhound.Internal.Client: UnassignedNodeLeftDelayedTimeout :: NominalDiffTime -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: UpsertDoc :: Value -> UpsertPayload
- Database.Bloodhound.Internal.Client: UpsertScript :: Bool -> Script -> Value -> UpsertPayload
- Database.Bloodhound.Internal.Client: VMVersion :: Text -> VMVersion
- Database.Bloodhound.Internal.Client: Version :: VersionNumber -> BuildHash -> UTCTime -> Bool -> VersionNumber -> Version
- Database.Bloodhound.Internal.Client: VersionNumber :: Version -> VersionNumber
- Database.Bloodhound.Internal.Client: WarmerEnabled :: Bool -> UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: Week :: Interval
- Database.Bloodhound.Internal.Client: Weeks :: TimeInterval
- Database.Bloodhound.Internal.Client: Year :: Interval
- Database.Bloodhound.Internal.Client: [aliasCreateFilter] :: IndexAliasCreate -> Maybe Filter
- Database.Bloodhound.Internal.Client: [aliasCreateRouting] :: IndexAliasCreate -> Maybe AliasRouting
- Database.Bloodhound.Internal.Client: [bhManager] :: BHEnv -> Manager
- Database.Bloodhound.Internal.Client: [bhRequestHook] :: BHEnv -> Request -> IO Request
- Database.Bloodhound.Internal.Client: [bhServer] :: BHEnv -> Server
- Database.Bloodhound.Internal.Client: [boundAddress] :: BoundTransportAddress -> [EsAddress]
- Database.Bloodhound.Internal.Client: [buildHash] :: BuildHash -> Text
- Database.Bloodhound.Internal.Client: [build_date] :: Version -> UTCTime
- Database.Bloodhound.Internal.Client: [build_hash] :: Version -> BuildHash
- Database.Bloodhound.Internal.Client: [build_snapshot] :: Version -> Bool
- Database.Bloodhound.Internal.Client: [clusterName] :: ClusterName -> Text
- Database.Bloodhound.Internal.Client: [cluster_name] :: Status -> Text
- Database.Bloodhound.Internal.Client: [cluster_uuid] :: Status -> Text
- Database.Bloodhound.Internal.Client: [cpuCacheSize] :: CPUInfo -> Bytes
- Database.Bloodhound.Internal.Client: [cpuCoresPerSocket] :: CPUInfo -> Int
- Database.Bloodhound.Internal.Client: [cpuMHZ] :: CPUInfo -> Int
- Database.Bloodhound.Internal.Client: [cpuModel] :: CPUInfo -> Text
- Database.Bloodhound.Internal.Client: [cpuTotalCores] :: CPUInfo -> Int
- Database.Bloodhound.Internal.Client: [cpuTotalSockets] :: CPUInfo -> Int
- Database.Bloodhound.Internal.Client: [cpuVendor] :: CPUInfo -> Text
- Database.Bloodhound.Internal.Client: [esAddress] :: EsAddress -> Text
- Database.Bloodhound.Internal.Client: [esPassword] :: EsPassword -> Text
- Database.Bloodhound.Internal.Client: [esUsername] :: EsUsername -> Text
- Database.Bloodhound.Internal.Client: [fieldDefinition] :: MappingField -> FieldDefinition
- Database.Bloodhound.Internal.Client: [fieldType] :: FieldDefinition -> FieldType
- Database.Bloodhound.Internal.Client: [flushAfterOptimize] :: ForceMergeIndexSettings -> Bool
- Database.Bloodhound.Internal.Client: [fsrChunkSize] :: FsSnapshotRepo -> Maybe Bytes
- Database.Bloodhound.Internal.Client: [fsrCompressMetadata] :: FsSnapshotRepo -> Bool
- Database.Bloodhound.Internal.Client: [fsrLocation] :: FsSnapshotRepo -> FilePath
- Database.Bloodhound.Internal.Client: [fsrMaxRestoreBytesPerSec] :: FsSnapshotRepo -> Maybe Bytes
- Database.Bloodhound.Internal.Client: [fsrMaxSnapshotBytesPerSec] :: FsSnapshotRepo -> Maybe Bytes
- Database.Bloodhound.Internal.Client: [fsrName] :: FsSnapshotRepo -> SnapshotRepoName
- Database.Bloodhound.Internal.Client: [fullNodeId] :: FullNodeId -> Text
- Database.Bloodhound.Internal.Client: [gSnapshotRepoName] :: GenericSnapshotRepo -> SnapshotRepoName
- Database.Bloodhound.Internal.Client: [gSnapshotRepoSettingsObject] :: GenericSnapshotRepoSettings -> Object
- Database.Bloodhound.Internal.Client: [gSnapshotRepoSettings] :: GenericSnapshotRepo -> GenericSnapshotRepoSettings
- Database.Bloodhound.Internal.Client: [gSnapshotRepoType] :: GenericSnapshotRepo -> SnapshotRepoType
- Database.Bloodhound.Internal.Client: [idsJoinRelation] :: IndexDocumentSettings -> Maybe JoinRelation
- Database.Bloodhound.Internal.Client: [idsVersionControl] :: IndexDocumentSettings -> VersionControl
- Database.Bloodhound.Internal.Client: [indexAliasSummaryAlias] :: IndexAliasSummary -> IndexAlias
- Database.Bloodhound.Internal.Client: [indexAliasSummaryCreate] :: IndexAliasSummary -> IndexAliasCreate
- Database.Bloodhound.Internal.Client: [indexAlias] :: IndexAlias -> IndexAliasName
- Database.Bloodhound.Internal.Client: [indexAliasesSummary] :: IndexAliasesSummary -> [IndexAliasSummary]
- Database.Bloodhound.Internal.Client: [indexMappingsLimitDepth] :: IndexMappingsLimits -> Maybe Int
- Database.Bloodhound.Internal.Client: [indexMappingsLimitFieldNameLength] :: IndexMappingsLimits -> Maybe Int
- Database.Bloodhound.Internal.Client: [indexMappingsLimitNestedFields] :: IndexMappingsLimits -> Maybe Int
- Database.Bloodhound.Internal.Client: [indexMappingsLimitNestedObjects] :: IndexMappingsLimits -> Maybe Int
- Database.Bloodhound.Internal.Client: [indexMappingsLimits] :: IndexSettings -> IndexMappingsLimits
- Database.Bloodhound.Internal.Client: [indexReplicas] :: IndexSettings -> ReplicaCount
- Database.Bloodhound.Internal.Client: [indexShards] :: IndexSettings -> ShardCount
- Database.Bloodhound.Internal.Client: [jvmBufferPoolStatsCount] :: JVMBufferPoolStats -> Int
- Database.Bloodhound.Internal.Client: [jvmBufferPoolStatsTotalCapacity] :: JVMBufferPoolStats -> Bytes
- Database.Bloodhound.Internal.Client: [jvmBufferPoolStatsUsed] :: JVMBufferPoolStats -> Bytes
- Database.Bloodhound.Internal.Client: [jvmGCCollector] :: JVMGCCollector -> Text
- Database.Bloodhound.Internal.Client: [jvmGCStatsCollectionCount] :: JVMGCStats -> Int
- Database.Bloodhound.Internal.Client: [jvmGCStatsCollectionTime] :: JVMGCStats -> NominalDiffTime
- Database.Bloodhound.Internal.Client: [jvmMemoryInfoDirectMax] :: JVMMemoryInfo -> Bytes
- Database.Bloodhound.Internal.Client: [jvmMemoryInfoHeapInit] :: JVMMemoryInfo -> Bytes
- Database.Bloodhound.Internal.Client: [jvmMemoryInfoHeapMax] :: JVMMemoryInfo -> Bytes
- Database.Bloodhound.Internal.Client: [jvmMemoryInfoNonHeapInit] :: JVMMemoryInfo -> Bytes
- Database.Bloodhound.Internal.Client: [jvmMemoryInfoNonHeapMax] :: JVMMemoryInfo -> Bytes
- Database.Bloodhound.Internal.Client: [jvmMemoryPool] :: JVMMemoryPool -> Text
- Database.Bloodhound.Internal.Client: [jvmPoolStatsMax] :: JVMPoolStats -> Bytes
- Database.Bloodhound.Internal.Client: [jvmPoolStatsPeakMax] :: JVMPoolStats -> Bytes
- Database.Bloodhound.Internal.Client: [jvmPoolStatsPeakUsed] :: JVMPoolStats -> Bytes
- Database.Bloodhound.Internal.Client: [jvmPoolStatsUsed] :: JVMPoolStats -> Bytes
- Database.Bloodhound.Internal.Client: [loadAvg15Min] :: LoadAvgs -> Double
- Database.Bloodhound.Internal.Client: [loadAvg1Min] :: LoadAvgs -> Double
- Database.Bloodhound.Internal.Client: [loadAvg5Min] :: LoadAvgs -> Double
- Database.Bloodhound.Internal.Client: [lucene_version] :: Version -> VersionNumber
- Database.Bloodhound.Internal.Client: [macAddress] :: MacAddress -> Text
- Database.Bloodhound.Internal.Client: [mappingFieldName] :: MappingField -> FieldName
- Database.Bloodhound.Internal.Client: [mappingFields] :: Mapping -> [MappingField]
- Database.Bloodhound.Internal.Client: [maxNumSegments] :: ForceMergeIndexSettings -> Maybe Int
- Database.Bloodhound.Internal.Client: [name] :: Status -> Text
- Database.Bloodhound.Internal.Client: [ndtJSON] :: NominalDiffTimeJSON -> NominalDiffTime
- Database.Bloodhound.Internal.Client: [networkInterfaceName] :: NetworkInterfaceName -> Text
- Database.Bloodhound.Internal.Client: [nodeAttrFilterName] :: NodeAttrFilter -> NodeAttrName
- Database.Bloodhound.Internal.Client: [nodeAttrFilterValues] :: NodeAttrFilter -> NonEmpty Text
- Database.Bloodhound.Internal.Client: [nodeBreakersEstSize] :: NodeBreakerStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeBreakersLimitSize] :: NodeBreakerStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeBreakersOverhead] :: NodeBreakerStats -> Double
- Database.Bloodhound.Internal.Client: [nodeBreakersTripped] :: NodeBreakerStats -> Int
- Database.Bloodhound.Internal.Client: [nodeDataPathAvailable] :: NodeDataPathStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeDataPathDevice] :: NodeDataPathStats -> Maybe Text
- Database.Bloodhound.Internal.Client: [nodeDataPathDiskQueue] :: NodeDataPathStats -> Maybe Double
- Database.Bloodhound.Internal.Client: [nodeDataPathDiskServiceTime] :: NodeDataPathStats -> Maybe Double
- Database.Bloodhound.Internal.Client: [nodeDataPathFree] :: NodeDataPathStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeDataPathIOOps] :: NodeDataPathStats -> Maybe Int
- Database.Bloodhound.Internal.Client: [nodeDataPathIOSize] :: NodeDataPathStats -> Maybe Bytes
- Database.Bloodhound.Internal.Client: [nodeDataPathMount] :: NodeDataPathStats -> Text
- Database.Bloodhound.Internal.Client: [nodeDataPathPath] :: NodeDataPathStats -> Text
- Database.Bloodhound.Internal.Client: [nodeDataPathReadSize] :: NodeDataPathStats -> Maybe Bytes
- Database.Bloodhound.Internal.Client: [nodeDataPathReads] :: NodeDataPathStats -> Maybe Int
- Database.Bloodhound.Internal.Client: [nodeDataPathTotal] :: NodeDataPathStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeDataPathType] :: NodeDataPathStats -> Maybe Text
- Database.Bloodhound.Internal.Client: [nodeDataPathWriteSize] :: NodeDataPathStats -> Maybe Bytes
- Database.Bloodhound.Internal.Client: [nodeDataPathWrites] :: NodeDataPathStats -> Maybe Int
- Database.Bloodhound.Internal.Client: [nodeFSDataPaths] :: NodeFSStats -> [NodeDataPathStats]
- Database.Bloodhound.Internal.Client: [nodeFSTimestamp] :: NodeFSStats -> UTCTime
- Database.Bloodhound.Internal.Client: [nodeFSTotalAvailable] :: NodeFSTotalStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeFSTotalDiskQueue] :: NodeFSTotalStats -> Maybe Double
- Database.Bloodhound.Internal.Client: [nodeFSTotalDiskServiceTime] :: NodeFSTotalStats -> Maybe Double
- Database.Bloodhound.Internal.Client: [nodeFSTotalFree] :: NodeFSTotalStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeFSTotalIOOps] :: NodeFSTotalStats -> Maybe Int
- Database.Bloodhound.Internal.Client: [nodeFSTotalIOSize] :: NodeFSTotalStats -> Maybe Bytes
- Database.Bloodhound.Internal.Client: [nodeFSTotalReadSize] :: NodeFSTotalStats -> Maybe Bytes
- Database.Bloodhound.Internal.Client: [nodeFSTotalReads] :: NodeFSTotalStats -> Maybe Int
- Database.Bloodhound.Internal.Client: [nodeFSTotalTotal] :: NodeFSTotalStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeFSTotalWriteSize] :: NodeFSTotalStats -> Maybe Bytes
- Database.Bloodhound.Internal.Client: [nodeFSTotalWrites] :: NodeFSTotalStats -> Maybe Int
- Database.Bloodhound.Internal.Client: [nodeFSTotal] :: NodeFSStats -> NodeFSTotalStats
- Database.Bloodhound.Internal.Client: [nodeHTTPCurrentOpen] :: NodeHTTPStats -> Int
- Database.Bloodhound.Internal.Client: [nodeHTTPMaxContentLength] :: NodeHTTPInfo -> Bytes
- Database.Bloodhound.Internal.Client: [nodeHTTPTotalOpened] :: NodeHTTPStats -> Int
- Database.Bloodhound.Internal.Client: [nodeHTTPbound_address] :: NodeHTTPInfo -> [EsAddress]
- Database.Bloodhound.Internal.Client: [nodeHTTPpublishAddress] :: NodeHTTPInfo -> EsAddress
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsCompletionSize] :: NodeIndicesStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsDocsCount] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsDocsDeleted] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsFieldDataEvictions] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsFieldDataMemory] :: NodeIndicesStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsFlushTotalTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsFlushTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsGetCurrent] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsGetExistsTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsGetExistsTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsGetMissingTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsGetMissingTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsGetTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsGetTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsIndexingDeleteCurrent] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsIndexingDeleteTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsIndexingDeleteTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsIndexingIndexCurrent] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsIndexingIndexTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsIndexingIsThrottled] :: NodeIndicesStats -> Maybe Bool
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsIndexingNoopUpdateTotal] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsIndexingThrottleTime] :: NodeIndicesStats -> Maybe NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsIndexingTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsMergesCurrentDocs] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsMergesCurrentSize] :: NodeIndicesStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsMergesCurrent] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsMergesTotalDocs] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsMergesTotalSize] :: NodeIndicesStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsMergesTotalTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsMergesTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsPercolateCurrent] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsPercolateMemory] :: NodeIndicesStats -> Maybe Bytes
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsPercolateQueries] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsPercolateTime] :: NodeIndicesStats -> Maybe NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsPercolateTotal] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsQueryCacheEvictions] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsQueryCacheHits] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsQueryCacheMisses] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsQueryCacheSize] :: NodeIndicesStats -> Maybe Bytes
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsRecoveryCurrentAsSource] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsRecoveryCurrentAsTarget] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsRecoveryThrottleTime] :: NodeIndicesStats -> Maybe NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsRefreshTotalTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsRefreshTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsSearchFetchCurrent] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsSearchFetchTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsSearchFetchTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsSearchOpenContexts] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsSearchQueryCurrent] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsSearchQueryTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsSearchQueryTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsSegCount] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsSegFixedBitSetMemory] :: NodeIndicesStats -> Maybe Bytes
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsSegIndexWriterMaxMemory] :: NodeIndicesStats -> Maybe Bytes
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsSegIndexWriterMemory] :: NodeIndicesStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsSegMemory] :: NodeIndicesStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsSegVersionMapMemory] :: NodeIndicesStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsStoreSize] :: NodeIndicesStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsStoreThrottleTime] :: NodeIndicesStats -> Maybe NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsSuggestCurrent] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsSuggestTime] :: NodeIndicesStats -> Maybe NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsSuggestTotal] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsTranslogOps] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsTranslogSize] :: NodeIndicesStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsWarmerCurrent] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsWarmerTotalTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeIndicesStatsWarmerTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Internal.Client: [nodeInfoBuild] :: NodeInfo -> BuildHash
- Database.Bloodhound.Internal.Client: [nodeInfoESVersion] :: NodeInfo -> VersionNumber
- Database.Bloodhound.Internal.Client: [nodeInfoFullId] :: NodeInfo -> FullNodeId
- Database.Bloodhound.Internal.Client: [nodeInfoHTTPAddress] :: NodeInfo -> Maybe EsAddress
- Database.Bloodhound.Internal.Client: [nodeInfoHTTP] :: NodeInfo -> NodeHTTPInfo
- Database.Bloodhound.Internal.Client: [nodeInfoHost] :: NodeInfo -> Server
- Database.Bloodhound.Internal.Client: [nodeInfoIP] :: NodeInfo -> Server
- Database.Bloodhound.Internal.Client: [nodeInfoJVM] :: NodeInfo -> NodeJVMInfo
- Database.Bloodhound.Internal.Client: [nodeInfoName] :: NodeInfo -> NodeName
- Database.Bloodhound.Internal.Client: [nodeInfoNetwork] :: NodeInfo -> Maybe NodeNetworkInfo
- Database.Bloodhound.Internal.Client: [nodeInfoOS] :: NodeInfo -> NodeOSInfo
- Database.Bloodhound.Internal.Client: [nodeInfoPlugins] :: NodeInfo -> [NodePluginInfo]
- Database.Bloodhound.Internal.Client: [nodeInfoProcess] :: NodeInfo -> NodeProcessInfo
- Database.Bloodhound.Internal.Client: [nodeInfoSettings] :: NodeInfo -> Object
- Database.Bloodhound.Internal.Client: [nodeInfoThreadPool] :: NodeInfo -> Map Text NodeThreadPoolInfo
- Database.Bloodhound.Internal.Client: [nodeInfoTransportAddress] :: NodeInfo -> EsAddress
- Database.Bloodhound.Internal.Client: [nodeInfoTransport] :: NodeInfo -> NodeTransportInfo
- Database.Bloodhound.Internal.Client: [nodeJVMInfoMemoryInfo] :: NodeJVMInfo -> JVMMemoryInfo
- Database.Bloodhound.Internal.Client: [nodeJVMInfoMemoryPoolsGCCollectors] :: NodeJVMInfo -> [JVMGCCollector]
- Database.Bloodhound.Internal.Client: [nodeJVMInfoMemoryPools] :: NodeJVMInfo -> [JVMMemoryPool]
- Database.Bloodhound.Internal.Client: [nodeJVMInfoStartTime] :: NodeJVMInfo -> UTCTime
- Database.Bloodhound.Internal.Client: [nodeJVMInfoVMVendor] :: NodeJVMInfo -> Text
- Database.Bloodhound.Internal.Client: [nodeJVMPID] :: NodeJVMInfo -> PID
- Database.Bloodhound.Internal.Client: [nodeJVMStatsDirectBufferPool] :: NodeJVMStats -> JVMBufferPoolStats
- Database.Bloodhound.Internal.Client: [nodeJVMStatsGCOldCollector] :: NodeJVMStats -> JVMGCStats
- Database.Bloodhound.Internal.Client: [nodeJVMStatsGCYoungCollector] :: NodeJVMStats -> JVMGCStats
- Database.Bloodhound.Internal.Client: [nodeJVMStatsHeapCommitted] :: NodeJVMStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeJVMStatsHeapMax] :: NodeJVMStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeJVMStatsHeapUsedPercent] :: NodeJVMStats -> Int
- Database.Bloodhound.Internal.Client: [nodeJVMStatsHeapUsed] :: NodeJVMStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeJVMStatsMappedBufferPool] :: NodeJVMStats -> JVMBufferPoolStats
- Database.Bloodhound.Internal.Client: [nodeJVMStatsNonHeapCommitted] :: NodeJVMStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeJVMStatsNonHeapUsed] :: NodeJVMStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeJVMStatsOldPool] :: NodeJVMStats -> JVMPoolStats
- Database.Bloodhound.Internal.Client: [nodeJVMStatsPeakThreadsCount] :: NodeJVMStats -> Int
- Database.Bloodhound.Internal.Client: [nodeJVMStatsSurvivorPool] :: NodeJVMStats -> JVMPoolStats
- Database.Bloodhound.Internal.Client: [nodeJVMStatsThreadsCount] :: NodeJVMStats -> Int
- Database.Bloodhound.Internal.Client: [nodeJVMStatsTimestamp] :: NodeJVMStats -> UTCTime
- Database.Bloodhound.Internal.Client: [nodeJVMStatsUptime] :: NodeJVMStats -> NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeJVMStatsYoungPool] :: NodeJVMStats -> JVMPoolStats
- Database.Bloodhound.Internal.Client: [nodeJVMVMName] :: NodeJVMInfo -> Text
- Database.Bloodhound.Internal.Client: [nodeJVMVMVersion] :: NodeJVMInfo -> VMVersion
- Database.Bloodhound.Internal.Client: [nodeJVMVersion] :: NodeJVMInfo -> JVMVersion
- Database.Bloodhound.Internal.Client: [nodeName] :: NodeName -> Text
- Database.Bloodhound.Internal.Client: [nodeNetIfaceAddress] :: NodeNetworkInterface -> Server
- Database.Bloodhound.Internal.Client: [nodeNetIfaceMacAddress] :: NodeNetworkInterface -> MacAddress
- Database.Bloodhound.Internal.Client: [nodeNetIfaceName] :: NodeNetworkInterface -> NetworkInterfaceName
- Database.Bloodhound.Internal.Client: [nodeNetTCPActiveOpens] :: NodeNetworkStats -> Int
- Database.Bloodhound.Internal.Client: [nodeNetTCPAttemptFails] :: NodeNetworkStats -> Int
- Database.Bloodhound.Internal.Client: [nodeNetTCPCurrEstab] :: NodeNetworkStats -> Int
- Database.Bloodhound.Internal.Client: [nodeNetTCPEstabResets] :: NodeNetworkStats -> Int
- Database.Bloodhound.Internal.Client: [nodeNetTCPInErrs] :: NodeNetworkStats -> Int
- Database.Bloodhound.Internal.Client: [nodeNetTCPInSegs] :: NodeNetworkStats -> Int
- Database.Bloodhound.Internal.Client: [nodeNetTCPOutRSTs] :: NodeNetworkStats -> Int
- Database.Bloodhound.Internal.Client: [nodeNetTCPOutSegs] :: NodeNetworkStats -> Int
- Database.Bloodhound.Internal.Client: [nodeNetTCPPassiveOpens] :: NodeNetworkStats -> Int
- Database.Bloodhound.Internal.Client: [nodeNetTCPRetransSegs] :: NodeNetworkStats -> Int
- Database.Bloodhound.Internal.Client: [nodeNetworkPrimaryInterface] :: NodeNetworkInfo -> NodeNetworkInterface
- Database.Bloodhound.Internal.Client: [nodeNetworkRefreshInterval] :: NodeNetworkInfo -> NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeOSAllocatedProcessors] :: NodeOSInfo -> Int
- Database.Bloodhound.Internal.Client: [nodeOSArch] :: NodeOSInfo -> Text
- Database.Bloodhound.Internal.Client: [nodeOSAvailableProcessors] :: NodeOSInfo -> Int
- Database.Bloodhound.Internal.Client: [nodeOSCPUPercent] :: NodeOSStats -> Int
- Database.Bloodhound.Internal.Client: [nodeOSLoad] :: NodeOSStats -> Maybe LoadAvgs
- Database.Bloodhound.Internal.Client: [nodeOSMemFreePercent] :: NodeOSStats -> Int
- Database.Bloodhound.Internal.Client: [nodeOSMemFree] :: NodeOSStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeOSMemTotal] :: NodeOSStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeOSMemUsedPercent] :: NodeOSStats -> Int
- Database.Bloodhound.Internal.Client: [nodeOSMemUsed] :: NodeOSStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeOSName] :: NodeOSInfo -> Text
- Database.Bloodhound.Internal.Client: [nodeOSRefreshInterval] :: NodeOSInfo -> NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeOSSwapFree] :: NodeOSStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeOSSwapTotal] :: NodeOSStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeOSSwapUsed] :: NodeOSStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeOSTimestamp] :: NodeOSStats -> UTCTime
- Database.Bloodhound.Internal.Client: [nodeOSVersion] :: NodeOSInfo -> Text
- Database.Bloodhound.Internal.Client: [nodePluginDescription] :: NodePluginInfo -> Text
- Database.Bloodhound.Internal.Client: [nodePluginJVM] :: NodePluginInfo -> Maybe Bool
- Database.Bloodhound.Internal.Client: [nodePluginName] :: NodePluginInfo -> PluginName
- Database.Bloodhound.Internal.Client: [nodePluginSite] :: NodePluginInfo -> Maybe Bool
- Database.Bloodhound.Internal.Client: [nodePluginVersion] :: NodePluginInfo -> MaybeNA VersionNumber
- Database.Bloodhound.Internal.Client: [nodeProcessCPUPercent] :: NodeProcessStats -> Int
- Database.Bloodhound.Internal.Client: [nodeProcessCPUTotal] :: NodeProcessStats -> NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeProcessId] :: NodeProcessInfo -> PID
- Database.Bloodhound.Internal.Client: [nodeProcessMLockAll] :: NodeProcessInfo -> Bool
- Database.Bloodhound.Internal.Client: [nodeProcessMaxFDs] :: NodeProcessStats -> Int
- Database.Bloodhound.Internal.Client: [nodeProcessMaxFileDescriptors] :: NodeProcessInfo -> Maybe Int
- Database.Bloodhound.Internal.Client: [nodeProcessMemTotalVirtual] :: NodeProcessStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeProcessOpenFDs] :: NodeProcessStats -> Int
- Database.Bloodhound.Internal.Client: [nodeProcessRefreshInterval] :: NodeProcessInfo -> NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeProcessTimestamp] :: NodeProcessStats -> UTCTime
- Database.Bloodhound.Internal.Client: [nodeStatsBreakersStats] :: NodeStats -> Maybe NodeBreakersStats
- Database.Bloodhound.Internal.Client: [nodeStatsFS] :: NodeStats -> NodeFSStats
- Database.Bloodhound.Internal.Client: [nodeStatsFieldDataBreaker] :: NodeBreakersStats -> NodeBreakerStats
- Database.Bloodhound.Internal.Client: [nodeStatsFullId] :: NodeStats -> FullNodeId
- Database.Bloodhound.Internal.Client: [nodeStatsHTTP] :: NodeStats -> NodeHTTPStats
- Database.Bloodhound.Internal.Client: [nodeStatsIndices] :: NodeStats -> NodeIndicesStats
- Database.Bloodhound.Internal.Client: [nodeStatsJVM] :: NodeStats -> NodeJVMStats
- Database.Bloodhound.Internal.Client: [nodeStatsName] :: NodeStats -> NodeName
- Database.Bloodhound.Internal.Client: [nodeStatsNetwork] :: NodeStats -> Maybe NodeNetworkStats
- Database.Bloodhound.Internal.Client: [nodeStatsOS] :: NodeStats -> NodeOSStats
- Database.Bloodhound.Internal.Client: [nodeStatsParentBreaker] :: NodeBreakersStats -> NodeBreakerStats
- Database.Bloodhound.Internal.Client: [nodeStatsProcess] :: NodeStats -> NodeProcessStats
- Database.Bloodhound.Internal.Client: [nodeStatsRequestBreaker] :: NodeBreakersStats -> NodeBreakerStats
- Database.Bloodhound.Internal.Client: [nodeStatsThreadPool] :: NodeStats -> Map Text NodeThreadPoolStats
- Database.Bloodhound.Internal.Client: [nodeStatsTransport] :: NodeStats -> NodeTransportStats
- Database.Bloodhound.Internal.Client: [nodeThreadPoolActive] :: NodeThreadPoolStats -> Int
- Database.Bloodhound.Internal.Client: [nodeThreadPoolCompleted] :: NodeThreadPoolStats -> Int
- Database.Bloodhound.Internal.Client: [nodeThreadPoolInfo] :: ThreadPool -> NodeThreadPoolInfo
- Database.Bloodhound.Internal.Client: [nodeThreadPoolKeepalive] :: NodeThreadPoolInfo -> Maybe NominalDiffTime
- Database.Bloodhound.Internal.Client: [nodeThreadPoolLargest] :: NodeThreadPoolStats -> Int
- Database.Bloodhound.Internal.Client: [nodeThreadPoolMax] :: NodeThreadPoolInfo -> Maybe Int
- Database.Bloodhound.Internal.Client: [nodeThreadPoolMin] :: NodeThreadPoolInfo -> Maybe Int
- Database.Bloodhound.Internal.Client: [nodeThreadPoolName] :: ThreadPool -> Text
- Database.Bloodhound.Internal.Client: [nodeThreadPoolQueueSize] :: NodeThreadPoolInfo -> ThreadPoolSize
- Database.Bloodhound.Internal.Client: [nodeThreadPoolQueue] :: NodeThreadPoolStats -> Int
- Database.Bloodhound.Internal.Client: [nodeThreadPoolRejected] :: NodeThreadPoolStats -> Int
- Database.Bloodhound.Internal.Client: [nodeThreadPoolThreads] :: NodeThreadPoolStats -> Int
- Database.Bloodhound.Internal.Client: [nodeThreadPoolType] :: NodeThreadPoolInfo -> ThreadPoolType
- Database.Bloodhound.Internal.Client: [nodeTransportBoundAddress] :: NodeTransportInfo -> [EsAddress]
- Database.Bloodhound.Internal.Client: [nodeTransportCount] :: NodeTransportStats -> Int
- Database.Bloodhound.Internal.Client: [nodeTransportProfiles] :: NodeTransportInfo -> [BoundTransportAddress]
- Database.Bloodhound.Internal.Client: [nodeTransportPublishAddress] :: NodeTransportInfo -> EsAddress
- Database.Bloodhound.Internal.Client: [nodeTransportRXCount] :: NodeTransportStats -> Int
- Database.Bloodhound.Internal.Client: [nodeTransportRXSize] :: NodeTransportStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodeTransportServerOpen] :: NodeTransportStats -> Int
- Database.Bloodhound.Internal.Client: [nodeTransportTXSize] :: NodeTransportStats -> Bytes
- Database.Bloodhound.Internal.Client: [nodesClusterName] :: NodesInfo -> ClusterName
- Database.Bloodhound.Internal.Client: [nodesInfo] :: NodesInfo -> [NodeInfo]
- Database.Bloodhound.Internal.Client: [nodesStatsClusterName] :: NodesStats -> ClusterName
- Database.Bloodhound.Internal.Client: [nodesStats] :: NodesStats -> [NodeStats]
- Database.Bloodhound.Internal.Client: [number] :: Version -> VersionNumber
- Database.Bloodhound.Internal.Client: [onlyExpungeDeletes] :: ForceMergeIndexSettings -> Bool
- Database.Bloodhound.Internal.Client: [pid] :: PID -> Int
- Database.Bloodhound.Internal.Client: [pluginName] :: PluginName -> Text
- Database.Bloodhound.Internal.Client: [publishAddress] :: BoundTransportAddress -> EsAddress
- Database.Bloodhound.Internal.Client: [repoUpdateVerify] :: SnapshotRepoUpdateSettings -> Bool
- Database.Bloodhound.Internal.Client: [restoreOverrideReplicas] :: RestoreIndexSettings -> Maybe ReplicaCount
- Database.Bloodhound.Internal.Client: [routingValue] :: RoutingValue -> Text
- Database.Bloodhound.Internal.Client: [rrGroupRefNum] :: RRGroupRefNum -> Int
- Database.Bloodhound.Internal.Client: [rrPattern] :: RestoreRenamePattern -> Text
- Database.Bloodhound.Internal.Client: [sSummaryFixedSettings] :: IndexSettingsSummary -> IndexSettings
- Database.Bloodhound.Internal.Client: [sSummaryIndexName] :: IndexSettingsSummary -> IndexName
- Database.Bloodhound.Internal.Client: [sSummaryUpdateable] :: IndexSettingsSummary -> [UpdatableIndexSetting]
- Database.Bloodhound.Internal.Client: [shardTotal] :: ShardResult -> Int
- Database.Bloodhound.Internal.Client: [shardsFailed] :: ShardResult -> Int
- Database.Bloodhound.Internal.Client: [shardsSkipped] :: ShardResult -> Int
- Database.Bloodhound.Internal.Client: [shardsSuccessful] :: ShardResult -> Int
- Database.Bloodhound.Internal.Client: [snapIgnoreUnavailable] :: SnapshotCreateSettings -> Bool
- Database.Bloodhound.Internal.Client: [snapIncludeGlobalState] :: SnapshotCreateSettings -> Bool
- Database.Bloodhound.Internal.Client: [snapIndices] :: SnapshotCreateSettings -> Maybe IndexSelection
- Database.Bloodhound.Internal.Client: [snapInfoDuration] :: SnapshotInfo -> NominalDiffTime
- Database.Bloodhound.Internal.Client: [snapInfoEndTime] :: SnapshotInfo -> UTCTime
- Database.Bloodhound.Internal.Client: [snapInfoFailures] :: SnapshotInfo -> [SnapshotShardFailure]
- Database.Bloodhound.Internal.Client: [snapInfoIndices] :: SnapshotInfo -> [IndexName]
- Database.Bloodhound.Internal.Client: [snapInfoName] :: SnapshotInfo -> SnapshotName
- Database.Bloodhound.Internal.Client: [snapInfoShards] :: SnapshotInfo -> ShardResult
- Database.Bloodhound.Internal.Client: [snapInfoStartTime] :: SnapshotInfo -> UTCTime
- Database.Bloodhound.Internal.Client: [snapInfoState] :: SnapshotInfo -> SnapshotState
- Database.Bloodhound.Internal.Client: [snapPartial] :: SnapshotCreateSettings -> Bool
- Database.Bloodhound.Internal.Client: [snapRestoreIgnoreIndexSettings] :: SnapshotRestoreSettings -> Maybe (NonEmpty Text)
- Database.Bloodhound.Internal.Client: [snapRestoreIgnoreUnavailable] :: SnapshotRestoreSettings -> Bool
- Database.Bloodhound.Internal.Client: [snapRestoreIncludeAliases] :: SnapshotRestoreSettings -> Bool
- Database.Bloodhound.Internal.Client: [snapRestoreIncludeGlobalState] :: SnapshotRestoreSettings -> Bool
- Database.Bloodhound.Internal.Client: [snapRestoreIndexSettingsOverrides] :: SnapshotRestoreSettings -> Maybe RestoreIndexSettings
- Database.Bloodhound.Internal.Client: [snapRestoreIndices] :: SnapshotRestoreSettings -> Maybe IndexSelection
- Database.Bloodhound.Internal.Client: [snapRestorePartial] :: SnapshotRestoreSettings -> Bool
- Database.Bloodhound.Internal.Client: [snapRestoreRenamePattern] :: SnapshotRestoreSettings -> Maybe RestoreRenamePattern
- Database.Bloodhound.Internal.Client: [snapRestoreRenameReplacement] :: SnapshotRestoreSettings -> Maybe (NonEmpty RestoreRenameToken)
- Database.Bloodhound.Internal.Client: [snapRestoreWaitForCompletion] :: SnapshotRestoreSettings -> Bool
- Database.Bloodhound.Internal.Client: [snapShardFailureIndex] :: SnapshotShardFailure -> IndexName
- Database.Bloodhound.Internal.Client: [snapShardFailureNodeId] :: SnapshotShardFailure -> Maybe NodeName
- Database.Bloodhound.Internal.Client: [snapShardFailureReason] :: SnapshotShardFailure -> Text
- Database.Bloodhound.Internal.Client: [snapShardFailureShardId] :: SnapshotShardFailure -> ShardId
- Database.Bloodhound.Internal.Client: [snapWaitForCompletion] :: SnapshotCreateSettings -> Bool
- Database.Bloodhound.Internal.Client: [snapshotNodeVerifications] :: SnapshotVerification -> [SnapshotNodeVerification]
- Database.Bloodhound.Internal.Client: [snapshotRepoName] :: SnapshotRepoName -> Text
- Database.Bloodhound.Internal.Client: [snapshotRepoType] :: SnapshotRepoType -> Text
- Database.Bloodhound.Internal.Client: [snvFullId] :: SnapshotNodeVerification -> FullNodeId
- Database.Bloodhound.Internal.Client: [snvNodeName] :: SnapshotNodeVerification -> NodeName
- Database.Bloodhound.Internal.Client: [srcIndex] :: IndexAlias -> IndexName
- Database.Bloodhound.Internal.Client: [tagline] :: Status -> Text
- Database.Bloodhound.Internal.Client: [templateMappings] :: IndexTemplate -> Value
- Database.Bloodhound.Internal.Client: [templatePatterns] :: IndexTemplate -> [IndexPattern]
- Database.Bloodhound.Internal.Client: [templateSettings] :: IndexTemplate -> Maybe IndexSettings
- Database.Bloodhound.Internal.Client: [unBH] :: BH m a -> ReaderT BHEnv m a
- Database.Bloodhound.Internal.Client: [unJVMVersion] :: JVMVersion -> Text
- Database.Bloodhound.Internal.Client: [unVMVersion] :: VMVersion -> Text
- Database.Bloodhound.Internal.Client: [versionNumber] :: VersionNumber -> Version
- Database.Bloodhound.Internal.Client: [version] :: Status -> Version
- Database.Bloodhound.Internal.Client: attrFilterJSON :: NonEmpty NodeAttrFilter -> Value
- Database.Bloodhound.Internal.Client: buildUpsertActionMetadata :: UpsertActionMetadata -> Pair
- Database.Bloodhound.Internal.Client: class (Functor m, Applicative m, MonadIO m) => MonadBH m
- Database.Bloodhound.Internal.Client: class SnapshotRepo r
- Database.Bloodhound.Internal.Client: data AliasRouting
- Database.Bloodhound.Internal.Client: data AllocationPolicy
- Database.Bloodhound.Internal.Client: data BHEnv
- Database.Bloodhound.Internal.Client: data BoundTransportAddress
- Database.Bloodhound.Internal.Client: data BulkOperation
- Database.Bloodhound.Internal.Client: data CPUInfo
- Database.Bloodhound.Internal.Client: data CompoundFormat
- Database.Bloodhound.Internal.Client: data Compression
- Database.Bloodhound.Internal.Client: data FSType
- Database.Bloodhound.Internal.Client: data FieldType
- Database.Bloodhound.Internal.Client: data ForceMergeIndexSettings
- Database.Bloodhound.Internal.Client: data FsSnapshotRepo
- Database.Bloodhound.Internal.Client: data GenericSnapshotRepo
- Database.Bloodhound.Internal.Client: data IndexAlias
- Database.Bloodhound.Internal.Client: data IndexAliasAction
- Database.Bloodhound.Internal.Client: data IndexAliasCreate
- Database.Bloodhound.Internal.Client: data IndexAliasSummary
- Database.Bloodhound.Internal.Client: data IndexDocumentSettings
- Database.Bloodhound.Internal.Client: data IndexMappingsLimits
- Database.Bloodhound.Internal.Client: data IndexSelection
- Database.Bloodhound.Internal.Client: data IndexSettings
- Database.Bloodhound.Internal.Client: data IndexSettingsSummary
- Database.Bloodhound.Internal.Client: data IndexTemplate
- Database.Bloodhound.Internal.Client: data InitialShardCount
- Database.Bloodhound.Internal.Client: data Interval
- Database.Bloodhound.Internal.Client: data JVMBufferPoolStats
- Database.Bloodhound.Internal.Client: data JVMGCStats
- Database.Bloodhound.Internal.Client: data JVMMemoryInfo
- Database.Bloodhound.Internal.Client: data JVMPoolStats
- Database.Bloodhound.Internal.Client: data JoinRelation
- Database.Bloodhound.Internal.Client: data LoadAvgs
- Database.Bloodhound.Internal.Client: data MappingField
- Database.Bloodhound.Internal.Client: data NodeAttrFilter
- Database.Bloodhound.Internal.Client: data NodeBreakerStats
- Database.Bloodhound.Internal.Client: data NodeBreakersStats
- Database.Bloodhound.Internal.Client: data NodeDataPathStats
- Database.Bloodhound.Internal.Client: data NodeFSStats
- Database.Bloodhound.Internal.Client: data NodeFSTotalStats
- Database.Bloodhound.Internal.Client: data NodeHTTPInfo
- Database.Bloodhound.Internal.Client: data NodeHTTPStats
- Database.Bloodhound.Internal.Client: data NodeIndicesStats
- Database.Bloodhound.Internal.Client: data NodeInfo
- Database.Bloodhound.Internal.Client: data NodeJVMInfo
- Database.Bloodhound.Internal.Client: data NodeJVMStats
- Database.Bloodhound.Internal.Client: data NodeNetworkInfo
- Database.Bloodhound.Internal.Client: data NodeNetworkInterface
- Database.Bloodhound.Internal.Client: data NodeNetworkStats
- Database.Bloodhound.Internal.Client: data NodeOSInfo
- Database.Bloodhound.Internal.Client: data NodeOSStats
- Database.Bloodhound.Internal.Client: data NodePluginInfo
- Database.Bloodhound.Internal.Client: data NodeProcessInfo
- Database.Bloodhound.Internal.Client: data NodeProcessStats
- Database.Bloodhound.Internal.Client: data NodeSelection
- Database.Bloodhound.Internal.Client: data NodeSelector
- Database.Bloodhound.Internal.Client: data NodeStats
- Database.Bloodhound.Internal.Client: data NodeThreadPoolInfo
- Database.Bloodhound.Internal.Client: data NodeThreadPoolStats
- Database.Bloodhound.Internal.Client: data NodeTransportInfo
- Database.Bloodhound.Internal.Client: data NodeTransportStats
- Database.Bloodhound.Internal.Client: data NodesInfo
- Database.Bloodhound.Internal.Client: data NodesStats
- Database.Bloodhound.Internal.Client: data OpenCloseIndex
- Database.Bloodhound.Internal.Client: data ReplicaBounds
- Database.Bloodhound.Internal.Client: data RestoreRenameToken
- Database.Bloodhound.Internal.Client: data ShardResult
- Database.Bloodhound.Internal.Client: data SnapshotCreateSettings
- Database.Bloodhound.Internal.Client: data SnapshotInfo
- Database.Bloodhound.Internal.Client: data SnapshotNodeVerification
- Database.Bloodhound.Internal.Client: data SnapshotPattern
- Database.Bloodhound.Internal.Client: data SnapshotRepoConversionError
- Database.Bloodhound.Internal.Client: data SnapshotRepoPattern
- Database.Bloodhound.Internal.Client: data SnapshotRepoSelection
- Database.Bloodhound.Internal.Client: data SnapshotRestoreSettings
- Database.Bloodhound.Internal.Client: data SnapshotSelection
- Database.Bloodhound.Internal.Client: data SnapshotShardFailure
- Database.Bloodhound.Internal.Client: data SnapshotState
- Database.Bloodhound.Internal.Client: data Status
- Database.Bloodhound.Internal.Client: data ThreadPool
- Database.Bloodhound.Internal.Client: data ThreadPoolSize
- Database.Bloodhound.Internal.Client: data ThreadPoolType
- Database.Bloodhound.Internal.Client: data TimeInterval
- Database.Bloodhound.Internal.Client: data UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: data UpsertActionMetadata
- Database.Bloodhound.Internal.Client: data UpsertPayload
- Database.Bloodhound.Internal.Client: data Version
- Database.Bloodhound.Internal.Client: defaultForceMergeIndexSettings :: ForceMergeIndexSettings
- Database.Bloodhound.Internal.Client: defaultIndexDocumentSettings :: IndexDocumentSettings
- Database.Bloodhound.Internal.Client: defaultIndexMappingsLimits :: IndexMappingsLimits
- Database.Bloodhound.Internal.Client: defaultIndexSettings :: IndexSettings
- Database.Bloodhound.Internal.Client: defaultSnapshotCreateSettings :: SnapshotCreateSettings
- Database.Bloodhound.Internal.Client: defaultSnapshotRepoUpdateSettings :: SnapshotRepoUpdateSettings
- Database.Bloodhound.Internal.Client: defaultSnapshotRestoreSettings :: SnapshotRestoreSettings
- Database.Bloodhound.Internal.Client: fromGSnapshotRepo :: SnapshotRepo r => GenericSnapshotRepo -> Either SnapshotRepoConversionError r
- Database.Bloodhound.Internal.Client: fsRepoType :: SnapshotRepoType
- Database.Bloodhound.Internal.Client: getBHEnv :: MonadBH m => m BHEnv
- Database.Bloodhound.Internal.Client: gigabytes :: Int -> Bytes
- Database.Bloodhound.Internal.Client: instance (GHC.Base.Functor m, GHC.Base.Applicative m, Control.Monad.IO.Class.MonadIO m) => Database.Bloodhound.Internal.Client.MonadBH (Control.Monad.Trans.Reader.ReaderT Database.Bloodhound.Internal.Client.BHEnv m)
- Database.Bloodhound.Internal.Client: instance (GHC.Base.Functor m, GHC.Base.Applicative m, Control.Monad.IO.Class.MonadIO m) => Database.Bloodhound.Internal.Client.MonadBH (Database.Bloodhound.Internal.Client.BH m)
- Database.Bloodhound.Internal.Client: instance Control.Monad.Catch.MonadCatch m => Control.Monad.Catch.MonadCatch (Database.Bloodhound.Internal.Client.BH m)
- Database.Bloodhound.Internal.Client: instance Control.Monad.Catch.MonadMask m => Control.Monad.Catch.MonadMask (Database.Bloodhound.Internal.Client.BH m)
- Database.Bloodhound.Internal.Client: instance Control.Monad.Catch.MonadThrow m => Control.Monad.Catch.MonadThrow (Database.Bloodhound.Internal.Client.BH m)
- Database.Bloodhound.Internal.Client: instance Control.Monad.Error.Class.MonadError e m => Control.Monad.Error.Class.MonadError e (Database.Bloodhound.Internal.Client.BH m)
- Database.Bloodhound.Internal.Client: instance Control.Monad.Fail.MonadFail m => Control.Monad.Fail.MonadFail (Database.Bloodhound.Internal.Client.BH m)
- Database.Bloodhound.Internal.Client: instance Control.Monad.Fix.MonadFix m => Control.Monad.Fix.MonadFix (Database.Bloodhound.Internal.Client.BH m)
- Database.Bloodhound.Internal.Client: instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (Database.Bloodhound.Internal.Client.BH m)
- Database.Bloodhound.Internal.Client: instance Control.Monad.Reader.Class.MonadReader r m => Control.Monad.Reader.Class.MonadReader r (Database.Bloodhound.Internal.Client.BH m)
- Database.Bloodhound.Internal.Client: instance Control.Monad.State.Class.MonadState s m => Control.Monad.State.Class.MonadState s (Database.Bloodhound.Internal.Client.BH m)
- Database.Bloodhound.Internal.Client: instance Control.Monad.Trans.Class.MonadTrans Database.Bloodhound.Internal.Client.BH
- Database.Bloodhound.Internal.Client: instance Control.Monad.Writer.Class.MonadWriter w m => Control.Monad.Writer.Class.MonadWriter w (Database.Bloodhound.Internal.Client.BH m)
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.AliasRouting
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.AllocationPolicy
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.BoundTransportAddress
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.BuildHash
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.Bytes
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.CPUInfo
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.ClusterName
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.CompoundFormat
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.Compression
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.EsAddress
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.FSType
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.FullNodeId
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.GenericSnapshotRepoSettings
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.IndexAliasCreate
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.IndexAliasRouting
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.IndexAliasesSummary
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.IndexMappingsLimits
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.IndexPattern
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.IndexSettings
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.IndexSettingsSummary
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.InitialShardCount
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.JVMBufferPoolStats
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.JVMGCCollector
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.JVMGCStats
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.JVMMemoryInfo
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.JVMMemoryPool
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.JVMPoolStats
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.JVMVersion
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.LoadAvgs
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.MacAddress
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NetworkInterfaceName
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeBreakerStats
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeBreakersStats
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeDataPathStats
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeFSStats
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeFSTotalStats
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeHTTPInfo
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeHTTPStats
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeIndicesStats
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeJVMInfo
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeJVMStats
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeName
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeNetworkInfo
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeNetworkInterface
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeNetworkStats
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeOSInfo
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeOSStats
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodePluginInfo
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeProcessInfo
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeProcessStats
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeThreadPoolInfo
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeThreadPoolStats
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeTransportInfo
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodeTransportStats
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodesInfo
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NodesStats
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.NominalDiffTimeJSON
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.PID
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.PluginName
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.ReplicaBounds
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.RoutingValue
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.SearchAliasRouting
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.ShardResult
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.SnapshotInfo
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.SnapshotRepoName
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.SnapshotRepoType
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.SnapshotShardFailure
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.SnapshotState
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.SnapshotVerification
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.Status
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.TemplateName
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.ThreadPoolSize
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.ThreadPoolType
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.VMVersion
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.Version
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Client.VersionNumber
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.AliasRouting
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.AllocationPolicy
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.BuildHash
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.Bytes
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.CompoundFormat
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.Compression
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.FSType
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.GenericSnapshotRepoSettings
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.IndexAlias
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.IndexAliasAction
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.IndexAliasCreate
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.IndexAliasRouting
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.IndexMappingsLimits
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.IndexPattern
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.IndexSettings
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.IndexTemplate
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.InitialShardCount
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.Interval
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.NominalDiffTimeJSON
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.ReplicaBounds
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.RestoreIndexSettings
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.RestoreRenamePattern
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.RoutingValue
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.SearchAliasRouting
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.SnapshotRepoName
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.SnapshotRepoType
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.TemplateName
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.VMVersion
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.Version
- Database.Bloodhound.Internal.Client: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Client.VersionNumber
- Database.Bloodhound.Internal.Client: instance Database.Bloodhound.Internal.Client.SnapshotRepo Database.Bloodhound.Internal.Client.FsSnapshotRepo
- Database.Bloodhound.Internal.Client: instance Database.Bloodhound.Internal.Client.SnapshotRepo Database.Bloodhound.Internal.Client.GenericSnapshotRepo
- Database.Bloodhound.Internal.Client: instance GHC.Base.Alternative m => GHC.Base.Alternative (Database.Bloodhound.Internal.Client.BH m)
- Database.Bloodhound.Internal.Client: instance GHC.Base.Applicative m => GHC.Base.Applicative (Database.Bloodhound.Internal.Client.BH m)
- Database.Bloodhound.Internal.Client: instance GHC.Base.Functor m => GHC.Base.Functor (Database.Bloodhound.Internal.Client.BH m)
- Database.Bloodhound.Internal.Client: instance GHC.Base.Monad m => GHC.Base.Monad (Database.Bloodhound.Internal.Client.BH m)
- Database.Bloodhound.Internal.Client: instance GHC.Base.MonadPlus m => GHC.Base.MonadPlus (Database.Bloodhound.Internal.Client.BH m)
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.AliasRouting
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.AllocationPolicy
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.BoundTransportAddress
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.BuildHash
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.BulkOperation
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.Bytes
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.CPUInfo
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.ClusterName
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.CompoundFormat
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.Compression
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.EsAddress
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.EsPassword
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.EsUsername
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.FSType
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.FieldDefinition
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.FieldType
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.ForceMergeIndexSettings
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.FsSnapshotRepo
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.FullNodeId
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.GenericSnapshotRepo
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.GenericSnapshotRepoSettings
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.IndexAlias
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.IndexAliasAction
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.IndexAliasCreate
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.IndexAliasRouting
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.IndexAliasSummary
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.IndexAliasesSummary
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.IndexDocumentSettings
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.IndexMappingsLimits
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.IndexPattern
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.IndexSelection
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.IndexSettings
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.IndexSettingsSummary
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.InitialShardCount
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.Interval
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.JVMBufferPoolStats
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.JVMGCCollector
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.JVMGCStats
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.JVMMemoryInfo
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.JVMMemoryPool
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.JVMPoolStats
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.JVMVersion
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.JoinRelation
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.LoadAvgs
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.MacAddress
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.Mapping
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.MappingField
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NetworkInterfaceName
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeAttrFilter
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeAttrName
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeBreakerStats
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeBreakersStats
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeDataPathStats
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeFSStats
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeFSTotalStats
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeHTTPInfo
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeHTTPStats
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeIndicesStats
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeInfo
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeJVMInfo
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeJVMStats
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeName
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeNetworkInfo
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeNetworkInterface
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeNetworkStats
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeOSInfo
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeOSStats
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodePluginInfo
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeProcessInfo
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeProcessStats
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeSelection
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeSelector
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeStats
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeThreadPoolInfo
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeThreadPoolStats
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeTransportInfo
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodeTransportStats
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodesInfo
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.NodesStats
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.OpenCloseIndex
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.PID
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.PluginName
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.RRGroupRefNum
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.ReplicaBounds
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.RestoreIndexSettings
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.RestoreRenamePattern
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.RestoreRenameToken
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.RoutingValue
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.SearchAliasRouting
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.ShardResult
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.SnapshotCreateSettings
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.SnapshotInfo
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.SnapshotNodeVerification
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.SnapshotPattern
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.SnapshotRepoConversionError
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.SnapshotRepoName
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.SnapshotRepoPattern
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.SnapshotRepoSelection
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.SnapshotRepoType
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.SnapshotRepoUpdateSettings
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.SnapshotRestoreSettings
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.SnapshotSelection
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.SnapshotShardFailure
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.SnapshotState
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.SnapshotVerification
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.Status
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.TemplateName
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.ThreadPool
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.ThreadPoolSize
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.ThreadPoolType
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.TimeInterval
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.UpsertActionMetadata
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.UpsertPayload
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.VMVersion
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.Version
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Eq Database.Bloodhound.Internal.Client.VersionNumber
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Ord Database.Bloodhound.Internal.Client.BuildHash
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Ord Database.Bloodhound.Internal.Client.Bytes
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Ord Database.Bloodhound.Internal.Client.ClusterName
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Ord Database.Bloodhound.Internal.Client.EsAddress
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Ord Database.Bloodhound.Internal.Client.FullNodeId
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Ord Database.Bloodhound.Internal.Client.MacAddress
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Ord Database.Bloodhound.Internal.Client.NetworkInterfaceName
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Ord Database.Bloodhound.Internal.Client.NodeAttrFilter
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Ord Database.Bloodhound.Internal.Client.NodeAttrName
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Ord Database.Bloodhound.Internal.Client.NodeName
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Ord Database.Bloodhound.Internal.Client.PluginName
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Ord Database.Bloodhound.Internal.Client.RRGroupRefNum
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Ord Database.Bloodhound.Internal.Client.RestoreRenamePattern
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Ord Database.Bloodhound.Internal.Client.SnapshotRepoName
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Ord Database.Bloodhound.Internal.Client.SnapshotRepoType
- Database.Bloodhound.Internal.Client: instance GHC.Classes.Ord Database.Bloodhound.Internal.Client.VersionNumber
- Database.Bloodhound.Internal.Client: instance GHC.Enum.Bounded Database.Bloodhound.Internal.Client.RRGroupRefNum
- Database.Bloodhound.Internal.Client: instance GHC.Exception.Type.Exception Database.Bloodhound.Internal.Client.SnapshotRepoConversionError
- Database.Bloodhound.Internal.Client: instance GHC.Generics.Generic Database.Bloodhound.Internal.Client.AllocationPolicy
- Database.Bloodhound.Internal.Client: instance GHC.Generics.Generic Database.Bloodhound.Internal.Client.BuildHash
- Database.Bloodhound.Internal.Client: instance GHC.Generics.Generic Database.Bloodhound.Internal.Client.Bytes
- Database.Bloodhound.Internal.Client: instance GHC.Generics.Generic Database.Bloodhound.Internal.Client.CompoundFormat
- Database.Bloodhound.Internal.Client: instance GHC.Generics.Generic Database.Bloodhound.Internal.Client.Compression
- Database.Bloodhound.Internal.Client: instance GHC.Generics.Generic Database.Bloodhound.Internal.Client.FSType
- Database.Bloodhound.Internal.Client: instance GHC.Generics.Generic Database.Bloodhound.Internal.Client.FsSnapshotRepo
- Database.Bloodhound.Internal.Client: instance GHC.Generics.Generic Database.Bloodhound.Internal.Client.IndexAliasRouting
- Database.Bloodhound.Internal.Client: instance GHC.Generics.Generic Database.Bloodhound.Internal.Client.IndexMappingsLimits
- Database.Bloodhound.Internal.Client: instance GHC.Generics.Generic Database.Bloodhound.Internal.Client.IndexPattern
- Database.Bloodhound.Internal.Client: instance GHC.Generics.Generic Database.Bloodhound.Internal.Client.IndexSettings
- Database.Bloodhound.Internal.Client: instance GHC.Generics.Generic Database.Bloodhound.Internal.Client.InitialShardCount
- Database.Bloodhound.Internal.Client: instance GHC.Generics.Generic Database.Bloodhound.Internal.Client.SearchAliasRouting
- Database.Bloodhound.Internal.Client: instance GHC.Generics.Generic Database.Bloodhound.Internal.Client.SnapshotRepoName
- Database.Bloodhound.Internal.Client: instance GHC.Generics.Generic Database.Bloodhound.Internal.Client.TemplateName
- Database.Bloodhound.Internal.Client: instance GHC.Generics.Generic Database.Bloodhound.Internal.Client.UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: instance GHC.Generics.Generic Database.Bloodhound.Internal.Client.Version
- Database.Bloodhound.Internal.Client: instance GHC.Read.Read Database.Bloodhound.Internal.Client.EsPassword
- Database.Bloodhound.Internal.Client: instance GHC.Read.Read Database.Bloodhound.Internal.Client.EsUsername
- Database.Bloodhound.Internal.Client: instance GHC.Read.Read Database.Bloodhound.Internal.Client.TimeInterval
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.AliasRouting
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.AllocationPolicy
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.BoundTransportAddress
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.BuildHash
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.BulkOperation
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.Bytes
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.CPUInfo
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.ClusterName
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.CompoundFormat
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.Compression
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.EsAddress
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.EsPassword
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.EsUsername
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.FSType
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.FieldDefinition
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.FieldType
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.ForceMergeIndexSettings
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.FsSnapshotRepo
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.FullNodeId
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.GenericSnapshotRepo
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.GenericSnapshotRepoSettings
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.IndexAlias
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.IndexAliasAction
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.IndexAliasCreate
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.IndexAliasRouting
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.IndexAliasSummary
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.IndexAliasesSummary
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.IndexDocumentSettings
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.IndexMappingsLimits
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.IndexPattern
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.IndexSelection
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.IndexSettings
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.IndexSettingsSummary
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.InitialShardCount
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.Interval
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.JVMBufferPoolStats
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.JVMGCCollector
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.JVMGCStats
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.JVMMemoryInfo
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.JVMMemoryPool
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.JVMPoolStats
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.JVMVersion
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.JoinRelation
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.LoadAvgs
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.MacAddress
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.Mapping
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.MappingField
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NetworkInterfaceName
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeAttrFilter
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeAttrName
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeBreakerStats
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeBreakersStats
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeDataPathStats
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeFSStats
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeFSTotalStats
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeHTTPInfo
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeHTTPStats
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeIndicesStats
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeInfo
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeJVMInfo
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeJVMStats
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeName
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeNetworkInfo
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeNetworkInterface
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeNetworkStats
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeOSInfo
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeOSStats
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodePluginInfo
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeProcessInfo
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeProcessStats
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeSelection
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeSelector
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeStats
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeThreadPoolInfo
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeThreadPoolStats
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeTransportInfo
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodeTransportStats
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodesInfo
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.NodesStats
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.OpenCloseIndex
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.PID
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.PluginName
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.RRGroupRefNum
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.ReplicaBounds
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.RestoreIndexSettings
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.RestoreRenamePattern
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.RestoreRenameToken
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.RoutingValue
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.SearchAliasRouting
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.ShardResult
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.SnapshotCreateSettings
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.SnapshotInfo
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.SnapshotNodeVerification
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.SnapshotPattern
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.SnapshotRepoConversionError
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.SnapshotRepoName
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.SnapshotRepoPattern
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.SnapshotRepoSelection
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.SnapshotRepoType
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.SnapshotRepoUpdateSettings
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.SnapshotRestoreSettings
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.SnapshotSelection
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.SnapshotShardFailure
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.SnapshotState
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.SnapshotVerification
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.Status
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.TemplateName
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.ThreadPool
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.ThreadPoolSize
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.ThreadPoolType
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.TimeInterval
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.UpdatableIndexSetting
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.UpsertActionMetadata
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.UpsertPayload
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.VMVersion
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.Version
- Database.Bloodhound.Internal.Client: instance GHC.Show.Show Database.Bloodhound.Internal.Client.VersionNumber
- Database.Bloodhound.Internal.Client: kilobytes :: Int -> Bytes
- Database.Bloodhound.Internal.Client: megabytes :: Int -> Bytes
- Database.Bloodhound.Internal.Client: mkBHEnv :: Server -> Manager -> BHEnv
- Database.Bloodhound.Internal.Client: mkRRGroupRefNum :: Int -> Maybe RRGroupRefNum
- Database.Bloodhound.Internal.Client: newtype BH m a
- Database.Bloodhound.Internal.Client: newtype BuildHash
- Database.Bloodhound.Internal.Client: newtype Bytes
- Database.Bloodhound.Internal.Client: newtype ClusterName
- Database.Bloodhound.Internal.Client: newtype EsAddress
- Database.Bloodhound.Internal.Client: newtype EsPassword
- Database.Bloodhound.Internal.Client: newtype EsUsername
- Database.Bloodhound.Internal.Client: newtype FieldDefinition
- Database.Bloodhound.Internal.Client: newtype FullNodeId
- Database.Bloodhound.Internal.Client: newtype GenericSnapshotRepoSettings
- Database.Bloodhound.Internal.Client: newtype IndexAliasRouting
- Database.Bloodhound.Internal.Client: newtype IndexAliasesSummary
- Database.Bloodhound.Internal.Client: newtype IndexPattern
- Database.Bloodhound.Internal.Client: newtype JVMGCCollector
- Database.Bloodhound.Internal.Client: newtype JVMMemoryPool
- Database.Bloodhound.Internal.Client: newtype JVMVersion
- Database.Bloodhound.Internal.Client: newtype MacAddress
- Database.Bloodhound.Internal.Client: newtype Mapping
- Database.Bloodhound.Internal.Client: newtype NetworkInterfaceName
- Database.Bloodhound.Internal.Client: newtype NodeAttrName
- Database.Bloodhound.Internal.Client: newtype NodeName
- Database.Bloodhound.Internal.Client: newtype NominalDiffTimeJSON
- Database.Bloodhound.Internal.Client: newtype PID
- Database.Bloodhound.Internal.Client: newtype PluginName
- Database.Bloodhound.Internal.Client: newtype RRGroupRefNum
- Database.Bloodhound.Internal.Client: newtype RestoreIndexSettings
- Database.Bloodhound.Internal.Client: newtype RestoreRenamePattern
- Database.Bloodhound.Internal.Client: newtype RoutingValue
- Database.Bloodhound.Internal.Client: newtype SearchAliasRouting
- Database.Bloodhound.Internal.Client: newtype SnapshotRepoName
- Database.Bloodhound.Internal.Client: newtype SnapshotRepoType
- Database.Bloodhound.Internal.Client: newtype SnapshotRepoUpdateSettings
- Database.Bloodhound.Internal.Client: newtype SnapshotVerification
- Database.Bloodhound.Internal.Client: newtype TemplateName
- Database.Bloodhound.Internal.Client: newtype VMVersion
- Database.Bloodhound.Internal.Client: newtype VersionNumber
- Database.Bloodhound.Internal.Client: parseAttrFilter :: Value -> Parser (NonEmpty NodeAttrFilter)
- Database.Bloodhound.Internal.Client: parseNodeInfo :: FullNodeId -> Object -> Parser NodeInfo
- Database.Bloodhound.Internal.Client: parseNodeStats :: FullNodeId -> Object -> Parser NodeStats
- Database.Bloodhound.Internal.Client: parseRepo :: Parser a -> Either SnapshotRepoConversionError a
- Database.Bloodhound.Internal.Client: parseSettings :: Object -> Parser [UpdatableIndexSetting]
- Database.Bloodhound.Internal.Client: parseStringInterval :: (Monad m, MonadFail m) => String -> m NominalDiffTime
- Database.Bloodhound.Internal.Client: runBH :: BHEnv -> BH m a -> m a
- Database.Bloodhound.Internal.Client: toGSnapshotRepo :: SnapshotRepo r => r -> GenericSnapshotRepo
- Database.Bloodhound.Internal.Highlight: CommonHighlight :: Maybe Text -> Maybe Bool -> Maybe HighlightTag -> Maybe HighlightEncoder -> Maybe Int -> Maybe Query -> Maybe Bool -> CommonHighlight
- Database.Bloodhound.Internal.Highlight: CustomTags :: ([Text], [Text]) -> HighlightTag
- Database.Bloodhound.Internal.Highlight: DefaultEncoder :: HighlightEncoder
- Database.Bloodhound.Internal.Highlight: FastVector :: FastVectorHighlight -> HighlightSettings
- Database.Bloodhound.Internal.Highlight: FastVectorHighlight :: Maybe CommonHighlight -> Maybe NonPostings -> Maybe Text -> Maybe Int -> Maybe Int -> [Text] -> Maybe Int -> FastVectorHighlight
- Database.Bloodhound.Internal.Highlight: FieldHighlight :: FieldName -> Maybe HighlightSettings -> FieldHighlight
- Database.Bloodhound.Internal.Highlight: HTMLEncoder :: HighlightEncoder
- Database.Bloodhound.Internal.Highlight: Highlights :: Maybe HighlightSettings -> [FieldHighlight] -> Highlights
- Database.Bloodhound.Internal.Highlight: NonPostings :: Maybe Int -> Maybe Int -> NonPostings
- Database.Bloodhound.Internal.Highlight: Plain :: PlainHighlight -> HighlightSettings
- Database.Bloodhound.Internal.Highlight: PlainHighlight :: Maybe CommonHighlight -> Maybe NonPostings -> PlainHighlight
- Database.Bloodhound.Internal.Highlight: Postings :: PostingsHighlight -> HighlightSettings
- Database.Bloodhound.Internal.Highlight: PostingsHighlight :: Maybe CommonHighlight -> PostingsHighlight
- Database.Bloodhound.Internal.Highlight: TagSchema :: Text -> HighlightTag
- Database.Bloodhound.Internal.Highlight: [boundaryChars] :: FastVectorHighlight -> Maybe Text
- Database.Bloodhound.Internal.Highlight: [boundaryMaxScan] :: FastVectorHighlight -> Maybe Int
- Database.Bloodhound.Internal.Highlight: [encoder] :: CommonHighlight -> Maybe HighlightEncoder
- Database.Bloodhound.Internal.Highlight: [forceSource] :: CommonHighlight -> Maybe Bool
- Database.Bloodhound.Internal.Highlight: [fragmentOffset] :: FastVectorHighlight -> Maybe Int
- Database.Bloodhound.Internal.Highlight: [fragmentSize] :: NonPostings -> Maybe Int
- Database.Bloodhound.Internal.Highlight: [fvCommon] :: FastVectorHighlight -> Maybe CommonHighlight
- Database.Bloodhound.Internal.Highlight: [fvNonPostSettings] :: FastVectorHighlight -> Maybe NonPostings
- Database.Bloodhound.Internal.Highlight: [globalsettings] :: Highlights -> Maybe HighlightSettings
- Database.Bloodhound.Internal.Highlight: [highlightFields] :: Highlights -> [FieldHighlight]
- Database.Bloodhound.Internal.Highlight: [highlightQuery] :: CommonHighlight -> Maybe Query
- Database.Bloodhound.Internal.Highlight: [matchedFields] :: FastVectorHighlight -> [Text]
- Database.Bloodhound.Internal.Highlight: [noMatchSize] :: CommonHighlight -> Maybe Int
- Database.Bloodhound.Internal.Highlight: [numberOfFragments] :: NonPostings -> Maybe Int
- Database.Bloodhound.Internal.Highlight: [order] :: CommonHighlight -> Maybe Text
- Database.Bloodhound.Internal.Highlight: [phraseLimit] :: FastVectorHighlight -> Maybe Int
- Database.Bloodhound.Internal.Highlight: [plainCommon] :: PlainHighlight -> Maybe CommonHighlight
- Database.Bloodhound.Internal.Highlight: [plainNonPost] :: PlainHighlight -> Maybe NonPostings
- Database.Bloodhound.Internal.Highlight: [requireFieldMatch] :: CommonHighlight -> Maybe Bool
- Database.Bloodhound.Internal.Highlight: [tag] :: CommonHighlight -> Maybe HighlightTag
- Database.Bloodhound.Internal.Highlight: commonHighlightPairs :: Maybe CommonHighlight -> [Pair]
- Database.Bloodhound.Internal.Highlight: data CommonHighlight
- Database.Bloodhound.Internal.Highlight: data FastVectorHighlight
- Database.Bloodhound.Internal.Highlight: data FieldHighlight
- Database.Bloodhound.Internal.Highlight: data HighlightEncoder
- Database.Bloodhound.Internal.Highlight: data HighlightSettings
- Database.Bloodhound.Internal.Highlight: data HighlightTag
- Database.Bloodhound.Internal.Highlight: data Highlights
- Database.Bloodhound.Internal.Highlight: data NonPostings
- Database.Bloodhound.Internal.Highlight: data PlainHighlight
- Database.Bloodhound.Internal.Highlight: data PostingsHighlight
- Database.Bloodhound.Internal.Highlight: fastVectorHighPairs :: Maybe FastVectorHighlight -> [Pair]
- Database.Bloodhound.Internal.Highlight: highlightSettingsPairs :: Maybe HighlightSettings -> [Pair]
- Database.Bloodhound.Internal.Highlight: highlightTagToPairs :: Maybe HighlightTag -> [Pair]
- Database.Bloodhound.Internal.Highlight: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Highlight.FieldHighlight
- Database.Bloodhound.Internal.Highlight: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Highlight.HighlightEncoder
- Database.Bloodhound.Internal.Highlight: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Highlight.HighlightSettings
- Database.Bloodhound.Internal.Highlight: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Highlight.Highlights
- Database.Bloodhound.Internal.Highlight: instance GHC.Classes.Eq Database.Bloodhound.Internal.Highlight.CommonHighlight
- Database.Bloodhound.Internal.Highlight: instance GHC.Classes.Eq Database.Bloodhound.Internal.Highlight.FastVectorHighlight
- Database.Bloodhound.Internal.Highlight: instance GHC.Classes.Eq Database.Bloodhound.Internal.Highlight.FieldHighlight
- Database.Bloodhound.Internal.Highlight: instance GHC.Classes.Eq Database.Bloodhound.Internal.Highlight.HighlightEncoder
- Database.Bloodhound.Internal.Highlight: instance GHC.Classes.Eq Database.Bloodhound.Internal.Highlight.HighlightSettings
- Database.Bloodhound.Internal.Highlight: instance GHC.Classes.Eq Database.Bloodhound.Internal.Highlight.HighlightTag
- Database.Bloodhound.Internal.Highlight: instance GHC.Classes.Eq Database.Bloodhound.Internal.Highlight.Highlights
- Database.Bloodhound.Internal.Highlight: instance GHC.Classes.Eq Database.Bloodhound.Internal.Highlight.NonPostings
- Database.Bloodhound.Internal.Highlight: instance GHC.Classes.Eq Database.Bloodhound.Internal.Highlight.PlainHighlight
- Database.Bloodhound.Internal.Highlight: instance GHC.Classes.Eq Database.Bloodhound.Internal.Highlight.PostingsHighlight
- Database.Bloodhound.Internal.Highlight: instance GHC.Show.Show Database.Bloodhound.Internal.Highlight.CommonHighlight
- Database.Bloodhound.Internal.Highlight: instance GHC.Show.Show Database.Bloodhound.Internal.Highlight.FastVectorHighlight
- Database.Bloodhound.Internal.Highlight: instance GHC.Show.Show Database.Bloodhound.Internal.Highlight.FieldHighlight
- Database.Bloodhound.Internal.Highlight: instance GHC.Show.Show Database.Bloodhound.Internal.Highlight.HighlightEncoder
- Database.Bloodhound.Internal.Highlight: instance GHC.Show.Show Database.Bloodhound.Internal.Highlight.HighlightSettings
- Database.Bloodhound.Internal.Highlight: instance GHC.Show.Show Database.Bloodhound.Internal.Highlight.HighlightTag
- Database.Bloodhound.Internal.Highlight: instance GHC.Show.Show Database.Bloodhound.Internal.Highlight.Highlights
- Database.Bloodhound.Internal.Highlight: instance GHC.Show.Show Database.Bloodhound.Internal.Highlight.NonPostings
- Database.Bloodhound.Internal.Highlight: instance GHC.Show.Show Database.Bloodhound.Internal.Highlight.PlainHighlight
- Database.Bloodhound.Internal.Highlight: instance GHC.Show.Show Database.Bloodhound.Internal.Highlight.PostingsHighlight
- Database.Bloodhound.Internal.Highlight: nonPostingsToPairs :: Maybe NonPostings -> [Pair]
- Database.Bloodhound.Internal.Highlight: plainHighPairs :: Maybe PlainHighlight -> [Pair]
- Database.Bloodhound.Internal.Highlight: postHighPairs :: Maybe PostingsHighlight -> [Pair]
- Database.Bloodhound.Internal.Highlight: type HitHighlight = Map Text [Text]
- Database.Bloodhound.Internal.Newtypes: AggregateParentScore :: Bool -> AggregateParentScore
- Database.Bloodhound.Internal.Newtypes: AllowLeadingWildcard :: Bool -> AllowLeadingWildcard
- Database.Bloodhound.Internal.Newtypes: AnalyzeWildcard :: Bool -> AnalyzeWildcard
- Database.Bloodhound.Internal.Newtypes: Analyzer :: Text -> Analyzer
- Database.Bloodhound.Internal.Newtypes: Boost :: Double -> Boost
- Database.Bloodhound.Internal.Newtypes: BoostTerms :: Double -> BoostTerms
- Database.Bloodhound.Internal.Newtypes: CacheKey :: Text -> CacheKey
- Database.Bloodhound.Internal.Newtypes: CacheName :: Text -> CacheName
- Database.Bloodhound.Internal.Newtypes: CharFilter :: Text -> CharFilter
- Database.Bloodhound.Internal.Newtypes: CutoffFrequency :: Double -> CutoffFrequency
- Database.Bloodhound.Internal.Newtypes: DisableCoord :: Bool -> DisableCoord
- Database.Bloodhound.Internal.Newtypes: DocId :: Text -> DocId
- Database.Bloodhound.Internal.Newtypes: EnablePositionIncrements :: Bool -> EnablePositionIncrements
- Database.Bloodhound.Internal.Newtypes: Existence :: Bool -> Existence
- Database.Bloodhound.Internal.Newtypes: FieldName :: Text -> FieldName
- Database.Bloodhound.Internal.Newtypes: From :: Int -> From
- Database.Bloodhound.Internal.Newtypes: GeneratePhraseQueries :: Bool -> GeneratePhraseQueries
- Database.Bloodhound.Internal.Newtypes: HitFields :: Map Text [Value] -> HitFields
- Database.Bloodhound.Internal.Newtypes: IgnoreTermFrequency :: Bool -> IgnoreTermFrequency
- Database.Bloodhound.Internal.Newtypes: IgnoreUnmapped :: Bool -> IgnoreUnmapped
- Database.Bloodhound.Internal.Newtypes: IndexAliasName :: IndexName -> IndexAliasName
- Database.Bloodhound.Internal.Newtypes: IndexName :: Text -> IndexName
- Database.Bloodhound.Internal.Newtypes: Lenient :: Bool -> Lenient
- Database.Bloodhound.Internal.Newtypes: Locale :: Text -> Locale
- Database.Bloodhound.Internal.Newtypes: LowercaseExpanded :: Bool -> LowercaseExpanded
- Database.Bloodhound.Internal.Newtypes: MS :: NominalDiffTime -> MS
- Database.Bloodhound.Internal.Newtypes: MaxChildren :: Int -> MaxChildren
- Database.Bloodhound.Internal.Newtypes: MaxDocFrequency :: Int -> MaxDocFrequency
- Database.Bloodhound.Internal.Newtypes: MaxExpansions :: Int -> MaxExpansions
- Database.Bloodhound.Internal.Newtypes: MaxQueryTerms :: Int -> MaxQueryTerms
- Database.Bloodhound.Internal.Newtypes: MaxWordLength :: Int -> MaxWordLength
- Database.Bloodhound.Internal.Newtypes: MaybeNA :: Maybe a -> MaybeNA a
- Database.Bloodhound.Internal.Newtypes: MinChildren :: Int -> MinChildren
- Database.Bloodhound.Internal.Newtypes: MinDocFrequency :: Int -> MinDocFrequency
- Database.Bloodhound.Internal.Newtypes: MinWordLength :: Int -> MinWordLength
- Database.Bloodhound.Internal.Newtypes: MinimumMatch :: Int -> MinimumMatch
- Database.Bloodhound.Internal.Newtypes: MinimumTermFrequency :: Int -> MinimumTermFrequency
- Database.Bloodhound.Internal.Newtypes: NullValue :: Bool -> NullValue
- Database.Bloodhound.Internal.Newtypes: POSIXMS :: UTCTime -> POSIXMS
- Database.Bloodhound.Internal.Newtypes: PercentMatch :: Double -> PercentMatch
- Database.Bloodhound.Internal.Newtypes: PhraseSlop :: Int -> PhraseSlop
- Database.Bloodhound.Internal.Newtypes: PrefixLength :: Int -> PrefixLength
- Database.Bloodhound.Internal.Newtypes: QueryPath :: Text -> QueryPath
- Database.Bloodhound.Internal.Newtypes: QueryString :: Text -> QueryString
- Database.Bloodhound.Internal.Newtypes: RelationName :: Text -> RelationName
- Database.Bloodhound.Internal.Newtypes: ReplicaCount :: Int -> ReplicaCount
- Database.Bloodhound.Internal.Newtypes: ShardCount :: Int -> ShardCount
- Database.Bloodhound.Internal.Newtypes: ShardId :: Int -> ShardId
- Database.Bloodhound.Internal.Newtypes: Size :: Int -> Size
- Database.Bloodhound.Internal.Newtypes: SnapshotName :: Text -> SnapshotName
- Database.Bloodhound.Internal.Newtypes: StopWord :: Text -> StopWord
- Database.Bloodhound.Internal.Newtypes: Tiebreaker :: Double -> Tiebreaker
- Database.Bloodhound.Internal.Newtypes: TokenFilter :: Text -> TokenFilter
- Database.Bloodhound.Internal.Newtypes: [indexAliasName] :: IndexAliasName -> IndexName
- Database.Bloodhound.Internal.Newtypes: [posixMS] :: POSIXMS -> UTCTime
- Database.Bloodhound.Internal.Newtypes: [shardId] :: ShardId -> Int
- Database.Bloodhound.Internal.Newtypes: [snapshotName] :: SnapshotName -> Text
- Database.Bloodhound.Internal.Newtypes: [unMaybeNA] :: MaybeNA a -> Maybe a
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.AggregateParentScore
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.AllowLeadingWildcard
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.AnalyzeWildcard
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.Analyzer
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.Boost
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.BoostTerms
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.CacheKey
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.CacheName
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.CharFilter
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.CutoffFrequency
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.DisableCoord
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.DocId
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.EnablePositionIncrements
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.Existence
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.FieldName
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.GeneratePhraseQueries
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.HitFields
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.IgnoreTermFrequency
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.IgnoreUnmapped
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.IndexName
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.Lenient
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.Locale
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.LowercaseExpanded
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.MS
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.MaxChildren
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.MaxDocFrequency
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.MaxExpansions
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.MaxQueryTerms
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.MaxWordLength
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.MinChildren
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.MinDocFrequency
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.MinWordLength
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.MinimumMatch
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.MinimumTermFrequency
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.NullValue
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.POSIXMS
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.PercentMatch
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.PhraseSlop
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.PrefixLength
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.QueryPath
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.QueryString
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.RelationName
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.ReplicaCount
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.ShardCount
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.ShardId
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.Size
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.SnapshotName
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.StopWord
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.Tiebreaker
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Newtypes.TokenFilter
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (Database.Bloodhound.Internal.Newtypes.MaybeNA a)
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.AggregateParentScore
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.AllowLeadingWildcard
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.AnalyzeWildcard
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.Analyzer
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.Boost
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.BoostTerms
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.CacheKey
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.CacheName
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.CharFilter
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.CutoffFrequency
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.DisableCoord
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.DocId
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.EnablePositionIncrements
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.Existence
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.FieldName
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.From
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.GeneratePhraseQueries
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.IgnoreTermFrequency
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.IgnoreUnmapped
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.IndexAliasName
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.IndexName
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.Lenient
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.Locale
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.LowercaseExpanded
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.MaxChildren
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.MaxDocFrequency
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.MaxExpansions
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.MaxQueryTerms
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.MaxWordLength
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.MinChildren
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.MinDocFrequency
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.MinWordLength
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.MinimumMatch
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.MinimumTermFrequency
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.NullValue
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.PercentMatch
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.PhraseSlop
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.PrefixLength
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.QueryPath
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.QueryString
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.RelationName
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.ReplicaCount
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.ShardCount
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.Size
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.SnapshotName
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.StopWord
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.Tiebreaker
- Database.Bloodhound.Internal.Newtypes: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Newtypes.TokenFilter
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.AggregateParentScore
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.AllowLeadingWildcard
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.AnalyzeWildcard
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.Analyzer
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.Boost
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.BoostTerms
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.CacheKey
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.CacheName
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.CharFilter
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.CutoffFrequency
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.DisableCoord
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.DocId
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.EnablePositionIncrements
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.Existence
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.FieldName
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.From
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.GeneratePhraseQueries
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.HitFields
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.IgnoreTermFrequency
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.IgnoreUnmapped
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.IndexAliasName
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.IndexName
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.Lenient
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.Locale
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.LowercaseExpanded
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.MaxChildren
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.MaxDocFrequency
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.MaxExpansions
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.MaxQueryTerms
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.MaxWordLength
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.MinChildren
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.MinDocFrequency
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.MinWordLength
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.MinimumMatch
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.MinimumTermFrequency
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.NullValue
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.PercentMatch
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.PhraseSlop
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.PrefixLength
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.QueryPath
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.QueryString
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.RelationName
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.ReplicaCount
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.ShardCount
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.ShardId
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.Size
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.SnapshotName
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.StopWord
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.Tiebreaker
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq Database.Bloodhound.Internal.Newtypes.TokenFilter
- Database.Bloodhound.Internal.Newtypes: instance GHC.Classes.Eq a => GHC.Classes.Eq (Database.Bloodhound.Internal.Newtypes.MaybeNA a)
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.AggregateParentScore
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.AllowLeadingWildcard
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.AnalyzeWildcard
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.Analyzer
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.Boost
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.BoostTerms
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.CacheKey
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.CacheName
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.CharFilter
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.CutoffFrequency
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.DisableCoord
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.DocId
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.EnablePositionIncrements
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.Existence
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.GeneratePhraseQueries
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.IgnoreTermFrequency
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.IgnoreUnmapped
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.IndexName
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.Lenient
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.Locale
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.LowercaseExpanded
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.MaxChildren
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.MaxDocFrequency
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.MaxExpansions
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.MaxQueryTerms
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.MaxWordLength
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.MinChildren
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.MinDocFrequency
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.MinWordLength
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.MinimumMatch
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.MinimumTermFrequency
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.NullValue
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.PercentMatch
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.PhraseSlop
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.PrefixLength
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.QueryPath
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.QueryString
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.RelationName
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.ReplicaCount
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.ShardCount
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.Size
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.StopWord
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.Tiebreaker
- Database.Bloodhound.Internal.Newtypes: instance GHC.Generics.Generic Database.Bloodhound.Internal.Newtypes.TokenFilter
- Database.Bloodhound.Internal.Newtypes: instance GHC.Read.Read Database.Bloodhound.Internal.Newtypes.FieldName
- Database.Bloodhound.Internal.Newtypes: instance GHC.Read.Read Database.Bloodhound.Internal.Newtypes.RelationName
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.AggregateParentScore
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.AllowLeadingWildcard
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.AnalyzeWildcard
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.Analyzer
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.Boost
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.BoostTerms
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.CacheKey
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.CacheName
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.CharFilter
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.CutoffFrequency
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.DisableCoord
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.DocId
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.EnablePositionIncrements
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.Existence
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.FieldName
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.From
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.GeneratePhraseQueries
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.HitFields
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.IgnoreTermFrequency
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.IgnoreUnmapped
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.IndexAliasName
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.IndexName
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.Lenient
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.Locale
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.LowercaseExpanded
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.MaxChildren
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.MaxDocFrequency
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.MaxExpansions
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.MaxQueryTerms
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.MaxWordLength
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.MinChildren
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.MinDocFrequency
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.MinWordLength
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.MinimumMatch
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.MinimumTermFrequency
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.NullValue
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.PercentMatch
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.PhraseSlop
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.PrefixLength
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.QueryPath
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.QueryString
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.RelationName
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.ReplicaCount
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.ShardCount
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.ShardId
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.Size
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.SnapshotName
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.StopWord
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.Tiebreaker
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show Database.Bloodhound.Internal.Newtypes.TokenFilter
- Database.Bloodhound.Internal.Newtypes: instance GHC.Show.Show a => GHC.Show.Show (Database.Bloodhound.Internal.Newtypes.MaybeNA a)
- Database.Bloodhound.Internal.Newtypes: newtype AggregateParentScore
- Database.Bloodhound.Internal.Newtypes: newtype AllowLeadingWildcard
- Database.Bloodhound.Internal.Newtypes: newtype AnalyzeWildcard
- Database.Bloodhound.Internal.Newtypes: newtype Analyzer
- Database.Bloodhound.Internal.Newtypes: newtype Boost
- Database.Bloodhound.Internal.Newtypes: newtype BoostTerms
- Database.Bloodhound.Internal.Newtypes: newtype CacheKey
- Database.Bloodhound.Internal.Newtypes: newtype CacheName
- Database.Bloodhound.Internal.Newtypes: newtype CharFilter
- Database.Bloodhound.Internal.Newtypes: newtype CutoffFrequency
- Database.Bloodhound.Internal.Newtypes: newtype DisableCoord
- Database.Bloodhound.Internal.Newtypes: newtype DocId
- Database.Bloodhound.Internal.Newtypes: newtype EnablePositionIncrements
- Database.Bloodhound.Internal.Newtypes: newtype Existence
- Database.Bloodhound.Internal.Newtypes: newtype FieldName
- Database.Bloodhound.Internal.Newtypes: newtype From
- Database.Bloodhound.Internal.Newtypes: newtype GeneratePhraseQueries
- Database.Bloodhound.Internal.Newtypes: newtype HitFields
- Database.Bloodhound.Internal.Newtypes: newtype IgnoreTermFrequency
- Database.Bloodhound.Internal.Newtypes: newtype IgnoreUnmapped
- Database.Bloodhound.Internal.Newtypes: newtype IndexAliasName
- Database.Bloodhound.Internal.Newtypes: newtype IndexName
- Database.Bloodhound.Internal.Newtypes: newtype Lenient
- Database.Bloodhound.Internal.Newtypes: newtype Locale
- Database.Bloodhound.Internal.Newtypes: newtype LowercaseExpanded
- Database.Bloodhound.Internal.Newtypes: newtype MS
- Database.Bloodhound.Internal.Newtypes: newtype MaxChildren
- Database.Bloodhound.Internal.Newtypes: newtype MaxDocFrequency
- Database.Bloodhound.Internal.Newtypes: newtype MaxExpansions
- Database.Bloodhound.Internal.Newtypes: newtype MaxQueryTerms
- Database.Bloodhound.Internal.Newtypes: newtype MaxWordLength
- Database.Bloodhound.Internal.Newtypes: newtype MaybeNA a
- Database.Bloodhound.Internal.Newtypes: newtype MinChildren
- Database.Bloodhound.Internal.Newtypes: newtype MinDocFrequency
- Database.Bloodhound.Internal.Newtypes: newtype MinWordLength
- Database.Bloodhound.Internal.Newtypes: newtype MinimumMatch
- Database.Bloodhound.Internal.Newtypes: newtype MinimumTermFrequency
- Database.Bloodhound.Internal.Newtypes: newtype NullValue
- Database.Bloodhound.Internal.Newtypes: newtype POSIXMS
- Database.Bloodhound.Internal.Newtypes: newtype PercentMatch
- Database.Bloodhound.Internal.Newtypes: newtype PhraseSlop
- Database.Bloodhound.Internal.Newtypes: newtype PrefixLength
- Database.Bloodhound.Internal.Newtypes: newtype QueryPath
- Database.Bloodhound.Internal.Newtypes: newtype QueryString
- Database.Bloodhound.Internal.Newtypes: newtype RelationName
- Database.Bloodhound.Internal.Newtypes: newtype ReplicaCount
- Database.Bloodhound.Internal.Newtypes: newtype ShardCount
- Database.Bloodhound.Internal.Newtypes: newtype ShardId
- Database.Bloodhound.Internal.Newtypes: newtype Size
- Database.Bloodhound.Internal.Newtypes: newtype SnapshotName
- Database.Bloodhound.Internal.Newtypes: newtype StopWord
- Database.Bloodhound.Internal.Newtypes: newtype Tiebreaker
- Database.Bloodhound.Internal.Newtypes: newtype TokenFilter
- Database.Bloodhound.Internal.Newtypes: type Score = Maybe Double
- Database.Bloodhound.Internal.Newtypes: unMS :: MS -> NominalDiffTime
- Database.Bloodhound.Internal.Query: AllRegexpFlags :: RegexpFlags
- Database.Bloodhound.Internal.Query: And :: BooleanOperator
- Database.Bloodhound.Internal.Query: AnyString :: RegexpFlag
- Database.Bloodhound.Internal.Query: Arc :: DistanceType
- Database.Bloodhound.Internal.Query: Automaton :: RegexpFlag
- Database.Bloodhound.Internal.Query: BoolQuery :: [Query] -> [Filter] -> [Query] -> [Query] -> Maybe MinimumMatch -> Maybe Boost -> Maybe DisableCoord -> BoolQuery
- Database.Bloodhound.Internal.Query: BoostModeAvg :: BoostMode
- Database.Bloodhound.Internal.Query: BoostModeMax :: BoostMode
- Database.Bloodhound.Internal.Query: BoostModeMin :: BoostMode
- Database.Bloodhound.Internal.Query: BoostModeMultiply :: BoostMode
- Database.Bloodhound.Internal.Query: BoostModeReplace :: BoostMode
- Database.Bloodhound.Internal.Query: BoostModeSum :: BoostMode
- Database.Bloodhound.Internal.Query: BoostingQuery :: Query -> Query -> Boost -> BoostingQuery
- Database.Bloodhound.Internal.Query: Centimeters :: DistanceUnit
- Database.Bloodhound.Internal.Query: CommonMinimumMatch :: MinimumMatch -> CommonMinimumMatch
- Database.Bloodhound.Internal.Query: CommonMinimumMatchHighLow :: MinimumMatchHighLow -> CommonMinimumMatch
- Database.Bloodhound.Internal.Query: CommonTermsQuery :: FieldName -> QueryString -> CutoffFrequency -> BooleanOperator -> BooleanOperator -> Maybe CommonMinimumMatch -> Maybe Boost -> Maybe Analyzer -> Maybe DisableCoord -> CommonTermsQuery
- Database.Bloodhound.Internal.Query: Complement :: RegexpFlag
- Database.Bloodhound.Internal.Query: ComponentFunctionScoreFunction :: Maybe Filter -> FunctionScoreFunction -> Maybe Weight -> ComponentFunctionScoreFunction
- Database.Bloodhound.Internal.Query: ConstantScoreQuery :: Query -> Boost -> Query
- Database.Bloodhound.Internal.Query: DisMaxQuery :: [Query] -> Tiebreaker -> Maybe Boost -> DisMaxQuery
- Database.Bloodhound.Internal.Query: Distance :: Double -> DistanceUnit -> Distance
- Database.Bloodhound.Internal.Query: DistanceRange :: Distance -> Distance -> DistanceRange
- Database.Bloodhound.Internal.Query: Empty :: RegexpFlag
- Database.Bloodhound.Internal.Query: Factor :: Float -> Factor
- Database.Bloodhound.Internal.Query: FactorMissingFieldValue :: Float -> FactorMissingFieldValue
- Database.Bloodhound.Internal.Query: FactorModifierLn :: FactorModifier
- Database.Bloodhound.Internal.Query: FactorModifierLn1p :: FactorModifier
- Database.Bloodhound.Internal.Query: FactorModifierLn2p :: FactorModifier
- Database.Bloodhound.Internal.Query: FactorModifierLog :: FactorModifier
- Database.Bloodhound.Internal.Query: FactorModifierLog1p :: FactorModifier
- Database.Bloodhound.Internal.Query: FactorModifierLog2p :: FactorModifier
- Database.Bloodhound.Internal.Query: FactorModifierNone :: FactorModifier
- Database.Bloodhound.Internal.Query: FactorModifierReciprocal :: FactorModifier
- Database.Bloodhound.Internal.Query: FactorModifierSqrt :: FactorModifier
- Database.Bloodhound.Internal.Query: FactorModifierSquare :: FactorModifier
- Database.Bloodhound.Internal.Query: Feet :: DistanceUnit
- Database.Bloodhound.Internal.Query: FieldValueFactor :: FieldName -> Maybe Factor -> Maybe FactorModifier -> Maybe FactorMissingFieldValue -> FieldValueFactor
- Database.Bloodhound.Internal.Query: Filter :: Query -> Filter
- Database.Bloodhound.Internal.Query: FofField :: FieldName -> FieldOrFields
- Database.Bloodhound.Internal.Query: FofFields :: NonEmpty FieldName -> FieldOrFields
- Database.Bloodhound.Internal.Query: FunctionScoreFunctionFieldValueFactor :: FieldValueFactor -> FunctionScoreFunction
- Database.Bloodhound.Internal.Query: FunctionScoreFunctionRandom :: Seed -> FunctionScoreFunction
- Database.Bloodhound.Internal.Query: FunctionScoreFunctionScript :: Script -> FunctionScoreFunction
- Database.Bloodhound.Internal.Query: FunctionScoreMultiple :: NonEmpty ComponentFunctionScoreFunction -> FunctionScoreFunctions
- Database.Bloodhound.Internal.Query: FunctionScoreQuery :: Maybe Query -> Maybe Boost -> FunctionScoreFunctions -> Maybe Boost -> Maybe BoostMode -> Score -> Maybe ScoreMode -> FunctionScoreQuery
- Database.Bloodhound.Internal.Query: FunctionScoreSingle :: FunctionScoreFunction -> FunctionScoreFunctions
- Database.Bloodhound.Internal.Query: Fuzziness :: Double -> Fuzziness
- Database.Bloodhound.Internal.Query: FuzzinessAuto :: Fuzziness
- Database.Bloodhound.Internal.Query: FuzzyLikeFieldQuery :: FieldName -> Text -> MaxQueryTerms -> IgnoreTermFrequency -> Fuzziness -> PrefixLength -> Boost -> Maybe Analyzer -> FuzzyLikeFieldQuery
- Database.Bloodhound.Internal.Query: FuzzyLikeThisQuery :: [FieldName] -> Text -> MaxQueryTerms -> IgnoreTermFrequency -> Fuzziness -> PrefixLength -> Boost -> Maybe Analyzer -> FuzzyLikeThisQuery
- Database.Bloodhound.Internal.Query: FuzzyQuery :: FieldName -> Text -> PrefixLength -> MaxExpansions -> Fuzziness -> Maybe Boost -> FuzzyQuery
- Database.Bloodhound.Internal.Query: GeoBoundingBox :: LatLon -> LatLon -> GeoBoundingBox
- Database.Bloodhound.Internal.Query: GeoBoundingBoxConstraint :: FieldName -> GeoBoundingBox -> Cache -> GeoFilterType -> GeoBoundingBoxConstraint
- Database.Bloodhound.Internal.Query: GeoFilterIndexed :: GeoFilterType
- Database.Bloodhound.Internal.Query: GeoFilterMemory :: GeoFilterType
- Database.Bloodhound.Internal.Query: GeoPoint :: FieldName -> LatLon -> GeoPoint
- Database.Bloodhound.Internal.Query: GreaterThan :: Double -> GreaterThan
- Database.Bloodhound.Internal.Query: GreaterThanD :: UTCTime -> GreaterThanD
- Database.Bloodhound.Internal.Query: GreaterThanEq :: Double -> GreaterThanEq
- Database.Bloodhound.Internal.Query: GreaterThanEqD :: UTCTime -> GreaterThanEqD
- Database.Bloodhound.Internal.Query: HasChildQuery :: RelationName -> Query -> Maybe ScoreType -> Maybe IgnoreUnmapped -> Maybe MinChildren -> Maybe MaxChildren -> HasChildQuery
- Database.Bloodhound.Internal.Query: HasParentQuery :: RelationName -> Query -> Maybe AggregateParentScore -> Maybe IgnoreUnmapped -> HasParentQuery
- Database.Bloodhound.Internal.Query: IdsQuery :: [DocId] -> Query
- Database.Bloodhound.Internal.Query: Inches :: DistanceUnit
- Database.Bloodhound.Internal.Query: IndicesQuery :: [IndexName] -> Query -> Maybe Query -> IndicesQuery
- Database.Bloodhound.Internal.Query: InnerHits :: Maybe Integer -> Maybe Integer -> InnerHits
- Database.Bloodhound.Internal.Query: Intersection :: RegexpFlag
- Database.Bloodhound.Internal.Query: Interval :: RegexpFlag
- Database.Bloodhound.Internal.Query: Kilometers :: DistanceUnit
- Database.Bloodhound.Internal.Query: LatLon :: Double -> Double -> LatLon
- Database.Bloodhound.Internal.Query: LessThan :: Double -> LessThan
- Database.Bloodhound.Internal.Query: LessThanD :: UTCTime -> LessThanD
- Database.Bloodhound.Internal.Query: LessThanEq :: Double -> LessThanEq
- Database.Bloodhound.Internal.Query: LessThanEqD :: UTCTime -> LessThanEqD
- Database.Bloodhound.Internal.Query: MatchAllQuery :: Maybe Boost -> Query
- Database.Bloodhound.Internal.Query: MatchPhrase :: MatchQueryType
- Database.Bloodhound.Internal.Query: MatchPhrasePrefix :: MatchQueryType
- Database.Bloodhound.Internal.Query: MatchQuery :: FieldName -> QueryString -> BooleanOperator -> ZeroTermsQuery -> Maybe CutoffFrequency -> Maybe MatchQueryType -> Maybe Analyzer -> Maybe MaxExpansions -> Maybe Lenient -> Maybe Boost -> Maybe Text -> Maybe Fuzziness -> MatchQuery
- Database.Bloodhound.Internal.Query: Meters :: DistanceUnit
- Database.Bloodhound.Internal.Query: Miles :: DistanceUnit
- Database.Bloodhound.Internal.Query: Millimeters :: DistanceUnit
- Database.Bloodhound.Internal.Query: MinimumMatchHighLow :: MinimumMatch -> MinimumMatch -> MinimumMatchHighLow
- Database.Bloodhound.Internal.Query: MoreLikeThisFieldQuery :: Text -> FieldName -> Maybe PercentMatch -> Maybe MinimumTermFrequency -> Maybe MaxQueryTerms -> Maybe (NonEmpty StopWord) -> Maybe MinDocFrequency -> Maybe MaxDocFrequency -> Maybe MinWordLength -> Maybe MaxWordLength -> Maybe BoostTerms -> Maybe Boost -> Maybe Analyzer -> MoreLikeThisFieldQuery
- Database.Bloodhound.Internal.Query: MoreLikeThisQuery :: Text -> Maybe (NonEmpty FieldName) -> Maybe PercentMatch -> Maybe MinimumTermFrequency -> Maybe MaxQueryTerms -> Maybe (NonEmpty StopWord) -> Maybe MinDocFrequency -> Maybe MaxDocFrequency -> Maybe MinWordLength -> Maybe MaxWordLength -> Maybe BoostTerms -> Maybe Boost -> Maybe Analyzer -> MoreLikeThisQuery
- Database.Bloodhound.Internal.Query: MultiMatchBestFields :: MultiMatchQueryType
- Database.Bloodhound.Internal.Query: MultiMatchCrossFields :: MultiMatchQueryType
- Database.Bloodhound.Internal.Query: MultiMatchMostFields :: MultiMatchQueryType
- Database.Bloodhound.Internal.Query: MultiMatchPhrase :: MultiMatchQueryType
- Database.Bloodhound.Internal.Query: MultiMatchPhrasePrefix :: MultiMatchQueryType
- Database.Bloodhound.Internal.Query: MultiMatchQuery :: [FieldName] -> QueryString -> BooleanOperator -> ZeroTermsQuery -> Maybe Tiebreaker -> Maybe MultiMatchQueryType -> Maybe CutoffFrequency -> Maybe Analyzer -> Maybe MaxExpansions -> Maybe Lenient -> MultiMatchQuery
- Database.Bloodhound.Internal.Query: MustMatch :: Term -> Cache -> BoolMatch
- Database.Bloodhound.Internal.Query: MustNotMatch :: Term -> Cache -> BoolMatch
- Database.Bloodhound.Internal.Query: NauticalMiles :: DistanceUnit
- Database.Bloodhound.Internal.Query: NestedQuery :: QueryPath -> ScoreType -> Query -> Maybe InnerHits -> NestedQuery
- Database.Bloodhound.Internal.Query: NoOptimizeBbox :: OptimizeBbox
- Database.Bloodhound.Internal.Query: NoRegexpFlags :: RegexpFlags
- Database.Bloodhound.Internal.Query: OptimizeGeoFilterType :: GeoFilterType -> OptimizeBbox
- Database.Bloodhound.Internal.Query: Or :: BooleanOperator
- Database.Bloodhound.Internal.Query: Plane :: DistanceType
- Database.Bloodhound.Internal.Query: PrefixQuery :: FieldName -> Text -> Maybe Boost -> PrefixQuery
- Database.Bloodhound.Internal.Query: QueryBoolQuery :: BoolQuery -> Query
- Database.Bloodhound.Internal.Query: QueryBoostingQuery :: BoostingQuery -> Query
- Database.Bloodhound.Internal.Query: QueryCommonTermsQuery :: CommonTermsQuery -> Query
- Database.Bloodhound.Internal.Query: QueryDisMaxQuery :: DisMaxQuery -> Query
- Database.Bloodhound.Internal.Query: QueryExistsQuery :: FieldName -> Query
- Database.Bloodhound.Internal.Query: QueryFunctionScoreQuery :: FunctionScoreQuery -> Query
- Database.Bloodhound.Internal.Query: QueryFuzzyLikeFieldQuery :: FuzzyLikeFieldQuery -> Query
- Database.Bloodhound.Internal.Query: QueryFuzzyLikeThisQuery :: FuzzyLikeThisQuery -> Query
- Database.Bloodhound.Internal.Query: QueryFuzzyQuery :: FuzzyQuery -> Query
- Database.Bloodhound.Internal.Query: QueryHasChildQuery :: HasChildQuery -> Query
- Database.Bloodhound.Internal.Query: QueryHasParentQuery :: HasParentQuery -> Query
- Database.Bloodhound.Internal.Query: QueryIndicesQuery :: IndicesQuery -> Query
- Database.Bloodhound.Internal.Query: QueryMatchNoneQuery :: Query
- Database.Bloodhound.Internal.Query: QueryMatchQuery :: MatchQuery -> Query
- Database.Bloodhound.Internal.Query: QueryMoreLikeThisFieldQuery :: MoreLikeThisFieldQuery -> Query
- Database.Bloodhound.Internal.Query: QueryMoreLikeThisQuery :: MoreLikeThisQuery -> Query
- Database.Bloodhound.Internal.Query: QueryMultiMatchQuery :: MultiMatchQuery -> Query
- Database.Bloodhound.Internal.Query: QueryNestedQuery :: NestedQuery -> Query
- Database.Bloodhound.Internal.Query: QueryPrefixQuery :: PrefixQuery -> Query
- Database.Bloodhound.Internal.Query: QueryQueryStringQuery :: QueryStringQuery -> Query
- Database.Bloodhound.Internal.Query: QueryRangeQuery :: RangeQuery -> Query
- Database.Bloodhound.Internal.Query: QueryRegexpQuery :: RegexpQuery -> Query
- Database.Bloodhound.Internal.Query: QuerySimpleQueryStringQuery :: SimpleQueryStringQuery -> Query
- Database.Bloodhound.Internal.Query: QueryStringQuery :: QueryString -> Maybe FieldName -> Maybe BooleanOperator -> Maybe Analyzer -> Maybe AllowLeadingWildcard -> Maybe LowercaseExpanded -> Maybe EnablePositionIncrements -> Maybe MaxExpansions -> Maybe Fuzziness -> Maybe PrefixLength -> Maybe PhraseSlop -> Maybe Boost -> Maybe AnalyzeWildcard -> Maybe GeneratePhraseQueries -> Maybe MinimumMatch -> Maybe Lenient -> Maybe Locale -> QueryStringQuery
- Database.Bloodhound.Internal.Query: QueryWildcardQuery :: WildcardQuery -> Query
- Database.Bloodhound.Internal.Query: RangeDateGt :: GreaterThanD -> RangeValue
- Database.Bloodhound.Internal.Query: RangeDateGtLt :: GreaterThanD -> LessThanD -> RangeValue
- Database.Bloodhound.Internal.Query: RangeDateGtLte :: GreaterThanD -> LessThanEqD -> RangeValue
- Database.Bloodhound.Internal.Query: RangeDateGte :: GreaterThanEqD -> RangeValue
- Database.Bloodhound.Internal.Query: RangeDateGteLt :: GreaterThanEqD -> LessThanD -> RangeValue
- Database.Bloodhound.Internal.Query: RangeDateGteLte :: GreaterThanEqD -> LessThanEqD -> RangeValue
- Database.Bloodhound.Internal.Query: RangeDateLt :: LessThanD -> RangeValue
- Database.Bloodhound.Internal.Query: RangeDateLte :: LessThanEqD -> RangeValue
- Database.Bloodhound.Internal.Query: RangeDoubleGt :: GreaterThan -> RangeValue
- Database.Bloodhound.Internal.Query: RangeDoubleGtLt :: GreaterThan -> LessThan -> RangeValue
- Database.Bloodhound.Internal.Query: RangeDoubleGtLte :: GreaterThan -> LessThanEq -> RangeValue
- Database.Bloodhound.Internal.Query: RangeDoubleGte :: GreaterThanEq -> RangeValue
- Database.Bloodhound.Internal.Query: RangeDoubleGteLt :: GreaterThanEq -> LessThan -> RangeValue
- Database.Bloodhound.Internal.Query: RangeDoubleGteLte :: GreaterThanEq -> LessThanEq -> RangeValue
- Database.Bloodhound.Internal.Query: RangeDoubleLt :: LessThan -> RangeValue
- Database.Bloodhound.Internal.Query: RangeDoubleLte :: LessThanEq -> RangeValue
- Database.Bloodhound.Internal.Query: RangeExecutionFielddata :: RangeExecution
- Database.Bloodhound.Internal.Query: RangeExecutionIndex :: RangeExecution
- Database.Bloodhound.Internal.Query: RangeQuery :: FieldName -> RangeValue -> Boost -> RangeQuery
- Database.Bloodhound.Internal.Query: Regexp :: Text -> Regexp
- Database.Bloodhound.Internal.Query: RegexpQuery :: FieldName -> Regexp -> RegexpFlags -> Maybe Boost -> RegexpQuery
- Database.Bloodhound.Internal.Query: ScoreModeAvg :: ScoreMode
- Database.Bloodhound.Internal.Query: ScoreModeFirst :: ScoreMode
- Database.Bloodhound.Internal.Query: ScoreModeMax :: ScoreMode
- Database.Bloodhound.Internal.Query: ScoreModeMin :: ScoreMode
- Database.Bloodhound.Internal.Query: ScoreModeMultiply :: ScoreMode
- Database.Bloodhound.Internal.Query: ScoreModeSum :: ScoreMode
- Database.Bloodhound.Internal.Query: ScoreTypeAvg :: ScoreType
- Database.Bloodhound.Internal.Query: ScoreTypeMax :: ScoreType
- Database.Bloodhound.Internal.Query: ScoreTypeNone :: ScoreType
- Database.Bloodhound.Internal.Query: ScoreTypeSum :: ScoreType
- Database.Bloodhound.Internal.Query: Script :: Maybe ScriptLanguage -> ScriptSource -> Maybe ScriptParams -> Script
- Database.Bloodhound.Internal.Query: ScriptFields :: KeyMap ScriptFieldValue -> ScriptFields
- Database.Bloodhound.Internal.Query: ScriptId :: Text -> ScriptSource
- Database.Bloodhound.Internal.Query: ScriptInline :: Text -> ScriptSource
- Database.Bloodhound.Internal.Query: ScriptLanguage :: Text -> ScriptLanguage
- Database.Bloodhound.Internal.Query: ScriptParams :: KeyMap ScriptParamValue -> ScriptParams
- Database.Bloodhound.Internal.Query: Seed :: Float -> Seed
- Database.Bloodhound.Internal.Query: ShouldMatch :: [Term] -> Cache -> BoolMatch
- Database.Bloodhound.Internal.Query: SimpleQueryAll :: SimpleQueryFlag
- Database.Bloodhound.Internal.Query: SimpleQueryAnd :: SimpleQueryFlag
- Database.Bloodhound.Internal.Query: SimpleQueryEscape :: SimpleQueryFlag
- Database.Bloodhound.Internal.Query: SimpleQueryFuzzy :: SimpleQueryFlag
- Database.Bloodhound.Internal.Query: SimpleQueryNear :: SimpleQueryFlag
- Database.Bloodhound.Internal.Query: SimpleQueryNone :: SimpleQueryFlag
- Database.Bloodhound.Internal.Query: SimpleQueryOr :: SimpleQueryFlag
- Database.Bloodhound.Internal.Query: SimpleQueryPhrase :: SimpleQueryFlag
- Database.Bloodhound.Internal.Query: SimpleQueryPrecedence :: SimpleQueryFlag
- Database.Bloodhound.Internal.Query: SimpleQueryPrefix :: SimpleQueryFlag
- Database.Bloodhound.Internal.Query: SimpleQuerySlop :: SimpleQueryFlag
- Database.Bloodhound.Internal.Query: SimpleQueryStringQuery :: QueryString -> Maybe FieldOrFields -> Maybe BooleanOperator -> Maybe Analyzer -> Maybe (NonEmpty SimpleQueryFlag) -> Maybe LowercaseExpanded -> Maybe Locale -> SimpleQueryStringQuery
- Database.Bloodhound.Internal.Query: SimpleQueryWhitespace :: SimpleQueryFlag
- Database.Bloodhound.Internal.Query: SloppyArc :: DistanceType
- Database.Bloodhound.Internal.Query: SomeRegexpFlags :: NonEmpty RegexpFlag -> RegexpFlags
- Database.Bloodhound.Internal.Query: TemplateQueryKeyValuePairs :: KeyMap TemplateQueryValue -> TemplateQueryKeyValuePairs
- Database.Bloodhound.Internal.Query: Term :: Key -> Text -> Term
- Database.Bloodhound.Internal.Query: TermQuery :: Term -> Maybe Boost -> Query
- Database.Bloodhound.Internal.Query: TermsQuery :: Key -> NonEmpty Text -> Query
- Database.Bloodhound.Internal.Query: Weight :: Float -> Weight
- Database.Bloodhound.Internal.Query: WildcardQuery :: FieldName -> Key -> Maybe Boost -> WildcardQuery
- Database.Bloodhound.Internal.Query: Yards :: DistanceUnit
- Database.Bloodhound.Internal.Query: ZeroTermsAll :: ZeroTermsQuery
- Database.Bloodhound.Internal.Query: ZeroTermsNone :: ZeroTermsQuery
- Database.Bloodhound.Internal.Query: [bbConstraintcache] :: GeoBoundingBoxConstraint -> Cache
- Database.Bloodhound.Internal.Query: [boolQueryBoost] :: BoolQuery -> Maybe Boost
- Database.Bloodhound.Internal.Query: [boolQueryDisableCoord] :: BoolQuery -> Maybe DisableCoord
- Database.Bloodhound.Internal.Query: [boolQueryFilter] :: BoolQuery -> [Filter]
- Database.Bloodhound.Internal.Query: [boolQueryMinimumShouldMatch] :: BoolQuery -> Maybe MinimumMatch
- Database.Bloodhound.Internal.Query: [boolQueryMustMatch] :: BoolQuery -> [Query]
- Database.Bloodhound.Internal.Query: [boolQueryMustNotMatch] :: BoolQuery -> [Query]
- Database.Bloodhound.Internal.Query: [boolQueryShouldMatch] :: BoolQuery -> [Query]
- Database.Bloodhound.Internal.Query: [bottomRight] :: GeoBoundingBox -> LatLon
- Database.Bloodhound.Internal.Query: [coefficient] :: Distance -> Double
- Database.Bloodhound.Internal.Query: [commonAnalyzer] :: CommonTermsQuery -> Maybe Analyzer
- Database.Bloodhound.Internal.Query: [commonBoost] :: CommonTermsQuery -> Maybe Boost
- Database.Bloodhound.Internal.Query: [commonCutoffFrequency] :: CommonTermsQuery -> CutoffFrequency
- Database.Bloodhound.Internal.Query: [commonDisableCoord] :: CommonTermsQuery -> Maybe DisableCoord
- Database.Bloodhound.Internal.Query: [commonField] :: CommonTermsQuery -> FieldName
- Database.Bloodhound.Internal.Query: [commonHighFreqOperator] :: CommonTermsQuery -> BooleanOperator
- Database.Bloodhound.Internal.Query: [commonLowFreqOperator] :: CommonTermsQuery -> BooleanOperator
- Database.Bloodhound.Internal.Query: [commonMinimumShouldMatch] :: CommonTermsQuery -> Maybe CommonMinimumMatch
- Database.Bloodhound.Internal.Query: [commonQuery] :: CommonTermsQuery -> QueryString
- Database.Bloodhound.Internal.Query: [componentScoreFunctionFilter] :: ComponentFunctionScoreFunction -> Maybe Filter
- Database.Bloodhound.Internal.Query: [componentScoreFunctionWeight] :: ComponentFunctionScoreFunction -> Maybe Weight
- Database.Bloodhound.Internal.Query: [componentScoreFunction] :: ComponentFunctionScoreFunction -> FunctionScoreFunction
- Database.Bloodhound.Internal.Query: [constraintBox] :: GeoBoundingBoxConstraint -> GeoBoundingBox
- Database.Bloodhound.Internal.Query: [disMaxBoost] :: DisMaxQuery -> Maybe Boost
- Database.Bloodhound.Internal.Query: [disMaxQueries] :: DisMaxQuery -> [Query]
- Database.Bloodhound.Internal.Query: [disMaxTiebreaker] :: DisMaxQuery -> Tiebreaker
- Database.Bloodhound.Internal.Query: [distanceFrom] :: DistanceRange -> Distance
- Database.Bloodhound.Internal.Query: [distanceTo] :: DistanceRange -> Distance
- Database.Bloodhound.Internal.Query: [fieldValueFactorField] :: FieldValueFactor -> FieldName
- Database.Bloodhound.Internal.Query: [fieldValueFactorMissing] :: FieldValueFactor -> Maybe FactorMissingFieldValue
- Database.Bloodhound.Internal.Query: [fieldValueFactorModifier] :: FieldValueFactor -> Maybe FactorModifier
- Database.Bloodhound.Internal.Query: [fieldValueFactor] :: FieldValueFactor -> Maybe Factor
- Database.Bloodhound.Internal.Query: [functionScoreBoostMode] :: FunctionScoreQuery -> Maybe BoostMode
- Database.Bloodhound.Internal.Query: [functionScoreBoost] :: FunctionScoreQuery -> Maybe Boost
- Database.Bloodhound.Internal.Query: [functionScoreFunctions] :: FunctionScoreQuery -> FunctionScoreFunctions
- Database.Bloodhound.Internal.Query: [functionScoreMaxBoost] :: FunctionScoreQuery -> Maybe Boost
- Database.Bloodhound.Internal.Query: [functionScoreMinScore] :: FunctionScoreQuery -> Score
- Database.Bloodhound.Internal.Query: [functionScoreQuery] :: FunctionScoreQuery -> Maybe Query
- Database.Bloodhound.Internal.Query: [functionScoreScoreMode] :: FunctionScoreQuery -> Maybe ScoreMode
- Database.Bloodhound.Internal.Query: [fuzzyLikeAnalyzer] :: FuzzyLikeThisQuery -> Maybe Analyzer
- Database.Bloodhound.Internal.Query: [fuzzyLikeBoost] :: FuzzyLikeThisQuery -> Boost
- Database.Bloodhound.Internal.Query: [fuzzyLikeFieldAnalyzer] :: FuzzyLikeFieldQuery -> Maybe Analyzer
- Database.Bloodhound.Internal.Query: [fuzzyLikeFieldBoost] :: FuzzyLikeFieldQuery -> Boost
- Database.Bloodhound.Internal.Query: [fuzzyLikeFieldFuzziness] :: FuzzyLikeFieldQuery -> Fuzziness
- Database.Bloodhound.Internal.Query: [fuzzyLikeFieldIgnoreTermFrequency] :: FuzzyLikeFieldQuery -> IgnoreTermFrequency
- Database.Bloodhound.Internal.Query: [fuzzyLikeFieldMaxQueryTerms] :: FuzzyLikeFieldQuery -> MaxQueryTerms
- Database.Bloodhound.Internal.Query: [fuzzyLikeFieldPrefixLength] :: FuzzyLikeFieldQuery -> PrefixLength
- Database.Bloodhound.Internal.Query: [fuzzyLikeFieldText] :: FuzzyLikeFieldQuery -> Text
- Database.Bloodhound.Internal.Query: [fuzzyLikeField] :: FuzzyLikeFieldQuery -> FieldName
- Database.Bloodhound.Internal.Query: [fuzzyLikeFields] :: FuzzyLikeThisQuery -> [FieldName]
- Database.Bloodhound.Internal.Query: [fuzzyLikeFuzziness] :: FuzzyLikeThisQuery -> Fuzziness
- Database.Bloodhound.Internal.Query: [fuzzyLikeIgnoreTermFrequency] :: FuzzyLikeThisQuery -> IgnoreTermFrequency
- Database.Bloodhound.Internal.Query: [fuzzyLikeMaxQueryTerms] :: FuzzyLikeThisQuery -> MaxQueryTerms
- Database.Bloodhound.Internal.Query: [fuzzyLikePrefixLength] :: FuzzyLikeThisQuery -> PrefixLength
- Database.Bloodhound.Internal.Query: [fuzzyLikeText] :: FuzzyLikeThisQuery -> Text
- Database.Bloodhound.Internal.Query: [fuzzyQueryBoost] :: FuzzyQuery -> Maybe Boost
- Database.Bloodhound.Internal.Query: [fuzzyQueryField] :: FuzzyQuery -> FieldName
- Database.Bloodhound.Internal.Query: [fuzzyQueryFuzziness] :: FuzzyQuery -> Fuzziness
- Database.Bloodhound.Internal.Query: [fuzzyQueryMaxExpansions] :: FuzzyQuery -> MaxExpansions
- Database.Bloodhound.Internal.Query: [fuzzyQueryPrefixLength] :: FuzzyQuery -> PrefixLength
- Database.Bloodhound.Internal.Query: [fuzzyQueryValue] :: FuzzyQuery -> Text
- Database.Bloodhound.Internal.Query: [geoBBField] :: GeoBoundingBoxConstraint -> FieldName
- Database.Bloodhound.Internal.Query: [geoField] :: GeoPoint -> FieldName
- Database.Bloodhound.Internal.Query: [geoType] :: GeoBoundingBoxConstraint -> GeoFilterType
- Database.Bloodhound.Internal.Query: [hasChildIgnoreUnmappped] :: HasChildQuery -> Maybe IgnoreUnmapped
- Database.Bloodhound.Internal.Query: [hasChildMaxChildren] :: HasChildQuery -> Maybe MaxChildren
- Database.Bloodhound.Internal.Query: [hasChildMinChildren] :: HasChildQuery -> Maybe MinChildren
- Database.Bloodhound.Internal.Query: [hasChildQueryScoreType] :: HasChildQuery -> Maybe ScoreType
- Database.Bloodhound.Internal.Query: [hasChildQueryType] :: HasChildQuery -> RelationName
- Database.Bloodhound.Internal.Query: [hasChildQuery] :: HasChildQuery -> Query
- Database.Bloodhound.Internal.Query: [hasParentIgnoreUnmapped] :: HasParentQuery -> Maybe IgnoreUnmapped
- Database.Bloodhound.Internal.Query: [hasParentQueryScore] :: HasParentQuery -> Maybe AggregateParentScore
- Database.Bloodhound.Internal.Query: [hasParentQueryType] :: HasParentQuery -> RelationName
- Database.Bloodhound.Internal.Query: [hasParentQuery] :: HasParentQuery -> Query
- Database.Bloodhound.Internal.Query: [highFreq] :: MinimumMatchHighLow -> MinimumMatch
- Database.Bloodhound.Internal.Query: [indicesQueryIndices] :: IndicesQuery -> [IndexName]
- Database.Bloodhound.Internal.Query: [indicesQueryNoMatch] :: IndicesQuery -> Maybe Query
- Database.Bloodhound.Internal.Query: [indicesQuery] :: IndicesQuery -> Query
- Database.Bloodhound.Internal.Query: [innerHitsFrom] :: InnerHits -> Maybe Integer
- Database.Bloodhound.Internal.Query: [innerHitsSize] :: InnerHits -> Maybe Integer
- Database.Bloodhound.Internal.Query: [latLon] :: GeoPoint -> LatLon
- Database.Bloodhound.Internal.Query: [lat] :: LatLon -> Double
- Database.Bloodhound.Internal.Query: [lon] :: LatLon -> Double
- Database.Bloodhound.Internal.Query: [lowFreq] :: MinimumMatchHighLow -> MinimumMatch
- Database.Bloodhound.Internal.Query: [matchQueryAnalyzer] :: MatchQuery -> Maybe Analyzer
- Database.Bloodhound.Internal.Query: [matchQueryBoost] :: MatchQuery -> Maybe Boost
- Database.Bloodhound.Internal.Query: [matchQueryCutoffFrequency] :: MatchQuery -> Maybe CutoffFrequency
- Database.Bloodhound.Internal.Query: [matchQueryField] :: MatchQuery -> FieldName
- Database.Bloodhound.Internal.Query: [matchQueryFuzziness] :: MatchQuery -> Maybe Fuzziness
- Database.Bloodhound.Internal.Query: [matchQueryLenient] :: MatchQuery -> Maybe Lenient
- Database.Bloodhound.Internal.Query: [matchQueryMatchType] :: MatchQuery -> Maybe MatchQueryType
- Database.Bloodhound.Internal.Query: [matchQueryMaxExpansions] :: MatchQuery -> Maybe MaxExpansions
- Database.Bloodhound.Internal.Query: [matchQueryMinimumShouldMatch] :: MatchQuery -> Maybe Text
- Database.Bloodhound.Internal.Query: [matchQueryOperator] :: MatchQuery -> BooleanOperator
- Database.Bloodhound.Internal.Query: [matchQueryQueryString] :: MatchQuery -> QueryString
- Database.Bloodhound.Internal.Query: [matchQueryZeroTerms] :: MatchQuery -> ZeroTermsQuery
- Database.Bloodhound.Internal.Query: [moreLikeThisAnalyzer] :: MoreLikeThisQuery -> Maybe Analyzer
- Database.Bloodhound.Internal.Query: [moreLikeThisBoostTerms] :: MoreLikeThisQuery -> Maybe BoostTerms
- Database.Bloodhound.Internal.Query: [moreLikeThisBoost] :: MoreLikeThisQuery -> Maybe Boost
- Database.Bloodhound.Internal.Query: [moreLikeThisFieldAnalyzer] :: MoreLikeThisFieldQuery -> Maybe Analyzer
- Database.Bloodhound.Internal.Query: [moreLikeThisFieldBoostTerms] :: MoreLikeThisFieldQuery -> Maybe BoostTerms
- Database.Bloodhound.Internal.Query: [moreLikeThisFieldBoost] :: MoreLikeThisFieldQuery -> Maybe Boost
- Database.Bloodhound.Internal.Query: [moreLikeThisFieldFields] :: MoreLikeThisFieldQuery -> FieldName
- Database.Bloodhound.Internal.Query: [moreLikeThisFieldMaxDocFrequency] :: MoreLikeThisFieldQuery -> Maybe MaxDocFrequency
- Database.Bloodhound.Internal.Query: [moreLikeThisFieldMaxQueryTerms] :: MoreLikeThisFieldQuery -> Maybe MaxQueryTerms
- Database.Bloodhound.Internal.Query: [moreLikeThisFieldMaxWordLength] :: MoreLikeThisFieldQuery -> Maybe MaxWordLength
- Database.Bloodhound.Internal.Query: [moreLikeThisFieldMinDocFrequency] :: MoreLikeThisFieldQuery -> Maybe MinDocFrequency
- Database.Bloodhound.Internal.Query: [moreLikeThisFieldMinWordLength] :: MoreLikeThisFieldQuery -> Maybe MinWordLength
- Database.Bloodhound.Internal.Query: [moreLikeThisFieldMinimumTermFreq] :: MoreLikeThisFieldQuery -> Maybe MinimumTermFrequency
- Database.Bloodhound.Internal.Query: [moreLikeThisFieldPercentMatch] :: MoreLikeThisFieldQuery -> Maybe PercentMatch
- Database.Bloodhound.Internal.Query: [moreLikeThisFieldStopWords] :: MoreLikeThisFieldQuery -> Maybe (NonEmpty StopWord)
- Database.Bloodhound.Internal.Query: [moreLikeThisFieldText] :: MoreLikeThisFieldQuery -> Text
- Database.Bloodhound.Internal.Query: [moreLikeThisFields] :: MoreLikeThisQuery -> Maybe (NonEmpty FieldName)
- Database.Bloodhound.Internal.Query: [moreLikeThisMaxDocFrequency] :: MoreLikeThisQuery -> Maybe MaxDocFrequency
- Database.Bloodhound.Internal.Query: [moreLikeThisMaxQueryTerms] :: MoreLikeThisQuery -> Maybe MaxQueryTerms
- Database.Bloodhound.Internal.Query: [moreLikeThisMaxWordLength] :: MoreLikeThisQuery -> Maybe MaxWordLength
- Database.Bloodhound.Internal.Query: [moreLikeThisMinDocFrequency] :: MoreLikeThisQuery -> Maybe MinDocFrequency
- Database.Bloodhound.Internal.Query: [moreLikeThisMinWordLength] :: MoreLikeThisQuery -> Maybe MinWordLength
- Database.Bloodhound.Internal.Query: [moreLikeThisMinimumTermFreq] :: MoreLikeThisQuery -> Maybe MinimumTermFrequency
- Database.Bloodhound.Internal.Query: [moreLikeThisPercentMatch] :: MoreLikeThisQuery -> Maybe PercentMatch
- Database.Bloodhound.Internal.Query: [moreLikeThisStopWords] :: MoreLikeThisQuery -> Maybe (NonEmpty StopWord)
- Database.Bloodhound.Internal.Query: [moreLikeThisText] :: MoreLikeThisQuery -> Text
- Database.Bloodhound.Internal.Query: [multiMatchQueryAnalyzer] :: MultiMatchQuery -> Maybe Analyzer
- Database.Bloodhound.Internal.Query: [multiMatchQueryCutoffFrequency] :: MultiMatchQuery -> Maybe CutoffFrequency
- Database.Bloodhound.Internal.Query: [multiMatchQueryFields] :: MultiMatchQuery -> [FieldName]
- Database.Bloodhound.Internal.Query: [multiMatchQueryLenient] :: MultiMatchQuery -> Maybe Lenient
- Database.Bloodhound.Internal.Query: [multiMatchQueryMaxExpansions] :: MultiMatchQuery -> Maybe MaxExpansions
- Database.Bloodhound.Internal.Query: [multiMatchQueryOperator] :: MultiMatchQuery -> BooleanOperator
- Database.Bloodhound.Internal.Query: [multiMatchQueryString] :: MultiMatchQuery -> QueryString
- Database.Bloodhound.Internal.Query: [multiMatchQueryTiebreaker] :: MultiMatchQuery -> Maybe Tiebreaker
- Database.Bloodhound.Internal.Query: [multiMatchQueryType] :: MultiMatchQuery -> Maybe MultiMatchQueryType
- Database.Bloodhound.Internal.Query: [multiMatchQueryZeroTerms] :: MultiMatchQuery -> ZeroTermsQuery
- Database.Bloodhound.Internal.Query: [negativeBoost] :: BoostingQuery -> Boost
- Database.Bloodhound.Internal.Query: [negativeQuery] :: BoostingQuery -> Query
- Database.Bloodhound.Internal.Query: [nestedQueryInnerHits] :: NestedQuery -> Maybe InnerHits
- Database.Bloodhound.Internal.Query: [nestedQueryPath] :: NestedQuery -> QueryPath
- Database.Bloodhound.Internal.Query: [nestedQueryScoreType] :: NestedQuery -> ScoreType
- Database.Bloodhound.Internal.Query: [nestedQuery] :: NestedQuery -> Query
- Database.Bloodhound.Internal.Query: [positiveQuery] :: BoostingQuery -> Query
- Database.Bloodhound.Internal.Query: [prefixQueryBoost] :: PrefixQuery -> Maybe Boost
- Database.Bloodhound.Internal.Query: [prefixQueryField] :: PrefixQuery -> FieldName
- Database.Bloodhound.Internal.Query: [prefixQueryPrefixValue] :: PrefixQuery -> Text
- Database.Bloodhound.Internal.Query: [queryStringAllowLeadingWildcard] :: QueryStringQuery -> Maybe AllowLeadingWildcard
- Database.Bloodhound.Internal.Query: [queryStringAnalyzeWildcard] :: QueryStringQuery -> Maybe AnalyzeWildcard
- Database.Bloodhound.Internal.Query: [queryStringAnalyzer] :: QueryStringQuery -> Maybe Analyzer
- Database.Bloodhound.Internal.Query: [queryStringBoost] :: QueryStringQuery -> Maybe Boost
- Database.Bloodhound.Internal.Query: [queryStringDefaultField] :: QueryStringQuery -> Maybe FieldName
- Database.Bloodhound.Internal.Query: [queryStringEnablePositionIncrements] :: QueryStringQuery -> Maybe EnablePositionIncrements
- Database.Bloodhound.Internal.Query: [queryStringFuzziness] :: QueryStringQuery -> Maybe Fuzziness
- Database.Bloodhound.Internal.Query: [queryStringFuzzyMaxExpansions] :: QueryStringQuery -> Maybe MaxExpansions
- Database.Bloodhound.Internal.Query: [queryStringFuzzyPrefixLength] :: QueryStringQuery -> Maybe PrefixLength
- Database.Bloodhound.Internal.Query: [queryStringGeneratePhraseQueries] :: QueryStringQuery -> Maybe GeneratePhraseQueries
- Database.Bloodhound.Internal.Query: [queryStringLenient] :: QueryStringQuery -> Maybe Lenient
- Database.Bloodhound.Internal.Query: [queryStringLocale] :: QueryStringQuery -> Maybe Locale
- Database.Bloodhound.Internal.Query: [queryStringLowercaseExpanded] :: QueryStringQuery -> Maybe LowercaseExpanded
- Database.Bloodhound.Internal.Query: [queryStringMinimumShouldMatch] :: QueryStringQuery -> Maybe MinimumMatch
- Database.Bloodhound.Internal.Query: [queryStringOperator] :: QueryStringQuery -> Maybe BooleanOperator
- Database.Bloodhound.Internal.Query: [queryStringPhraseSlop] :: QueryStringQuery -> Maybe PhraseSlop
- Database.Bloodhound.Internal.Query: [queryStringQuery] :: QueryStringQuery -> QueryString
- Database.Bloodhound.Internal.Query: [rangeQueryBoost] :: RangeQuery -> Boost
- Database.Bloodhound.Internal.Query: [rangeQueryField] :: RangeQuery -> FieldName
- Database.Bloodhound.Internal.Query: [rangeQueryRange] :: RangeQuery -> RangeValue
- Database.Bloodhound.Internal.Query: [regexpQueryBoost] :: RegexpQuery -> Maybe Boost
- Database.Bloodhound.Internal.Query: [regexpQueryField] :: RegexpQuery -> FieldName
- Database.Bloodhound.Internal.Query: [regexpQueryFlags] :: RegexpQuery -> RegexpFlags
- Database.Bloodhound.Internal.Query: [regexpQuery] :: RegexpQuery -> Regexp
- Database.Bloodhound.Internal.Query: [scriptLanguage] :: Script -> Maybe ScriptLanguage
- Database.Bloodhound.Internal.Query: [scriptParams] :: Script -> Maybe ScriptParams
- Database.Bloodhound.Internal.Query: [scriptSource] :: Script -> ScriptSource
- Database.Bloodhound.Internal.Query: [simpleQueryStringAnalyzer] :: SimpleQueryStringQuery -> Maybe Analyzer
- Database.Bloodhound.Internal.Query: [simpleQueryStringField] :: SimpleQueryStringQuery -> Maybe FieldOrFields
- Database.Bloodhound.Internal.Query: [simpleQueryStringFlags] :: SimpleQueryStringQuery -> Maybe (NonEmpty SimpleQueryFlag)
- Database.Bloodhound.Internal.Query: [simpleQueryStringLocale] :: SimpleQueryStringQuery -> Maybe Locale
- Database.Bloodhound.Internal.Query: [simpleQueryStringLowercaseExpanded] :: SimpleQueryStringQuery -> Maybe LowercaseExpanded
- Database.Bloodhound.Internal.Query: [simpleQueryStringOperator] :: SimpleQueryStringQuery -> Maybe BooleanOperator
- Database.Bloodhound.Internal.Query: [simpleQueryStringQuery] :: SimpleQueryStringQuery -> QueryString
- Database.Bloodhound.Internal.Query: [termField] :: Term -> Key
- Database.Bloodhound.Internal.Query: [termValue] :: Term -> Text
- Database.Bloodhound.Internal.Query: [topLeft] :: GeoBoundingBox -> LatLon
- Database.Bloodhound.Internal.Query: [unFilter] :: Filter -> Query
- Database.Bloodhound.Internal.Query: [unit] :: Distance -> DistanceUnit
- Database.Bloodhound.Internal.Query: [wildcardQueryBoost] :: WildcardQuery -> Maybe Boost
- Database.Bloodhound.Internal.Query: [wildcardQueryField] :: WildcardQuery -> FieldName
- Database.Bloodhound.Internal.Query: [wildcardQuery] :: WildcardQuery -> Key
- Database.Bloodhound.Internal.Query: data BoolMatch
- Database.Bloodhound.Internal.Query: data BoolQuery
- Database.Bloodhound.Internal.Query: data BooleanOperator
- Database.Bloodhound.Internal.Query: data BoostMode
- Database.Bloodhound.Internal.Query: data BoostingQuery
- Database.Bloodhound.Internal.Query: data CommonMinimumMatch
- Database.Bloodhound.Internal.Query: data CommonTermsQuery
- Database.Bloodhound.Internal.Query: data ComponentFunctionScoreFunction
- Database.Bloodhound.Internal.Query: data DisMaxQuery
- Database.Bloodhound.Internal.Query: data Distance
- Database.Bloodhound.Internal.Query: data DistanceRange
- Database.Bloodhound.Internal.Query: data DistanceType
- Database.Bloodhound.Internal.Query: data DistanceUnit
- Database.Bloodhound.Internal.Query: data FactorModifier
- Database.Bloodhound.Internal.Query: data FieldOrFields
- Database.Bloodhound.Internal.Query: data FieldValueFactor
- Database.Bloodhound.Internal.Query: data FunctionScoreFunction
- Database.Bloodhound.Internal.Query: data FunctionScoreFunctions
- Database.Bloodhound.Internal.Query: data FunctionScoreQuery
- Database.Bloodhound.Internal.Query: data Fuzziness
- Database.Bloodhound.Internal.Query: data FuzzyLikeFieldQuery
- Database.Bloodhound.Internal.Query: data FuzzyLikeThisQuery
- Database.Bloodhound.Internal.Query: data FuzzyQuery
- Database.Bloodhound.Internal.Query: data GeoBoundingBox
- Database.Bloodhound.Internal.Query: data GeoBoundingBoxConstraint
- Database.Bloodhound.Internal.Query: data GeoFilterType
- Database.Bloodhound.Internal.Query: data GeoPoint
- Database.Bloodhound.Internal.Query: data HasChildQuery
- Database.Bloodhound.Internal.Query: data HasParentQuery
- Database.Bloodhound.Internal.Query: data IndicesQuery
- Database.Bloodhound.Internal.Query: data InnerHits
- Database.Bloodhound.Internal.Query: data LatLon
- Database.Bloodhound.Internal.Query: data MatchQuery
- Database.Bloodhound.Internal.Query: data MatchQueryType
- Database.Bloodhound.Internal.Query: data MinimumMatchHighLow
- Database.Bloodhound.Internal.Query: data MoreLikeThisFieldQuery
- Database.Bloodhound.Internal.Query: data MoreLikeThisQuery
- Database.Bloodhound.Internal.Query: data MultiMatchQuery
- Database.Bloodhound.Internal.Query: data MultiMatchQueryType
- Database.Bloodhound.Internal.Query: data NestedQuery
- Database.Bloodhound.Internal.Query: data OptimizeBbox
- Database.Bloodhound.Internal.Query: data PrefixQuery
- Database.Bloodhound.Internal.Query: data Query
- Database.Bloodhound.Internal.Query: data QueryStringQuery
- Database.Bloodhound.Internal.Query: data RangeExecution
- Database.Bloodhound.Internal.Query: data RangeQuery
- Database.Bloodhound.Internal.Query: data RangeValue
- Database.Bloodhound.Internal.Query: data RegexpFlag
- Database.Bloodhound.Internal.Query: data RegexpFlags
- Database.Bloodhound.Internal.Query: data RegexpQuery
- Database.Bloodhound.Internal.Query: data ScoreMode
- Database.Bloodhound.Internal.Query: data ScoreType
- Database.Bloodhound.Internal.Query: data Script
- Database.Bloodhound.Internal.Query: data ScriptSource
- Database.Bloodhound.Internal.Query: data SimpleQueryFlag
- Database.Bloodhound.Internal.Query: data SimpleQueryStringQuery
- Database.Bloodhound.Internal.Query: data Term
- Database.Bloodhound.Internal.Query: data WildcardQuery
- Database.Bloodhound.Internal.Query: data ZeroTermsQuery
- Database.Bloodhound.Internal.Query: defaultCache :: Cache
- Database.Bloodhound.Internal.Query: fieldTagged :: (Monad m, MonadFail m) => (FieldName -> Object -> m a) -> Object -> m a
- Database.Bloodhound.Internal.Query: functionScoreFunctionPair :: FunctionScoreFunction -> (Key, Value)
- Database.Bloodhound.Internal.Query: functionScoreFunctionsPair :: FunctionScoreFunctions -> (Key, Value)
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.BoolMatch
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.BoolQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.BooleanOperator
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.BoostingQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.CommonMinimumMatch
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.CommonTermsQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.ComponentFunctionScoreFunction
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.DisMaxQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.Distance
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.DistanceType
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.DistanceUnit
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.FieldOrFields
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.Filter
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.FunctionScoreQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.Fuzziness
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.FuzzyLikeFieldQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.FuzzyLikeThisQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.FuzzyQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.GeoBoundingBox
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.GeoBoundingBoxConstraint
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.GeoFilterType
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.HasChildQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.HasParentQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.IndicesQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.InnerHits
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.LatLon
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.MatchQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.MatchQueryType
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.MoreLikeThisFieldQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.MoreLikeThisQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.MultiMatchQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.MultiMatchQueryType
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.NestedQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.OptimizeBbox
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.PrefixQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.Query
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.QueryStringQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.RangeExecution
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.RangeQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.RangeValue
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.Regexp
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.RegexpFlag
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.RegexpFlags
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.RegexpQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.ScoreType
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.SimpleQueryFlag
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.SimpleQueryStringQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.TemplateQueryKeyValuePairs
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.Term
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.WildcardQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Query.ZeroTermsQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.BoolMatch
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.BoolQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.BooleanOperator
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.BoostingQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.CommonMinimumMatch
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.CommonTermsQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.ComponentFunctionScoreFunction
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.DisMaxQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.Distance
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.DistanceType
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.DistanceUnit
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.FieldOrFields
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.Filter
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.FunctionScoreQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.Fuzziness
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.FuzzyLikeFieldQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.FuzzyLikeThisQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.FuzzyQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.GeoBoundingBox
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.GeoBoundingBoxConstraint
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.GeoFilterType
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.GeoPoint
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.HasChildQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.HasParentQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.IndicesQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.InnerHits
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.LatLon
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.MatchQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.MatchQueryType
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.MoreLikeThisFieldQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.MoreLikeThisQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.MultiMatchQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.MultiMatchQueryType
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.NestedQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.OptimizeBbox
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.PrefixQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.Query
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.QueryStringQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.RangeExecution
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.RangeQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.RegexpFlags
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.RegexpQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.ScoreType
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.SimpleQueryFlag
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.SimpleQueryStringQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.TemplateQueryKeyValuePairs
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.Term
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.WildcardQuery
- Database.Bloodhound.Internal.Query: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Query.ZeroTermsQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.BoolMatch
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.BoolQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.BooleanOperator
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.BoostingQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.CommonMinimumMatch
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.CommonTermsQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.ComponentFunctionScoreFunction
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.DisMaxQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.Distance
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.DistanceRange
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.DistanceType
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.DistanceUnit
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.FieldOrFields
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.Filter
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.FunctionScoreFunctions
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.FunctionScoreQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.Fuzziness
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.FuzzyLikeFieldQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.FuzzyLikeThisQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.FuzzyQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.GeoBoundingBox
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.GeoBoundingBoxConstraint
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.GeoFilterType
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.GeoPoint
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.GreaterThan
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.GreaterThanD
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.GreaterThanEq
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.GreaterThanEqD
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.HasChildQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.HasParentQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.IndicesQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.InnerHits
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.LatLon
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.LessThan
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.LessThanD
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.LessThanEq
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.LessThanEqD
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.MatchQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.MatchQueryType
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.MinimumMatchHighLow
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.MoreLikeThisFieldQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.MoreLikeThisQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.MultiMatchQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.MultiMatchQueryType
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.NestedQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.OptimizeBbox
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.PrefixQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.Query
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.QueryStringQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.RangeExecution
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.RangeQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.RangeValue
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.Regexp
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.RegexpFlag
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.RegexpFlags
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.RegexpQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.ScoreType
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.SimpleQueryFlag
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.SimpleQueryStringQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.TemplateQueryKeyValuePairs
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.Term
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.WildcardQuery
- Database.Bloodhound.Internal.Query: instance GHC.Classes.Eq Database.Bloodhound.Internal.Query.ZeroTermsQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.BoolMatch
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.BoolQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.BooleanOperator
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.BoostingQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.CommonMinimumMatch
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.CommonTermsQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.ComponentFunctionScoreFunction
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.DisMaxQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.Distance
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.DistanceRange
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.DistanceType
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.DistanceUnit
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.FieldOrFields
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.FunctionScoreFunctions
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.FunctionScoreQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.Fuzziness
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.FuzzyLikeFieldQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.FuzzyLikeThisQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.FuzzyQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.GeoBoundingBox
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.GeoBoundingBoxConstraint
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.GeoFilterType
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.GeoPoint
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.GreaterThan
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.GreaterThanD
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.GreaterThanEq
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.GreaterThanEqD
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.HasChildQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.HasParentQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.IndicesQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.InnerHits
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.LatLon
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.LessThan
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.LessThanD
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.LessThanEq
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.LessThanEqD
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.MatchQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.MatchQueryType
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.MinimumMatchHighLow
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.MoreLikeThisFieldQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.MoreLikeThisQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.MultiMatchQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.MultiMatchQueryType
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.NestedQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.OptimizeBbox
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.PrefixQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.Query
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.QueryStringQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.RangeExecution
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.RangeQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.RangeValue
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.Regexp
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.RegexpFlag
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.RegexpFlags
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.RegexpQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.ScoreType
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.SimpleQueryFlag
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.SimpleQueryStringQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.Term
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.WildcardQuery
- Database.Bloodhound.Internal.Query: instance GHC.Generics.Generic Database.Bloodhound.Internal.Query.ZeroTermsQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.BoolMatch
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.BoolQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.BooleanOperator
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.BoostingQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.CommonMinimumMatch
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.CommonTermsQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.ComponentFunctionScoreFunction
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.DisMaxQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.Distance
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.DistanceRange
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.DistanceType
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.DistanceUnit
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.FieldOrFields
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.Filter
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.FunctionScoreFunctions
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.FunctionScoreQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.Fuzziness
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.FuzzyLikeFieldQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.FuzzyLikeThisQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.FuzzyQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.GeoBoundingBox
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.GeoBoundingBoxConstraint
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.GeoFilterType
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.GeoPoint
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.GreaterThan
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.GreaterThanD
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.GreaterThanEq
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.GreaterThanEqD
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.HasChildQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.HasParentQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.IndicesQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.InnerHits
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.LatLon
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.LessThan
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.LessThanD
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.LessThanEq
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.LessThanEqD
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.MatchQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.MatchQueryType
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.MinimumMatchHighLow
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.MoreLikeThisFieldQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.MoreLikeThisQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.MultiMatchQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.MultiMatchQueryType
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.NestedQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.OptimizeBbox
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.PrefixQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.Query
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.QueryStringQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.RangeExecution
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.RangeQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.RangeValue
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.Regexp
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.RegexpFlag
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.RegexpFlags
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.RegexpQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.ScoreType
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.SimpleQueryFlag
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.SimpleQueryStringQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.TemplateQueryKeyValuePairs
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.Term
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.WildcardQuery
- Database.Bloodhound.Internal.Query: instance GHC.Show.Show Database.Bloodhound.Internal.Query.ZeroTermsQuery
- Database.Bloodhound.Internal.Query: mkBoolQuery :: [Query] -> [Filter] -> [Query] -> [Query] -> BoolQuery
- Database.Bloodhound.Internal.Query: mkMatchQuery :: FieldName -> QueryString -> MatchQuery
- Database.Bloodhound.Internal.Query: mkMultiMatchQuery :: [FieldName] -> QueryString -> MultiMatchQuery
- Database.Bloodhound.Internal.Query: mkQueryStringQuery :: QueryString -> QueryStringQuery
- Database.Bloodhound.Internal.Query: mkRangeQuery :: FieldName -> RangeValue -> RangeQuery
- Database.Bloodhound.Internal.Query: newtype Factor
- Database.Bloodhound.Internal.Query: newtype FactorMissingFieldValue
- Database.Bloodhound.Internal.Query: newtype Filter
- Database.Bloodhound.Internal.Query: newtype GreaterThan
- Database.Bloodhound.Internal.Query: newtype GreaterThanD
- Database.Bloodhound.Internal.Query: newtype GreaterThanEq
- Database.Bloodhound.Internal.Query: newtype GreaterThanEqD
- Database.Bloodhound.Internal.Query: newtype LessThan
- Database.Bloodhound.Internal.Query: newtype LessThanD
- Database.Bloodhound.Internal.Query: newtype LessThanEq
- Database.Bloodhound.Internal.Query: newtype LessThanEqD
- Database.Bloodhound.Internal.Query: newtype Regexp
- Database.Bloodhound.Internal.Query: newtype ScriptFields
- Database.Bloodhound.Internal.Query: newtype ScriptLanguage
- Database.Bloodhound.Internal.Query: newtype ScriptParams
- Database.Bloodhound.Internal.Query: newtype Seed
- Database.Bloodhound.Internal.Query: newtype TemplateQueryKeyValuePairs
- Database.Bloodhound.Internal.Query: newtype Weight
- Database.Bloodhound.Internal.Query: parseFunctionScoreFunction :: Object -> Parser FunctionScoreFunction
- Database.Bloodhound.Internal.Query: parseRangeValue :: (FromJSON t4, FromJSON t3, FromJSON t2, FromJSON t1) => (t3 -> t5) -> (t1 -> t6) -> (t4 -> t7) -> (t2 -> t8) -> (t5 -> t6 -> b) -> (t7 -> t6 -> b) -> (t5 -> t8 -> b) -> (t7 -> t8 -> b) -> (t5 -> b) -> (t6 -> b) -> (t7 -> b) -> (t8 -> b) -> Parser b -> Object -> Parser b
- Database.Bloodhound.Internal.Query: rangeValueToPair :: RangeValue -> [Pair]
- Database.Bloodhound.Internal.Query: type Cache = Bool
- Database.Bloodhound.Internal.Query: type ScriptFieldValue = Value
- Database.Bloodhound.Internal.Query: type ScriptParamValue = Value
- Database.Bloodhound.Internal.Query: type TemplateQueryValue = Text
- Database.Bloodhound.Internal.Sort: Ascending :: SortOrder
- Database.Bloodhound.Internal.Sort: CustomMissing :: Text -> Missing
- Database.Bloodhound.Internal.Sort: DefaultSort :: FieldName -> SortOrder -> Maybe Text -> Maybe SortMode -> Maybe Missing -> Maybe Filter -> DefaultSort
- Database.Bloodhound.Internal.Sort: DefaultSortSpec :: DefaultSort -> SortSpec
- Database.Bloodhound.Internal.Sort: Descending :: SortOrder
- Database.Bloodhound.Internal.Sort: FirstMissing :: Missing
- Database.Bloodhound.Internal.Sort: GeoDistanceSortSpec :: SortOrder -> GeoPoint -> DistanceUnit -> SortSpec
- Database.Bloodhound.Internal.Sort: LastMissing :: Missing
- Database.Bloodhound.Internal.Sort: SortAvg :: SortMode
- Database.Bloodhound.Internal.Sort: SortMax :: SortMode
- Database.Bloodhound.Internal.Sort: SortMin :: SortMode
- Database.Bloodhound.Internal.Sort: SortSum :: SortMode
- Database.Bloodhound.Internal.Sort: [ignoreUnmapped] :: DefaultSort -> Maybe Text
- Database.Bloodhound.Internal.Sort: [missingSort] :: DefaultSort -> Maybe Missing
- Database.Bloodhound.Internal.Sort: [nestedFilter] :: DefaultSort -> Maybe Filter
- Database.Bloodhound.Internal.Sort: [sortFieldName] :: DefaultSort -> FieldName
- Database.Bloodhound.Internal.Sort: [sortMode] :: DefaultSort -> Maybe SortMode
- Database.Bloodhound.Internal.Sort: [sortOrder] :: DefaultSort -> SortOrder
- Database.Bloodhound.Internal.Sort: data DefaultSort
- Database.Bloodhound.Internal.Sort: data Missing
- Database.Bloodhound.Internal.Sort: data SortMode
- Database.Bloodhound.Internal.Sort: data SortOrder
- Database.Bloodhound.Internal.Sort: data SortSpec
- Database.Bloodhound.Internal.Sort: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Sort.Missing
- Database.Bloodhound.Internal.Sort: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Sort.SortMode
- Database.Bloodhound.Internal.Sort: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Sort.SortOrder
- Database.Bloodhound.Internal.Sort: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Sort.SortSpec
- Database.Bloodhound.Internal.Sort: instance GHC.Classes.Eq Database.Bloodhound.Internal.Sort.DefaultSort
- Database.Bloodhound.Internal.Sort: instance GHC.Classes.Eq Database.Bloodhound.Internal.Sort.Missing
- Database.Bloodhound.Internal.Sort: instance GHC.Classes.Eq Database.Bloodhound.Internal.Sort.SortMode
- Database.Bloodhound.Internal.Sort: instance GHC.Classes.Eq Database.Bloodhound.Internal.Sort.SortOrder
- Database.Bloodhound.Internal.Sort: instance GHC.Classes.Eq Database.Bloodhound.Internal.Sort.SortSpec
- Database.Bloodhound.Internal.Sort: instance GHC.Show.Show Database.Bloodhound.Internal.Sort.DefaultSort
- Database.Bloodhound.Internal.Sort: instance GHC.Show.Show Database.Bloodhound.Internal.Sort.Missing
- Database.Bloodhound.Internal.Sort: instance GHC.Show.Show Database.Bloodhound.Internal.Sort.SortMode
- Database.Bloodhound.Internal.Sort: instance GHC.Show.Show Database.Bloodhound.Internal.Sort.SortOrder
- Database.Bloodhound.Internal.Sort: instance GHC.Show.Show Database.Bloodhound.Internal.Sort.SortSpec
- Database.Bloodhound.Internal.Sort: mkSort :: FieldName -> SortOrder -> DefaultSort
- Database.Bloodhound.Internal.Sort: type Sort = [SortSpec]
- Database.Bloodhound.Internal.StringlyTyped: StringlyTypedBool :: Bool -> StringlyTypedBool
- Database.Bloodhound.Internal.StringlyTyped: StringlyTypedDouble :: Double -> StringlyTypedDouble
- Database.Bloodhound.Internal.StringlyTyped: StringlyTypedInt :: Int -> StringlyTypedInt
- Database.Bloodhound.Internal.StringlyTyped: [unStringlyTypedBool] :: StringlyTypedBool -> Bool
- Database.Bloodhound.Internal.StringlyTyped: [unStringlyTypedDouble] :: StringlyTypedDouble -> Double
- Database.Bloodhound.Internal.StringlyTyped: [unStringlyTypedInt] :: StringlyTypedInt -> Int
- Database.Bloodhound.Internal.StringlyTyped: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.StringlyTyped.StringlyTypedBool
- Database.Bloodhound.Internal.StringlyTyped: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.StringlyTyped.StringlyTypedDouble
- Database.Bloodhound.Internal.StringlyTyped: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.StringlyTyped.StringlyTypedInt
- Database.Bloodhound.Internal.StringlyTyped: newtype StringlyTypedBool
- Database.Bloodhound.Internal.StringlyTyped: newtype StringlyTypedDouble
- Database.Bloodhound.Internal.StringlyTyped: newtype StringlyTypedInt
- Database.Bloodhound.Internal.StringlyTyped: unStringlyTypeJSON :: Value -> Value
- Database.Bloodhound.Internal.Suggest: DirectGeneratorSuggestModeAlways :: DirectGeneratorSuggestModeTypes
- Database.Bloodhound.Internal.Suggest: DirectGeneratorSuggestModeMissing :: DirectGeneratorSuggestModeTypes
- Database.Bloodhound.Internal.Suggest: DirectGeneratorSuggestModePopular :: DirectGeneratorSuggestModeTypes
- Database.Bloodhound.Internal.Suggest: DirectGenerators :: FieldName -> Maybe Int -> DirectGeneratorSuggestModeTypes -> Maybe Double -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Double -> Maybe Double -> Maybe Text -> Maybe Text -> DirectGenerators
- Database.Bloodhound.Internal.Suggest: NamedSuggestionResponse :: Text -> [SuggestResponse] -> NamedSuggestionResponse
- Database.Bloodhound.Internal.Suggest: PhraseSuggester :: FieldName -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Size -> Maybe Analyzer -> Maybe Int -> Maybe PhraseSuggesterHighlighter -> Maybe PhraseSuggesterCollate -> [DirectGenerators] -> PhraseSuggester
- Database.Bloodhound.Internal.Suggest: PhraseSuggesterCollate :: Query -> TemplateQueryKeyValuePairs -> Bool -> PhraseSuggesterCollate
- Database.Bloodhound.Internal.Suggest: PhraseSuggesterHighlighter :: Text -> Text -> PhraseSuggesterHighlighter
- Database.Bloodhound.Internal.Suggest: Suggest :: Text -> Text -> SuggestType -> Suggest
- Database.Bloodhound.Internal.Suggest: SuggestOptions :: Text -> Double -> Maybe Int -> Maybe Text -> SuggestOptions
- Database.Bloodhound.Internal.Suggest: SuggestResponse :: Text -> Int -> Int -> [SuggestOptions] -> SuggestResponse
- Database.Bloodhound.Internal.Suggest: SuggestTypePhraseSuggester :: PhraseSuggester -> SuggestType
- Database.Bloodhound.Internal.Suggest: [directGeneratorMaxEdits] :: DirectGenerators -> Maybe Double
- Database.Bloodhound.Internal.Suggest: [directGeneratorMaxInspections] :: DirectGenerators -> Maybe Int
- Database.Bloodhound.Internal.Suggest: [directGeneratorMaxTermFreq] :: DirectGenerators -> Maybe Double
- Database.Bloodhound.Internal.Suggest: [directGeneratorMinDocFreq] :: DirectGenerators -> Maybe Double
- Database.Bloodhound.Internal.Suggest: [directGeneratorMinWordLength] :: DirectGenerators -> Maybe Int
- Database.Bloodhound.Internal.Suggest: [directGeneratorPostFilter] :: DirectGenerators -> Maybe Text
- Database.Bloodhound.Internal.Suggest: [directGeneratorPreFilter] :: DirectGenerators -> Maybe Text
- Database.Bloodhound.Internal.Suggest: [directGeneratorPrefixLength] :: DirectGenerators -> Maybe Int
- Database.Bloodhound.Internal.Suggest: [directGeneratorSuggestMode] :: DirectGenerators -> DirectGeneratorSuggestModeTypes
- Database.Bloodhound.Internal.Suggest: [directGeneratorsField] :: DirectGenerators -> FieldName
- Database.Bloodhound.Internal.Suggest: [directGeneratorsSize] :: DirectGenerators -> Maybe Int
- Database.Bloodhound.Internal.Suggest: [nsrName] :: NamedSuggestionResponse -> Text
- Database.Bloodhound.Internal.Suggest: [nsrResponses] :: NamedSuggestionResponse -> [SuggestResponse]
- Database.Bloodhound.Internal.Suggest: [phraseSuggesterAnalyzer] :: PhraseSuggester -> Maybe Analyzer
- Database.Bloodhound.Internal.Suggest: [phraseSuggesterCandidateGenerators] :: PhraseSuggester -> [DirectGenerators]
- Database.Bloodhound.Internal.Suggest: [phraseSuggesterCollateParams] :: PhraseSuggesterCollate -> TemplateQueryKeyValuePairs
- Database.Bloodhound.Internal.Suggest: [phraseSuggesterCollatePrune] :: PhraseSuggesterCollate -> Bool
- Database.Bloodhound.Internal.Suggest: [phraseSuggesterCollateTemplateQuery] :: PhraseSuggesterCollate -> Query
- Database.Bloodhound.Internal.Suggest: [phraseSuggesterCollate] :: PhraseSuggester -> Maybe PhraseSuggesterCollate
- Database.Bloodhound.Internal.Suggest: [phraseSuggesterConfidence] :: PhraseSuggester -> Maybe Int
- Database.Bloodhound.Internal.Suggest: [phraseSuggesterField] :: PhraseSuggester -> FieldName
- Database.Bloodhound.Internal.Suggest: [phraseSuggesterGramSize] :: PhraseSuggester -> Maybe Int
- Database.Bloodhound.Internal.Suggest: [phraseSuggesterHighlight] :: PhraseSuggester -> Maybe PhraseSuggesterHighlighter
- Database.Bloodhound.Internal.Suggest: [phraseSuggesterHighlighterPostTag] :: PhraseSuggesterHighlighter -> Text
- Database.Bloodhound.Internal.Suggest: [phraseSuggesterHighlighterPreTag] :: PhraseSuggesterHighlighter -> Text
- Database.Bloodhound.Internal.Suggest: [phraseSuggesterMaxErrors] :: PhraseSuggester -> Maybe Int
- Database.Bloodhound.Internal.Suggest: [phraseSuggesterRealWordErrorLikelihood] :: PhraseSuggester -> Maybe Int
- Database.Bloodhound.Internal.Suggest: [phraseSuggesterSeparator] :: PhraseSuggester -> Maybe Text
- Database.Bloodhound.Internal.Suggest: [phraseSuggesterShardSize] :: PhraseSuggester -> Maybe Int
- Database.Bloodhound.Internal.Suggest: [phraseSuggesterSize] :: PhraseSuggester -> Maybe Size
- Database.Bloodhound.Internal.Suggest: [suggestName] :: Suggest -> Text
- Database.Bloodhound.Internal.Suggest: [suggestOptionsFreq] :: SuggestOptions -> Maybe Int
- Database.Bloodhound.Internal.Suggest: [suggestOptionsHighlighted] :: SuggestOptions -> Maybe Text
- Database.Bloodhound.Internal.Suggest: [suggestOptionsScore] :: SuggestOptions -> Double
- Database.Bloodhound.Internal.Suggest: [suggestOptionsText] :: SuggestOptions -> Text
- Database.Bloodhound.Internal.Suggest: [suggestResponseLength] :: SuggestResponse -> Int
- Database.Bloodhound.Internal.Suggest: [suggestResponseOffset] :: SuggestResponse -> Int
- Database.Bloodhound.Internal.Suggest: [suggestResponseOptions] :: SuggestResponse -> [SuggestOptions]
- Database.Bloodhound.Internal.Suggest: [suggestResponseText] :: SuggestResponse -> Text
- Database.Bloodhound.Internal.Suggest: [suggestText] :: Suggest -> Text
- Database.Bloodhound.Internal.Suggest: [suggestType] :: Suggest -> SuggestType
- Database.Bloodhound.Internal.Suggest: data DirectGeneratorSuggestModeTypes
- Database.Bloodhound.Internal.Suggest: data DirectGenerators
- Database.Bloodhound.Internal.Suggest: data NamedSuggestionResponse
- Database.Bloodhound.Internal.Suggest: data PhraseSuggester
- Database.Bloodhound.Internal.Suggest: data PhraseSuggesterCollate
- Database.Bloodhound.Internal.Suggest: data PhraseSuggesterHighlighter
- Database.Bloodhound.Internal.Suggest: data Suggest
- Database.Bloodhound.Internal.Suggest: data SuggestOptions
- Database.Bloodhound.Internal.Suggest: data SuggestResponse
- Database.Bloodhound.Internal.Suggest: data SuggestType
- Database.Bloodhound.Internal.Suggest: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Suggest.DirectGeneratorSuggestModeTypes
- Database.Bloodhound.Internal.Suggest: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Suggest.DirectGenerators
- Database.Bloodhound.Internal.Suggest: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Suggest.NamedSuggestionResponse
- Database.Bloodhound.Internal.Suggest: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Suggest.PhraseSuggester
- Database.Bloodhound.Internal.Suggest: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Suggest.PhraseSuggesterCollate
- Database.Bloodhound.Internal.Suggest: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Suggest.PhraseSuggesterHighlighter
- Database.Bloodhound.Internal.Suggest: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Suggest.Suggest
- Database.Bloodhound.Internal.Suggest: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Suggest.SuggestOptions
- Database.Bloodhound.Internal.Suggest: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Suggest.SuggestResponse
- Database.Bloodhound.Internal.Suggest: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Internal.Suggest.SuggestType
- Database.Bloodhound.Internal.Suggest: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Suggest.DirectGeneratorSuggestModeTypes
- Database.Bloodhound.Internal.Suggest: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Suggest.DirectGenerators
- Database.Bloodhound.Internal.Suggest: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Suggest.PhraseSuggester
- Database.Bloodhound.Internal.Suggest: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Suggest.PhraseSuggesterCollate
- Database.Bloodhound.Internal.Suggest: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Suggest.PhraseSuggesterHighlighter
- Database.Bloodhound.Internal.Suggest: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Suggest.Suggest
- Database.Bloodhound.Internal.Suggest: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Internal.Suggest.SuggestType
- Database.Bloodhound.Internal.Suggest: instance GHC.Classes.Eq Database.Bloodhound.Internal.Suggest.DirectGeneratorSuggestModeTypes
- Database.Bloodhound.Internal.Suggest: instance GHC.Classes.Eq Database.Bloodhound.Internal.Suggest.DirectGenerators
- Database.Bloodhound.Internal.Suggest: instance GHC.Classes.Eq Database.Bloodhound.Internal.Suggest.NamedSuggestionResponse
- Database.Bloodhound.Internal.Suggest: instance GHC.Classes.Eq Database.Bloodhound.Internal.Suggest.PhraseSuggester
- Database.Bloodhound.Internal.Suggest: instance GHC.Classes.Eq Database.Bloodhound.Internal.Suggest.PhraseSuggesterCollate
- Database.Bloodhound.Internal.Suggest: instance GHC.Classes.Eq Database.Bloodhound.Internal.Suggest.PhraseSuggesterHighlighter
- Database.Bloodhound.Internal.Suggest: instance GHC.Classes.Eq Database.Bloodhound.Internal.Suggest.Suggest
- Database.Bloodhound.Internal.Suggest: instance GHC.Classes.Eq Database.Bloodhound.Internal.Suggest.SuggestOptions
- Database.Bloodhound.Internal.Suggest: instance GHC.Classes.Eq Database.Bloodhound.Internal.Suggest.SuggestResponse
- Database.Bloodhound.Internal.Suggest: instance GHC.Classes.Eq Database.Bloodhound.Internal.Suggest.SuggestType
- Database.Bloodhound.Internal.Suggest: instance GHC.Generics.Generic Database.Bloodhound.Internal.Suggest.DirectGeneratorSuggestModeTypes
- Database.Bloodhound.Internal.Suggest: instance GHC.Generics.Generic Database.Bloodhound.Internal.Suggest.DirectGenerators
- Database.Bloodhound.Internal.Suggest: instance GHC.Generics.Generic Database.Bloodhound.Internal.Suggest.PhraseSuggester
- Database.Bloodhound.Internal.Suggest: instance GHC.Generics.Generic Database.Bloodhound.Internal.Suggest.PhraseSuggesterCollate
- Database.Bloodhound.Internal.Suggest: instance GHC.Generics.Generic Database.Bloodhound.Internal.Suggest.PhraseSuggesterHighlighter
- Database.Bloodhound.Internal.Suggest: instance GHC.Generics.Generic Database.Bloodhound.Internal.Suggest.Suggest
- Database.Bloodhound.Internal.Suggest: instance GHC.Generics.Generic Database.Bloodhound.Internal.Suggest.SuggestType
- Database.Bloodhound.Internal.Suggest: instance GHC.Read.Read Database.Bloodhound.Internal.Suggest.NamedSuggestionResponse
- Database.Bloodhound.Internal.Suggest: instance GHC.Read.Read Database.Bloodhound.Internal.Suggest.SuggestOptions
- Database.Bloodhound.Internal.Suggest: instance GHC.Read.Read Database.Bloodhound.Internal.Suggest.SuggestResponse
- Database.Bloodhound.Internal.Suggest: instance GHC.Show.Show Database.Bloodhound.Internal.Suggest.DirectGeneratorSuggestModeTypes
- Database.Bloodhound.Internal.Suggest: instance GHC.Show.Show Database.Bloodhound.Internal.Suggest.DirectGenerators
- Database.Bloodhound.Internal.Suggest: instance GHC.Show.Show Database.Bloodhound.Internal.Suggest.NamedSuggestionResponse
- Database.Bloodhound.Internal.Suggest: instance GHC.Show.Show Database.Bloodhound.Internal.Suggest.PhraseSuggester
- Database.Bloodhound.Internal.Suggest: instance GHC.Show.Show Database.Bloodhound.Internal.Suggest.PhraseSuggesterCollate
- Database.Bloodhound.Internal.Suggest: instance GHC.Show.Show Database.Bloodhound.Internal.Suggest.PhraseSuggesterHighlighter
- Database.Bloodhound.Internal.Suggest: instance GHC.Show.Show Database.Bloodhound.Internal.Suggest.Suggest
- Database.Bloodhound.Internal.Suggest: instance GHC.Show.Show Database.Bloodhound.Internal.Suggest.SuggestOptions
- Database.Bloodhound.Internal.Suggest: instance GHC.Show.Show Database.Bloodhound.Internal.Suggest.SuggestResponse
- Database.Bloodhound.Internal.Suggest: instance GHC.Show.Show Database.Bloodhound.Internal.Suggest.SuggestType
- Database.Bloodhound.Internal.Suggest: mkDirectGenerators :: FieldName -> DirectGenerators
- Database.Bloodhound.Internal.Suggest: mkPhraseSuggester :: FieldName -> PhraseSuggester
- Database.Bloodhound.Types: AddAlias :: IndexAlias -> IndexAliasCreate -> IndexAliasAction
- Database.Bloodhound.Types: AddTime :: Int -> DateMathUnit -> DateMathModifier
- Database.Bloodhound.Types: AggregateParentScore :: Bool -> AggregateParentScore
- Database.Bloodhound.Types: AllAliasRouting :: RoutingValue -> AliasRouting
- Database.Bloodhound.Types: AllIndexes :: IndexSelection
- Database.Bloodhound.Types: AllNodes :: NodeSelection
- Database.Bloodhound.Types: AllRegexpFlags :: RegexpFlags
- Database.Bloodhound.Types: AllSnapshotRepos :: SnapshotRepoSelection
- Database.Bloodhound.Types: AllSnapshots :: SnapshotSelection
- Database.Bloodhound.Types: AllocAll :: AllocationPolicy
- Database.Bloodhound.Types: AllocNewPrimaries :: AllocationPolicy
- Database.Bloodhound.Types: AllocNone :: AllocationPolicy
- Database.Bloodhound.Types: AllocPrimaries :: AllocationPolicy
- Database.Bloodhound.Types: AllowLeadingWildcard :: Bool -> AllowLeadingWildcard
- Database.Bloodhound.Types: Analysis :: Map Text AnalyzerDefinition -> Map Text TokenizerDefinition -> Map Text TokenFilterDefinition -> Map Text CharFilterDefinition -> Analysis
- Database.Bloodhound.Types: AnalysisSetting :: Analysis -> UpdatableIndexSetting
- Database.Bloodhound.Types: AnalyzeWildcard :: Bool -> AnalyzeWildcard
- Database.Bloodhound.Types: Analyzer :: Text -> Analyzer
- Database.Bloodhound.Types: AnalyzerDefinition :: Maybe Tokenizer -> [TokenFilter] -> [CharFilter] -> AnalyzerDefinition
- Database.Bloodhound.Types: And :: BooleanOperator
- Database.Bloodhound.Types: AnyString :: RegexpFlag
- Database.Bloodhound.Types: Arabic :: Language
- Database.Bloodhound.Types: Arc :: DistanceType
- Database.Bloodhound.Types: Armenian :: Language
- Database.Bloodhound.Types: Ascending :: SortOrder
- Database.Bloodhound.Types: AutoExpandReplicas :: ReplicaBounds -> UpdatableIndexSetting
- Database.Bloodhound.Types: Automaton :: RegexpFlag
- Database.Bloodhound.Types: BH :: ReaderT BHEnv m a -> BH m a
- Database.Bloodhound.Types: BHRequest :: Method -> Endpoint -> Maybe ByteString -> BHRequest responseBody
- Database.Bloodhound.Types: BHResponse :: Response ByteString -> BHResponse body
- Database.Bloodhound.Types: Basque :: Language
- Database.Bloodhound.Types: Bengali :: Language
- Database.Bloodhound.Types: BlocksMetaData :: Bool -> UpdatableIndexSetting
- Database.Bloodhound.Types: BlocksRead :: Bool -> UpdatableIndexSetting
- Database.Bloodhound.Types: BlocksReadOnly :: Bool -> UpdatableIndexSetting
- Database.Bloodhound.Types: BlocksWrite :: Bool -> UpdatableIndexSetting
- Database.Bloodhound.Types: BoolQuery :: [Query] -> [Filter] -> [Query] -> [Query] -> Maybe MinimumMatch -> Maybe Boost -> Maybe DisableCoord -> BoolQuery
- Database.Bloodhound.Types: BoolValue :: Bool -> BucketValue
- Database.Bloodhound.Types: Boost :: Double -> Boost
- Database.Bloodhound.Types: BoostModeAvg :: BoostMode
- Database.Bloodhound.Types: BoostModeMax :: BoostMode
- Database.Bloodhound.Types: BoostModeMin :: BoostMode
- Database.Bloodhound.Types: BoostModeMultiply :: BoostMode
- Database.Bloodhound.Types: BoostModeReplace :: BoostMode
- Database.Bloodhound.Types: BoostModeSum :: BoostMode
- Database.Bloodhound.Types: BoostTerms :: Double -> BoostTerms
- Database.Bloodhound.Types: BoostingQuery :: Query -> Query -> Boost -> BoostingQuery
- Database.Bloodhound.Types: BoundTransportAddress :: EsAddress -> [EsAddress] -> BoundTransportAddress
- Database.Bloodhound.Types: Brazilian :: Language
- Database.Bloodhound.Types: BreadthFirst :: CollectionMode
- Database.Bloodhound.Types: Bucket :: [a] -> Bucket a
- Database.Bloodhound.Types: BuildHash :: Text -> BuildHash
- Database.Bloodhound.Types: Bulgarian :: Language
- Database.Bloodhound.Types: BulkCreate :: IndexName -> DocId -> Value -> BulkOperation
- Database.Bloodhound.Types: BulkCreateEncoding :: IndexName -> DocId -> Encoding -> BulkOperation
- Database.Bloodhound.Types: BulkDelete :: IndexName -> DocId -> BulkOperation
- Database.Bloodhound.Types: BulkIndex :: IndexName -> DocId -> Value -> BulkOperation
- Database.Bloodhound.Types: BulkIndexAuto :: IndexName -> Value -> BulkOperation
- Database.Bloodhound.Types: BulkIndexEncodingAuto :: IndexName -> Encoding -> BulkOperation
- Database.Bloodhound.Types: BulkUpdate :: IndexName -> DocId -> Value -> BulkOperation
- Database.Bloodhound.Types: BulkUpsert :: IndexName -> DocId -> UpsertPayload -> [UpsertActionMetadata] -> BulkOperation
- Database.Bloodhound.Types: Bytes :: Int -> Bytes
- Database.Bloodhound.Types: CPUInfo :: Bytes -> Int -> Int -> Int -> Int -> Text -> Text -> CPUInfo
- Database.Bloodhound.Types: CacheFilterExpire :: Maybe NominalDiffTime -> UpdatableIndexSetting
- Database.Bloodhound.Types: CacheFilterMaxSize :: Maybe Bytes -> UpdatableIndexSetting
- Database.Bloodhound.Types: CacheKey :: Text -> CacheKey
- Database.Bloodhound.Types: CacheName :: Text -> CacheName
- Database.Bloodhound.Types: CardinalityAgg :: CardinalityAggregation -> Aggregation
- Database.Bloodhound.Types: CardinalityAggregation :: FieldName -> Maybe Int -> CardinalityAggregation
- Database.Bloodhound.Types: Catalan :: Language
- Database.Bloodhound.Types: Centimeters :: DistanceUnit
- Database.Bloodhound.Types: CharFilter :: Text -> CharFilter
- Database.Bloodhound.Types: CharFilterDefinitionMapping :: Map Text Text -> CharFilterDefinition
- Database.Bloodhound.Types: CharFilterDefinitionPatternReplace :: Text -> Text -> Maybe Text -> CharFilterDefinition
- Database.Bloodhound.Types: ChildDocument :: FieldName -> RelationName -> DocId -> JoinRelation
- Database.Bloodhound.Types: Cjk :: Language
- Database.Bloodhound.Types: CloseIndex :: OpenCloseIndex
- Database.Bloodhound.Types: ClosePointInTime :: Text -> ClosePointInTime
- Database.Bloodhound.Types: ClosePointInTimeResponse :: Bool -> Int -> ClosePointInTimeResponse
- Database.Bloodhound.Types: ClusterName :: Text -> ClusterName
- Database.Bloodhound.Types: CommonHighlight :: Maybe Text -> Maybe Bool -> Maybe HighlightTag -> Maybe HighlightEncoder -> Maybe Int -> Maybe Query -> Maybe Bool -> CommonHighlight
- Database.Bloodhound.Types: CommonMinimumMatch :: MinimumMatch -> CommonMinimumMatch
- Database.Bloodhound.Types: CommonMinimumMatchHighLow :: MinimumMatchHighLow -> CommonMinimumMatch
- Database.Bloodhound.Types: CommonTermsQuery :: FieldName -> QueryString -> CutoffFrequency -> BooleanOperator -> BooleanOperator -> Maybe CommonMinimumMatch -> Maybe Boost -> Maybe Analyzer -> Maybe DisableCoord -> CommonTermsQuery
- Database.Bloodhound.Types: Complement :: RegexpFlag
- Database.Bloodhound.Types: ComponentFunctionScoreFunction :: Maybe Filter -> FunctionScoreFunction -> Maybe Weight -> ComponentFunctionScoreFunction
- Database.Bloodhound.Types: CompoundFileFormat :: Bool -> CompoundFormat
- Database.Bloodhound.Types: CompressionBest :: Compression
- Database.Bloodhound.Types: CompressionDefault :: Compression
- Database.Bloodhound.Types: CompressionSetting :: Compression -> UpdatableIndexSetting
- Database.Bloodhound.Types: ConstantScoreQuery :: Query -> Boost -> Query
- Database.Bloodhound.Types: CountQuery :: Query -> CountQuery
- Database.Bloodhound.Types: CountResponse :: Natural -> CountShards -> CountResponse
- Database.Bloodhound.Types: CountShards :: Int -> Int -> Int -> Int -> CountShards
- Database.Bloodhound.Types: CustomMissing :: Text -> Missing
- Database.Bloodhound.Types: CustomTags :: ([Text], [Text]) -> HighlightTag
- Database.Bloodhound.Types: CutoffFrequency :: Double -> CutoffFrequency
- Database.Bloodhound.Types: Czech :: Language
- Database.Bloodhound.Types: DMDate :: Day -> DateMathAnchor
- Database.Bloodhound.Types: DMDay :: DateMathUnit
- Database.Bloodhound.Types: DMHour :: DateMathUnit
- Database.Bloodhound.Types: DMMinute :: DateMathUnit
- Database.Bloodhound.Types: DMMonth :: DateMathUnit
- Database.Bloodhound.Types: DMNow :: DateMathAnchor
- Database.Bloodhound.Types: DMSecond :: DateMathUnit
- Database.Bloodhound.Types: DMWeek :: DateMathUnit
- Database.Bloodhound.Types: DMYear :: DateMathUnit
- Database.Bloodhound.Types: Danish :: Language
- Database.Bloodhound.Types: DateHistogramAgg :: DateHistogramAggregation -> Aggregation
- Database.Bloodhound.Types: DateHistogramAggregation :: FieldName -> Interval -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Aggregations -> DateHistogramAggregation
- Database.Bloodhound.Types: DateHistogramResult :: Int -> Maybe Text -> Int -> Maybe AggregationResults -> DateHistogramResult
- Database.Bloodhound.Types: DateMathExpr :: DateMathAnchor -> [DateMathModifier] -> DateMathExpr
- Database.Bloodhound.Types: DateRangeAgg :: DateRangeAggregation -> Aggregation
- Database.Bloodhound.Types: DateRangeAggregation :: FieldName -> Maybe Text -> NonEmpty DateRangeAggRange -> DateRangeAggregation
- Database.Bloodhound.Types: DateRangeFrom :: DateMathExpr -> DateRangeAggRange
- Database.Bloodhound.Types: DateRangeFromAndTo :: DateMathExpr -> DateMathExpr -> DateRangeAggRange
- Database.Bloodhound.Types: DateRangeResult :: Text -> Maybe UTCTime -> Maybe Text -> Maybe UTCTime -> Maybe Text -> Int -> Maybe AggregationResults -> DateRangeResult
- Database.Bloodhound.Types: DateRangeTo :: DateMathExpr -> DateRangeAggRange
- Database.Bloodhound.Types: Day :: Interval
- Database.Bloodhound.Types: Days :: TimeInterval
- Database.Bloodhound.Types: DefaultEncoder :: HighlightEncoder
- Database.Bloodhound.Types: DefaultSort :: FieldName -> SortOrder -> Maybe Text -> Maybe SortMode -> Maybe Missing -> Maybe Filter -> DefaultSort
- Database.Bloodhound.Types: DefaultSortSpec :: DefaultSort -> SortSpec
- Database.Bloodhound.Types: DepthFirst :: CollectionMode
- Database.Bloodhound.Types: Descending :: SortOrder
- Database.Bloodhound.Types: DirectGeneratorSuggestModeAlways :: DirectGeneratorSuggestModeTypes
- Database.Bloodhound.Types: DirectGeneratorSuggestModeMissing :: DirectGeneratorSuggestModeTypes
- Database.Bloodhound.Types: DirectGeneratorSuggestModePopular :: DirectGeneratorSuggestModeTypes
- Database.Bloodhound.Types: DirectGenerators :: FieldName -> Maybe Int -> DirectGeneratorSuggestModeTypes -> Maybe Double -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Double -> Maybe Double -> Maybe Text -> Maybe Text -> DirectGenerators
- Database.Bloodhound.Types: DisMaxQuery :: [Query] -> Tiebreaker -> Maybe Boost -> DisMaxQuery
- Database.Bloodhound.Types: DisableCoord :: Bool -> DisableCoord
- Database.Bloodhound.Types: Distance :: Double -> DistanceUnit -> Distance
- Database.Bloodhound.Types: DistanceRange :: Distance -> Distance -> DistanceRange
- Database.Bloodhound.Types: DocId :: Text -> DocId
- Database.Bloodhound.Types: Dutch :: Language
- Database.Bloodhound.Types: EdgeNgramFilterSideBack :: EdgeNgramFilterSide
- Database.Bloodhound.Types: EdgeNgramFilterSideFront :: EdgeNgramFilterSide
- Database.Bloodhound.Types: Empty :: RegexpFlag
- Database.Bloodhound.Types: EnablePositionIncrements :: Bool -> EnablePositionIncrements
- Database.Bloodhound.Types: Endpoint :: [Text] -> [(Text, Maybe Text)] -> Endpoint
- Database.Bloodhound.Types: English :: Language
- Database.Bloodhound.Types: EsAddress :: Text -> EsAddress
- Database.Bloodhound.Types: EsError :: Maybe Int -> Text -> EsError
- Database.Bloodhound.Types: EsPassword :: Text -> EsPassword
- Database.Bloodhound.Types: EsProtocolException :: !Text -> !ByteString -> EsProtocolException
- Database.Bloodhound.Types: EsResult :: Text -> Text -> Text -> Maybe (EsResultFound a) -> EsResult a
- Database.Bloodhound.Types: EsResultFound :: DocVersion -> a -> EsResultFound a
- Database.Bloodhound.Types: EsUsername :: Text -> EsUsername
- Database.Bloodhound.Types: ExactRepo :: SnapshotRepoName -> SnapshotRepoPattern
- Database.Bloodhound.Types: ExactSnap :: SnapshotName -> SnapshotPattern
- Database.Bloodhound.Types: Exclude :: [Pattern] -> Exclude
- Database.Bloodhound.Types: Existence :: Bool -> Existence
- Database.Bloodhound.Types: ExplicitShards :: Int -> InitialShardCount
- Database.Bloodhound.Types: ExternalDocVersion :: DocVersion -> ExternalDocVersion
- Database.Bloodhound.Types: ExternalGT :: ExternalDocVersion -> VersionControl
- Database.Bloodhound.Types: ExternalGTE :: ExternalDocVersion -> VersionControl
- Database.Bloodhound.Types: FSBuffered :: FSType
- Database.Bloodhound.Types: FSSimple :: FSType
- Database.Bloodhound.Types: Factor :: Float -> Factor
- Database.Bloodhound.Types: FactorMissingFieldValue :: Float -> FactorMissingFieldValue
- Database.Bloodhound.Types: FactorModifierLn :: FactorModifier
- Database.Bloodhound.Types: FactorModifierLn1p :: FactorModifier
- Database.Bloodhound.Types: FactorModifierLn2p :: FactorModifier
- Database.Bloodhound.Types: FactorModifierLog :: FactorModifier
- Database.Bloodhound.Types: FactorModifierLog1p :: FactorModifier
- Database.Bloodhound.Types: FactorModifierLog2p :: FactorModifier
- Database.Bloodhound.Types: FactorModifierNone :: FactorModifier
- Database.Bloodhound.Types: FactorModifierReciprocal :: FactorModifier
- Database.Bloodhound.Types: FactorModifierSqrt :: FactorModifier
- Database.Bloodhound.Types: FactorModifierSquare :: FactorModifier
- Database.Bloodhound.Types: FailOnMergeFailure :: Bool -> UpdatableIndexSetting
- Database.Bloodhound.Types: FastVector :: FastVectorHighlight -> HighlightSettings
- Database.Bloodhound.Types: FastVectorHighlight :: Maybe CommonHighlight -> Maybe NonPostings -> Maybe Text -> Maybe Int -> Maybe Int -> [Text] -> Maybe Int -> FastVectorHighlight
- Database.Bloodhound.Types: Feet :: DistanceUnit
- Database.Bloodhound.Types: FieldDefinition :: FieldType -> FieldDefinition
- Database.Bloodhound.Types: FieldHighlight :: FieldName -> Maybe HighlightSettings -> FieldHighlight
- Database.Bloodhound.Types: FieldName :: Text -> FieldName
- Database.Bloodhound.Types: FieldValueCount :: FieldName -> ValueCountAggregation
- Database.Bloodhound.Types: FieldValueFactor :: FieldName -> Maybe Factor -> Maybe FactorModifier -> Maybe FactorMissingFieldValue -> FieldValueFactor
- Database.Bloodhound.Types: Filter :: Query -> Filter
- Database.Bloodhound.Types: FilterAgg :: FilterAggregation -> Aggregation
- Database.Bloodhound.Types: FilterAggregation :: Filter -> Maybe Aggregations -> FilterAggregation
- Database.Bloodhound.Types: Finnish :: Language
- Database.Bloodhound.Types: FirstMissing :: Missing
- Database.Bloodhound.Types: FofField :: FieldName -> FieldOrFields
- Database.Bloodhound.Types: FofFields :: NonEmpty FieldName -> FieldOrFields
- Database.Bloodhound.Types: ForceMergeIndexSettings :: Maybe Int -> Bool -> Bool -> ForceMergeIndexSettings
- Database.Bloodhound.Types: ForceVersion :: ExternalDocVersion -> VersionControl
- Database.Bloodhound.Types: French :: Language
- Database.Bloodhound.Types: From :: Int -> From
- Database.Bloodhound.Types: FsSnapshotRepo :: SnapshotRepoName -> FilePath -> Bool -> Maybe Bytes -> Maybe Bytes -> Maybe Bytes -> FsSnapshotRepo
- Database.Bloodhound.Types: FullMinus1Shards :: InitialShardCount
- Database.Bloodhound.Types: FullNodeId :: Text -> FullNodeId
- Database.Bloodhound.Types: FullShards :: InitialShardCount
- Database.Bloodhound.Types: FunctionScoreFunctionFieldValueFactor :: FieldValueFactor -> FunctionScoreFunction
- Database.Bloodhound.Types: FunctionScoreFunctionRandom :: Seed -> FunctionScoreFunction
- Database.Bloodhound.Types: FunctionScoreFunctionScript :: Script -> FunctionScoreFunction
- Database.Bloodhound.Types: FunctionScoreMultiple :: NonEmpty ComponentFunctionScoreFunction -> FunctionScoreFunctions
- Database.Bloodhound.Types: FunctionScoreQuery :: Maybe Query -> Maybe Boost -> FunctionScoreFunctions -> Maybe Boost -> Maybe BoostMode -> Score -> Maybe ScoreMode -> FunctionScoreQuery
- Database.Bloodhound.Types: FunctionScoreSingle :: FunctionScoreFunction -> FunctionScoreFunctions
- Database.Bloodhound.Types: Fuzziness :: Double -> Fuzziness
- Database.Bloodhound.Types: FuzzinessAuto :: Fuzziness
- Database.Bloodhound.Types: FuzzyLikeFieldQuery :: FieldName -> Text -> MaxQueryTerms -> IgnoreTermFrequency -> Fuzziness -> PrefixLength -> Boost -> Maybe Analyzer -> FuzzyLikeFieldQuery
- Database.Bloodhound.Types: FuzzyLikeThisQuery :: [FieldName] -> Text -> MaxQueryTerms -> IgnoreTermFrequency -> Fuzziness -> PrefixLength -> Boost -> Maybe Analyzer -> FuzzyLikeThisQuery
- Database.Bloodhound.Types: FuzzyQuery :: FieldName -> Text -> PrefixLength -> MaxExpansions -> Fuzziness -> Maybe Boost -> FuzzyQuery
- Database.Bloodhound.Types: GCDeletes :: NominalDiffTime -> UpdatableIndexSetting
- Database.Bloodhound.Types: Galician :: Language
- Database.Bloodhound.Types: GatewaySnapshotInterval :: NominalDiffTime -> UpdatableIndexSetting
- Database.Bloodhound.Types: GeneratePhraseQueries :: Bool -> GeneratePhraseQueries
- Database.Bloodhound.Types: GenericSnapshotRepo :: SnapshotRepoName -> SnapshotRepoType -> GenericSnapshotRepoSettings -> GenericSnapshotRepo
- Database.Bloodhound.Types: GenericSnapshotRepoSettings :: Object -> GenericSnapshotRepoSettings
- Database.Bloodhound.Types: GeoBoundingBox :: LatLon -> LatLon -> GeoBoundingBox
- Database.Bloodhound.Types: GeoBoundingBoxConstraint :: FieldName -> GeoBoundingBox -> Cache -> GeoFilterType -> GeoBoundingBoxConstraint
- Database.Bloodhound.Types: GeoDistanceSortSpec :: SortOrder -> GeoPoint -> DistanceUnit -> SortSpec
- Database.Bloodhound.Types: GeoFilterIndexed :: GeoFilterType
- Database.Bloodhound.Types: GeoFilterMemory :: GeoFilterType
- Database.Bloodhound.Types: GeoPoint :: FieldName -> LatLon -> GeoPoint
- Database.Bloodhound.Types: German :: Language
- Database.Bloodhound.Types: German2 :: Language
- Database.Bloodhound.Types: GetTemplateScript :: Maybe Text -> Maybe SearchTemplateSource -> Maybe (HashMap Text Text) -> Text -> Bool -> GetTemplateScript
- Database.Bloodhound.Types: GlobalOrdinals :: ExecutionHint
- Database.Bloodhound.Types: GranularAliasRouting :: Maybe SearchAliasRouting -> Maybe IndexAliasRouting -> AliasRouting
- Database.Bloodhound.Types: GreaterThan :: Double -> GreaterThan
- Database.Bloodhound.Types: GreaterThanD :: UTCTime -> GreaterThanD
- Database.Bloodhound.Types: GreaterThanEq :: Double -> GreaterThanEq
- Database.Bloodhound.Types: GreaterThanEqD :: UTCTime -> GreaterThanEqD
- Database.Bloodhound.Types: Greek :: Language
- Database.Bloodhound.Types: HTMLEncoder :: HighlightEncoder
- Database.Bloodhound.Types: HTR_EQ :: HitsTotalRelation
- Database.Bloodhound.Types: HTR_GTE :: HitsTotalRelation
- Database.Bloodhound.Types: HasChildQuery :: RelationName -> Query -> Maybe ScoreType -> Maybe IgnoreUnmapped -> Maybe MinChildren -> Maybe MaxChildren -> HasChildQuery
- Database.Bloodhound.Types: HasParentQuery :: RelationName -> Query -> Maybe AggregateParentScore -> Maybe IgnoreUnmapped -> HasParentQuery
- Database.Bloodhound.Types: Highlights :: Maybe HighlightSettings -> [FieldHighlight] -> Highlights
- Database.Bloodhound.Types: Hindi :: Language
- Database.Bloodhound.Types: Hit :: IndexName -> DocId -> Score -> Maybe a -> Maybe SearchAfterKey -> Maybe HitFields -> Maybe HitHighlight -> Maybe (KeyMap (TopHitResult Value)) -> Hit a
- Database.Bloodhound.Types: HitFields :: Map Text [Value] -> HitFields
- Database.Bloodhound.Types: HitsTotal :: Int -> HitsTotalRelation -> HitsTotal
- Database.Bloodhound.Types: Hour :: Interval
- Database.Bloodhound.Types: Hours :: TimeInterval
- Database.Bloodhound.Types: Hungarian :: Language
- Database.Bloodhound.Types: IdsQuery :: [DocId] -> Query
- Database.Bloodhound.Types: IgnoreTermFrequency :: Bool -> IgnoreTermFrequency
- Database.Bloodhound.Types: IgnoreUnmapped :: Bool -> IgnoreUnmapped
- Database.Bloodhound.Types: Inches :: DistanceUnit
- Database.Bloodhound.Types: Include :: [Pattern] -> Include
- Database.Bloodhound.Types: IndexAlias :: IndexName -> IndexAliasName -> IndexAlias
- Database.Bloodhound.Types: IndexAliasCreate :: Maybe AliasRouting -> Maybe Filter -> IndexAliasCreate
- Database.Bloodhound.Types: IndexAliasName :: IndexName -> IndexAliasName
- Database.Bloodhound.Types: IndexAliasRouting :: RoutingValue -> IndexAliasRouting
- Database.Bloodhound.Types: IndexAliasSummary :: IndexAlias -> IndexAliasCreate -> IndexAliasSummary
- Database.Bloodhound.Types: IndexAliasesSummary :: [IndexAliasSummary] -> IndexAliasesSummary
- Database.Bloodhound.Types: IndexCompoundFormat :: CompoundFormat -> UpdatableIndexSetting
- Database.Bloodhound.Types: IndexCompoundOnFlush :: Bool -> UpdatableIndexSetting
- Database.Bloodhound.Types: IndexConcurrency :: Int -> UpdatableIndexSetting
- Database.Bloodhound.Types: IndexDocumentSettings :: VersionControl -> Maybe JoinRelation -> IndexDocumentSettings
- Database.Bloodhound.Types: IndexList :: NonEmpty IndexName -> IndexSelection
- Database.Bloodhound.Types: IndexMappingsLimits :: Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> IndexMappingsLimits
- Database.Bloodhound.Types: IndexName :: Text -> IndexName
- Database.Bloodhound.Types: IndexPattern :: Text -> IndexPattern
- Database.Bloodhound.Types: IndexSettings :: ShardCount -> ReplicaCount -> IndexMappingsLimits -> IndexSettings
- Database.Bloodhound.Types: IndexSettingsSummary :: IndexName -> IndexSettings -> [UpdatableIndexSetting] -> IndexSettingsSummary
- Database.Bloodhound.Types: IndexTemplate :: [IndexPattern] -> Maybe IndexSettings -> Value -> IndexTemplate
- Database.Bloodhound.Types: IndicesQuery :: [IndexName] -> Query -> Maybe Query -> IndicesQuery
- Database.Bloodhound.Types: Indonesian :: Language
- Database.Bloodhound.Types: InnerHits :: Maybe Integer -> Maybe Integer -> InnerHits
- Database.Bloodhound.Types: InternalVersion :: DocVersion -> VersionControl
- Database.Bloodhound.Types: Intersection :: RegexpFlag
- Database.Bloodhound.Types: Interval :: RegexpFlag
- Database.Bloodhound.Types: Irish :: Language
- Database.Bloodhound.Types: Italian :: Language
- Database.Bloodhound.Types: JVMBufferPoolStats :: Bytes -> Bytes -> Int -> JVMBufferPoolStats
- Database.Bloodhound.Types: JVMGCCollector :: Text -> JVMGCCollector
- Database.Bloodhound.Types: JVMGCStats :: NominalDiffTime -> Int -> JVMGCStats
- Database.Bloodhound.Types: JVMMemoryInfo :: Bytes -> Bytes -> Bytes -> Bytes -> Bytes -> JVMMemoryInfo
- Database.Bloodhound.Types: JVMMemoryPool :: Text -> JVMMemoryPool
- Database.Bloodhound.Types: JVMPoolStats :: Bytes -> Bytes -> Bytes -> Bytes -> JVMPoolStats
- Database.Bloodhound.Types: Kilometers :: DistanceUnit
- Database.Bloodhound.Types: Kp :: Language
- Database.Bloodhound.Types: LastMissing :: Missing
- Database.Bloodhound.Types: LatLon :: Double -> Double -> LatLon
- Database.Bloodhound.Types: Latvian :: Language
- Database.Bloodhound.Types: Lenient :: Bool -> Lenient
- Database.Bloodhound.Types: LessThan :: Double -> LessThan
- Database.Bloodhound.Types: LessThanD :: UTCTime -> LessThanD
- Database.Bloodhound.Types: LessThanEq :: Double -> LessThanEq
- Database.Bloodhound.Types: LessThanEqD :: UTCTime -> LessThanEqD
- Database.Bloodhound.Types: Lithuanian :: Language
- Database.Bloodhound.Types: LoadAvgs :: Double -> Double -> Double -> LoadAvgs
- Database.Bloodhound.Types: LocalNode :: NodeSelection
- Database.Bloodhound.Types: Locale :: Text -> Locale
- Database.Bloodhound.Types: Lovins :: Language
- Database.Bloodhound.Types: LowercaseExpanded :: Bool -> LowercaseExpanded
- Database.Bloodhound.Types: MacAddress :: Text -> MacAddress
- Database.Bloodhound.Types: Map :: ExecutionHint
- Database.Bloodhound.Types: Mapping :: [MappingField] -> Mapping
- Database.Bloodhound.Types: MappingField :: FieldName -> FieldDefinition -> MappingField
- Database.Bloodhound.Types: MappingTotalFieldsLimit :: Int -> UpdatableIndexSetting
- Database.Bloodhound.Types: MatchAllQuery :: Maybe Boost -> Query
- Database.Bloodhound.Types: MatchPhrase :: MatchQueryType
- Database.Bloodhound.Types: MatchPhrasePrefix :: MatchQueryType
- Database.Bloodhound.Types: MatchQuery :: FieldName -> QueryString -> BooleanOperator -> ZeroTermsQuery -> Maybe CutoffFrequency -> Maybe MatchQueryType -> Maybe Analyzer -> Maybe MaxExpansions -> Maybe Lenient -> Maybe Boost -> Maybe Text -> Maybe Fuzziness -> MatchQuery
- Database.Bloodhound.Types: MaxChildren :: Int -> MaxChildren
- Database.Bloodhound.Types: MaxDocFrequency :: Int -> MaxDocFrequency
- Database.Bloodhound.Types: MaxExpansions :: Int -> MaxExpansions
- Database.Bloodhound.Types: MaxQueryTerms :: Int -> MaxQueryTerms
- Database.Bloodhound.Types: MaxWordLength :: Int -> MaxWordLength
- Database.Bloodhound.Types: MaybeNA :: Maybe a -> MaybeNA a
- Database.Bloodhound.Types: MergeSegmentVsTotalIndex :: Double -> CompoundFormat
- Database.Bloodhound.Types: Meters :: DistanceUnit
- Database.Bloodhound.Types: Miles :: DistanceUnit
- Database.Bloodhound.Types: Millimeters :: DistanceUnit
- Database.Bloodhound.Types: MinChildren :: Int -> MinChildren
- Database.Bloodhound.Types: MinDocFrequency :: Int -> MinDocFrequency
- Database.Bloodhound.Types: MinWordLength :: Int -> MinWordLength
- Database.Bloodhound.Types: MinimumMatch :: Int -> MinimumMatch
- Database.Bloodhound.Types: MinimumMatchHighLow :: MinimumMatch -> MinimumMatch -> MinimumMatchHighLow
- Database.Bloodhound.Types: MinimumTermFrequency :: Int -> MinimumTermFrequency
- Database.Bloodhound.Types: Minute :: Interval
- Database.Bloodhound.Types: Minutes :: TimeInterval
- Database.Bloodhound.Types: MissingAgg :: MissingAggregation -> Aggregation
- Database.Bloodhound.Types: MissingAggregation :: Text -> MissingAggregation
- Database.Bloodhound.Types: MissingResult :: Int -> MissingResult
- Database.Bloodhound.Types: Month :: Interval
- Database.Bloodhound.Types: MoreLikeThisFieldQuery :: Text -> FieldName -> Maybe PercentMatch -> Maybe MinimumTermFrequency -> Maybe MaxQueryTerms -> Maybe (NonEmpty StopWord) -> Maybe MinDocFrequency -> Maybe MaxDocFrequency -> Maybe MinWordLength -> Maybe MaxWordLength -> Maybe BoostTerms -> Maybe Boost -> Maybe Analyzer -> MoreLikeThisFieldQuery
- Database.Bloodhound.Types: MoreLikeThisQuery :: Text -> Maybe (NonEmpty FieldName) -> Maybe PercentMatch -> Maybe MinimumTermFrequency -> Maybe MaxQueryTerms -> Maybe (NonEmpty StopWord) -> Maybe MinDocFrequency -> Maybe MaxDocFrequency -> Maybe MinWordLength -> Maybe MaxWordLength -> Maybe BoostTerms -> Maybe Boost -> Maybe Analyzer -> MoreLikeThisQuery
- Database.Bloodhound.Types: MultiMatchBestFields :: MultiMatchQueryType
- Database.Bloodhound.Types: MultiMatchCrossFields :: MultiMatchQueryType
- Database.Bloodhound.Types: MultiMatchMostFields :: MultiMatchQueryType
- Database.Bloodhound.Types: MultiMatchPhrase :: MultiMatchQueryType
- Database.Bloodhound.Types: MultiMatchPhrasePrefix :: MultiMatchQueryType
- Database.Bloodhound.Types: MultiMatchQuery :: [FieldName] -> QueryString -> BooleanOperator -> ZeroTermsQuery -> Maybe Tiebreaker -> Maybe MultiMatchQueryType -> Maybe CutoffFrequency -> Maybe Analyzer -> Maybe MaxExpansions -> Maybe Lenient -> MultiMatchQuery
- Database.Bloodhound.Types: MustMatch :: Term -> Cache -> BoolMatch
- Database.Bloodhound.Types: MustNotMatch :: Term -> Cache -> BoolMatch
- Database.Bloodhound.Types: NamedSuggestionResponse :: Text -> [SuggestResponse] -> NamedSuggestionResponse
- Database.Bloodhound.Types: NauticalMiles :: DistanceUnit
- Database.Bloodhound.Types: NestedQuery :: QueryPath -> ScoreType -> Query -> Maybe InnerHits -> NestedQuery
- Database.Bloodhound.Types: NetworkInterfaceName :: Text -> NetworkInterfaceName
- Database.Bloodhound.Types: Ngram :: Int -> Int -> [TokenChar] -> Ngram
- Database.Bloodhound.Types: NgramFilter :: Int -> Int -> NgramFilter
- Database.Bloodhound.Types: NoOptimizeBbox :: OptimizeBbox
- Database.Bloodhound.Types: NoRegexpFlags :: RegexpFlags
- Database.Bloodhound.Types: NoSource :: Source
- Database.Bloodhound.Types: NoVersionControl :: VersionControl
- Database.Bloodhound.Types: NodeAttrFilter :: NodeAttrName -> NonEmpty Text -> NodeAttrFilter
- Database.Bloodhound.Types: NodeAttrName :: Text -> NodeAttrName
- Database.Bloodhound.Types: NodeBreakerStats :: Int -> Double -> Bytes -> Bytes -> NodeBreakerStats
- Database.Bloodhound.Types: NodeBreakersStats :: NodeBreakerStats -> NodeBreakerStats -> NodeBreakerStats -> NodeBreakersStats
- Database.Bloodhound.Types: NodeByAttribute :: NodeAttrName -> Text -> NodeSelector
- Database.Bloodhound.Types: NodeByFullNodeId :: FullNodeId -> NodeSelector
- Database.Bloodhound.Types: NodeByHost :: Server -> NodeSelector
- Database.Bloodhound.Types: NodeByName :: NodeName -> NodeSelector
- Database.Bloodhound.Types: NodeDataPathStats :: Maybe Double -> Maybe Double -> Maybe Bytes -> Maybe Bytes -> Maybe Bytes -> Maybe Int -> Maybe Int -> Maybe Int -> Bytes -> Bytes -> Bytes -> Maybe Text -> Maybe Text -> Text -> Text -> NodeDataPathStats
- Database.Bloodhound.Types: NodeFSStats :: [NodeDataPathStats] -> NodeFSTotalStats -> UTCTime -> NodeFSStats
- Database.Bloodhound.Types: NodeFSTotalStats :: Maybe Double -> Maybe Double -> Maybe Bytes -> Maybe Bytes -> Maybe Bytes -> Maybe Int -> Maybe Int -> Maybe Int -> Bytes -> Bytes -> Bytes -> NodeFSTotalStats
- Database.Bloodhound.Types: NodeHTTPInfo :: Bytes -> EsAddress -> [EsAddress] -> NodeHTTPInfo
- Database.Bloodhound.Types: NodeHTTPStats :: Int -> Int -> NodeHTTPStats
- Database.Bloodhound.Types: NodeIndicesStats :: Maybe NominalDiffTime -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Bytes -> Maybe Int -> Maybe NominalDiffTime -> Maybe Int -> Bytes -> Int -> Maybe Bytes -> Bytes -> Maybe Bytes -> Bytes -> Bytes -> Int -> Bytes -> Maybe Int -> Maybe Bytes -> Maybe Int -> Maybe NominalDiffTime -> Maybe Int -> Int -> Bytes -> NominalDiffTime -> Int -> Int -> NominalDiffTime -> Int -> NominalDiffTime -> Int -> Bytes -> Int -> NominalDiffTime -> Int -> Bytes -> Int -> Int -> Int -> NominalDiffTime -> Int -> Int -> NominalDiffTime -> Int -> Int -> Int -> NominalDiffTime -> Int -> NominalDiffTime -> Int -> NominalDiffTime -> Int -> Maybe NominalDiffTime -> Maybe Bool -> Maybe Int -> Int -> NominalDiffTime -> Int -> Int -> NominalDiffTime -> Int -> Maybe NominalDiffTime -> Bytes -> Int -> Int -> NodeIndicesStats
- Database.Bloodhound.Types: NodeInfo :: Maybe EsAddress -> BuildHash -> VersionNumber -> Server -> Server -> EsAddress -> NodeName -> FullNodeId -> [NodePluginInfo] -> NodeHTTPInfo -> NodeTransportInfo -> Maybe NodeNetworkInfo -> Map Text NodeThreadPoolInfo -> NodeJVMInfo -> NodeProcessInfo -> NodeOSInfo -> Object -> NodeInfo
- Database.Bloodhound.Types: NodeJVMInfo :: [JVMMemoryPool] -> [JVMGCCollector] -> JVMMemoryInfo -> UTCTime -> Text -> VMVersion -> Text -> JVMVersion -> PID -> NodeJVMInfo
- Database.Bloodhound.Types: NodeJVMStats :: JVMBufferPoolStats -> JVMBufferPoolStats -> JVMGCStats -> JVMGCStats -> Int -> Int -> JVMPoolStats -> JVMPoolStats -> JVMPoolStats -> Bytes -> Bytes -> Bytes -> Bytes -> Int -> Bytes -> NominalDiffTime -> UTCTime -> NodeJVMStats
- Database.Bloodhound.Types: NodeList :: NonEmpty NodeSelector -> NodeSelection
- Database.Bloodhound.Types: NodeName :: Text -> NodeName
- Database.Bloodhound.Types: NodeNetworkInfo :: NodeNetworkInterface -> NominalDiffTime -> NodeNetworkInfo
- Database.Bloodhound.Types: NodeNetworkInterface :: MacAddress -> NetworkInterfaceName -> Server -> NodeNetworkInterface
- Database.Bloodhound.Types: NodeNetworkStats :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> NodeNetworkStats
- Database.Bloodhound.Types: NodeOSInfo :: NominalDiffTime -> Text -> Text -> Text -> Int -> Int -> NodeOSInfo
- Database.Bloodhound.Types: NodeOSStats :: UTCTime -> Int -> Maybe LoadAvgs -> Bytes -> Bytes -> Int -> Bytes -> Int -> Bytes -> Bytes -> Bytes -> NodeOSStats
- Database.Bloodhound.Types: NodePluginInfo :: Maybe Bool -> Maybe Bool -> Text -> MaybeNA VersionNumber -> PluginName -> NodePluginInfo
- Database.Bloodhound.Types: NodeProcessInfo :: Bool -> Maybe Int -> PID -> NominalDiffTime -> NodeProcessInfo
- Database.Bloodhound.Types: NodeProcessStats :: UTCTime -> Int -> Int -> Int -> NominalDiffTime -> Bytes -> NodeProcessStats
- Database.Bloodhound.Types: NodeStats :: NodeName -> FullNodeId -> Maybe NodeBreakersStats -> NodeHTTPStats -> NodeTransportStats -> NodeFSStats -> Maybe NodeNetworkStats -> Map Text NodeThreadPoolStats -> NodeJVMStats -> NodeProcessStats -> NodeOSStats -> NodeIndicesStats -> NodeStats
- Database.Bloodhound.Types: NodeThreadPoolInfo :: ThreadPoolSize -> Maybe NominalDiffTime -> Maybe Int -> Maybe Int -> ThreadPoolType -> NodeThreadPoolInfo
- Database.Bloodhound.Types: NodeThreadPoolStats :: Int -> Int -> Int -> Int -> Int -> Int -> NodeThreadPoolStats
- Database.Bloodhound.Types: NodeTransportInfo :: [BoundTransportAddress] -> EsAddress -> [EsAddress] -> NodeTransportInfo
- Database.Bloodhound.Types: NodeTransportStats :: Bytes -> Int -> Bytes -> Int -> Int -> NodeTransportStats
- Database.Bloodhound.Types: NodesInfo :: [NodeInfo] -> ClusterName -> NodesInfo
- Database.Bloodhound.Types: NodesStats :: [NodeStats] -> ClusterName -> NodesStats
- Database.Bloodhound.Types: NonPostings :: Maybe Int -> Maybe Int -> NonPostings
- Database.Bloodhound.Types: Norwegian :: Language
- Database.Bloodhound.Types: NullValue :: Bool -> NullValue
- Database.Bloodhound.Types: NumberOfReplicas :: ReplicaCount -> UpdatableIndexSetting
- Database.Bloodhound.Types: OpenIndex :: OpenCloseIndex
- Database.Bloodhound.Types: OpenPointInTimeResponse :: Text -> OpenPointInTimeResponse
- Database.Bloodhound.Types: OptimizeGeoFilterType :: GeoFilterType -> OptimizeBbox
- Database.Bloodhound.Types: Or :: BooleanOperator
- Database.Bloodhound.Types: OtherRepoConversionError :: Text -> SnapshotRepoConversionError
- Database.Bloodhound.Types: PID :: Int -> PID
- Database.Bloodhound.Types: ParentDocument :: FieldName -> RelationName -> JoinRelation
- Database.Bloodhound.Types: Pattern :: Text -> Pattern
- Database.Bloodhound.Types: PercentMatch :: Double -> PercentMatch
- Database.Bloodhound.Types: Persian :: Language
- Database.Bloodhound.Types: PhraseSlop :: Int -> PhraseSlop
- Database.Bloodhound.Types: PhraseSuggester :: FieldName -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Size -> Maybe Analyzer -> Maybe Int -> Maybe PhraseSuggesterHighlighter -> Maybe PhraseSuggesterCollate -> [DirectGenerators] -> PhraseSuggester
- Database.Bloodhound.Types: PhraseSuggesterCollate :: Query -> TemplateQueryKeyValuePairs -> Bool -> PhraseSuggesterCollate
- Database.Bloodhound.Types: PhraseSuggesterHighlighter :: Text -> Text -> PhraseSuggesterHighlighter
- Database.Bloodhound.Types: Plain :: PlainHighlight -> HighlightSettings
- Database.Bloodhound.Types: PlainHighlight :: Maybe CommonHighlight -> Maybe NonPostings -> PlainHighlight
- Database.Bloodhound.Types: Plane :: DistanceType
- Database.Bloodhound.Types: PluginName :: Text -> PluginName
- Database.Bloodhound.Types: PointInTime :: Text -> Text -> PointInTime
- Database.Bloodhound.Types: PopPattern :: Pattern -> PatternOrPatterns
- Database.Bloodhound.Types: PopPatterns :: [Pattern] -> PatternOrPatterns
- Database.Bloodhound.Types: Porter :: Language
- Database.Bloodhound.Types: Portuguese :: Language
- Database.Bloodhound.Types: Postings :: PostingsHighlight -> HighlightSettings
- Database.Bloodhound.Types: PostingsHighlight :: Maybe CommonHighlight -> PostingsHighlight
- Database.Bloodhound.Types: PrefixLength :: Int -> PrefixLength
- Database.Bloodhound.Types: PrefixQuery :: FieldName -> Text -> Maybe Boost -> PrefixQuery
- Database.Bloodhound.Types: Quarter :: Interval
- Database.Bloodhound.Types: QueryBoolQuery :: BoolQuery -> Query
- Database.Bloodhound.Types: QueryBoostingQuery :: BoostingQuery -> Query
- Database.Bloodhound.Types: QueryCommonTermsQuery :: CommonTermsQuery -> Query
- Database.Bloodhound.Types: QueryDisMaxQuery :: DisMaxQuery -> Query
- Database.Bloodhound.Types: QueryExistsQuery :: FieldName -> Query
- Database.Bloodhound.Types: QueryFunctionScoreQuery :: FunctionScoreQuery -> Query
- Database.Bloodhound.Types: QueryFuzzyLikeFieldQuery :: FuzzyLikeFieldQuery -> Query
- Database.Bloodhound.Types: QueryFuzzyLikeThisQuery :: FuzzyLikeThisQuery -> Query
- Database.Bloodhound.Types: QueryFuzzyQuery :: FuzzyQuery -> Query
- Database.Bloodhound.Types: QueryHasChildQuery :: HasChildQuery -> Query
- Database.Bloodhound.Types: QueryHasParentQuery :: HasParentQuery -> Query
- Database.Bloodhound.Types: QueryIndicesQuery :: IndicesQuery -> Query
- Database.Bloodhound.Types: QueryMatchNoneQuery :: Query
- Database.Bloodhound.Types: QueryMatchQuery :: MatchQuery -> Query
- Database.Bloodhound.Types: QueryMoreLikeThisFieldQuery :: MoreLikeThisFieldQuery -> Query
- Database.Bloodhound.Types: QueryMoreLikeThisQuery :: MoreLikeThisQuery -> Query
- Database.Bloodhound.Types: QueryMultiMatchQuery :: MultiMatchQuery -> Query
- Database.Bloodhound.Types: QueryNestedQuery :: NestedQuery -> Query
- Database.Bloodhound.Types: QueryPath :: Text -> QueryPath
- Database.Bloodhound.Types: QueryPrefixQuery :: PrefixQuery -> Query
- Database.Bloodhound.Types: QueryQueryStringQuery :: QueryStringQuery -> Query
- Database.Bloodhound.Types: QueryRangeQuery :: RangeQuery -> Query
- Database.Bloodhound.Types: QueryRegexpQuery :: RegexpQuery -> Query
- Database.Bloodhound.Types: QuerySimpleQueryStringQuery :: SimpleQueryStringQuery -> Query
- Database.Bloodhound.Types: QueryString :: Text -> QueryString
- Database.Bloodhound.Types: QueryStringQuery :: QueryString -> Maybe FieldName -> Maybe BooleanOperator -> Maybe Analyzer -> Maybe AllowLeadingWildcard -> Maybe LowercaseExpanded -> Maybe EnablePositionIncrements -> Maybe MaxExpansions -> Maybe Fuzziness -> Maybe PrefixLength -> Maybe PhraseSlop -> Maybe Boost -> Maybe AnalyzeWildcard -> Maybe GeneratePhraseQueries -> Maybe MinimumMatch -> Maybe Lenient -> Maybe Locale -> QueryStringQuery
- Database.Bloodhound.Types: QueryWildcardQuery :: WildcardQuery -> Query
- Database.Bloodhound.Types: QuorumMinus1Shards :: InitialShardCount
- Database.Bloodhound.Types: QuorumShards :: InitialShardCount
- Database.Bloodhound.Types: RRSubGroup :: RRGroupRefNum -> RestoreRenameToken
- Database.Bloodhound.Types: RRSubWholeMatch :: RestoreRenameToken
- Database.Bloodhound.Types: RRTLit :: Text -> RestoreRenameToken
- Database.Bloodhound.Types: RangeDateGt :: GreaterThanD -> RangeValue
- Database.Bloodhound.Types: RangeDateGtLt :: GreaterThanD -> LessThanD -> RangeValue
- Database.Bloodhound.Types: RangeDateGtLte :: GreaterThanD -> LessThanEqD -> RangeValue
- Database.Bloodhound.Types: RangeDateGte :: GreaterThanEqD -> RangeValue
- Database.Bloodhound.Types: RangeDateGteLt :: GreaterThanEqD -> LessThanD -> RangeValue
- Database.Bloodhound.Types: RangeDateGteLte :: GreaterThanEqD -> LessThanEqD -> RangeValue
- Database.Bloodhound.Types: RangeDateLt :: LessThanD -> RangeValue
- Database.Bloodhound.Types: RangeDateLte :: LessThanEqD -> RangeValue
- Database.Bloodhound.Types: RangeDoubleGt :: GreaterThan -> RangeValue
- Database.Bloodhound.Types: RangeDoubleGtLt :: GreaterThan -> LessThan -> RangeValue
- Database.Bloodhound.Types: RangeDoubleGtLte :: GreaterThan -> LessThanEq -> RangeValue
- Database.Bloodhound.Types: RangeDoubleGte :: GreaterThanEq -> RangeValue
- Database.Bloodhound.Types: RangeDoubleGteLt :: GreaterThanEq -> LessThan -> RangeValue
- Database.Bloodhound.Types: RangeDoubleGteLte :: GreaterThanEq -> LessThanEq -> RangeValue
- Database.Bloodhound.Types: RangeDoubleLt :: LessThan -> RangeValue
- Database.Bloodhound.Types: RangeDoubleLte :: LessThanEq -> RangeValue
- Database.Bloodhound.Types: RangeExecutionFielddata :: RangeExecution
- Database.Bloodhound.Types: RangeExecutionIndex :: RangeExecution
- Database.Bloodhound.Types: RangeQuery :: FieldName -> RangeValue -> Boost -> RangeQuery
- Database.Bloodhound.Types: RecoveryInitialShards :: InitialShardCount -> UpdatableIndexSetting
- Database.Bloodhound.Types: RefreshInterval :: NominalDiffTime -> UpdatableIndexSetting
- Database.Bloodhound.Types: Regexp :: Text -> Regexp
- Database.Bloodhound.Types: RegexpQuery :: FieldName -> Regexp -> RegexpFlags -> Maybe Boost -> RegexpQuery
- Database.Bloodhound.Types: RelationName :: Text -> RelationName
- Database.Bloodhound.Types: RemoveAlias :: IndexAlias -> IndexAliasAction
- Database.Bloodhound.Types: ReplicaCount :: Int -> ReplicaCount
- Database.Bloodhound.Types: ReplicasBounded :: Int -> Int -> ReplicaBounds
- Database.Bloodhound.Types: ReplicasLowerBounded :: Int -> ReplicaBounds
- Database.Bloodhound.Types: ReplicasUnbounded :: ReplicaBounds
- Database.Bloodhound.Types: RepoPattern :: Text -> SnapshotRepoPattern
- Database.Bloodhound.Types: RepoTypeMismatch :: SnapshotRepoType -> SnapshotRepoType -> SnapshotRepoConversionError
- Database.Bloodhound.Types: RestoreIndexSettings :: Maybe ReplicaCount -> RestoreIndexSettings
- Database.Bloodhound.Types: RestoreRenamePattern :: Text -> RestoreRenamePattern
- Database.Bloodhound.Types: Romanian :: Language
- Database.Bloodhound.Types: RoundDownTo :: DateMathUnit -> DateMathModifier
- Database.Bloodhound.Types: RoutingAllocationEnable :: AllocationPolicy -> UpdatableIndexSetting
- Database.Bloodhound.Types: RoutingAllocationExclude :: NonEmpty NodeAttrFilter -> UpdatableIndexSetting
- Database.Bloodhound.Types: RoutingAllocationInclude :: NonEmpty NodeAttrFilter -> UpdatableIndexSetting
- Database.Bloodhound.Types: RoutingAllocationRequire :: NonEmpty NodeAttrFilter -> UpdatableIndexSetting
- Database.Bloodhound.Types: RoutingAllocationShardsPerNode :: ShardCount -> UpdatableIndexSetting
- Database.Bloodhound.Types: RoutingValue :: Text -> RoutingValue
- Database.Bloodhound.Types: Russian :: Language
- Database.Bloodhound.Types: ScientificValue :: Scientific -> BucketValue
- Database.Bloodhound.Types: ScoreModeAvg :: ScoreMode
- Database.Bloodhound.Types: ScoreModeFirst :: ScoreMode
- Database.Bloodhound.Types: ScoreModeMax :: ScoreMode
- Database.Bloodhound.Types: ScoreModeMin :: ScoreMode
- Database.Bloodhound.Types: ScoreModeMultiply :: ScoreMode
- Database.Bloodhound.Types: ScoreModeSum :: ScoreMode
- Database.Bloodhound.Types: ScoreTypeAvg :: ScoreType
- Database.Bloodhound.Types: ScoreTypeMax :: ScoreType
- Database.Bloodhound.Types: ScoreTypeNone :: ScoreType
- Database.Bloodhound.Types: ScoreTypeSum :: ScoreType
- Database.Bloodhound.Types: Script :: Maybe ScriptLanguage -> ScriptSource -> Maybe ScriptParams -> Script
- Database.Bloodhound.Types: ScriptFields :: KeyMap ScriptFieldValue -> ScriptFields
- Database.Bloodhound.Types: ScriptId :: Text -> ScriptSource
- Database.Bloodhound.Types: ScriptInline :: Text -> ScriptSource
- Database.Bloodhound.Types: ScriptLanguage :: Text -> ScriptLanguage
- Database.Bloodhound.Types: ScriptParams :: KeyMap ScriptParamValue -> ScriptParams
- Database.Bloodhound.Types: ScriptValueCount :: Script -> ValueCountAggregation
- Database.Bloodhound.Types: ScrollId :: Text -> ScrollId
- Database.Bloodhound.Types: Search :: Maybe Query -> Maybe Filter -> Maybe Sort -> Maybe Aggregations -> Maybe Highlights -> TrackSortScores -> From -> Size -> SearchType -> Maybe SearchAfterKey -> Maybe [FieldName] -> Maybe ScriptFields -> Maybe Source -> Maybe Suggest -> Maybe PointInTime -> Search
- Database.Bloodhound.Types: SearchAliasRouting :: NonEmpty RoutingValue -> SearchAliasRouting
- Database.Bloodhound.Types: SearchHits :: HitsTotal -> Score -> [Hit a] -> SearchHits a
- Database.Bloodhound.Types: SearchResult :: Int -> Bool -> ShardResult -> SearchHits a -> Maybe AggregationResults -> Maybe ScrollId -> Maybe NamedSuggestionResponse -> Maybe Text -> SearchResult a
- Database.Bloodhound.Types: SearchTemplate :: Either SearchTemplateId SearchTemplateSource -> TemplateQueryKeyValuePairs -> Maybe Bool -> Maybe Bool -> SearchTemplate
- Database.Bloodhound.Types: SearchTemplateId :: Text -> SearchTemplateId
- Database.Bloodhound.Types: SearchTemplateSource :: Text -> SearchTemplateSource
- Database.Bloodhound.Types: SearchTypeDfsQueryThenFetch :: SearchType
- Database.Bloodhound.Types: SearchTypeQueryThenFetch :: SearchType
- Database.Bloodhound.Types: Second :: Interval
- Database.Bloodhound.Types: Seconds :: TimeInterval
- Database.Bloodhound.Types: Seed :: Float -> Seed
- Database.Bloodhound.Types: Server :: Text -> Server
- Database.Bloodhound.Types: ShardCount :: Int -> ShardCount
- Database.Bloodhound.Types: ShardId :: Int -> ShardId
- Database.Bloodhound.Types: ShardResult :: Int -> Int -> Int -> Int -> ShardResult
- Database.Bloodhound.Types: Shingle :: Int -> Int -> Bool -> Bool -> Text -> Text -> Shingle
- Database.Bloodhound.Types: ShouldMatch :: [Term] -> Cache -> BoolMatch
- Database.Bloodhound.Types: SimpleQueryAll :: SimpleQueryFlag
- Database.Bloodhound.Types: SimpleQueryAnd :: SimpleQueryFlag
- Database.Bloodhound.Types: SimpleQueryEscape :: SimpleQueryFlag
- Database.Bloodhound.Types: SimpleQueryFuzzy :: SimpleQueryFlag
- Database.Bloodhound.Types: SimpleQueryNear :: SimpleQueryFlag
- Database.Bloodhound.Types: SimpleQueryNone :: SimpleQueryFlag
- Database.Bloodhound.Types: SimpleQueryOr :: SimpleQueryFlag
- Database.Bloodhound.Types: SimpleQueryPhrase :: SimpleQueryFlag
- Database.Bloodhound.Types: SimpleQueryPrecedence :: SimpleQueryFlag
- Database.Bloodhound.Types: SimpleQueryPrefix :: SimpleQueryFlag
- Database.Bloodhound.Types: SimpleQuerySlop :: SimpleQueryFlag
- Database.Bloodhound.Types: SimpleQueryStringQuery :: QueryString -> Maybe FieldOrFields -> Maybe BooleanOperator -> Maybe Analyzer -> Maybe (NonEmpty SimpleQueryFlag) -> Maybe LowercaseExpanded -> Maybe Locale -> SimpleQueryStringQuery
- Database.Bloodhound.Types: SimpleQueryWhitespace :: SimpleQueryFlag
- Database.Bloodhound.Types: Size :: Int -> Size
- Database.Bloodhound.Types: SloppyArc :: DistanceType
- Database.Bloodhound.Types: SnapPattern :: Text -> SnapshotPattern
- Database.Bloodhound.Types: SnapshotAborted :: SnapshotState
- Database.Bloodhound.Types: SnapshotCreateSettings :: Bool -> Maybe IndexSelection -> Bool -> Bool -> Bool -> SnapshotCreateSettings
- Database.Bloodhound.Types: SnapshotFailed :: SnapshotState
- Database.Bloodhound.Types: SnapshotInfo :: ShardResult -> [SnapshotShardFailure] -> NominalDiffTime -> UTCTime -> UTCTime -> SnapshotState -> [IndexName] -> SnapshotName -> SnapshotInfo
- Database.Bloodhound.Types: SnapshotInit :: SnapshotState
- Database.Bloodhound.Types: SnapshotList :: NonEmpty SnapshotPattern -> SnapshotSelection
- Database.Bloodhound.Types: SnapshotMissing :: SnapshotState
- Database.Bloodhound.Types: SnapshotName :: Text -> SnapshotName
- Database.Bloodhound.Types: SnapshotNodeVerification :: FullNodeId -> NodeName -> SnapshotNodeVerification
- Database.Bloodhound.Types: SnapshotRepoList :: NonEmpty SnapshotRepoPattern -> SnapshotRepoSelection
- Database.Bloodhound.Types: SnapshotRepoName :: Text -> SnapshotRepoName
- Database.Bloodhound.Types: SnapshotRepoType :: Text -> SnapshotRepoType
- Database.Bloodhound.Types: SnapshotRepoUpdateSettings :: Bool -> SnapshotRepoUpdateSettings
- Database.Bloodhound.Types: SnapshotRestoreSettings :: Bool -> Maybe IndexSelection -> Bool -> Bool -> Maybe RestoreRenamePattern -> Maybe (NonEmpty RestoreRenameToken) -> Bool -> Bool -> Maybe RestoreIndexSettings -> Maybe (NonEmpty Text) -> SnapshotRestoreSettings
- Database.Bloodhound.Types: SnapshotShardFailure :: IndexName -> Maybe NodeName -> Text -> ShardId -> SnapshotShardFailure
- Database.Bloodhound.Types: SnapshotStarted :: SnapshotState
- Database.Bloodhound.Types: SnapshotSuccess :: SnapshotState
- Database.Bloodhound.Types: SnapshotVerification :: [SnapshotNodeVerification] -> SnapshotVerification
- Database.Bloodhound.Types: SnapshotWaiting :: SnapshotState
- Database.Bloodhound.Types: SomeRegexpFlags :: NonEmpty RegexpFlag -> RegexpFlags
- Database.Bloodhound.Types: Sorani :: Language
- Database.Bloodhound.Types: SortAvg :: SortMode
- Database.Bloodhound.Types: SortMax :: SortMode
- Database.Bloodhound.Types: SortMin :: SortMode
- Database.Bloodhound.Types: SortSum :: SortMode
- Database.Bloodhound.Types: SourceIncludeExclude :: Include -> Exclude -> Source
- Database.Bloodhound.Types: SourcePatterns :: PatternOrPatterns -> Source
- Database.Bloodhound.Types: Spanish :: Language
- Database.Bloodhound.Types: StatisticsAggregation :: StatsType -> FieldName -> StatisticsAggregation
- Database.Bloodhound.Types: StatsAgg :: StatisticsAggregation -> Aggregation
- Database.Bloodhound.Types: Status :: Text -> Text -> Text -> Version -> Text -> Status
- Database.Bloodhound.Types: StopWord :: Text -> StopWord
- Database.Bloodhound.Types: SubtractTime :: Int -> DateMathUnit -> DateMathModifier
- Database.Bloodhound.Types: Suggest :: Text -> Text -> SuggestType -> Suggest
- Database.Bloodhound.Types: SuggestOptions :: Text -> Double -> Maybe Int -> Maybe Text -> SuggestOptions
- Database.Bloodhound.Types: SuggestResponse :: Text -> Int -> Int -> [SuggestOptions] -> SuggestResponse
- Database.Bloodhound.Types: SuggestTypePhraseSuggester :: PhraseSuggester -> SuggestType
- Database.Bloodhound.Types: SumAgg :: SumAggregation -> Aggregation
- Database.Bloodhound.Types: SumAggregation :: FieldName -> SumAggregation
- Database.Bloodhound.Types: Swedish :: Language
- Database.Bloodhound.Types: TTLDisablePurge :: Bool -> UpdatableIndexSetting
- Database.Bloodhound.Types: TagSchema :: Text -> HighlightTag
- Database.Bloodhound.Types: TemplateName :: Text -> TemplateName
- Database.Bloodhound.Types: TemplateQueryKeyValuePairs :: KeyMap TemplateQueryValue -> TemplateQueryKeyValuePairs
- Database.Bloodhound.Types: Term :: Key -> Text -> Term
- Database.Bloodhound.Types: TermInclusion :: Text -> TermInclusion
- Database.Bloodhound.Types: TermOrder :: Text -> SortOrder -> TermOrder
- Database.Bloodhound.Types: TermPattern :: Text -> Text -> TermInclusion
- Database.Bloodhound.Types: TermQuery :: Term -> Maybe Boost -> Query
- Database.Bloodhound.Types: TermsAgg :: TermsAggregation -> Aggregation
- Database.Bloodhound.Types: TermsAggregation :: Either Text Text -> Maybe TermInclusion -> Maybe TermInclusion -> Maybe TermOrder -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe CollectionMode -> Maybe ExecutionHint -> Maybe Aggregations -> TermsAggregation
- Database.Bloodhound.Types: TermsQuery :: Key -> NonEmpty Text -> Query
- Database.Bloodhound.Types: TermsResult :: BucketValue -> Int -> Maybe AggregationResults -> TermsResult
- Database.Bloodhound.Types: TextValue :: Text -> BucketValue
- Database.Bloodhound.Types: Thai :: Language
- Database.Bloodhound.Types: ThreadPoolBounded :: Int -> ThreadPoolSize
- Database.Bloodhound.Types: ThreadPoolCached :: ThreadPoolType
- Database.Bloodhound.Types: ThreadPoolFixed :: ThreadPoolType
- Database.Bloodhound.Types: ThreadPoolFixedAutoQueueSize :: ThreadPoolType
- Database.Bloodhound.Types: ThreadPoolScaling :: ThreadPoolType
- Database.Bloodhound.Types: ThreadPoolUnbounded :: ThreadPoolSize
- Database.Bloodhound.Types: Tiebreaker :: Double -> Tiebreaker
- Database.Bloodhound.Types: TokenDigit :: TokenChar
- Database.Bloodhound.Types: TokenFilter :: Text -> TokenFilter
- Database.Bloodhound.Types: TokenFilterDefinitionApostrophe :: TokenFilterDefinition
- Database.Bloodhound.Types: TokenFilterDefinitionEdgeNgram :: NgramFilter -> Maybe EdgeNgramFilterSide -> TokenFilterDefinition
- Database.Bloodhound.Types: TokenFilterDefinitionLowercase :: Maybe Language -> TokenFilterDefinition
- Database.Bloodhound.Types: TokenFilterDefinitionNgram :: NgramFilter -> TokenFilterDefinition
- Database.Bloodhound.Types: TokenFilterDefinitionReverse :: TokenFilterDefinition
- Database.Bloodhound.Types: TokenFilterDefinitionShingle :: Shingle -> TokenFilterDefinition
- Database.Bloodhound.Types: TokenFilterDefinitionSnowball :: Language -> TokenFilterDefinition
- Database.Bloodhound.Types: TokenFilterDefinitionStemmer :: Language -> TokenFilterDefinition
- Database.Bloodhound.Types: TokenFilterDefinitionStop :: Either Language [StopWord] -> TokenFilterDefinition
- Database.Bloodhound.Types: TokenFilterDefinitionUppercase :: Maybe Language -> TokenFilterDefinition
- Database.Bloodhound.Types: TokenFilterTruncate :: Int -> TokenFilterDefinition
- Database.Bloodhound.Types: TokenLetter :: TokenChar
- Database.Bloodhound.Types: TokenPunctuation :: TokenChar
- Database.Bloodhound.Types: TokenSymbol :: TokenChar
- Database.Bloodhound.Types: TokenWhitespace :: TokenChar
- Database.Bloodhound.Types: Tokenizer :: Text -> Tokenizer
- Database.Bloodhound.Types: TokenizerDefinitionEdgeNgram :: Ngram -> TokenizerDefinition
- Database.Bloodhound.Types: TokenizerDefinitionNgram :: Ngram -> TokenizerDefinition
- Database.Bloodhound.Types: TopHitResult :: SearchHits a -> TopHitResult a
- Database.Bloodhound.Types: TopHitsAgg :: TopHitsAggregation -> Aggregation
- Database.Bloodhound.Types: TopHitsAggregation :: Maybe From -> Maybe Size -> Maybe Sort -> TopHitsAggregation
- Database.Bloodhound.Types: TranslogDisableFlush :: Bool -> UpdatableIndexSetting
- Database.Bloodhound.Types: TranslogFSType :: FSType -> UpdatableIndexSetting
- Database.Bloodhound.Types: TranslogFlushThresholdOps :: Int -> UpdatableIndexSetting
- Database.Bloodhound.Types: TranslogFlushThresholdPeriod :: NominalDiffTime -> UpdatableIndexSetting
- Database.Bloodhound.Types: TranslogFlushThresholdSize :: Bytes -> UpdatableIndexSetting
- Database.Bloodhound.Types: Turkish :: Language
- Database.Bloodhound.Types: UA_RetryOnConflict :: Int -> UpsertActionMetadata
- Database.Bloodhound.Types: UA_Version :: Int -> UpsertActionMetadata
- Database.Bloodhound.Types: UnassignedNodeLeftDelayedTimeout :: NominalDiffTime -> UpdatableIndexSetting
- Database.Bloodhound.Types: UpsertDoc :: Value -> UpsertPayload
- Database.Bloodhound.Types: UpsertScript :: Bool -> Script -> Value -> UpsertPayload
- Database.Bloodhound.Types: ValueCountAgg :: ValueCountAggregation -> Aggregation
- Database.Bloodhound.Types: Version :: VersionNumber -> BuildHash -> UTCTime -> Bool -> VersionNumber -> Version
- Database.Bloodhound.Types: VersionNumber :: Version -> VersionNumber
- Database.Bloodhound.Types: WarmerEnabled :: Bool -> UpdatableIndexSetting
- Database.Bloodhound.Types: Week :: Interval
- Database.Bloodhound.Types: Weeks :: TimeInterval
- Database.Bloodhound.Types: Weight :: Float -> Weight
- Database.Bloodhound.Types: WildcardQuery :: FieldName -> Key -> Maybe Boost -> WildcardQuery
- Database.Bloodhound.Types: Yards :: DistanceUnit
- Database.Bloodhound.Types: Year :: Interval
- Database.Bloodhound.Types: ZeroTermsAll :: ZeroTermsQuery
- Database.Bloodhound.Types: ZeroTermsNone :: ZeroTermsQuery
- Database.Bloodhound.Types: [_id] :: EsResult a -> Text
- Database.Bloodhound.Types: [_index] :: EsResult a -> Text
- Database.Bloodhound.Types: [_source] :: EsResultFound a -> a
- Database.Bloodhound.Types: [_type] :: EsResult a -> Text
- Database.Bloodhound.Types: [_version] :: EsResultFound a -> DocVersion
- Database.Bloodhound.Types: [aggBody] :: Search -> Maybe Aggregations
- Database.Bloodhound.Types: [aggregations] :: SearchResult a -> Maybe AggregationResults
- Database.Bloodhound.Types: [aliasCreateFilter] :: IndexAliasCreate -> Maybe Filter
- Database.Bloodhound.Types: [aliasCreateRouting] :: IndexAliasCreate -> Maybe AliasRouting
- Database.Bloodhound.Types: [analysisAnalyzer] :: Analysis -> Map Text AnalyzerDefinition
- Database.Bloodhound.Types: [analysisCharFilter] :: Analysis -> Map Text CharFilterDefinition
- Database.Bloodhound.Types: [analysisTokenFilter] :: Analysis -> Map Text TokenFilterDefinition
- Database.Bloodhound.Types: [analysisTokenizer] :: Analysis -> Map Text TokenizerDefinition
- Database.Bloodhound.Types: [analyzerDefinitionCharFilter] :: AnalyzerDefinition -> [CharFilter]
- Database.Bloodhound.Types: [analyzerDefinitionFilter] :: AnalyzerDefinition -> [TokenFilter]
- Database.Bloodhound.Types: [analyzerDefinitionTokenizer] :: AnalyzerDefinition -> Maybe Tokenizer
- Database.Bloodhound.Types: [bbConstraintcache] :: GeoBoundingBoxConstraint -> Cache
- Database.Bloodhound.Types: [bhRequestBody] :: BHRequest responseBody -> Maybe ByteString
- Database.Bloodhound.Types: [bhRequestEndpoint] :: BHRequest responseBody -> Endpoint
- Database.Bloodhound.Types: [bhRequestMethod] :: BHRequest responseBody -> Method
- Database.Bloodhound.Types: [boolQueryBoost] :: BoolQuery -> Maybe Boost
- Database.Bloodhound.Types: [boolQueryDisableCoord] :: BoolQuery -> Maybe DisableCoord
- Database.Bloodhound.Types: [boolQueryFilter] :: BoolQuery -> [Filter]
- Database.Bloodhound.Types: [boolQueryMinimumShouldMatch] :: BoolQuery -> Maybe MinimumMatch
- Database.Bloodhound.Types: [boolQueryMustMatch] :: BoolQuery -> [Query]
- Database.Bloodhound.Types: [boolQueryMustNotMatch] :: BoolQuery -> [Query]
- Database.Bloodhound.Types: [boolQueryShouldMatch] :: BoolQuery -> [Query]
- Database.Bloodhound.Types: [bottomRight] :: GeoBoundingBox -> LatLon
- Database.Bloodhound.Types: [boundAddress] :: BoundTransportAddress -> [EsAddress]
- Database.Bloodhound.Types: [boundaryChars] :: FastVectorHighlight -> Maybe Text
- Database.Bloodhound.Types: [boundaryMaxScan] :: FastVectorHighlight -> Maybe Int
- Database.Bloodhound.Types: [buckets] :: Bucket a -> [a]
- Database.Bloodhound.Types: [buildHash] :: BuildHash -> Text
- Database.Bloodhound.Types: [build_date] :: Version -> UTCTime
- Database.Bloodhound.Types: [build_hash] :: Version -> BuildHash
- Database.Bloodhound.Types: [build_snapshot] :: Version -> Bool
- Database.Bloodhound.Types: [cPitId] :: ClosePointInTime -> Text
- Database.Bloodhound.Types: [cardinalityField] :: CardinalityAggregation -> FieldName
- Database.Bloodhound.Types: [charFilterDefinitionPatternReplaceFlags] :: CharFilterDefinition -> Maybe Text
- Database.Bloodhound.Types: [charFilterDefinitionPatternReplacePattern] :: CharFilterDefinition -> Text
- Database.Bloodhound.Types: [charFilterDefinitionPatternReplaceReplacement] :: CharFilterDefinition -> Text
- Database.Bloodhound.Types: [clusterName] :: ClusterName -> Text
- Database.Bloodhound.Types: [cluster_name] :: Status -> Text
- Database.Bloodhound.Types: [cluster_uuid] :: Status -> Text
- Database.Bloodhound.Types: [coefficient] :: Distance -> Double
- Database.Bloodhound.Types: [commonAnalyzer] :: CommonTermsQuery -> Maybe Analyzer
- Database.Bloodhound.Types: [commonBoost] :: CommonTermsQuery -> Maybe Boost
- Database.Bloodhound.Types: [commonCutoffFrequency] :: CommonTermsQuery -> CutoffFrequency
- Database.Bloodhound.Types: [commonDisableCoord] :: CommonTermsQuery -> Maybe DisableCoord
- Database.Bloodhound.Types: [commonField] :: CommonTermsQuery -> FieldName
- Database.Bloodhound.Types: [commonHighFreqOperator] :: CommonTermsQuery -> BooleanOperator
- Database.Bloodhound.Types: [commonLowFreqOperator] :: CommonTermsQuery -> BooleanOperator
- Database.Bloodhound.Types: [commonMinimumShouldMatch] :: CommonTermsQuery -> Maybe CommonMinimumMatch
- Database.Bloodhound.Types: [commonQuery] :: CommonTermsQuery -> QueryString
- Database.Bloodhound.Types: [componentScoreFunctionFilter] :: ComponentFunctionScoreFunction -> Maybe Filter
- Database.Bloodhound.Types: [componentScoreFunctionWeight] :: ComponentFunctionScoreFunction -> Maybe Weight
- Database.Bloodhound.Types: [componentScoreFunction] :: ComponentFunctionScoreFunction -> FunctionScoreFunction
- Database.Bloodhound.Types: [constraintBox] :: GeoBoundingBoxConstraint -> GeoBoundingBox
- Database.Bloodhound.Types: [countQuery] :: CountQuery -> Query
- Database.Bloodhound.Types: [cpuCacheSize] :: CPUInfo -> Bytes
- Database.Bloodhound.Types: [cpuCoresPerSocket] :: CPUInfo -> Int
- Database.Bloodhound.Types: [cpuMHZ] :: CPUInfo -> Int
- Database.Bloodhound.Types: [cpuModel] :: CPUInfo -> Text
- Database.Bloodhound.Types: [cpuTotalCores] :: CPUInfo -> Int
- Database.Bloodhound.Types: [cpuTotalSockets] :: CPUInfo -> Int
- Database.Bloodhound.Types: [cpuVendor] :: CPUInfo -> Text
- Database.Bloodhound.Types: [crCount] :: CountResponse -> Natural
- Database.Bloodhound.Types: [crShards] :: CountResponse -> CountShards
- Database.Bloodhound.Types: [csFailed] :: CountShards -> Int
- Database.Bloodhound.Types: [csSkipped] :: CountShards -> Int
- Database.Bloodhound.Types: [csSuccessful] :: CountShards -> Int
- Database.Bloodhound.Types: [csTotal] :: CountShards -> Int
- Database.Bloodhound.Types: [dateAggs] :: DateHistogramAggregation -> Maybe Aggregations
- Database.Bloodhound.Types: [dateDocCount] :: DateHistogramResult -> Int
- Database.Bloodhound.Types: [dateField] :: DateHistogramAggregation -> FieldName
- Database.Bloodhound.Types: [dateFormat] :: DateHistogramAggregation -> Maybe Text
- Database.Bloodhound.Types: [dateHistogramAggs] :: DateHistogramResult -> Maybe AggregationResults
- Database.Bloodhound.Types: [dateInterval] :: DateHistogramAggregation -> Interval
- Database.Bloodhound.Types: [dateKeyStr] :: DateHistogramResult -> Maybe Text
- Database.Bloodhound.Types: [dateKey] :: DateHistogramResult -> Int
- Database.Bloodhound.Types: [datePostOffset] :: DateHistogramAggregation -> Maybe Text
- Database.Bloodhound.Types: [datePostZone] :: DateHistogramAggregation -> Maybe Text
- Database.Bloodhound.Types: [datePreOffset] :: DateHistogramAggregation -> Maybe Text
- Database.Bloodhound.Types: [datePreZone] :: DateHistogramAggregation -> Maybe Text
- Database.Bloodhound.Types: [dateRangeAggs] :: DateRangeResult -> Maybe AggregationResults
- Database.Bloodhound.Types: [dateRangeDocCount] :: DateRangeResult -> Int
- Database.Bloodhound.Types: [dateRangeFromAsString] :: DateRangeResult -> Maybe Text
- Database.Bloodhound.Types: [dateRangeFrom] :: DateRangeResult -> Maybe UTCTime
- Database.Bloodhound.Types: [dateRangeKey] :: DateRangeResult -> Text
- Database.Bloodhound.Types: [dateRangeToAsString] :: DateRangeResult -> Maybe Text
- Database.Bloodhound.Types: [dateRangeTo] :: DateRangeResult -> Maybe UTCTime
- Database.Bloodhound.Types: [directGeneratorMaxEdits] :: DirectGenerators -> Maybe Double
- Database.Bloodhound.Types: [directGeneratorMaxInspections] :: DirectGenerators -> Maybe Int
- Database.Bloodhound.Types: [directGeneratorMaxTermFreq] :: DirectGenerators -> Maybe Double
- Database.Bloodhound.Types: [directGeneratorMinDocFreq] :: DirectGenerators -> Maybe Double
- Database.Bloodhound.Types: [directGeneratorMinWordLength] :: DirectGenerators -> Maybe Int
- Database.Bloodhound.Types: [directGeneratorPostFilter] :: DirectGenerators -> Maybe Text
- Database.Bloodhound.Types: [directGeneratorPreFilter] :: DirectGenerators -> Maybe Text
- Database.Bloodhound.Types: [directGeneratorPrefixLength] :: DirectGenerators -> Maybe Int
- Database.Bloodhound.Types: [directGeneratorSuggestMode] :: DirectGenerators -> DirectGeneratorSuggestModeTypes
- Database.Bloodhound.Types: [directGeneratorsField] :: DirectGenerators -> FieldName
- Database.Bloodhound.Types: [directGeneratorsSize] :: DirectGenerators -> Maybe Int
- Database.Bloodhound.Types: [disMaxBoost] :: DisMaxQuery -> Maybe Boost
- Database.Bloodhound.Types: [disMaxQueries] :: DisMaxQuery -> [Query]
- Database.Bloodhound.Types: [disMaxTiebreaker] :: DisMaxQuery -> Tiebreaker
- Database.Bloodhound.Types: [distanceFrom] :: DistanceRange -> Distance
- Database.Bloodhound.Types: [distanceTo] :: DistanceRange -> Distance
- Database.Bloodhound.Types: [draField] :: DateRangeAggregation -> FieldName
- Database.Bloodhound.Types: [draFormat] :: DateRangeAggregation -> Maybe Text
- Database.Bloodhound.Types: [draRanges] :: DateRangeAggregation -> NonEmpty DateRangeAggRange
- Database.Bloodhound.Types: [encoder] :: CommonHighlight -> Maybe HighlightEncoder
- Database.Bloodhound.Types: [errorMessage] :: EsError -> Text
- Database.Bloodhound.Types: [errorStatus] :: EsError -> Maybe Int
- Database.Bloodhound.Types: [esAddress] :: EsAddress -> Text
- Database.Bloodhound.Types: [esPassword] :: EsPassword -> Text
- Database.Bloodhound.Types: [esProtoExMessage] :: EsProtocolException -> !Text
- Database.Bloodhound.Types: [esProtoExResponse] :: EsProtocolException -> !ByteString
- Database.Bloodhound.Types: [esUsername] :: EsUsername -> Text
- Database.Bloodhound.Types: [explainSearchTemplate] :: SearchTemplate -> Maybe Bool
- Database.Bloodhound.Types: [faAggs] :: FilterAggregation -> Maybe Aggregations
- Database.Bloodhound.Types: [faFilter] :: FilterAggregation -> Filter
- Database.Bloodhound.Types: [fieldDefinition] :: MappingField -> FieldDefinition
- Database.Bloodhound.Types: [fieldType] :: FieldDefinition -> FieldType
- Database.Bloodhound.Types: [fieldValueFactorField] :: FieldValueFactor -> FieldName
- Database.Bloodhound.Types: [fieldValueFactorMissing] :: FieldValueFactor -> Maybe FactorMissingFieldValue
- Database.Bloodhound.Types: [fieldValueFactorModifier] :: FieldValueFactor -> Maybe FactorModifier
- Database.Bloodhound.Types: [fieldValueFactor] :: FieldValueFactor -> Maybe Factor
- Database.Bloodhound.Types: [fields] :: Search -> Maybe [FieldName]
- Database.Bloodhound.Types: [filterBody] :: Search -> Maybe Filter
- Database.Bloodhound.Types: [flushAfterOptimize] :: ForceMergeIndexSettings -> Bool
- Database.Bloodhound.Types: [forceSource] :: CommonHighlight -> Maybe Bool
- Database.Bloodhound.Types: [foundResult] :: EsResult a -> Maybe (EsResultFound a)
- Database.Bloodhound.Types: [fragmentOffset] :: FastVectorHighlight -> Maybe Int
- Database.Bloodhound.Types: [fragmentSize] :: NonPostings -> Maybe Int
- Database.Bloodhound.Types: [from] :: Search -> From
- Database.Bloodhound.Types: [fsrChunkSize] :: FsSnapshotRepo -> Maybe Bytes
- Database.Bloodhound.Types: [fsrCompressMetadata] :: FsSnapshotRepo -> Bool
- Database.Bloodhound.Types: [fsrLocation] :: FsSnapshotRepo -> FilePath
- Database.Bloodhound.Types: [fsrMaxRestoreBytesPerSec] :: FsSnapshotRepo -> Maybe Bytes
- Database.Bloodhound.Types: [fsrMaxSnapshotBytesPerSec] :: FsSnapshotRepo -> Maybe Bytes
- Database.Bloodhound.Types: [fsrName] :: FsSnapshotRepo -> SnapshotRepoName
- Database.Bloodhound.Types: [fullNodeId] :: FullNodeId -> Text
- Database.Bloodhound.Types: [functionScoreBoostMode] :: FunctionScoreQuery -> Maybe BoostMode
- Database.Bloodhound.Types: [functionScoreBoost] :: FunctionScoreQuery -> Maybe Boost
- Database.Bloodhound.Types: [functionScoreFunctions] :: FunctionScoreQuery -> FunctionScoreFunctions
- Database.Bloodhound.Types: [functionScoreMaxBoost] :: FunctionScoreQuery -> Maybe Boost
- Database.Bloodhound.Types: [functionScoreMinScore] :: FunctionScoreQuery -> Score
- Database.Bloodhound.Types: [functionScoreQuery] :: FunctionScoreQuery -> Maybe Query
- Database.Bloodhound.Types: [functionScoreScoreMode] :: FunctionScoreQuery -> Maybe ScoreMode
- Database.Bloodhound.Types: [fuzzyLikeAnalyzer] :: FuzzyLikeThisQuery -> Maybe Analyzer
- Database.Bloodhound.Types: [fuzzyLikeBoost] :: FuzzyLikeThisQuery -> Boost
- Database.Bloodhound.Types: [fuzzyLikeFieldAnalyzer] :: FuzzyLikeFieldQuery -> Maybe Analyzer
- Database.Bloodhound.Types: [fuzzyLikeFieldBoost] :: FuzzyLikeFieldQuery -> Boost
- Database.Bloodhound.Types: [fuzzyLikeFieldFuzziness] :: FuzzyLikeFieldQuery -> Fuzziness
- Database.Bloodhound.Types: [fuzzyLikeFieldIgnoreTermFrequency] :: FuzzyLikeFieldQuery -> IgnoreTermFrequency
- Database.Bloodhound.Types: [fuzzyLikeFieldMaxQueryTerms] :: FuzzyLikeFieldQuery -> MaxQueryTerms
- Database.Bloodhound.Types: [fuzzyLikeFieldPrefixLength] :: FuzzyLikeFieldQuery -> PrefixLength
- Database.Bloodhound.Types: [fuzzyLikeFieldText] :: FuzzyLikeFieldQuery -> Text
- Database.Bloodhound.Types: [fuzzyLikeField] :: FuzzyLikeFieldQuery -> FieldName
- Database.Bloodhound.Types: [fuzzyLikeFields] :: FuzzyLikeThisQuery -> [FieldName]
- Database.Bloodhound.Types: [fuzzyLikeFuzziness] :: FuzzyLikeThisQuery -> Fuzziness
- Database.Bloodhound.Types: [fuzzyLikeIgnoreTermFrequency] :: FuzzyLikeThisQuery -> IgnoreTermFrequency
- Database.Bloodhound.Types: [fuzzyLikeMaxQueryTerms] :: FuzzyLikeThisQuery -> MaxQueryTerms
- Database.Bloodhound.Types: [fuzzyLikePrefixLength] :: FuzzyLikeThisQuery -> PrefixLength
- Database.Bloodhound.Types: [fuzzyLikeText] :: FuzzyLikeThisQuery -> Text
- Database.Bloodhound.Types: [fuzzyQueryBoost] :: FuzzyQuery -> Maybe Boost
- Database.Bloodhound.Types: [fuzzyQueryField] :: FuzzyQuery -> FieldName
- Database.Bloodhound.Types: [fuzzyQueryFuzziness] :: FuzzyQuery -> Fuzziness
- Database.Bloodhound.Types: [fuzzyQueryMaxExpansions] :: FuzzyQuery -> MaxExpansions
- Database.Bloodhound.Types: [fuzzyQueryPrefixLength] :: FuzzyQuery -> PrefixLength
- Database.Bloodhound.Types: [fuzzyQueryValue] :: FuzzyQuery -> Text
- Database.Bloodhound.Types: [fvCommon] :: FastVectorHighlight -> Maybe CommonHighlight
- Database.Bloodhound.Types: [fvNonPostSettings] :: FastVectorHighlight -> Maybe NonPostings
- Database.Bloodhound.Types: [gSnapshotRepoName] :: GenericSnapshotRepo -> SnapshotRepoName
- Database.Bloodhound.Types: [gSnapshotRepoSettingsObject] :: GenericSnapshotRepoSettings -> Object
- Database.Bloodhound.Types: [gSnapshotRepoSettings] :: GenericSnapshotRepo -> GenericSnapshotRepoSettings
- Database.Bloodhound.Types: [gSnapshotRepoType] :: GenericSnapshotRepo -> SnapshotRepoType
- Database.Bloodhound.Types: [geoBBField] :: GeoBoundingBoxConstraint -> FieldName
- Database.Bloodhound.Types: [geoField] :: GeoPoint -> FieldName
- Database.Bloodhound.Types: [geoType] :: GeoBoundingBoxConstraint -> GeoFilterType
- Database.Bloodhound.Types: [getRawEndpointQueries] :: Endpoint -> [(Text, Maybe Text)]
- Database.Bloodhound.Types: [getRawEndpoint] :: Endpoint -> [Text]
- Database.Bloodhound.Types: [getResponse] :: BHResponse body -> Response ByteString
- Database.Bloodhound.Types: [getTemplateScriptFound] :: GetTemplateScript -> Bool
- Database.Bloodhound.Types: [getTemplateScriptId] :: GetTemplateScript -> Text
- Database.Bloodhound.Types: [getTemplateScriptLang] :: GetTemplateScript -> Maybe Text
- Database.Bloodhound.Types: [getTemplateScriptOptions] :: GetTemplateScript -> Maybe (HashMap Text Text)
- Database.Bloodhound.Types: [getTemplateScriptSource] :: GetTemplateScript -> Maybe SearchTemplateSource
- Database.Bloodhound.Types: [globalsettings] :: Highlights -> Maybe HighlightSettings
- Database.Bloodhound.Types: [hasChildIgnoreUnmappped] :: HasChildQuery -> Maybe IgnoreUnmapped
- Database.Bloodhound.Types: [hasChildMaxChildren] :: HasChildQuery -> Maybe MaxChildren
- Database.Bloodhound.Types: [hasChildMinChildren] :: HasChildQuery -> Maybe MinChildren
- Database.Bloodhound.Types: [hasChildQueryScoreType] :: HasChildQuery -> Maybe ScoreType
- Database.Bloodhound.Types: [hasChildQueryType] :: HasChildQuery -> RelationName
- Database.Bloodhound.Types: [hasChildQuery] :: HasChildQuery -> Query
- Database.Bloodhound.Types: [hasParentIgnoreUnmapped] :: HasParentQuery -> Maybe IgnoreUnmapped
- Database.Bloodhound.Types: [hasParentQueryScore] :: HasParentQuery -> Maybe AggregateParentScore
- Database.Bloodhound.Types: [hasParentQueryType] :: HasParentQuery -> RelationName
- Database.Bloodhound.Types: [hasParentQuery] :: HasParentQuery -> Query
- Database.Bloodhound.Types: [highFreq] :: MinimumMatchHighLow -> MinimumMatch
- Database.Bloodhound.Types: [highlightFields] :: Highlights -> [FieldHighlight]
- Database.Bloodhound.Types: [highlightQuery] :: CommonHighlight -> Maybe Query
- Database.Bloodhound.Types: [highlight] :: Search -> Maybe Highlights
- Database.Bloodhound.Types: [hitDocId] :: Hit a -> DocId
- Database.Bloodhound.Types: [hitFields] :: Hit a -> Maybe HitFields
- Database.Bloodhound.Types: [hitHighlight] :: Hit a -> Maybe HitHighlight
- Database.Bloodhound.Types: [hitIndex] :: Hit a -> IndexName
- Database.Bloodhound.Types: [hitInnerHits] :: Hit a -> Maybe (KeyMap (TopHitResult Value))
- Database.Bloodhound.Types: [hitScore] :: Hit a -> Score
- Database.Bloodhound.Types: [hitSort] :: Hit a -> Maybe SearchAfterKey
- Database.Bloodhound.Types: [hitSource] :: Hit a -> Maybe a
- Database.Bloodhound.Types: [hitsTotal] :: SearchHits a -> HitsTotal
- Database.Bloodhound.Types: [hits] :: SearchHits a -> [Hit a]
- Database.Bloodhound.Types: [idsJoinRelation] :: IndexDocumentSettings -> Maybe JoinRelation
- Database.Bloodhound.Types: [idsVersionControl] :: IndexDocumentSettings -> VersionControl
- Database.Bloodhound.Types: [ignoreUnmapped] :: DefaultSort -> Maybe Text
- Database.Bloodhound.Types: [indexAliasName] :: IndexAliasName -> IndexName
- Database.Bloodhound.Types: [indexAliasSummaryAlias] :: IndexAliasSummary -> IndexAlias
- Database.Bloodhound.Types: [indexAliasSummaryCreate] :: IndexAliasSummary -> IndexAliasCreate
- Database.Bloodhound.Types: [indexAlias] :: IndexAlias -> IndexAliasName
- Database.Bloodhound.Types: [indexAliasesSummary] :: IndexAliasesSummary -> [IndexAliasSummary]
- Database.Bloodhound.Types: [indexMappingsLimitDepth] :: IndexMappingsLimits -> Maybe Int
- Database.Bloodhound.Types: [indexMappingsLimitFieldNameLength] :: IndexMappingsLimits -> Maybe Int
- Database.Bloodhound.Types: [indexMappingsLimitNestedFields] :: IndexMappingsLimits -> Maybe Int
- Database.Bloodhound.Types: [indexMappingsLimitNestedObjects] :: IndexMappingsLimits -> Maybe Int
- Database.Bloodhound.Types: [indexMappingsLimits] :: IndexSettings -> IndexMappingsLimits
- Database.Bloodhound.Types: [indexReplicas] :: IndexSettings -> ReplicaCount
- Database.Bloodhound.Types: [indexShards] :: IndexSettings -> ShardCount
- Database.Bloodhound.Types: [indicesQueryIndices] :: IndicesQuery -> [IndexName]
- Database.Bloodhound.Types: [indicesQueryNoMatch] :: IndicesQuery -> Maybe Query
- Database.Bloodhound.Types: [indicesQuery] :: IndicesQuery -> Query
- Database.Bloodhound.Types: [innerHitsFrom] :: InnerHits -> Maybe Integer
- Database.Bloodhound.Types: [innerHitsSize] :: InnerHits -> Maybe Integer
- Database.Bloodhound.Types: [jvmBufferPoolStatsCount] :: JVMBufferPoolStats -> Int
- Database.Bloodhound.Types: [jvmBufferPoolStatsTotalCapacity] :: JVMBufferPoolStats -> Bytes
- Database.Bloodhound.Types: [jvmBufferPoolStatsUsed] :: JVMBufferPoolStats -> Bytes
- Database.Bloodhound.Types: [jvmGCCollector] :: JVMGCCollector -> Text
- Database.Bloodhound.Types: [jvmGCStatsCollectionCount] :: JVMGCStats -> Int
- Database.Bloodhound.Types: [jvmGCStatsCollectionTime] :: JVMGCStats -> NominalDiffTime
- Database.Bloodhound.Types: [jvmMemoryInfoDirectMax] :: JVMMemoryInfo -> Bytes
- Database.Bloodhound.Types: [jvmMemoryInfoHeapInit] :: JVMMemoryInfo -> Bytes
- Database.Bloodhound.Types: [jvmMemoryInfoHeapMax] :: JVMMemoryInfo -> Bytes
- Database.Bloodhound.Types: [jvmMemoryInfoNonHeapInit] :: JVMMemoryInfo -> Bytes
- Database.Bloodhound.Types: [jvmMemoryInfoNonHeapMax] :: JVMMemoryInfo -> Bytes
- Database.Bloodhound.Types: [jvmMemoryPool] :: JVMMemoryPool -> Text
- Database.Bloodhound.Types: [jvmPoolStatsMax] :: JVMPoolStats -> Bytes
- Database.Bloodhound.Types: [jvmPoolStatsPeakMax] :: JVMPoolStats -> Bytes
- Database.Bloodhound.Types: [jvmPoolStatsPeakUsed] :: JVMPoolStats -> Bytes
- Database.Bloodhound.Types: [jvmPoolStatsUsed] :: JVMPoolStats -> Bytes
- Database.Bloodhound.Types: [keepAlive] :: PointInTime -> Text
- Database.Bloodhound.Types: [latLon] :: GeoPoint -> LatLon
- Database.Bloodhound.Types: [lat] :: LatLon -> Double
- Database.Bloodhound.Types: [loadAvg15Min] :: LoadAvgs -> Double
- Database.Bloodhound.Types: [loadAvg1Min] :: LoadAvgs -> Double
- Database.Bloodhound.Types: [loadAvg5Min] :: LoadAvgs -> Double
- Database.Bloodhound.Types: [lon] :: LatLon -> Double
- Database.Bloodhound.Types: [lowFreq] :: MinimumMatchHighLow -> MinimumMatch
- Database.Bloodhound.Types: [lucene_version] :: Version -> VersionNumber
- Database.Bloodhound.Types: [maField] :: MissingAggregation -> Text
- Database.Bloodhound.Types: [macAddress] :: MacAddress -> Text
- Database.Bloodhound.Types: [mappingFieldName] :: MappingField -> FieldName
- Database.Bloodhound.Types: [mappingFields] :: Mapping -> [MappingField]
- Database.Bloodhound.Types: [matchQueryAnalyzer] :: MatchQuery -> Maybe Analyzer
- Database.Bloodhound.Types: [matchQueryBoost] :: MatchQuery -> Maybe Boost
- Database.Bloodhound.Types: [matchQueryCutoffFrequency] :: MatchQuery -> Maybe CutoffFrequency
- Database.Bloodhound.Types: [matchQueryField] :: MatchQuery -> FieldName
- Database.Bloodhound.Types: [matchQueryFuzziness] :: MatchQuery -> Maybe Fuzziness
- Database.Bloodhound.Types: [matchQueryLenient] :: MatchQuery -> Maybe Lenient
- Database.Bloodhound.Types: [matchQueryMatchType] :: MatchQuery -> Maybe MatchQueryType
- Database.Bloodhound.Types: [matchQueryMaxExpansions] :: MatchQuery -> Maybe MaxExpansions
- Database.Bloodhound.Types: [matchQueryMinimumShouldMatch] :: MatchQuery -> Maybe Text
- Database.Bloodhound.Types: [matchQueryOperator] :: MatchQuery -> BooleanOperator
- Database.Bloodhound.Types: [matchQueryQueryString] :: MatchQuery -> QueryString
- Database.Bloodhound.Types: [matchQueryZeroTerms] :: MatchQuery -> ZeroTermsQuery
- Database.Bloodhound.Types: [matchedFields] :: FastVectorHighlight -> [Text]
- Database.Bloodhound.Types: [maxNumSegments] :: ForceMergeIndexSettings -> Maybe Int
- Database.Bloodhound.Types: [maxScore] :: SearchHits a -> Score
- Database.Bloodhound.Types: [missingDocCount] :: MissingResult -> Int
- Database.Bloodhound.Types: [missingSort] :: DefaultSort -> Maybe Missing
- Database.Bloodhound.Types: [moreLikeThisAnalyzer] :: MoreLikeThisQuery -> Maybe Analyzer
- Database.Bloodhound.Types: [moreLikeThisBoostTerms] :: MoreLikeThisQuery -> Maybe BoostTerms
- Database.Bloodhound.Types: [moreLikeThisBoost] :: MoreLikeThisQuery -> Maybe Boost
- Database.Bloodhound.Types: [moreLikeThisFieldAnalyzer] :: MoreLikeThisFieldQuery -> Maybe Analyzer
- Database.Bloodhound.Types: [moreLikeThisFieldBoostTerms] :: MoreLikeThisFieldQuery -> Maybe BoostTerms
- Database.Bloodhound.Types: [moreLikeThisFieldBoost] :: MoreLikeThisFieldQuery -> Maybe Boost
- Database.Bloodhound.Types: [moreLikeThisFieldFields] :: MoreLikeThisFieldQuery -> FieldName
- Database.Bloodhound.Types: [moreLikeThisFieldMaxDocFrequency] :: MoreLikeThisFieldQuery -> Maybe MaxDocFrequency
- Database.Bloodhound.Types: [moreLikeThisFieldMaxQueryTerms] :: MoreLikeThisFieldQuery -> Maybe MaxQueryTerms
- Database.Bloodhound.Types: [moreLikeThisFieldMaxWordLength] :: MoreLikeThisFieldQuery -> Maybe MaxWordLength
- Database.Bloodhound.Types: [moreLikeThisFieldMinDocFrequency] :: MoreLikeThisFieldQuery -> Maybe MinDocFrequency
- Database.Bloodhound.Types: [moreLikeThisFieldMinWordLength] :: MoreLikeThisFieldQuery -> Maybe MinWordLength
- Database.Bloodhound.Types: [moreLikeThisFieldMinimumTermFreq] :: MoreLikeThisFieldQuery -> Maybe MinimumTermFrequency
- Database.Bloodhound.Types: [moreLikeThisFieldPercentMatch] :: MoreLikeThisFieldQuery -> Maybe PercentMatch
- Database.Bloodhound.Types: [moreLikeThisFieldStopWords] :: MoreLikeThisFieldQuery -> Maybe (NonEmpty StopWord)
- Database.Bloodhound.Types: [moreLikeThisFieldText] :: MoreLikeThisFieldQuery -> Text
- Database.Bloodhound.Types: [moreLikeThisFields] :: MoreLikeThisQuery -> Maybe (NonEmpty FieldName)
- Database.Bloodhound.Types: [moreLikeThisMaxDocFrequency] :: MoreLikeThisQuery -> Maybe MaxDocFrequency
- Database.Bloodhound.Types: [moreLikeThisMaxQueryTerms] :: MoreLikeThisQuery -> Maybe MaxQueryTerms
- Database.Bloodhound.Types: [moreLikeThisMaxWordLength] :: MoreLikeThisQuery -> Maybe MaxWordLength
- Database.Bloodhound.Types: [moreLikeThisMinDocFrequency] :: MoreLikeThisQuery -> Maybe MinDocFrequency
- Database.Bloodhound.Types: [moreLikeThisMinWordLength] :: MoreLikeThisQuery -> Maybe MinWordLength
- Database.Bloodhound.Types: [moreLikeThisMinimumTermFreq] :: MoreLikeThisQuery -> Maybe MinimumTermFrequency
- Database.Bloodhound.Types: [moreLikeThisPercentMatch] :: MoreLikeThisQuery -> Maybe PercentMatch
- Database.Bloodhound.Types: [moreLikeThisStopWords] :: MoreLikeThisQuery -> Maybe (NonEmpty StopWord)
- Database.Bloodhound.Types: [moreLikeThisText] :: MoreLikeThisQuery -> Text
- Database.Bloodhound.Types: [multiMatchQueryAnalyzer] :: MultiMatchQuery -> Maybe Analyzer
- Database.Bloodhound.Types: [multiMatchQueryCutoffFrequency] :: MultiMatchQuery -> Maybe CutoffFrequency
- Database.Bloodhound.Types: [multiMatchQueryFields] :: MultiMatchQuery -> [FieldName]
- Database.Bloodhound.Types: [multiMatchQueryLenient] :: MultiMatchQuery -> Maybe Lenient
- Database.Bloodhound.Types: [multiMatchQueryMaxExpansions] :: MultiMatchQuery -> Maybe MaxExpansions
- Database.Bloodhound.Types: [multiMatchQueryOperator] :: MultiMatchQuery -> BooleanOperator
- Database.Bloodhound.Types: [multiMatchQueryString] :: MultiMatchQuery -> QueryString
- Database.Bloodhound.Types: [multiMatchQueryTiebreaker] :: MultiMatchQuery -> Maybe Tiebreaker
- Database.Bloodhound.Types: [multiMatchQueryType] :: MultiMatchQuery -> Maybe MultiMatchQueryType
- Database.Bloodhound.Types: [multiMatchQueryZeroTerms] :: MultiMatchQuery -> ZeroTermsQuery
- Database.Bloodhound.Types: [name] :: Status -> Text
- Database.Bloodhound.Types: [negativeBoost] :: BoostingQuery -> Boost
- Database.Bloodhound.Types: [negativeQuery] :: BoostingQuery -> Query
- Database.Bloodhound.Types: [nestedFilter] :: DefaultSort -> Maybe Filter
- Database.Bloodhound.Types: [nestedQueryInnerHits] :: NestedQuery -> Maybe InnerHits
- Database.Bloodhound.Types: [nestedQueryPath] :: NestedQuery -> QueryPath
- Database.Bloodhound.Types: [nestedQueryScoreType] :: NestedQuery -> ScoreType
- Database.Bloodhound.Types: [nestedQuery] :: NestedQuery -> Query
- Database.Bloodhound.Types: [networkInterfaceName] :: NetworkInterfaceName -> Text
- Database.Bloodhound.Types: [ngramFilterMaxGram] :: NgramFilter -> Int
- Database.Bloodhound.Types: [ngramFilterMinGram] :: NgramFilter -> Int
- Database.Bloodhound.Types: [ngramMaxGram] :: Ngram -> Int
- Database.Bloodhound.Types: [ngramMinGram] :: Ngram -> Int
- Database.Bloodhound.Types: [ngramTokenChars] :: Ngram -> [TokenChar]
- Database.Bloodhound.Types: [noMatchSize] :: CommonHighlight -> Maybe Int
- Database.Bloodhound.Types: [nodeAttrFilterName] :: NodeAttrFilter -> NodeAttrName
- Database.Bloodhound.Types: [nodeAttrFilterValues] :: NodeAttrFilter -> NonEmpty Text
- Database.Bloodhound.Types: [nodeBreakersEstSize] :: NodeBreakerStats -> Bytes
- Database.Bloodhound.Types: [nodeBreakersLimitSize] :: NodeBreakerStats -> Bytes
- Database.Bloodhound.Types: [nodeBreakersOverhead] :: NodeBreakerStats -> Double
- Database.Bloodhound.Types: [nodeBreakersTripped] :: NodeBreakerStats -> Int
- Database.Bloodhound.Types: [nodeDataPathAvailable] :: NodeDataPathStats -> Bytes
- Database.Bloodhound.Types: [nodeDataPathDevice] :: NodeDataPathStats -> Maybe Text
- Database.Bloodhound.Types: [nodeDataPathDiskQueue] :: NodeDataPathStats -> Maybe Double
- Database.Bloodhound.Types: [nodeDataPathDiskServiceTime] :: NodeDataPathStats -> Maybe Double
- Database.Bloodhound.Types: [nodeDataPathFree] :: NodeDataPathStats -> Bytes
- Database.Bloodhound.Types: [nodeDataPathIOOps] :: NodeDataPathStats -> Maybe Int
- Database.Bloodhound.Types: [nodeDataPathIOSize] :: NodeDataPathStats -> Maybe Bytes
- Database.Bloodhound.Types: [nodeDataPathMount] :: NodeDataPathStats -> Text
- Database.Bloodhound.Types: [nodeDataPathPath] :: NodeDataPathStats -> Text
- Database.Bloodhound.Types: [nodeDataPathReadSize] :: NodeDataPathStats -> Maybe Bytes
- Database.Bloodhound.Types: [nodeDataPathReads] :: NodeDataPathStats -> Maybe Int
- Database.Bloodhound.Types: [nodeDataPathTotal] :: NodeDataPathStats -> Bytes
- Database.Bloodhound.Types: [nodeDataPathType] :: NodeDataPathStats -> Maybe Text
- Database.Bloodhound.Types: [nodeDataPathWriteSize] :: NodeDataPathStats -> Maybe Bytes
- Database.Bloodhound.Types: [nodeDataPathWrites] :: NodeDataPathStats -> Maybe Int
- Database.Bloodhound.Types: [nodeFSDataPaths] :: NodeFSStats -> [NodeDataPathStats]
- Database.Bloodhound.Types: [nodeFSTimestamp] :: NodeFSStats -> UTCTime
- Database.Bloodhound.Types: [nodeFSTotalAvailable] :: NodeFSTotalStats -> Bytes
- Database.Bloodhound.Types: [nodeFSTotalDiskQueue] :: NodeFSTotalStats -> Maybe Double
- Database.Bloodhound.Types: [nodeFSTotalDiskServiceTime] :: NodeFSTotalStats -> Maybe Double
- Database.Bloodhound.Types: [nodeFSTotalFree] :: NodeFSTotalStats -> Bytes
- Database.Bloodhound.Types: [nodeFSTotalIOOps] :: NodeFSTotalStats -> Maybe Int
- Database.Bloodhound.Types: [nodeFSTotalIOSize] :: NodeFSTotalStats -> Maybe Bytes
- Database.Bloodhound.Types: [nodeFSTotalReadSize] :: NodeFSTotalStats -> Maybe Bytes
- Database.Bloodhound.Types: [nodeFSTotalReads] :: NodeFSTotalStats -> Maybe Int
- Database.Bloodhound.Types: [nodeFSTotalTotal] :: NodeFSTotalStats -> Bytes
- Database.Bloodhound.Types: [nodeFSTotalWriteSize] :: NodeFSTotalStats -> Maybe Bytes
- Database.Bloodhound.Types: [nodeFSTotalWrites] :: NodeFSTotalStats -> Maybe Int
- Database.Bloodhound.Types: [nodeFSTotal] :: NodeFSStats -> NodeFSTotalStats
- Database.Bloodhound.Types: [nodeHTTPCurrentOpen] :: NodeHTTPStats -> Int
- Database.Bloodhound.Types: [nodeHTTPMaxContentLength] :: NodeHTTPInfo -> Bytes
- Database.Bloodhound.Types: [nodeHTTPTotalOpened] :: NodeHTTPStats -> Int
- Database.Bloodhound.Types: [nodeHTTPbound_address] :: NodeHTTPInfo -> [EsAddress]
- Database.Bloodhound.Types: [nodeHTTPpublishAddress] :: NodeHTTPInfo -> EsAddress
- Database.Bloodhound.Types: [nodeIndicesStatsCompletionSize] :: NodeIndicesStats -> Bytes
- Database.Bloodhound.Types: [nodeIndicesStatsDocsCount] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsDocsDeleted] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsFieldDataEvictions] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsFieldDataMemory] :: NodeIndicesStats -> Bytes
- Database.Bloodhound.Types: [nodeIndicesStatsFlushTotalTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Types: [nodeIndicesStatsFlushTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsGetCurrent] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsGetExistsTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Types: [nodeIndicesStatsGetExistsTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsGetMissingTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Types: [nodeIndicesStatsGetMissingTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsGetTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Types: [nodeIndicesStatsGetTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsIndexingDeleteCurrent] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsIndexingDeleteTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Types: [nodeIndicesStatsIndexingDeleteTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsIndexingIndexCurrent] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsIndexingIndexTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Types: [nodeIndicesStatsIndexingIsThrottled] :: NodeIndicesStats -> Maybe Bool
- Database.Bloodhound.Types: [nodeIndicesStatsIndexingNoopUpdateTotal] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Types: [nodeIndicesStatsIndexingThrottleTime] :: NodeIndicesStats -> Maybe NominalDiffTime
- Database.Bloodhound.Types: [nodeIndicesStatsIndexingTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsMergesCurrentDocs] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsMergesCurrentSize] :: NodeIndicesStats -> Bytes
- Database.Bloodhound.Types: [nodeIndicesStatsMergesCurrent] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsMergesTotalDocs] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsMergesTotalSize] :: NodeIndicesStats -> Bytes
- Database.Bloodhound.Types: [nodeIndicesStatsMergesTotalTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Types: [nodeIndicesStatsMergesTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsPercolateCurrent] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Types: [nodeIndicesStatsPercolateMemory] :: NodeIndicesStats -> Maybe Bytes
- Database.Bloodhound.Types: [nodeIndicesStatsPercolateQueries] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Types: [nodeIndicesStatsPercolateTime] :: NodeIndicesStats -> Maybe NominalDiffTime
- Database.Bloodhound.Types: [nodeIndicesStatsPercolateTotal] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Types: [nodeIndicesStatsQueryCacheEvictions] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Types: [nodeIndicesStatsQueryCacheHits] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Types: [nodeIndicesStatsQueryCacheMisses] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Types: [nodeIndicesStatsQueryCacheSize] :: NodeIndicesStats -> Maybe Bytes
- Database.Bloodhound.Types: [nodeIndicesStatsRecoveryCurrentAsSource] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Types: [nodeIndicesStatsRecoveryCurrentAsTarget] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Types: [nodeIndicesStatsRecoveryThrottleTime] :: NodeIndicesStats -> Maybe NominalDiffTime
- Database.Bloodhound.Types: [nodeIndicesStatsRefreshTotalTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Types: [nodeIndicesStatsRefreshTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsSearchFetchCurrent] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsSearchFetchTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Types: [nodeIndicesStatsSearchFetchTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsSearchOpenContexts] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsSearchQueryCurrent] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsSearchQueryTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Types: [nodeIndicesStatsSearchQueryTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsSegCount] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsSegFixedBitSetMemory] :: NodeIndicesStats -> Maybe Bytes
- Database.Bloodhound.Types: [nodeIndicesStatsSegIndexWriterMaxMemory] :: NodeIndicesStats -> Maybe Bytes
- Database.Bloodhound.Types: [nodeIndicesStatsSegIndexWriterMemory] :: NodeIndicesStats -> Bytes
- Database.Bloodhound.Types: [nodeIndicesStatsSegMemory] :: NodeIndicesStats -> Bytes
- Database.Bloodhound.Types: [nodeIndicesStatsSegVersionMapMemory] :: NodeIndicesStats -> Bytes
- Database.Bloodhound.Types: [nodeIndicesStatsStoreSize] :: NodeIndicesStats -> Bytes
- Database.Bloodhound.Types: [nodeIndicesStatsStoreThrottleTime] :: NodeIndicesStats -> Maybe NominalDiffTime
- Database.Bloodhound.Types: [nodeIndicesStatsSuggestCurrent] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Types: [nodeIndicesStatsSuggestTime] :: NodeIndicesStats -> Maybe NominalDiffTime
- Database.Bloodhound.Types: [nodeIndicesStatsSuggestTotal] :: NodeIndicesStats -> Maybe Int
- Database.Bloodhound.Types: [nodeIndicesStatsTranslogOps] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsTranslogSize] :: NodeIndicesStats -> Bytes
- Database.Bloodhound.Types: [nodeIndicesStatsWarmerCurrent] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeIndicesStatsWarmerTotalTime] :: NodeIndicesStats -> NominalDiffTime
- Database.Bloodhound.Types: [nodeIndicesStatsWarmerTotal] :: NodeIndicesStats -> Int
- Database.Bloodhound.Types: [nodeInfoBuild] :: NodeInfo -> BuildHash
- Database.Bloodhound.Types: [nodeInfoESVersion] :: NodeInfo -> VersionNumber
- Database.Bloodhound.Types: [nodeInfoFullId] :: NodeInfo -> FullNodeId
- Database.Bloodhound.Types: [nodeInfoHTTPAddress] :: NodeInfo -> Maybe EsAddress
- Database.Bloodhound.Types: [nodeInfoHTTP] :: NodeInfo -> NodeHTTPInfo
- Database.Bloodhound.Types: [nodeInfoHost] :: NodeInfo -> Server
- Database.Bloodhound.Types: [nodeInfoIP] :: NodeInfo -> Server
- Database.Bloodhound.Types: [nodeInfoJVM] :: NodeInfo -> NodeJVMInfo
- Database.Bloodhound.Types: [nodeInfoName] :: NodeInfo -> NodeName
- Database.Bloodhound.Types: [nodeInfoNetwork] :: NodeInfo -> Maybe NodeNetworkInfo
- Database.Bloodhound.Types: [nodeInfoOS] :: NodeInfo -> NodeOSInfo
- Database.Bloodhound.Types: [nodeInfoPlugins] :: NodeInfo -> [NodePluginInfo]
- Database.Bloodhound.Types: [nodeInfoProcess] :: NodeInfo -> NodeProcessInfo
- Database.Bloodhound.Types: [nodeInfoSettings] :: NodeInfo -> Object
- Database.Bloodhound.Types: [nodeInfoThreadPool] :: NodeInfo -> Map Text NodeThreadPoolInfo
- Database.Bloodhound.Types: [nodeInfoTransportAddress] :: NodeInfo -> EsAddress
- Database.Bloodhound.Types: [nodeInfoTransport] :: NodeInfo -> NodeTransportInfo
- Database.Bloodhound.Types: [nodeJVMInfoMemoryInfo] :: NodeJVMInfo -> JVMMemoryInfo
- Database.Bloodhound.Types: [nodeJVMInfoMemoryPoolsGCCollectors] :: NodeJVMInfo -> [JVMGCCollector]
- Database.Bloodhound.Types: [nodeJVMInfoMemoryPools] :: NodeJVMInfo -> [JVMMemoryPool]
- Database.Bloodhound.Types: [nodeJVMInfoStartTime] :: NodeJVMInfo -> UTCTime
- Database.Bloodhound.Types: [nodeJVMInfoVMVendor] :: NodeJVMInfo -> Text
- Database.Bloodhound.Types: [nodeJVMPID] :: NodeJVMInfo -> PID
- Database.Bloodhound.Types: [nodeJVMStatsDirectBufferPool] :: NodeJVMStats -> JVMBufferPoolStats
- Database.Bloodhound.Types: [nodeJVMStatsGCOldCollector] :: NodeJVMStats -> JVMGCStats
- Database.Bloodhound.Types: [nodeJVMStatsGCYoungCollector] :: NodeJVMStats -> JVMGCStats
- Database.Bloodhound.Types: [nodeJVMStatsHeapCommitted] :: NodeJVMStats -> Bytes
- Database.Bloodhound.Types: [nodeJVMStatsHeapMax] :: NodeJVMStats -> Bytes
- Database.Bloodhound.Types: [nodeJVMStatsHeapUsedPercent] :: NodeJVMStats -> Int
- Database.Bloodhound.Types: [nodeJVMStatsHeapUsed] :: NodeJVMStats -> Bytes
- Database.Bloodhound.Types: [nodeJVMStatsMappedBufferPool] :: NodeJVMStats -> JVMBufferPoolStats
- Database.Bloodhound.Types: [nodeJVMStatsNonHeapCommitted] :: NodeJVMStats -> Bytes
- Database.Bloodhound.Types: [nodeJVMStatsNonHeapUsed] :: NodeJVMStats -> Bytes
- Database.Bloodhound.Types: [nodeJVMStatsOldPool] :: NodeJVMStats -> JVMPoolStats
- Database.Bloodhound.Types: [nodeJVMStatsPeakThreadsCount] :: NodeJVMStats -> Int
- Database.Bloodhound.Types: [nodeJVMStatsSurvivorPool] :: NodeJVMStats -> JVMPoolStats
- Database.Bloodhound.Types: [nodeJVMStatsThreadsCount] :: NodeJVMStats -> Int
- Database.Bloodhound.Types: [nodeJVMStatsTimestamp] :: NodeJVMStats -> UTCTime
- Database.Bloodhound.Types: [nodeJVMStatsUptime] :: NodeJVMStats -> NominalDiffTime
- Database.Bloodhound.Types: [nodeJVMStatsYoungPool] :: NodeJVMStats -> JVMPoolStats
- Database.Bloodhound.Types: [nodeJVMVMName] :: NodeJVMInfo -> Text
- Database.Bloodhound.Types: [nodeJVMVMVersion] :: NodeJVMInfo -> VMVersion
- Database.Bloodhound.Types: [nodeJVMVersion] :: NodeJVMInfo -> JVMVersion
- Database.Bloodhound.Types: [nodeName] :: NodeName -> Text
- Database.Bloodhound.Types: [nodeNetIfaceAddress] :: NodeNetworkInterface -> Server
- Database.Bloodhound.Types: [nodeNetIfaceMacAddress] :: NodeNetworkInterface -> MacAddress
- Database.Bloodhound.Types: [nodeNetIfaceName] :: NodeNetworkInterface -> NetworkInterfaceName
- Database.Bloodhound.Types: [nodeNetTCPActiveOpens] :: NodeNetworkStats -> Int
- Database.Bloodhound.Types: [nodeNetTCPAttemptFails] :: NodeNetworkStats -> Int
- Database.Bloodhound.Types: [nodeNetTCPCurrEstab] :: NodeNetworkStats -> Int
- Database.Bloodhound.Types: [nodeNetTCPEstabResets] :: NodeNetworkStats -> Int
- Database.Bloodhound.Types: [nodeNetTCPInErrs] :: NodeNetworkStats -> Int
- Database.Bloodhound.Types: [nodeNetTCPInSegs] :: NodeNetworkStats -> Int
- Database.Bloodhound.Types: [nodeNetTCPOutRSTs] :: NodeNetworkStats -> Int
- Database.Bloodhound.Types: [nodeNetTCPOutSegs] :: NodeNetworkStats -> Int
- Database.Bloodhound.Types: [nodeNetTCPPassiveOpens] :: NodeNetworkStats -> Int
- Database.Bloodhound.Types: [nodeNetTCPRetransSegs] :: NodeNetworkStats -> Int
- Database.Bloodhound.Types: [nodeNetworkPrimaryInterface] :: NodeNetworkInfo -> NodeNetworkInterface
- Database.Bloodhound.Types: [nodeNetworkRefreshInterval] :: NodeNetworkInfo -> NominalDiffTime
- Database.Bloodhound.Types: [nodeOSAllocatedProcessors] :: NodeOSInfo -> Int
- Database.Bloodhound.Types: [nodeOSArch] :: NodeOSInfo -> Text
- Database.Bloodhound.Types: [nodeOSAvailableProcessors] :: NodeOSInfo -> Int
- Database.Bloodhound.Types: [nodeOSCPUPercent] :: NodeOSStats -> Int
- Database.Bloodhound.Types: [nodeOSLoad] :: NodeOSStats -> Maybe LoadAvgs
- Database.Bloodhound.Types: [nodeOSMemFreePercent] :: NodeOSStats -> Int
- Database.Bloodhound.Types: [nodeOSMemFree] :: NodeOSStats -> Bytes
- Database.Bloodhound.Types: [nodeOSMemTotal] :: NodeOSStats -> Bytes
- Database.Bloodhound.Types: [nodeOSMemUsedPercent] :: NodeOSStats -> Int
- Database.Bloodhound.Types: [nodeOSMemUsed] :: NodeOSStats -> Bytes
- Database.Bloodhound.Types: [nodeOSName] :: NodeOSInfo -> Text
- Database.Bloodhound.Types: [nodeOSRefreshInterval] :: NodeOSInfo -> NominalDiffTime
- Database.Bloodhound.Types: [nodeOSSwapFree] :: NodeOSStats -> Bytes
- Database.Bloodhound.Types: [nodeOSSwapTotal] :: NodeOSStats -> Bytes
- Database.Bloodhound.Types: [nodeOSSwapUsed] :: NodeOSStats -> Bytes
- Database.Bloodhound.Types: [nodeOSTimestamp] :: NodeOSStats -> UTCTime
- Database.Bloodhound.Types: [nodeOSVersion] :: NodeOSInfo -> Text
- Database.Bloodhound.Types: [nodePluginDescription] :: NodePluginInfo -> Text
- Database.Bloodhound.Types: [nodePluginJVM] :: NodePluginInfo -> Maybe Bool
- Database.Bloodhound.Types: [nodePluginName] :: NodePluginInfo -> PluginName
- Database.Bloodhound.Types: [nodePluginSite] :: NodePluginInfo -> Maybe Bool
- Database.Bloodhound.Types: [nodePluginVersion] :: NodePluginInfo -> MaybeNA VersionNumber
- Database.Bloodhound.Types: [nodeProcessCPUPercent] :: NodeProcessStats -> Int
- Database.Bloodhound.Types: [nodeProcessCPUTotal] :: NodeProcessStats -> NominalDiffTime
- Database.Bloodhound.Types: [nodeProcessId] :: NodeProcessInfo -> PID
- Database.Bloodhound.Types: [nodeProcessMLockAll] :: NodeProcessInfo -> Bool
- Database.Bloodhound.Types: [nodeProcessMaxFDs] :: NodeProcessStats -> Int
- Database.Bloodhound.Types: [nodeProcessMaxFileDescriptors] :: NodeProcessInfo -> Maybe Int
- Database.Bloodhound.Types: [nodeProcessMemTotalVirtual] :: NodeProcessStats -> Bytes
- Database.Bloodhound.Types: [nodeProcessOpenFDs] :: NodeProcessStats -> Int
- Database.Bloodhound.Types: [nodeProcessRefreshInterval] :: NodeProcessInfo -> NominalDiffTime
- Database.Bloodhound.Types: [nodeProcessTimestamp] :: NodeProcessStats -> UTCTime
- Database.Bloodhound.Types: [nodeStatsBreakersStats] :: NodeStats -> Maybe NodeBreakersStats
- Database.Bloodhound.Types: [nodeStatsFS] :: NodeStats -> NodeFSStats
- Database.Bloodhound.Types: [nodeStatsFieldDataBreaker] :: NodeBreakersStats -> NodeBreakerStats
- Database.Bloodhound.Types: [nodeStatsFullId] :: NodeStats -> FullNodeId
- Database.Bloodhound.Types: [nodeStatsHTTP] :: NodeStats -> NodeHTTPStats
- Database.Bloodhound.Types: [nodeStatsIndices] :: NodeStats -> NodeIndicesStats
- Database.Bloodhound.Types: [nodeStatsJVM] :: NodeStats -> NodeJVMStats
- Database.Bloodhound.Types: [nodeStatsName] :: NodeStats -> NodeName
- Database.Bloodhound.Types: [nodeStatsNetwork] :: NodeStats -> Maybe NodeNetworkStats
- Database.Bloodhound.Types: [nodeStatsOS] :: NodeStats -> NodeOSStats
- Database.Bloodhound.Types: [nodeStatsParentBreaker] :: NodeBreakersStats -> NodeBreakerStats
- Database.Bloodhound.Types: [nodeStatsProcess] :: NodeStats -> NodeProcessStats
- Database.Bloodhound.Types: [nodeStatsRequestBreaker] :: NodeBreakersStats -> NodeBreakerStats
- Database.Bloodhound.Types: [nodeStatsThreadPool] :: NodeStats -> Map Text NodeThreadPoolStats
- Database.Bloodhound.Types: [nodeStatsTransport] :: NodeStats -> NodeTransportStats
- Database.Bloodhound.Types: [nodeThreadPoolActive] :: NodeThreadPoolStats -> Int
- Database.Bloodhound.Types: [nodeThreadPoolCompleted] :: NodeThreadPoolStats -> Int
- Database.Bloodhound.Types: [nodeThreadPoolKeepalive] :: NodeThreadPoolInfo -> Maybe NominalDiffTime
- Database.Bloodhound.Types: [nodeThreadPoolLargest] :: NodeThreadPoolStats -> Int
- Database.Bloodhound.Types: [nodeThreadPoolMax] :: NodeThreadPoolInfo -> Maybe Int
- Database.Bloodhound.Types: [nodeThreadPoolMin] :: NodeThreadPoolInfo -> Maybe Int
- Database.Bloodhound.Types: [nodeThreadPoolQueueSize] :: NodeThreadPoolInfo -> ThreadPoolSize
- Database.Bloodhound.Types: [nodeThreadPoolQueue] :: NodeThreadPoolStats -> Int
- Database.Bloodhound.Types: [nodeThreadPoolRejected] :: NodeThreadPoolStats -> Int
- Database.Bloodhound.Types: [nodeThreadPoolThreads] :: NodeThreadPoolStats -> Int
- Database.Bloodhound.Types: [nodeThreadPoolType] :: NodeThreadPoolInfo -> ThreadPoolType
- Database.Bloodhound.Types: [nodeTransportBoundAddress] :: NodeTransportInfo -> [EsAddress]
- Database.Bloodhound.Types: [nodeTransportCount] :: NodeTransportStats -> Int
- Database.Bloodhound.Types: [nodeTransportProfiles] :: NodeTransportInfo -> [BoundTransportAddress]
- Database.Bloodhound.Types: [nodeTransportPublishAddress] :: NodeTransportInfo -> EsAddress
- Database.Bloodhound.Types: [nodeTransportRXCount] :: NodeTransportStats -> Int
- Database.Bloodhound.Types: [nodeTransportRXSize] :: NodeTransportStats -> Bytes
- Database.Bloodhound.Types: [nodeTransportServerOpen] :: NodeTransportStats -> Int
- Database.Bloodhound.Types: [nodeTransportTXSize] :: NodeTransportStats -> Bytes
- Database.Bloodhound.Types: [nodesClusterName] :: NodesInfo -> ClusterName
- Database.Bloodhound.Types: [nodesInfo] :: NodesInfo -> [NodeInfo]
- Database.Bloodhound.Types: [nodesStatsClusterName] :: NodesStats -> ClusterName
- Database.Bloodhound.Types: [nodesStats] :: NodesStats -> [NodeStats]
- Database.Bloodhound.Types: [nsrName] :: NamedSuggestionResponse -> Text
- Database.Bloodhound.Types: [nsrResponses] :: NamedSuggestionResponse -> [SuggestResponse]
- Database.Bloodhound.Types: [numFreed] :: ClosePointInTimeResponse -> Int
- Database.Bloodhound.Types: [numberOfFragments] :: NonPostings -> Maybe Int
- Database.Bloodhound.Types: [number] :: Version -> VersionNumber
- Database.Bloodhound.Types: [oPitId] :: OpenPointInTimeResponse -> Text
- Database.Bloodhound.Types: [onlyExpungeDeletes] :: ForceMergeIndexSettings -> Bool
- Database.Bloodhound.Types: [order] :: CommonHighlight -> Maybe Text
- Database.Bloodhound.Types: [pPitId] :: PointInTime -> Text
- Database.Bloodhound.Types: [params] :: SearchTemplate -> TemplateQueryKeyValuePairs
- Database.Bloodhound.Types: [phraseLimit] :: FastVectorHighlight -> Maybe Int
- Database.Bloodhound.Types: [phraseSuggesterAnalyzer] :: PhraseSuggester -> Maybe Analyzer
- Database.Bloodhound.Types: [phraseSuggesterCandidateGenerators] :: PhraseSuggester -> [DirectGenerators]
- Database.Bloodhound.Types: [phraseSuggesterCollateParams] :: PhraseSuggesterCollate -> TemplateQueryKeyValuePairs
- Database.Bloodhound.Types: [phraseSuggesterCollatePrune] :: PhraseSuggesterCollate -> Bool
- Database.Bloodhound.Types: [phraseSuggesterCollateTemplateQuery] :: PhraseSuggesterCollate -> Query
- Database.Bloodhound.Types: [phraseSuggesterCollate] :: PhraseSuggester -> Maybe PhraseSuggesterCollate
- Database.Bloodhound.Types: [phraseSuggesterConfidence] :: PhraseSuggester -> Maybe Int
- Database.Bloodhound.Types: [phraseSuggesterField] :: PhraseSuggester -> FieldName
- Database.Bloodhound.Types: [phraseSuggesterGramSize] :: PhraseSuggester -> Maybe Int
- Database.Bloodhound.Types: [phraseSuggesterHighlight] :: PhraseSuggester -> Maybe PhraseSuggesterHighlighter
- Database.Bloodhound.Types: [phraseSuggesterHighlighterPostTag] :: PhraseSuggesterHighlighter -> Text
- Database.Bloodhound.Types: [phraseSuggesterHighlighterPreTag] :: PhraseSuggesterHighlighter -> Text
- Database.Bloodhound.Types: [phraseSuggesterMaxErrors] :: PhraseSuggester -> Maybe Int
- Database.Bloodhound.Types: [phraseSuggesterRealWordErrorLikelihood] :: PhraseSuggester -> Maybe Int
- Database.Bloodhound.Types: [phraseSuggesterSeparator] :: PhraseSuggester -> Maybe Text
- Database.Bloodhound.Types: [phraseSuggesterShardSize] :: PhraseSuggester -> Maybe Int
- Database.Bloodhound.Types: [phraseSuggesterSize] :: PhraseSuggester -> Maybe Size
- Database.Bloodhound.Types: [pid] :: PID -> Int
- Database.Bloodhound.Types: [pitId] :: SearchResult a -> Maybe Text
- Database.Bloodhound.Types: [plainCommon] :: PlainHighlight -> Maybe CommonHighlight
- Database.Bloodhound.Types: [plainNonPost] :: PlainHighlight -> Maybe NonPostings
- Database.Bloodhound.Types: [pluginName] :: PluginName -> Text
- Database.Bloodhound.Types: [pointInTime] :: Search -> Maybe PointInTime
- Database.Bloodhound.Types: [positiveQuery] :: BoostingQuery -> Query
- Database.Bloodhound.Types: [precisionThreshold] :: CardinalityAggregation -> Maybe Int
- Database.Bloodhound.Types: [prefixQueryBoost] :: PrefixQuery -> Maybe Boost
- Database.Bloodhound.Types: [prefixQueryField] :: PrefixQuery -> FieldName
- Database.Bloodhound.Types: [prefixQueryPrefixValue] :: PrefixQuery -> Text
- Database.Bloodhound.Types: [profileSearchTemplate] :: SearchTemplate -> Maybe Bool
- Database.Bloodhound.Types: [publishAddress] :: BoundTransportAddress -> EsAddress
- Database.Bloodhound.Types: [queryBody] :: Search -> Maybe Query
- Database.Bloodhound.Types: [queryStringAllowLeadingWildcard] :: QueryStringQuery -> Maybe AllowLeadingWildcard
- Database.Bloodhound.Types: [queryStringAnalyzeWildcard] :: QueryStringQuery -> Maybe AnalyzeWildcard
- Database.Bloodhound.Types: [queryStringAnalyzer] :: QueryStringQuery -> Maybe Analyzer
- Database.Bloodhound.Types: [queryStringBoost] :: QueryStringQuery -> Maybe Boost
- Database.Bloodhound.Types: [queryStringDefaultField] :: QueryStringQuery -> Maybe FieldName
- Database.Bloodhound.Types: [queryStringEnablePositionIncrements] :: QueryStringQuery -> Maybe EnablePositionIncrements
- Database.Bloodhound.Types: [queryStringFuzziness] :: QueryStringQuery -> Maybe Fuzziness
- Database.Bloodhound.Types: [queryStringFuzzyMaxExpansions] :: QueryStringQuery -> Maybe MaxExpansions
- Database.Bloodhound.Types: [queryStringFuzzyPrefixLength] :: QueryStringQuery -> Maybe PrefixLength
- Database.Bloodhound.Types: [queryStringGeneratePhraseQueries] :: QueryStringQuery -> Maybe GeneratePhraseQueries
- Database.Bloodhound.Types: [queryStringLenient] :: QueryStringQuery -> Maybe Lenient
- Database.Bloodhound.Types: [queryStringLocale] :: QueryStringQuery -> Maybe Locale
- Database.Bloodhound.Types: [queryStringLowercaseExpanded] :: QueryStringQuery -> Maybe LowercaseExpanded
- Database.Bloodhound.Types: [queryStringMinimumShouldMatch] :: QueryStringQuery -> Maybe MinimumMatch
- Database.Bloodhound.Types: [queryStringOperator] :: QueryStringQuery -> Maybe BooleanOperator
- Database.Bloodhound.Types: [queryStringPhraseSlop] :: QueryStringQuery -> Maybe PhraseSlop
- Database.Bloodhound.Types: [queryStringQuery] :: QueryStringQuery -> QueryString
- Database.Bloodhound.Types: [rangeQueryBoost] :: RangeQuery -> Boost
- Database.Bloodhound.Types: [rangeQueryField] :: RangeQuery -> FieldName
- Database.Bloodhound.Types: [rangeQueryRange] :: RangeQuery -> RangeValue
- Database.Bloodhound.Types: [regexpQueryBoost] :: RegexpQuery -> Maybe Boost
- Database.Bloodhound.Types: [regexpQueryField] :: RegexpQuery -> FieldName
- Database.Bloodhound.Types: [regexpQueryFlags] :: RegexpQuery -> RegexpFlags
- Database.Bloodhound.Types: [regexpQuery] :: RegexpQuery -> Regexp
- Database.Bloodhound.Types: [relation] :: HitsTotal -> HitsTotalRelation
- Database.Bloodhound.Types: [repoUpdateVerify] :: SnapshotRepoUpdateSettings -> Bool
- Database.Bloodhound.Types: [requireFieldMatch] :: CommonHighlight -> Maybe Bool
- Database.Bloodhound.Types: [restoreOverrideReplicas] :: RestoreIndexSettings -> Maybe ReplicaCount
- Database.Bloodhound.Types: [routingValue] :: RoutingValue -> Text
- Database.Bloodhound.Types: [rrPattern] :: RestoreRenamePattern -> Text
- Database.Bloodhound.Types: [sSummaryFixedSettings] :: IndexSettingsSummary -> IndexSettings
- Database.Bloodhound.Types: [sSummaryIndexName] :: IndexSettingsSummary -> IndexName
- Database.Bloodhound.Types: [sSummaryUpdateable] :: IndexSettingsSummary -> [UpdatableIndexSetting]
- Database.Bloodhound.Types: [scriptFields] :: Search -> Maybe ScriptFields
- Database.Bloodhound.Types: [scriptLanguage] :: Script -> Maybe ScriptLanguage
- Database.Bloodhound.Types: [scriptParams] :: Script -> Maybe ScriptParams
- Database.Bloodhound.Types: [scriptSource] :: Script -> ScriptSource
- Database.Bloodhound.Types: [scrollId] :: SearchResult a -> Maybe ScrollId
- Database.Bloodhound.Types: [searchAfterKey] :: Search -> Maybe SearchAfterKey
- Database.Bloodhound.Types: [searchHits] :: SearchResult a -> SearchHits a
- Database.Bloodhound.Types: [searchTemplate] :: SearchTemplate -> Either SearchTemplateId SearchTemplateSource
- Database.Bloodhound.Types: [searchType] :: Search -> SearchType
- Database.Bloodhound.Types: [shardId] :: ShardId -> Int
- Database.Bloodhound.Types: [shardTotal] :: ShardResult -> Int
- Database.Bloodhound.Types: [shardsFailed] :: ShardResult -> Int
- Database.Bloodhound.Types: [shardsSkipped] :: ShardResult -> Int
- Database.Bloodhound.Types: [shardsSuccessful] :: ShardResult -> Int
- Database.Bloodhound.Types: [shards] :: SearchResult a -> ShardResult
- Database.Bloodhound.Types: [shingleFillerToken] :: Shingle -> Text
- Database.Bloodhound.Types: [shingleMaxSize] :: Shingle -> Int
- Database.Bloodhound.Types: [shingleMinSize] :: Shingle -> Int
- Database.Bloodhound.Types: [shingleOutputUnigramsIfNoShingles] :: Shingle -> Bool
- Database.Bloodhound.Types: [shingleOutputUnigrams] :: Shingle -> Bool
- Database.Bloodhound.Types: [shingleTokenSeparator] :: Shingle -> Text
- Database.Bloodhound.Types: [simpleQueryStringAnalyzer] :: SimpleQueryStringQuery -> Maybe Analyzer
- Database.Bloodhound.Types: [simpleQueryStringField] :: SimpleQueryStringQuery -> Maybe FieldOrFields
- Database.Bloodhound.Types: [simpleQueryStringFlags] :: SimpleQueryStringQuery -> Maybe (NonEmpty SimpleQueryFlag)
- Database.Bloodhound.Types: [simpleQueryStringLocale] :: SimpleQueryStringQuery -> Maybe Locale
- Database.Bloodhound.Types: [simpleQueryStringLowercaseExpanded] :: SimpleQueryStringQuery -> Maybe LowercaseExpanded
- Database.Bloodhound.Types: [simpleQueryStringOperator] :: SimpleQueryStringQuery -> Maybe BooleanOperator
- Database.Bloodhound.Types: [simpleQueryStringQuery] :: SimpleQueryStringQuery -> QueryString
- Database.Bloodhound.Types: [size] :: Search -> Size
- Database.Bloodhound.Types: [snapIgnoreUnavailable] :: SnapshotCreateSettings -> Bool
- Database.Bloodhound.Types: [snapIncludeGlobalState] :: SnapshotCreateSettings -> Bool
- Database.Bloodhound.Types: [snapIndices] :: SnapshotCreateSettings -> Maybe IndexSelection
- Database.Bloodhound.Types: [snapInfoDuration] :: SnapshotInfo -> NominalDiffTime
- Database.Bloodhound.Types: [snapInfoEndTime] :: SnapshotInfo -> UTCTime
- Database.Bloodhound.Types: [snapInfoFailures] :: SnapshotInfo -> [SnapshotShardFailure]
- Database.Bloodhound.Types: [snapInfoIndices] :: SnapshotInfo -> [IndexName]
- Database.Bloodhound.Types: [snapInfoName] :: SnapshotInfo -> SnapshotName
- Database.Bloodhound.Types: [snapInfoShards] :: SnapshotInfo -> ShardResult
- Database.Bloodhound.Types: [snapInfoStartTime] :: SnapshotInfo -> UTCTime
- Database.Bloodhound.Types: [snapInfoState] :: SnapshotInfo -> SnapshotState
- Database.Bloodhound.Types: [snapPartial] :: SnapshotCreateSettings -> Bool
- Database.Bloodhound.Types: [snapRestoreIgnoreIndexSettings] :: SnapshotRestoreSettings -> Maybe (NonEmpty Text)
- Database.Bloodhound.Types: [snapRestoreIgnoreUnavailable] :: SnapshotRestoreSettings -> Bool
- Database.Bloodhound.Types: [snapRestoreIncludeAliases] :: SnapshotRestoreSettings -> Bool
- Database.Bloodhound.Types: [snapRestoreIncludeGlobalState] :: SnapshotRestoreSettings -> Bool
- Database.Bloodhound.Types: [snapRestoreIndexSettingsOverrides] :: SnapshotRestoreSettings -> Maybe RestoreIndexSettings
- Database.Bloodhound.Types: [snapRestoreIndices] :: SnapshotRestoreSettings -> Maybe IndexSelection
- Database.Bloodhound.Types: [snapRestorePartial] :: SnapshotRestoreSettings -> Bool
- Database.Bloodhound.Types: [snapRestoreRenamePattern] :: SnapshotRestoreSettings -> Maybe RestoreRenamePattern
- Database.Bloodhound.Types: [snapRestoreRenameReplacement] :: SnapshotRestoreSettings -> Maybe (NonEmpty RestoreRenameToken)
- Database.Bloodhound.Types: [snapRestoreWaitForCompletion] :: SnapshotRestoreSettings -> Bool
- Database.Bloodhound.Types: [snapShardFailureIndex] :: SnapshotShardFailure -> IndexName
- Database.Bloodhound.Types: [snapShardFailureNodeId] :: SnapshotShardFailure -> Maybe NodeName
- Database.Bloodhound.Types: [snapShardFailureReason] :: SnapshotShardFailure -> Text
- Database.Bloodhound.Types: [snapShardFailureShardId] :: SnapshotShardFailure -> ShardId
- Database.Bloodhound.Types: [snapWaitForCompletion] :: SnapshotCreateSettings -> Bool
- Database.Bloodhound.Types: [snapshotName] :: SnapshotName -> Text
- Database.Bloodhound.Types: [snapshotNodeVerifications] :: SnapshotVerification -> [SnapshotNodeVerification]
- Database.Bloodhound.Types: [snapshotRepoName] :: SnapshotRepoName -> Text
- Database.Bloodhound.Types: [snapshotRepoType] :: SnapshotRepoType -> Text
- Database.Bloodhound.Types: [snvFullId] :: SnapshotNodeVerification -> FullNodeId
- Database.Bloodhound.Types: [snvNodeName] :: SnapshotNodeVerification -> NodeName
- Database.Bloodhound.Types: [sortBody] :: Search -> Maybe Sort
- Database.Bloodhound.Types: [sortFieldName] :: DefaultSort -> FieldName
- Database.Bloodhound.Types: [sortMode] :: DefaultSort -> Maybe SortMode
- Database.Bloodhound.Types: [sortOrder] :: DefaultSort -> SortOrder
- Database.Bloodhound.Types: [source] :: Search -> Maybe Source
- Database.Bloodhound.Types: [srcIndex] :: IndexAlias -> IndexName
- Database.Bloodhound.Types: [statsField] :: StatisticsAggregation -> FieldName
- Database.Bloodhound.Types: [statsType] :: StatisticsAggregation -> StatsType
- Database.Bloodhound.Types: [succeeded] :: ClosePointInTimeResponse -> Bool
- Database.Bloodhound.Types: [suggestBody] :: Search -> Maybe Suggest
- Database.Bloodhound.Types: [suggestName] :: Suggest -> Text
- Database.Bloodhound.Types: [suggestOptionsFreq] :: SuggestOptions -> Maybe Int
- Database.Bloodhound.Types: [suggestOptionsHighlighted] :: SuggestOptions -> Maybe Text
- Database.Bloodhound.Types: [suggestOptionsScore] :: SuggestOptions -> Double
- Database.Bloodhound.Types: [suggestOptionsText] :: SuggestOptions -> Text
- Database.Bloodhound.Types: [suggestResponseLength] :: SuggestResponse -> Int
- Database.Bloodhound.Types: [suggestResponseOffset] :: SuggestResponse -> Int
- Database.Bloodhound.Types: [suggestResponseOptions] :: SuggestResponse -> [SuggestOptions]
- Database.Bloodhound.Types: [suggestResponseText] :: SuggestResponse -> Text
- Database.Bloodhound.Types: [suggestText] :: Suggest -> Text
- Database.Bloodhound.Types: [suggestType] :: Suggest -> SuggestType
- Database.Bloodhound.Types: [suggest] :: SearchResult a -> Maybe NamedSuggestionResponse
- Database.Bloodhound.Types: [sumAggregationField] :: SumAggregation -> FieldName
- Database.Bloodhound.Types: [taFrom] :: TopHitsAggregation -> Maybe From
- Database.Bloodhound.Types: [taSize] :: TopHitsAggregation -> Maybe Size
- Database.Bloodhound.Types: [taSort] :: TopHitsAggregation -> Maybe Sort
- Database.Bloodhound.Types: [tag] :: CommonHighlight -> Maybe HighlightTag
- Database.Bloodhound.Types: [tagline] :: Status -> Text
- Database.Bloodhound.Types: [tarHits] :: TopHitResult a -> SearchHits a
- Database.Bloodhound.Types: [templateMappings] :: IndexTemplate -> Value
- Database.Bloodhound.Types: [templatePatterns] :: IndexTemplate -> [IndexPattern]
- Database.Bloodhound.Types: [templateSettings] :: IndexTemplate -> Maybe IndexSettings
- Database.Bloodhound.Types: [termAggs] :: TermsAggregation -> Maybe Aggregations
- Database.Bloodhound.Types: [termCollectMode] :: TermsAggregation -> Maybe CollectionMode
- Database.Bloodhound.Types: [termExclude] :: TermsAggregation -> Maybe TermInclusion
- Database.Bloodhound.Types: [termExecutionHint] :: TermsAggregation -> Maybe ExecutionHint
- Database.Bloodhound.Types: [termField] :: Term -> Key
- Database.Bloodhound.Types: [termInclude] :: TermsAggregation -> Maybe TermInclusion
- Database.Bloodhound.Types: [termKey] :: TermsResult -> BucketValue
- Database.Bloodhound.Types: [termMinDocCount] :: TermsAggregation -> Maybe Int
- Database.Bloodhound.Types: [termOrder] :: TermsAggregation -> Maybe TermOrder
- Database.Bloodhound.Types: [termShardSize] :: TermsAggregation -> Maybe Int
- Database.Bloodhound.Types: [termSize] :: TermsAggregation -> Maybe Int
- Database.Bloodhound.Types: [termSortField] :: TermOrder -> Text
- Database.Bloodhound.Types: [termSortOrder] :: TermOrder -> SortOrder
- Database.Bloodhound.Types: [termValue] :: Term -> Text
- Database.Bloodhound.Types: [term] :: TermsAggregation -> Either Text Text
- Database.Bloodhound.Types: [termsAggs] :: TermsResult -> Maybe AggregationResults
- Database.Bloodhound.Types: [termsDocCount] :: TermsResult -> Int
- Database.Bloodhound.Types: [timedOut] :: SearchResult a -> Bool
- Database.Bloodhound.Types: [took] :: SearchResult a -> Int
- Database.Bloodhound.Types: [topLeft] :: GeoBoundingBox -> LatLon
- Database.Bloodhound.Types: [trackSortScores] :: Search -> TrackSortScores
- Database.Bloodhound.Types: [unBH] :: BH m a -> ReaderT BHEnv m a
- Database.Bloodhound.Types: [unFilter] :: Filter -> Query
- Database.Bloodhound.Types: [unMaybeNA] :: MaybeNA a -> Maybe a
- Database.Bloodhound.Types: [unit] :: Distance -> DistanceUnit
- Database.Bloodhound.Types: [value] :: HitsTotal -> Int
- Database.Bloodhound.Types: [versionNumber] :: VersionNumber -> Version
- Database.Bloodhound.Types: [version] :: Status -> Version
- Database.Bloodhound.Types: [wildcardQueryBoost] :: WildcardQuery -> Maybe Boost
- Database.Bloodhound.Types: [wildcardQueryField] :: WildcardQuery -> FieldName
- Database.Bloodhound.Types: [wildcardQuery] :: WildcardQuery -> Key
- Database.Bloodhound.Types: aggs :: BucketAggregation a => a -> Maybe AggregationResults
- Database.Bloodhound.Types: bhManager :: BHEnv -> Manager
- Database.Bloodhound.Types: bhRequestHook :: BHEnv -> Request -> IO Request
- Database.Bloodhound.Types: bhServer :: BHEnv -> Server
- Database.Bloodhound.Types: buildUpsertActionMetadata :: UpsertActionMetadata -> Pair
- Database.Bloodhound.Types: class BucketAggregation a
- Database.Bloodhound.Types: class (Functor m, Applicative m, MonadIO m) => MonadBH m
- Database.Bloodhound.Types: class Semigroup a => Monoid a
- Database.Bloodhound.Types: class SnapshotRepo r
- Database.Bloodhound.Types: class () => ToJSON a
- Database.Bloodhound.Types: data Aggregation
- Database.Bloodhound.Types: data AliasRouting
- Database.Bloodhound.Types: data AllocationPolicy
- Database.Bloodhound.Types: data Analysis
- Database.Bloodhound.Types: data AnalyzerDefinition
- Database.Bloodhound.Types: data BHEnv
- Database.Bloodhound.Types: data BHRequest responseBody
- Database.Bloodhound.Types: data BoolMatch
- Database.Bloodhound.Types: data BoolQuery
- Database.Bloodhound.Types: data BooleanOperator
- Database.Bloodhound.Types: data BoostMode
- Database.Bloodhound.Types: data BoostingQuery
- Database.Bloodhound.Types: data BoundTransportAddress
- Database.Bloodhound.Types: data Bucket a
- Database.Bloodhound.Types: data BucketValue
- Database.Bloodhound.Types: data BulkOperation
- Database.Bloodhound.Types: data CPUInfo
- Database.Bloodhound.Types: data CardinalityAggregation
- Database.Bloodhound.Types: data CharFilterDefinition
- Database.Bloodhound.Types: data ClosePointInTime
- Database.Bloodhound.Types: data ClosePointInTimeResponse
- Database.Bloodhound.Types: data CollectionMode
- Database.Bloodhound.Types: data CommonHighlight
- Database.Bloodhound.Types: data CommonMinimumMatch
- Database.Bloodhound.Types: data CommonTermsQuery
- Database.Bloodhound.Types: data ComponentFunctionScoreFunction
- Database.Bloodhound.Types: data CompoundFormat
- Database.Bloodhound.Types: data Compression
- Database.Bloodhound.Types: data CountResponse
- Database.Bloodhound.Types: data CountShards
- Database.Bloodhound.Types: data DateHistogramAggregation
- Database.Bloodhound.Types: data DateHistogramResult
- Database.Bloodhound.Types: data DateMathAnchor
- Database.Bloodhound.Types: data DateMathExpr
- Database.Bloodhound.Types: data DateMathModifier
- Database.Bloodhound.Types: data DateMathUnit
- Database.Bloodhound.Types: data DateRangeAggRange
- Database.Bloodhound.Types: data DateRangeAggregation
- Database.Bloodhound.Types: data DateRangeResult
- Database.Bloodhound.Types: data DefaultSort
- Database.Bloodhound.Types: data DirectGeneratorSuggestModeTypes
- Database.Bloodhound.Types: data DirectGenerators
- Database.Bloodhound.Types: data DisMaxQuery
- Database.Bloodhound.Types: data Distance
- Database.Bloodhound.Types: data DistanceRange
- Database.Bloodhound.Types: data DistanceType
- Database.Bloodhound.Types: data DistanceUnit
- Database.Bloodhound.Types: data DocVersion
- Database.Bloodhound.Types: data EdgeNgramFilterSide
- Database.Bloodhound.Types: data Endpoint
- Database.Bloodhound.Types: data EsError
- Database.Bloodhound.Types: data EsProtocolException
- Database.Bloodhound.Types: data EsResult a
- Database.Bloodhound.Types: data EsResultFound a
- Database.Bloodhound.Types: data Exclude
- Database.Bloodhound.Types: data ExecutionHint
- Database.Bloodhound.Types: data FSType
- Database.Bloodhound.Types: data FactorModifier
- Database.Bloodhound.Types: data FastVectorHighlight
- Database.Bloodhound.Types: data FieldHighlight
- Database.Bloodhound.Types: data FieldOrFields
- Database.Bloodhound.Types: data FieldValueFactor
- Database.Bloodhound.Types: data FilterAggregation
- Database.Bloodhound.Types: data ForceMergeIndexSettings
- Database.Bloodhound.Types: data FsSnapshotRepo
- Database.Bloodhound.Types: data FunctionScoreFunction
- Database.Bloodhound.Types: data FunctionScoreFunctions
- Database.Bloodhound.Types: data FunctionScoreQuery
- Database.Bloodhound.Types: data Fuzziness
- Database.Bloodhound.Types: data FuzzyLikeFieldQuery
- Database.Bloodhound.Types: data FuzzyLikeThisQuery
- Database.Bloodhound.Types: data FuzzyQuery
- Database.Bloodhound.Types: data GenericSnapshotRepo
- Database.Bloodhound.Types: data GeoBoundingBox
- Database.Bloodhound.Types: data GeoBoundingBoxConstraint
- Database.Bloodhound.Types: data GeoFilterType
- Database.Bloodhound.Types: data GeoPoint
- Database.Bloodhound.Types: data GetTemplateScript
- Database.Bloodhound.Types: data HasChildQuery
- Database.Bloodhound.Types: data HasParentQuery
- Database.Bloodhound.Types: data HighlightEncoder
- Database.Bloodhound.Types: data HighlightSettings
- Database.Bloodhound.Types: data HighlightTag
- Database.Bloodhound.Types: data Highlights
- Database.Bloodhound.Types: data Hit a
- Database.Bloodhound.Types: data HitsTotal
- Database.Bloodhound.Types: data HitsTotalRelation
- Database.Bloodhound.Types: data Include
- Database.Bloodhound.Types: data IndexAlias
- Database.Bloodhound.Types: data IndexAliasAction
- Database.Bloodhound.Types: data IndexAliasCreate
- Database.Bloodhound.Types: data IndexAliasSummary
- Database.Bloodhound.Types: data IndexDocumentSettings
- Database.Bloodhound.Types: data IndexMappingsLimits
- Database.Bloodhound.Types: data IndexSelection
- Database.Bloodhound.Types: data IndexSettings
- Database.Bloodhound.Types: data IndexSettingsSummary
- Database.Bloodhound.Types: data IndexTemplate
- Database.Bloodhound.Types: data IndicesQuery
- Database.Bloodhound.Types: data InitialShardCount
- Database.Bloodhound.Types: data InnerHits
- Database.Bloodhound.Types: data Interval
- Database.Bloodhound.Types: data JVMBufferPoolStats
- Database.Bloodhound.Types: data JVMGCStats
- Database.Bloodhound.Types: data JVMMemoryInfo
- Database.Bloodhound.Types: data JVMPoolStats
- Database.Bloodhound.Types: data JoinRelation
- Database.Bloodhound.Types: data Language
- Database.Bloodhound.Types: data LatLon
- Database.Bloodhound.Types: data LoadAvgs
- Database.Bloodhound.Types: data MappingField
- Database.Bloodhound.Types: data MatchQuery
- Database.Bloodhound.Types: data MatchQueryType
- Database.Bloodhound.Types: data MinimumMatchHighLow
- Database.Bloodhound.Types: data Missing
- Database.Bloodhound.Types: data MissingAggregation
- Database.Bloodhound.Types: data MissingResult
- Database.Bloodhound.Types: data MoreLikeThisFieldQuery
- Database.Bloodhound.Types: data MoreLikeThisQuery
- Database.Bloodhound.Types: data MultiMatchQuery
- Database.Bloodhound.Types: data MultiMatchQueryType
- Database.Bloodhound.Types: data NamedSuggestionResponse
- Database.Bloodhound.Types: data NestedQuery
- Database.Bloodhound.Types: data Ngram
- Database.Bloodhound.Types: data NgramFilter
- Database.Bloodhound.Types: data NodeAttrFilter
- Database.Bloodhound.Types: data NodeBreakerStats
- Database.Bloodhound.Types: data NodeBreakersStats
- Database.Bloodhound.Types: data NodeDataPathStats
- Database.Bloodhound.Types: data NodeFSStats
- Database.Bloodhound.Types: data NodeFSTotalStats
- Database.Bloodhound.Types: data NodeHTTPInfo
- Database.Bloodhound.Types: data NodeHTTPStats
- Database.Bloodhound.Types: data NodeIndicesStats
- Database.Bloodhound.Types: data NodeInfo
- Database.Bloodhound.Types: data NodeJVMInfo
- Database.Bloodhound.Types: data NodeJVMStats
- Database.Bloodhound.Types: data NodeNetworkInfo
- Database.Bloodhound.Types: data NodeNetworkInterface
- Database.Bloodhound.Types: data NodeNetworkStats
- Database.Bloodhound.Types: data NodeOSInfo
- Database.Bloodhound.Types: data NodeOSStats
- Database.Bloodhound.Types: data NodePluginInfo
- Database.Bloodhound.Types: data NodeProcessInfo
- Database.Bloodhound.Types: data NodeProcessStats
- Database.Bloodhound.Types: data NodeSelection
- Database.Bloodhound.Types: data NodeSelector
- Database.Bloodhound.Types: data NodeStats
- Database.Bloodhound.Types: data NodeThreadPoolInfo
- Database.Bloodhound.Types: data NodeThreadPoolStats
- Database.Bloodhound.Types: data NodeTransportInfo
- Database.Bloodhound.Types: data NodeTransportStats
- Database.Bloodhound.Types: data NodesInfo
- Database.Bloodhound.Types: data NodesStats
- Database.Bloodhound.Types: data NonPostings
- Database.Bloodhound.Types: data OpenCloseIndex
- Database.Bloodhound.Types: data OpenPointInTimeResponse
- Database.Bloodhound.Types: data OptimizeBbox
- Database.Bloodhound.Types: data PatternOrPatterns
- Database.Bloodhound.Types: data PhraseSuggester
- Database.Bloodhound.Types: data PhraseSuggesterCollate
- Database.Bloodhound.Types: data PhraseSuggesterHighlighter
- Database.Bloodhound.Types: data PlainHighlight
- Database.Bloodhound.Types: data PointInTime
- Database.Bloodhound.Types: data PostingsHighlight
- Database.Bloodhound.Types: data PrefixQuery
- Database.Bloodhound.Types: data Query
- Database.Bloodhound.Types: data QueryStringQuery
- Database.Bloodhound.Types: data RRGroupRefNum
- Database.Bloodhound.Types: data RangeExecution
- Database.Bloodhound.Types: data RangeQuery
- Database.Bloodhound.Types: data RangeValue
- Database.Bloodhound.Types: data RegexpFlag
- Database.Bloodhound.Types: data RegexpFlags
- Database.Bloodhound.Types: data RegexpQuery
- Database.Bloodhound.Types: data ReplicaBounds
- Database.Bloodhound.Types: data RestoreRenameToken
- Database.Bloodhound.Types: data ScoreMode
- Database.Bloodhound.Types: data ScoreType
- Database.Bloodhound.Types: data Script
- Database.Bloodhound.Types: data ScriptSource
- Database.Bloodhound.Types: data Search
- Database.Bloodhound.Types: data SearchHits a
- Database.Bloodhound.Types: data SearchResult a
- Database.Bloodhound.Types: data SearchTemplate
- Database.Bloodhound.Types: data SearchType
- Database.Bloodhound.Types: data ShardResult
- Database.Bloodhound.Types: data Shingle
- Database.Bloodhound.Types: data SimpleQueryFlag
- Database.Bloodhound.Types: data SimpleQueryStringQuery
- Database.Bloodhound.Types: data SnapshotCreateSettings
- Database.Bloodhound.Types: data SnapshotInfo
- Database.Bloodhound.Types: data SnapshotNodeVerification
- Database.Bloodhound.Types: data SnapshotPattern
- Database.Bloodhound.Types: data SnapshotRepoConversionError
- Database.Bloodhound.Types: data SnapshotRepoPattern
- Database.Bloodhound.Types: data SnapshotRepoSelection
- Database.Bloodhound.Types: data SnapshotRestoreSettings
- Database.Bloodhound.Types: data SnapshotSelection
- Database.Bloodhound.Types: data SnapshotShardFailure
- Database.Bloodhound.Types: data SnapshotState
- Database.Bloodhound.Types: data SortMode
- Database.Bloodhound.Types: data SortOrder
- Database.Bloodhound.Types: data SortSpec
- Database.Bloodhound.Types: data Source
- Database.Bloodhound.Types: data StatisticsAggregation
- Database.Bloodhound.Types: data Status
- Database.Bloodhound.Types: data Suggest
- Database.Bloodhound.Types: data SuggestOptions
- Database.Bloodhound.Types: data SuggestResponse
- Database.Bloodhound.Types: data SuggestType
- Database.Bloodhound.Types: data Term
- Database.Bloodhound.Types: data TermInclusion
- Database.Bloodhound.Types: data TermOrder
- Database.Bloodhound.Types: data TermsAggregation
- Database.Bloodhound.Types: data TermsResult
- Database.Bloodhound.Types: data ThreadPoolSize
- Database.Bloodhound.Types: data ThreadPoolType
- Database.Bloodhound.Types: data TimeInterval
- Database.Bloodhound.Types: data TokenChar
- Database.Bloodhound.Types: data TokenFilterDefinition
- Database.Bloodhound.Types: data TokenizerDefinition
- Database.Bloodhound.Types: data TopHitResult a
- Database.Bloodhound.Types: data TopHitsAggregation
- Database.Bloodhound.Types: data UpdatableIndexSetting
- Database.Bloodhound.Types: data UpsertActionMetadata
- Database.Bloodhound.Types: data UpsertPayload
- Database.Bloodhound.Types: data ValueCountAggregation
- Database.Bloodhound.Types: data Version
- Database.Bloodhound.Types: data VersionControl
- Database.Bloodhound.Types: data WildcardQuery
- Database.Bloodhound.Types: data ZeroTermsQuery
- Database.Bloodhound.Types: defaultCache :: Cache
- Database.Bloodhound.Types: defaultForceMergeIndexSettings :: ForceMergeIndexSettings
- Database.Bloodhound.Types: defaultIndexDocumentSettings :: IndexDocumentSettings
- Database.Bloodhound.Types: defaultIndexMappingsLimits :: IndexMappingsLimits
- Database.Bloodhound.Types: defaultIndexSettings :: IndexSettings
- Database.Bloodhound.Types: defaultSnapshotCreateSettings :: SnapshotCreateSettings
- Database.Bloodhound.Types: defaultSnapshotRepoUpdateSettings :: SnapshotRepoUpdateSettings
- Database.Bloodhound.Types: defaultSnapshotRestoreSettings :: SnapshotRestoreSettings
- Database.Bloodhound.Types: docCount :: BucketAggregation a => a -> Int
- Database.Bloodhound.Types: docVersionNumber :: DocVersion -> Int
- Database.Bloodhound.Types: fromGSnapshotRepo :: SnapshotRepo r => GenericSnapshotRepo -> Either SnapshotRepoConversionError r
- Database.Bloodhound.Types: getBHEnv :: MonadBH m => m BHEnv
- Database.Bloodhound.Types: getEndpoint :: Server -> Endpoint -> Text
- Database.Bloodhound.Types: gigabytes :: Int -> Bytes
- Database.Bloodhound.Types: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Types.ExpandWildcards
- Database.Bloodhound.Types: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Types.GetTemplateScript
- Database.Bloodhound.Types: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Types.ScrollId
- Database.Bloodhound.Types: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Types.SearchTemplateSource
- Database.Bloodhound.Types: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Types.SearchType
- Database.Bloodhound.Types: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Types.TimeUnits
- Database.Bloodhound.Types: instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (Database.Bloodhound.Types.SearchResult a)
- Database.Bloodhound.Types: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Types.Exclude
- Database.Bloodhound.Types: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Types.ExpandWildcards
- Database.Bloodhound.Types: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Types.Include
- Database.Bloodhound.Types: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Types.Pattern
- Database.Bloodhound.Types: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Types.PatternOrPatterns
- Database.Bloodhound.Types: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Types.ScrollId
- Database.Bloodhound.Types: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Types.Search
- Database.Bloodhound.Types: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Types.SearchTemplate
- Database.Bloodhound.Types: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Types.SearchTemplateId
- Database.Bloodhound.Types: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Types.SearchTemplateSource
- Database.Bloodhound.Types: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Types.SearchType
- Database.Bloodhound.Types: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Types.Source
- Database.Bloodhound.Types: instance Data.Aeson.Types.ToJSON.ToJSON Database.Bloodhound.Types.TimeUnits
- Database.Bloodhound.Types: instance GHC.Classes.Eq Database.Bloodhound.Types.Exclude
- Database.Bloodhound.Types: instance GHC.Classes.Eq Database.Bloodhound.Types.ExpandWildcards
- Database.Bloodhound.Types: instance GHC.Classes.Eq Database.Bloodhound.Types.GetTemplateScript
- Database.Bloodhound.Types: instance GHC.Classes.Eq Database.Bloodhound.Types.Include
- Database.Bloodhound.Types: instance GHC.Classes.Eq Database.Bloodhound.Types.Pattern
- Database.Bloodhound.Types: instance GHC.Classes.Eq Database.Bloodhound.Types.PatternOrPatterns
- Database.Bloodhound.Types: instance GHC.Classes.Eq Database.Bloodhound.Types.ScrollId
- Database.Bloodhound.Types: instance GHC.Classes.Eq Database.Bloodhound.Types.Search
- Database.Bloodhound.Types: instance GHC.Classes.Eq Database.Bloodhound.Types.SearchTemplate
- Database.Bloodhound.Types: instance GHC.Classes.Eq Database.Bloodhound.Types.SearchTemplateId
- Database.Bloodhound.Types: instance GHC.Classes.Eq Database.Bloodhound.Types.SearchTemplateSource
- Database.Bloodhound.Types: instance GHC.Classes.Eq Database.Bloodhound.Types.SearchType
- Database.Bloodhound.Types: instance GHC.Classes.Eq Database.Bloodhound.Types.Source
- Database.Bloodhound.Types: instance GHC.Classes.Eq Database.Bloodhound.Types.TimeUnits
- Database.Bloodhound.Types: instance GHC.Classes.Eq a => GHC.Classes.Eq (Database.Bloodhound.Types.SearchResult a)
- Database.Bloodhound.Types: instance GHC.Classes.Ord Database.Bloodhound.Types.ScrollId
- Database.Bloodhound.Types: instance GHC.Read.Read Database.Bloodhound.Types.Exclude
- Database.Bloodhound.Types: instance GHC.Read.Read Database.Bloodhound.Types.Include
- Database.Bloodhound.Types: instance GHC.Read.Read Database.Bloodhound.Types.Pattern
- Database.Bloodhound.Types: instance GHC.Read.Read Database.Bloodhound.Types.PatternOrPatterns
- Database.Bloodhound.Types: instance GHC.Show.Show Database.Bloodhound.Types.Exclude
- Database.Bloodhound.Types: instance GHC.Show.Show Database.Bloodhound.Types.ExpandWildcards
- Database.Bloodhound.Types: instance GHC.Show.Show Database.Bloodhound.Types.GetTemplateScript
- Database.Bloodhound.Types: instance GHC.Show.Show Database.Bloodhound.Types.Include
- Database.Bloodhound.Types: instance GHC.Show.Show Database.Bloodhound.Types.Pattern
- Database.Bloodhound.Types: instance GHC.Show.Show Database.Bloodhound.Types.PatternOrPatterns
- Database.Bloodhound.Types: instance GHC.Show.Show Database.Bloodhound.Types.ScrollId
- Database.Bloodhound.Types: instance GHC.Show.Show Database.Bloodhound.Types.Search
- Database.Bloodhound.Types: instance GHC.Show.Show Database.Bloodhound.Types.SearchTemplate
- Database.Bloodhound.Types: instance GHC.Show.Show Database.Bloodhound.Types.SearchTemplateId
- Database.Bloodhound.Types: instance GHC.Show.Show Database.Bloodhound.Types.SearchTemplateSource
- Database.Bloodhound.Types: instance GHC.Show.Show Database.Bloodhound.Types.SearchType
- Database.Bloodhound.Types: instance GHC.Show.Show Database.Bloodhound.Types.Source
- Database.Bloodhound.Types: instance GHC.Show.Show Database.Bloodhound.Types.TimeUnits
- Database.Bloodhound.Types: instance GHC.Show.Show a => GHC.Show.Show (Database.Bloodhound.Types.SearchResult a)
- Database.Bloodhound.Types: key :: BucketAggregation a => a -> BucketValue
- Database.Bloodhound.Types: kilobytes :: Int -> Bytes
- Database.Bloodhound.Types: mappend :: Monoid a => a -> a -> a
- Database.Bloodhound.Types: mconcat :: Monoid a => [a] -> a
- Database.Bloodhound.Types: megabytes :: Int -> Bytes
- Database.Bloodhound.Types: mempty :: Monoid a => a
- Database.Bloodhound.Types: mkAggregations :: Key -> Aggregation -> Aggregations
- Database.Bloodhound.Types: mkBHEnv :: Server -> Manager -> BHEnv
- Database.Bloodhound.Types: mkBoolQuery :: [Query] -> [Filter] -> [Query] -> [Query] -> BoolQuery
- Database.Bloodhound.Types: mkCardinalityAggregation :: FieldName -> CardinalityAggregation
- Database.Bloodhound.Types: mkDateHistogram :: FieldName -> Interval -> DateHistogramAggregation
- Database.Bloodhound.Types: mkDirectGenerators :: FieldName -> DirectGenerators
- Database.Bloodhound.Types: mkDocVersion :: Int -> Maybe DocVersion
- Database.Bloodhound.Types: mkEndpoint :: [Text] -> Endpoint
- Database.Bloodhound.Types: mkExtendedStatsAggregation :: FieldName -> StatisticsAggregation
- Database.Bloodhound.Types: mkFullRequest :: Method -> Endpoint -> ByteString -> BHRequest body
- Database.Bloodhound.Types: mkMatchQuery :: FieldName -> QueryString -> MatchQuery
- Database.Bloodhound.Types: mkMultiMatchQuery :: [FieldName] -> QueryString -> MultiMatchQuery
- Database.Bloodhound.Types: mkPhraseSuggester :: FieldName -> PhraseSuggester
- Database.Bloodhound.Types: mkQueryStringQuery :: QueryString -> QueryStringQuery
- Database.Bloodhound.Types: mkRRGroupRefNum :: Int -> Maybe RRGroupRefNum
- Database.Bloodhound.Types: mkRangeQuery :: FieldName -> RangeValue -> RangeQuery
- Database.Bloodhound.Types: mkSimpleRequest :: Method -> Endpoint -> BHRequest body
- Database.Bloodhound.Types: mkSort :: FieldName -> SortOrder -> DefaultSort
- Database.Bloodhound.Types: mkStatsAggregation :: FieldName -> StatisticsAggregation
- Database.Bloodhound.Types: mkTermsAggregation :: Text -> TermsAggregation
- Database.Bloodhound.Types: mkTermsScriptAggregation :: Text -> TermsAggregation
- Database.Bloodhound.Types: newtype AggregateParentScore
- Database.Bloodhound.Types: newtype AllowLeadingWildcard
- Database.Bloodhound.Types: newtype AnalyzeWildcard
- Database.Bloodhound.Types: newtype Analyzer
- Database.Bloodhound.Types: newtype BH m a
- Database.Bloodhound.Types: newtype BHResponse body
- Database.Bloodhound.Types: newtype Boost
- Database.Bloodhound.Types: newtype BoostTerms
- Database.Bloodhound.Types: newtype BuildHash
- Database.Bloodhound.Types: newtype Bytes
- Database.Bloodhound.Types: newtype CacheKey
- Database.Bloodhound.Types: newtype CacheName
- Database.Bloodhound.Types: newtype CharFilter
- Database.Bloodhound.Types: newtype ClusterName
- Database.Bloodhound.Types: newtype CountQuery
- Database.Bloodhound.Types: newtype CutoffFrequency
- Database.Bloodhound.Types: newtype DisableCoord
- Database.Bloodhound.Types: newtype DocId
- Database.Bloodhound.Types: newtype EnablePositionIncrements
- Database.Bloodhound.Types: newtype EsAddress
- Database.Bloodhound.Types: newtype EsPassword
- Database.Bloodhound.Types: newtype EsUsername
- Database.Bloodhound.Types: newtype Existence
- Database.Bloodhound.Types: newtype ExternalDocVersion
- Database.Bloodhound.Types: newtype Factor
- Database.Bloodhound.Types: newtype FactorMissingFieldValue
- Database.Bloodhound.Types: newtype FieldDefinition
- Database.Bloodhound.Types: newtype FieldName
- Database.Bloodhound.Types: newtype Filter
- Database.Bloodhound.Types: newtype From
- Database.Bloodhound.Types: newtype FullNodeId
- Database.Bloodhound.Types: newtype GeneratePhraseQueries
- Database.Bloodhound.Types: newtype GenericSnapshotRepoSettings
- Database.Bloodhound.Types: newtype GreaterThan
- Database.Bloodhound.Types: newtype GreaterThanD
- Database.Bloodhound.Types: newtype GreaterThanEq
- Database.Bloodhound.Types: newtype GreaterThanEqD
- Database.Bloodhound.Types: newtype HitFields
- Database.Bloodhound.Types: newtype IgnoreTermFrequency
- Database.Bloodhound.Types: newtype IgnoreUnmapped
- Database.Bloodhound.Types: newtype IndexAliasName
- Database.Bloodhound.Types: newtype IndexAliasRouting
- Database.Bloodhound.Types: newtype IndexAliasesSummary
- Database.Bloodhound.Types: newtype IndexName
- Database.Bloodhound.Types: newtype IndexPattern
- Database.Bloodhound.Types: newtype JVMGCCollector
- Database.Bloodhound.Types: newtype JVMMemoryPool
- Database.Bloodhound.Types: newtype Lenient
- Database.Bloodhound.Types: newtype LessThan
- Database.Bloodhound.Types: newtype LessThanD
- Database.Bloodhound.Types: newtype LessThanEq
- Database.Bloodhound.Types: newtype LessThanEqD
- Database.Bloodhound.Types: newtype Locale
- Database.Bloodhound.Types: newtype LowercaseExpanded
- Database.Bloodhound.Types: newtype MacAddress
- Database.Bloodhound.Types: newtype Mapping
- Database.Bloodhound.Types: newtype MaxChildren
- Database.Bloodhound.Types: newtype MaxDocFrequency
- Database.Bloodhound.Types: newtype MaxExpansions
- Database.Bloodhound.Types: newtype MaxQueryTerms
- Database.Bloodhound.Types: newtype MaxWordLength
- Database.Bloodhound.Types: newtype MaybeNA a
- Database.Bloodhound.Types: newtype MinChildren
- Database.Bloodhound.Types: newtype MinDocFrequency
- Database.Bloodhound.Types: newtype MinWordLength
- Database.Bloodhound.Types: newtype MinimumMatch
- Database.Bloodhound.Types: newtype MinimumTermFrequency
- Database.Bloodhound.Types: newtype NetworkInterfaceName
- Database.Bloodhound.Types: newtype NodeAttrName
- Database.Bloodhound.Types: newtype NodeName
- Database.Bloodhound.Types: newtype NullValue
- Database.Bloodhound.Types: newtype PID
- Database.Bloodhound.Types: newtype Pattern
- Database.Bloodhound.Types: newtype PercentMatch
- Database.Bloodhound.Types: newtype PhraseSlop
- Database.Bloodhound.Types: newtype PluginName
- Database.Bloodhound.Types: newtype PrefixLength
- Database.Bloodhound.Types: newtype QueryPath
- Database.Bloodhound.Types: newtype QueryString
- Database.Bloodhound.Types: newtype Regexp
- Database.Bloodhound.Types: newtype RelationName
- Database.Bloodhound.Types: newtype ReplicaCount
- Database.Bloodhound.Types: newtype RestoreIndexSettings
- Database.Bloodhound.Types: newtype RestoreRenamePattern
- Database.Bloodhound.Types: newtype RoutingValue
- Database.Bloodhound.Types: newtype ScriptFields
- Database.Bloodhound.Types: newtype ScriptLanguage
- Database.Bloodhound.Types: newtype ScriptParams
- Database.Bloodhound.Types: newtype ScrollId
- Database.Bloodhound.Types: newtype SearchAliasRouting
- Database.Bloodhound.Types: newtype SearchTemplateId
- Database.Bloodhound.Types: newtype SearchTemplateSource
- Database.Bloodhound.Types: newtype Seed
- Database.Bloodhound.Types: newtype Server
- Database.Bloodhound.Types: newtype ShardCount
- Database.Bloodhound.Types: newtype ShardId
- Database.Bloodhound.Types: newtype Size
- Database.Bloodhound.Types: newtype SnapshotName
- Database.Bloodhound.Types: newtype SnapshotRepoName
- Database.Bloodhound.Types: newtype SnapshotRepoType
- Database.Bloodhound.Types: newtype SnapshotRepoUpdateSettings
- Database.Bloodhound.Types: newtype SnapshotVerification
- Database.Bloodhound.Types: newtype StopWord
- Database.Bloodhound.Types: newtype SumAggregation
- Database.Bloodhound.Types: newtype TemplateName
- Database.Bloodhound.Types: newtype TemplateQueryKeyValuePairs
- Database.Bloodhound.Types: newtype Tiebreaker
- Database.Bloodhound.Types: newtype TokenFilter
- Database.Bloodhound.Types: newtype Tokenizer
- Database.Bloodhound.Types: newtype VersionNumber
- Database.Bloodhound.Types: newtype Weight
- Database.Bloodhound.Types: omitField :: ToJSON a => a -> Bool
- Database.Bloodhound.Types: omitNulls :: [(Key, Value)] -> Value
- Database.Bloodhound.Types: rrGroupRefNum :: RRGroupRefNum -> Int
- Database.Bloodhound.Types: runBH :: BHEnv -> BH m a -> m a
- Database.Bloodhound.Types: showText :: Show a => a -> Text
- Database.Bloodhound.Types: toDateHistogram :: Key -> AggregationResults -> Maybe (Bucket DateHistogramResult)
- Database.Bloodhound.Types: toEncoding :: ToJSON a => a -> Encoding
- Database.Bloodhound.Types: toEncodingList :: ToJSON a => [a] -> Encoding
- Database.Bloodhound.Types: toGSnapshotRepo :: SnapshotRepo r => r -> GenericSnapshotRepo
- Database.Bloodhound.Types: toJSON :: ToJSON a => a -> Value
- Database.Bloodhound.Types: toJSONList :: ToJSON a => [a] -> Value
- Database.Bloodhound.Types: toMissing :: Key -> AggregationResults -> Maybe MissingResult
- Database.Bloodhound.Types: toTerms :: Key -> AggregationResults -> Maybe (Bucket TermsResult)
- Database.Bloodhound.Types: toTopHits :: FromJSON a => Key -> AggregationResults -> Maybe (TopHitResult a)
- Database.Bloodhound.Types: type AggregationResults = Map Key Value
- Database.Bloodhound.Types: type Aggregations = Map Key Aggregation
- Database.Bloodhound.Types: type Cache = Bool
- Database.Bloodhound.Types: type HitHighlight = Map Text [Text]
- Database.Bloodhound.Types: type Method = Method
- Database.Bloodhound.Types: type ParsedEsResponse a = Either EsError a
- Database.Bloodhound.Types: type Score = Maybe Double
- Database.Bloodhound.Types: type ScriptFieldValue = Value
- Database.Bloodhound.Types: type ScriptParamValue = Value
- Database.Bloodhound.Types: type SearchAfterKey = [Value]
- Database.Bloodhound.Types: type Sort = [SortSpec]
- Database.Bloodhound.Types: type TrackSortScores = Bool
- Database.Bloodhound.Types: unpackId :: DocId -> Text
- Database.Bloodhound.Types: withQueries :: Endpoint -> [(Text, Maybe Text)] -> Endpoint
+ Database.Bloodhound.Client.Cluster: AddAlias :: IndexAlias -> IndexAliasCreate -> IndexAliasAction
+ Database.Bloodhound.Client.Cluster: AllAliasRouting :: RoutingValue -> AliasRouting
+ Database.Bloodhound.Client.Cluster: AllIndexes :: IndexSelection
+ Database.Bloodhound.Client.Cluster: AllNodes :: NodeSelection
+ Database.Bloodhound.Client.Cluster: AllSnapshotRepos :: SnapshotRepoSelection
+ Database.Bloodhound.Client.Cluster: AllSnapshots :: SnapshotSelection
+ Database.Bloodhound.Client.Cluster: AllocAll :: AllocationPolicy
+ Database.Bloodhound.Client.Cluster: AllocNewPrimaries :: AllocationPolicy
+ Database.Bloodhound.Client.Cluster: AllocNone :: AllocationPolicy
+ Database.Bloodhound.Client.Cluster: AllocPrimaries :: AllocationPolicy
+ Database.Bloodhound.Client.Cluster: AnalysisSetting :: Analysis -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: AutoExpandReplicas :: ReplicaBounds -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: BH :: ReaderT BHEnv (ExceptT EsError m) a -> BH m a
+ Database.Bloodhound.Client.Cluster: BHEnv :: Server -> Manager -> (Request -> IO Request) -> BHEnv
+ Database.Bloodhound.Client.Cluster: BlocksMetaData :: Bool -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: BlocksRead :: Bool -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: BlocksReadOnly :: Bool -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: BlocksWrite :: Bool -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: BoundTransportAddress :: EsAddress -> [EsAddress] -> BoundTransportAddress
+ Database.Bloodhound.Client.Cluster: BuildHash :: Text -> BuildHash
+ Database.Bloodhound.Client.Cluster: BulkActionItem :: BulkAction -> BulkItem -> BulkActionItem
+ Database.Bloodhound.Client.Cluster: BulkCreate :: IndexName -> DocId -> Value -> BulkOperation
+ Database.Bloodhound.Client.Cluster: BulkCreateEncoding :: IndexName -> DocId -> Encoding -> BulkOperation
+ Database.Bloodhound.Client.Cluster: BulkDelete :: IndexName -> DocId -> BulkOperation
+ Database.Bloodhound.Client.Cluster: BulkError :: Text -> Text -> BulkError
+ Database.Bloodhound.Client.Cluster: BulkIndex :: IndexName -> DocId -> Value -> BulkOperation
+ Database.Bloodhound.Client.Cluster: BulkIndexAuto :: IndexName -> Value -> BulkOperation
+ Database.Bloodhound.Client.Cluster: BulkIndexEncodingAuto :: IndexName -> Encoding -> BulkOperation
+ Database.Bloodhound.Client.Cluster: BulkItem :: Text -> Text -> Maybe Int -> Maybe BulkError -> BulkItem
+ Database.Bloodhound.Client.Cluster: BulkResponse :: Int -> Bool -> [BulkActionItem] -> BulkResponse
+ Database.Bloodhound.Client.Cluster: BulkUpdate :: IndexName -> DocId -> Value -> BulkOperation
+ Database.Bloodhound.Client.Cluster: BulkUpsert :: IndexName -> DocId -> UpsertPayload -> [UpsertActionMetadata] -> BulkOperation
+ Database.Bloodhound.Client.Cluster: ByteType :: FieldType
+ Database.Bloodhound.Client.Cluster: Bytes :: Int -> Bytes
+ Database.Bloodhound.Client.Cluster: CPUInfo :: Bytes -> Int -> Int -> Int -> Int -> Text -> Text -> CPUInfo
+ Database.Bloodhound.Client.Cluster: CacheFilterExpire :: Maybe NominalDiffTime -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: CacheFilterMaxSize :: Maybe Bytes -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: ChildDocument :: FieldName -> RelationName -> DocId -> JoinRelation
+ Database.Bloodhound.Client.Cluster: CloseIndex :: OpenCloseIndex
+ Database.Bloodhound.Client.Cluster: ClusterName :: Text -> ClusterName
+ Database.Bloodhound.Client.Cluster: CompoundFileFormat :: Bool -> CompoundFormat
+ Database.Bloodhound.Client.Cluster: CompressionBest :: Compression
+ Database.Bloodhound.Client.Cluster: CompressionDefault :: Compression
+ Database.Bloodhound.Client.Cluster: CompressionSetting :: Compression -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: CountQuery :: Query -> CountQuery
+ Database.Bloodhound.Client.Cluster: CountResponse :: Natural -> CountShards -> CountResponse
+ Database.Bloodhound.Client.Cluster: CountShards :: Int -> Int -> Int -> CountShards
+ Database.Bloodhound.Client.Cluster: Create :: BulkAction
+ Database.Bloodhound.Client.Cluster: Day :: Interval
+ Database.Bloodhound.Client.Cluster: Days :: TimeInterval
+ Database.Bloodhound.Client.Cluster: Delete :: BulkAction
+ Database.Bloodhound.Client.Cluster: EsAddress :: Text -> EsAddress
+ Database.Bloodhound.Client.Cluster: EsPassword :: Text -> EsPassword
+ Database.Bloodhound.Client.Cluster: EsUsername :: Text -> EsUsername
+ Database.Bloodhound.Client.Cluster: ExactRepo :: SnapshotRepoName -> SnapshotRepoPattern
+ Database.Bloodhound.Client.Cluster: ExactSnap :: SnapshotName -> SnapshotPattern
+ Database.Bloodhound.Client.Cluster: ExplicitShards :: Int -> InitialShardCount
+ Database.Bloodhound.Client.Cluster: FSBuffered :: FSType
+ Database.Bloodhound.Client.Cluster: FSSimple :: FSType
+ Database.Bloodhound.Client.Cluster: FailOnMergeFailure :: Bool -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: FieldDefinition :: FieldType -> FieldDefinition
+ Database.Bloodhound.Client.Cluster: FloatType :: FieldType
+ Database.Bloodhound.Client.Cluster: ForceMergeIndexSettings :: Maybe Int -> Bool -> Bool -> ForceMergeIndexSettings
+ Database.Bloodhound.Client.Cluster: FsSnapshotRepo :: SnapshotRepoName -> FilePath -> Bool -> Maybe Bytes -> Maybe Bytes -> Maybe Bytes -> FsSnapshotRepo
+ Database.Bloodhound.Client.Cluster: FullMinus1Shards :: InitialShardCount
+ Database.Bloodhound.Client.Cluster: FullNodeId :: Text -> FullNodeId
+ Database.Bloodhound.Client.Cluster: FullShards :: InitialShardCount
+ Database.Bloodhound.Client.Cluster: GCDeletes :: NominalDiffTime -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: GatewaySnapshotInterval :: NominalDiffTime -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: GenericSnapshotRepo :: SnapshotRepoName -> SnapshotRepoType -> GenericSnapshotRepoSettings -> GenericSnapshotRepo
+ Database.Bloodhound.Client.Cluster: GenericSnapshotRepoSettings :: Object -> GenericSnapshotRepoSettings
+ Database.Bloodhound.Client.Cluster: GeoPointType :: FieldType
+ Database.Bloodhound.Client.Cluster: GeoShapeType :: FieldType
+ Database.Bloodhound.Client.Cluster: GranularAliasRouting :: Maybe SearchAliasRouting -> Maybe IndexAliasRouting -> AliasRouting
+ Database.Bloodhound.Client.Cluster: Hour :: Interval
+ Database.Bloodhound.Client.Cluster: Hours :: TimeInterval
+ Database.Bloodhound.Client.Cluster: Index :: BulkAction
+ Database.Bloodhound.Client.Cluster: IndexAlias :: IndexName -> IndexAliasName -> IndexAlias
+ Database.Bloodhound.Client.Cluster: IndexAliasCreate :: Maybe AliasRouting -> Maybe Filter -> IndexAliasCreate
+ Database.Bloodhound.Client.Cluster: IndexAliasRouting :: RoutingValue -> IndexAliasRouting
+ Database.Bloodhound.Client.Cluster: IndexAliasSummary :: IndexAlias -> IndexAliasCreate -> IndexAliasSummary
+ Database.Bloodhound.Client.Cluster: IndexAliasesSummary :: [IndexAliasSummary] -> IndexAliasesSummary
+ Database.Bloodhound.Client.Cluster: IndexCompoundFormat :: CompoundFormat -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: IndexCompoundOnFlush :: Bool -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: IndexConcurrency :: Int -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: IndexDocumentSettings :: VersionControl -> Maybe JoinRelation -> IndexDocumentSettings
+ Database.Bloodhound.Client.Cluster: IndexList :: NonEmpty IndexName -> IndexSelection
+ Database.Bloodhound.Client.Cluster: IndexMappingsLimits :: Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> IndexMappingsLimits
+ Database.Bloodhound.Client.Cluster: IndexPattern :: Text -> IndexPattern
+ Database.Bloodhound.Client.Cluster: IndexSettings :: ShardCount -> ReplicaCount -> IndexMappingsLimits -> IndexSettings
+ Database.Bloodhound.Client.Cluster: IndexSettingsSummary :: IndexName -> IndexSettings -> [UpdatableIndexSetting] -> IndexSettingsSummary
+ Database.Bloodhound.Client.Cluster: IndexTemplate :: [IndexPattern] -> Maybe IndexSettings -> Value -> IndexTemplate
+ Database.Bloodhound.Client.Cluster: IntegerType :: FieldType
+ Database.Bloodhound.Client.Cluster: JVMBufferPoolStats :: Bytes -> Bytes -> Int -> JVMBufferPoolStats
+ Database.Bloodhound.Client.Cluster: JVMGCCollector :: Text -> JVMGCCollector
+ Database.Bloodhound.Client.Cluster: JVMGCStats :: NominalDiffTime -> Int -> JVMGCStats
+ Database.Bloodhound.Client.Cluster: JVMMemoryInfo :: Bytes -> Bytes -> Bytes -> Bytes -> Bytes -> JVMMemoryInfo
+ Database.Bloodhound.Client.Cluster: JVMMemoryPool :: Text -> JVMMemoryPool
+ Database.Bloodhound.Client.Cluster: JVMPoolStats :: Bytes -> Bytes -> Bytes -> Bytes -> JVMPoolStats
+ Database.Bloodhound.Client.Cluster: JVMVersion :: Text -> JVMVersion
+ Database.Bloodhound.Client.Cluster: LoadAvgs :: Double -> Double -> Double -> LoadAvgs
+ Database.Bloodhound.Client.Cluster: LocalNode :: NodeSelection
+ Database.Bloodhound.Client.Cluster: LongType :: FieldType
+ Database.Bloodhound.Client.Cluster: MacAddress :: Text -> MacAddress
+ Database.Bloodhound.Client.Cluster: Mapping :: [MappingField] -> Mapping
+ Database.Bloodhound.Client.Cluster: MappingField :: FieldName -> FieldDefinition -> MappingField
+ Database.Bloodhound.Client.Cluster: MappingTotalFieldsLimit :: Int -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: MergeSegmentVsTotalIndex :: Double -> CompoundFormat
+ Database.Bloodhound.Client.Cluster: Minute :: Interval
+ Database.Bloodhound.Client.Cluster: Minutes :: TimeInterval
+ Database.Bloodhound.Client.Cluster: Month :: Interval
+ Database.Bloodhound.Client.Cluster: NetworkInterfaceName :: Text -> NetworkInterfaceName
+ Database.Bloodhound.Client.Cluster: NodeAttrFilter :: NodeAttrName -> NonEmpty Text -> NodeAttrFilter
+ Database.Bloodhound.Client.Cluster: NodeAttrName :: Text -> NodeAttrName
+ Database.Bloodhound.Client.Cluster: NodeBreakerStats :: Int -> Double -> Bytes -> Bytes -> NodeBreakerStats
+ Database.Bloodhound.Client.Cluster: NodeBreakersStats :: NodeBreakerStats -> NodeBreakerStats -> NodeBreakerStats -> NodeBreakersStats
+ Database.Bloodhound.Client.Cluster: NodeByAttribute :: NodeAttrName -> Text -> NodeSelector
+ Database.Bloodhound.Client.Cluster: NodeByFullNodeId :: FullNodeId -> NodeSelector
+ Database.Bloodhound.Client.Cluster: NodeByHost :: Server -> NodeSelector
+ Database.Bloodhound.Client.Cluster: NodeByName :: NodeName -> NodeSelector
+ Database.Bloodhound.Client.Cluster: NodeDataPathStats :: Maybe Double -> Maybe Double -> Maybe Bytes -> Maybe Bytes -> Maybe Bytes -> Maybe Int -> Maybe Int -> Maybe Int -> Bytes -> Bytes -> Bytes -> Maybe Text -> Maybe Text -> Text -> Text -> NodeDataPathStats
+ Database.Bloodhound.Client.Cluster: NodeFSStats :: [NodeDataPathStats] -> NodeFSTotalStats -> UTCTime -> NodeFSStats
+ Database.Bloodhound.Client.Cluster: NodeFSTotalStats :: Maybe Double -> Maybe Double -> Maybe Bytes -> Maybe Bytes -> Maybe Bytes -> Maybe Int -> Maybe Int -> Maybe Int -> Bytes -> Bytes -> Bytes -> NodeFSTotalStats
+ Database.Bloodhound.Client.Cluster: NodeHTTPInfo :: Bytes -> EsAddress -> [EsAddress] -> NodeHTTPInfo
+ Database.Bloodhound.Client.Cluster: NodeHTTPStats :: Int -> Int -> NodeHTTPStats
+ Database.Bloodhound.Client.Cluster: NodeIndicesStats :: Maybe NominalDiffTime -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Bytes -> Maybe Int -> Maybe NominalDiffTime -> Maybe Int -> Bytes -> Int -> Maybe Bytes -> Bytes -> Maybe Bytes -> Bytes -> Bytes -> Int -> Bytes -> Maybe Int -> Maybe Bytes -> Maybe Int -> Maybe NominalDiffTime -> Maybe Int -> Int -> Bytes -> NominalDiffTime -> Int -> Int -> NominalDiffTime -> Int -> NominalDiffTime -> Int -> Bytes -> Int -> NominalDiffTime -> Int -> Bytes -> Int -> Int -> Int -> NominalDiffTime -> Int -> Int -> NominalDiffTime -> Int -> Int -> Int -> NominalDiffTime -> Int -> NominalDiffTime -> Int -> NominalDiffTime -> Int -> Maybe NominalDiffTime -> Maybe Bool -> Maybe Int -> Int -> NominalDiffTime -> Int -> Int -> NominalDiffTime -> Int -> Maybe NominalDiffTime -> Bytes -> Int -> Int -> NodeIndicesStats
+ Database.Bloodhound.Client.Cluster: NodeInfo :: Maybe EsAddress -> BuildHash -> VersionNumber -> Server -> Server -> EsAddress -> NodeName -> FullNodeId -> [NodePluginInfo] -> NodeHTTPInfo -> NodeTransportInfo -> Maybe NodeNetworkInfo -> Map Text NodeThreadPoolInfo -> NodeJVMInfo -> NodeProcessInfo -> NodeOSInfo -> Object -> NodeInfo
+ Database.Bloodhound.Client.Cluster: NodeJVMInfo :: [JVMMemoryPool] -> [JVMGCCollector] -> JVMMemoryInfo -> UTCTime -> Text -> VersionNumber -> Text -> JVMVersion -> PID -> NodeJVMInfo
+ Database.Bloodhound.Client.Cluster: NodeJVMStats :: JVMBufferPoolStats -> JVMBufferPoolStats -> JVMGCStats -> JVMGCStats -> Int -> Int -> JVMPoolStats -> JVMPoolStats -> JVMPoolStats -> Bytes -> Bytes -> Bytes -> Bytes -> Int -> Bytes -> NominalDiffTime -> UTCTime -> NodeJVMStats
+ Database.Bloodhound.Client.Cluster: NodeList :: NonEmpty NodeSelector -> NodeSelection
+ Database.Bloodhound.Client.Cluster: NodeName :: Text -> NodeName
+ Database.Bloodhound.Client.Cluster: NodeNetworkInfo :: NodeNetworkInterface -> NominalDiffTime -> NodeNetworkInfo
+ Database.Bloodhound.Client.Cluster: NodeNetworkInterface :: MacAddress -> NetworkInterfaceName -> Server -> NodeNetworkInterface
+ Database.Bloodhound.Client.Cluster: NodeNetworkStats :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> NodeNetworkStats
+ Database.Bloodhound.Client.Cluster: NodeOSInfo :: NominalDiffTime -> Text -> Text -> Text -> Int -> Int -> NodeOSInfo
+ Database.Bloodhound.Client.Cluster: NodeOSStats :: UTCTime -> Int -> Maybe LoadAvgs -> Bytes -> Bytes -> Int -> Bytes -> Int -> Bytes -> Bytes -> Bytes -> NodeOSStats
+ Database.Bloodhound.Client.Cluster: NodePluginInfo :: Maybe Bool -> Maybe Bool -> Text -> MaybeNA VersionNumber -> PluginName -> NodePluginInfo
+ Database.Bloodhound.Client.Cluster: NodeProcessInfo :: Bool -> Maybe Int -> PID -> NominalDiffTime -> NodeProcessInfo
+ Database.Bloodhound.Client.Cluster: NodeProcessStats :: UTCTime -> Int -> Int -> Int -> NominalDiffTime -> Bytes -> NodeProcessStats
+ Database.Bloodhound.Client.Cluster: NodeStats :: NodeName -> FullNodeId -> Maybe NodeBreakersStats -> NodeHTTPStats -> NodeTransportStats -> NodeFSStats -> Maybe NodeNetworkStats -> Map Text NodeThreadPoolStats -> NodeJVMStats -> NodeProcessStats -> NodeOSStats -> NodeIndicesStats -> NodeStats
+ Database.Bloodhound.Client.Cluster: NodeThreadPoolInfo :: ThreadPoolSize -> Maybe NominalDiffTime -> Maybe Int -> Maybe Int -> ThreadPoolType -> NodeThreadPoolInfo
+ Database.Bloodhound.Client.Cluster: NodeThreadPoolStats :: Int -> Int -> Int -> Int -> Int -> Int -> NodeThreadPoolStats
+ Database.Bloodhound.Client.Cluster: NodeTransportInfo :: [BoundTransportAddress] -> EsAddress -> [EsAddress] -> NodeTransportInfo
+ Database.Bloodhound.Client.Cluster: NodeTransportStats :: Bytes -> Int -> Bytes -> Int -> Int -> NodeTransportStats
+ Database.Bloodhound.Client.Cluster: NodesInfo :: [NodeInfo] -> ClusterName -> NodesInfo
+ Database.Bloodhound.Client.Cluster: NodesStats :: [NodeStats] -> ClusterName -> NodesStats
+ Database.Bloodhound.Client.Cluster: NominalDiffTimeJSON :: NominalDiffTime -> NominalDiffTimeJSON
+ Database.Bloodhound.Client.Cluster: NumberOfReplicas :: ReplicaCount -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: OpenIndex :: OpenCloseIndex
+ Database.Bloodhound.Client.Cluster: OtherRepoConversionError :: Text -> SnapshotRepoConversionError
+ Database.Bloodhound.Client.Cluster: PID :: Int -> PID
+ Database.Bloodhound.Client.Cluster: ParentDocument :: FieldName -> RelationName -> JoinRelation
+ Database.Bloodhound.Client.Cluster: PluginName :: Text -> PluginName
+ Database.Bloodhound.Client.Cluster: Quarter :: Interval
+ Database.Bloodhound.Client.Cluster: QuorumMinus1Shards :: InitialShardCount
+ Database.Bloodhound.Client.Cluster: QuorumShards :: InitialShardCount
+ Database.Bloodhound.Client.Cluster: RRGroupRefNum :: Int -> RRGroupRefNum
+ Database.Bloodhound.Client.Cluster: RRSubGroup :: RRGroupRefNum -> RestoreRenameToken
+ Database.Bloodhound.Client.Cluster: RRSubWholeMatch :: RestoreRenameToken
+ Database.Bloodhound.Client.Cluster: RRTLit :: Text -> RestoreRenameToken
+ Database.Bloodhound.Client.Cluster: RecoveryInitialShards :: InitialShardCount -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: RefreshInterval :: NominalDiffTime -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: RemoveAlias :: IndexAlias -> IndexAliasAction
+ Database.Bloodhound.Client.Cluster: ReplicasBounded :: Int -> Int -> ReplicaBounds
+ Database.Bloodhound.Client.Cluster: ReplicasLowerBounded :: Int -> ReplicaBounds
+ Database.Bloodhound.Client.Cluster: ReplicasUnbounded :: ReplicaBounds
+ Database.Bloodhound.Client.Cluster: RepoPattern :: Text -> SnapshotRepoPattern
+ Database.Bloodhound.Client.Cluster: RepoTypeMismatch :: SnapshotRepoType -> SnapshotRepoType -> SnapshotRepoConversionError
+ Database.Bloodhound.Client.Cluster: RestoreIndexSettings :: Maybe ReplicaCount -> RestoreIndexSettings
+ Database.Bloodhound.Client.Cluster: RestoreRenamePattern :: Text -> RestoreRenamePattern
+ Database.Bloodhound.Client.Cluster: RoutingAllocationEnable :: AllocationPolicy -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: RoutingAllocationExclude :: NonEmpty NodeAttrFilter -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: RoutingAllocationInclude :: NonEmpty NodeAttrFilter -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: RoutingAllocationRequire :: NonEmpty NodeAttrFilter -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: RoutingAllocationShardsPerNode :: ShardCount -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: RoutingValue :: Text -> RoutingValue
+ Database.Bloodhound.Client.Cluster: SearchAliasRouting :: NonEmpty RoutingValue -> SearchAliasRouting
+ Database.Bloodhound.Client.Cluster: Second :: Interval
+ Database.Bloodhound.Client.Cluster: Seconds :: TimeInterval
+ Database.Bloodhound.Client.Cluster: ShardResult :: Int -> Int -> Int -> Int -> ShardResult
+ Database.Bloodhound.Client.Cluster: ShardsResult :: ShardResult -> ShardsResult
+ Database.Bloodhound.Client.Cluster: ShortType :: FieldType
+ Database.Bloodhound.Client.Cluster: SnapPattern :: Text -> SnapshotPattern
+ Database.Bloodhound.Client.Cluster: SnapshotAborted :: SnapshotState
+ Database.Bloodhound.Client.Cluster: SnapshotCreateSettings :: Bool -> Maybe IndexSelection -> Bool -> Bool -> Bool -> SnapshotCreateSettings
+ Database.Bloodhound.Client.Cluster: SnapshotFailed :: SnapshotState
+ Database.Bloodhound.Client.Cluster: SnapshotInfo :: ShardResult -> [SnapshotShardFailure] -> NominalDiffTime -> UTCTime -> UTCTime -> SnapshotState -> [IndexName] -> SnapshotName -> SnapshotInfo
+ Database.Bloodhound.Client.Cluster: SnapshotInit :: SnapshotState
+ Database.Bloodhound.Client.Cluster: SnapshotList :: NonEmpty SnapshotPattern -> SnapshotSelection
+ Database.Bloodhound.Client.Cluster: SnapshotMissing :: SnapshotState
+ Database.Bloodhound.Client.Cluster: SnapshotNodeVerification :: FullNodeId -> NodeName -> SnapshotNodeVerification
+ Database.Bloodhound.Client.Cluster: SnapshotRepoList :: NonEmpty SnapshotRepoPattern -> SnapshotRepoSelection
+ Database.Bloodhound.Client.Cluster: SnapshotRepoName :: Text -> SnapshotRepoName
+ Database.Bloodhound.Client.Cluster: SnapshotRepoType :: Text -> SnapshotRepoType
+ Database.Bloodhound.Client.Cluster: SnapshotRepoUpdateSettings :: Bool -> SnapshotRepoUpdateSettings
+ Database.Bloodhound.Client.Cluster: SnapshotRestoreSettings :: Bool -> Maybe IndexSelection -> Bool -> Bool -> Maybe RestoreRenamePattern -> Maybe (NonEmpty RestoreRenameToken) -> Bool -> Bool -> Maybe RestoreIndexSettings -> Maybe (NonEmpty Text) -> SnapshotRestoreSettings
+ Database.Bloodhound.Client.Cluster: SnapshotShardFailure :: IndexName -> Maybe NodeName -> Text -> ShardId -> SnapshotShardFailure
+ Database.Bloodhound.Client.Cluster: SnapshotStarted :: SnapshotState
+ Database.Bloodhound.Client.Cluster: SnapshotSuccess :: SnapshotState
+ Database.Bloodhound.Client.Cluster: SnapshotVerification :: [SnapshotNodeVerification] -> SnapshotVerification
+ Database.Bloodhound.Client.Cluster: SnapshotWaiting :: SnapshotState
+ Database.Bloodhound.Client.Cluster: Status :: Text -> Text -> Text -> Version -> Text -> Status
+ Database.Bloodhound.Client.Cluster: TTLDisablePurge :: Bool -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: TemplateName :: Text -> TemplateName
+ Database.Bloodhound.Client.Cluster: ThreadPool :: Text -> NodeThreadPoolInfo -> ThreadPool
+ Database.Bloodhound.Client.Cluster: ThreadPoolBounded :: Int -> ThreadPoolSize
+ Database.Bloodhound.Client.Cluster: ThreadPoolCached :: ThreadPoolType
+ Database.Bloodhound.Client.Cluster: ThreadPoolFixed :: ThreadPoolType
+ Database.Bloodhound.Client.Cluster: ThreadPoolFixedAutoQueueSize :: ThreadPoolType
+ Database.Bloodhound.Client.Cluster: ThreadPoolScaling :: ThreadPoolType
+ Database.Bloodhound.Client.Cluster: ThreadPoolUnbounded :: ThreadPoolSize
+ Database.Bloodhound.Client.Cluster: TranslogDisableFlush :: Bool -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: TranslogFSType :: FSType -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: TranslogFlushThresholdOps :: Int -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: TranslogFlushThresholdPeriod :: NominalDiffTime -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: TranslogFlushThresholdSize :: Bytes -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: UA_RetryOnConflict :: Int -> UpsertActionMetadata
+ Database.Bloodhound.Client.Cluster: UA_Version :: Int -> UpsertActionMetadata
+ Database.Bloodhound.Client.Cluster: UnassignedNodeLeftDelayedTimeout :: NominalDiffTime -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: Update :: BulkAction
+ Database.Bloodhound.Client.Cluster: UpsertDoc :: Value -> UpsertPayload
+ Database.Bloodhound.Client.Cluster: UpsertScript :: Bool -> Script -> Value -> UpsertPayload
+ Database.Bloodhound.Client.Cluster: Version :: VersionNumber -> BuildHash -> UTCTime -> Bool -> VersionNumber -> Version
+ Database.Bloodhound.Client.Cluster: VersionNumber :: Version -> VersionNumber
+ Database.Bloodhound.Client.Cluster: WarmerEnabled :: Bool -> UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: Week :: Interval
+ Database.Bloodhound.Client.Cluster: Weeks :: TimeInterval
+ Database.Bloodhound.Client.Cluster: Year :: Interval
+ Database.Bloodhound.Client.Cluster: [aliasCreateFilter] :: IndexAliasCreate -> Maybe Filter
+ Database.Bloodhound.Client.Cluster: [aliasCreateRouting] :: IndexAliasCreate -> Maybe AliasRouting
+ Database.Bloodhound.Client.Cluster: [baiAction] :: BulkActionItem -> BulkAction
+ Database.Bloodhound.Client.Cluster: [baiItem] :: BulkActionItem -> BulkItem
+ Database.Bloodhound.Client.Cluster: [beReason] :: BulkError -> Text
+ Database.Bloodhound.Client.Cluster: [beType] :: BulkError -> Text
+ Database.Bloodhound.Client.Cluster: [bhManager] :: BHEnv -> Manager
+ Database.Bloodhound.Client.Cluster: [bhRequestHook] :: BHEnv -> Request -> IO Request
+ Database.Bloodhound.Client.Cluster: [bhServer] :: BHEnv -> Server
+ Database.Bloodhound.Client.Cluster: [biError] :: BulkItem -> Maybe BulkError
+ Database.Bloodhound.Client.Cluster: [biId] :: BulkItem -> Text
+ Database.Bloodhound.Client.Cluster: [biIndex] :: BulkItem -> Text
+ Database.Bloodhound.Client.Cluster: [biStatus] :: BulkItem -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [boundAddress] :: BoundTransportAddress -> [EsAddress]
+ Database.Bloodhound.Client.Cluster: [buildHash] :: BuildHash -> Text
+ Database.Bloodhound.Client.Cluster: [build_date] :: Version -> UTCTime
+ Database.Bloodhound.Client.Cluster: [build_hash] :: Version -> BuildHash
+ Database.Bloodhound.Client.Cluster: [build_snapshot] :: Version -> Bool
+ Database.Bloodhound.Client.Cluster: [bulkActionItems] :: BulkResponse -> [BulkActionItem]
+ Database.Bloodhound.Client.Cluster: [bulkErrors] :: BulkResponse -> Bool
+ Database.Bloodhound.Client.Cluster: [bulkTook] :: BulkResponse -> Int
+ Database.Bloodhound.Client.Cluster: [clusterName] :: ClusterName -> Text
+ Database.Bloodhound.Client.Cluster: [cluster_name] :: Status -> Text
+ Database.Bloodhound.Client.Cluster: [cluster_uuid] :: Status -> Text
+ Database.Bloodhound.Client.Cluster: [countQuery] :: CountQuery -> Query
+ Database.Bloodhound.Client.Cluster: [cpuCacheSize] :: CPUInfo -> Bytes
+ Database.Bloodhound.Client.Cluster: [cpuCoresPerSocket] :: CPUInfo -> Int
+ Database.Bloodhound.Client.Cluster: [cpuMHZ] :: CPUInfo -> Int
+ Database.Bloodhound.Client.Cluster: [cpuModel] :: CPUInfo -> Text
+ Database.Bloodhound.Client.Cluster: [cpuTotalCores] :: CPUInfo -> Int
+ Database.Bloodhound.Client.Cluster: [cpuTotalSockets] :: CPUInfo -> Int
+ Database.Bloodhound.Client.Cluster: [cpuVendor] :: CPUInfo -> Text
+ Database.Bloodhound.Client.Cluster: [crCount] :: CountResponse -> Natural
+ Database.Bloodhound.Client.Cluster: [crShards] :: CountResponse -> CountShards
+ Database.Bloodhound.Client.Cluster: [csFailed] :: CountShards -> Int
+ Database.Bloodhound.Client.Cluster: [csSuccessful] :: CountShards -> Int
+ Database.Bloodhound.Client.Cluster: [csTotal] :: CountShards -> Int
+ Database.Bloodhound.Client.Cluster: [esAddress] :: EsAddress -> Text
+ Database.Bloodhound.Client.Cluster: [esPassword] :: EsPassword -> Text
+ Database.Bloodhound.Client.Cluster: [esUsername] :: EsUsername -> Text
+ Database.Bloodhound.Client.Cluster: [fieldDefinition] :: MappingField -> FieldDefinition
+ Database.Bloodhound.Client.Cluster: [fieldType] :: FieldDefinition -> FieldType
+ Database.Bloodhound.Client.Cluster: [flushAfterOptimize] :: ForceMergeIndexSettings -> Bool
+ Database.Bloodhound.Client.Cluster: [fsrChunkSize] :: FsSnapshotRepo -> Maybe Bytes
+ Database.Bloodhound.Client.Cluster: [fsrCompressMetadata] :: FsSnapshotRepo -> Bool
+ Database.Bloodhound.Client.Cluster: [fsrLocation] :: FsSnapshotRepo -> FilePath
+ Database.Bloodhound.Client.Cluster: [fsrMaxRestoreBytesPerSec] :: FsSnapshotRepo -> Maybe Bytes
+ Database.Bloodhound.Client.Cluster: [fsrMaxSnapshotBytesPerSec] :: FsSnapshotRepo -> Maybe Bytes
+ Database.Bloodhound.Client.Cluster: [fsrName] :: FsSnapshotRepo -> SnapshotRepoName
+ Database.Bloodhound.Client.Cluster: [fullNodeId] :: FullNodeId -> Text
+ Database.Bloodhound.Client.Cluster: [gSnapshotRepoName] :: GenericSnapshotRepo -> SnapshotRepoName
+ Database.Bloodhound.Client.Cluster: [gSnapshotRepoSettingsObject] :: GenericSnapshotRepoSettings -> Object
+ Database.Bloodhound.Client.Cluster: [gSnapshotRepoSettings] :: GenericSnapshotRepo -> GenericSnapshotRepoSettings
+ Database.Bloodhound.Client.Cluster: [gSnapshotRepoType] :: GenericSnapshotRepo -> SnapshotRepoType
+ Database.Bloodhound.Client.Cluster: [idsJoinRelation] :: IndexDocumentSettings -> Maybe JoinRelation
+ Database.Bloodhound.Client.Cluster: [idsVersionControl] :: IndexDocumentSettings -> VersionControl
+ Database.Bloodhound.Client.Cluster: [indexAliasSummaryAlias] :: IndexAliasSummary -> IndexAlias
+ Database.Bloodhound.Client.Cluster: [indexAliasSummaryCreate] :: IndexAliasSummary -> IndexAliasCreate
+ Database.Bloodhound.Client.Cluster: [indexAlias] :: IndexAlias -> IndexAliasName
+ Database.Bloodhound.Client.Cluster: [indexAliasesSummary] :: IndexAliasesSummary -> [IndexAliasSummary]
+ Database.Bloodhound.Client.Cluster: [indexMappingsLimitDepth] :: IndexMappingsLimits -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [indexMappingsLimitFieldNameLength] :: IndexMappingsLimits -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [indexMappingsLimitNestedFields] :: IndexMappingsLimits -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [indexMappingsLimitNestedObjects] :: IndexMappingsLimits -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [indexMappingsLimits] :: IndexSettings -> IndexMappingsLimits
+ Database.Bloodhound.Client.Cluster: [indexReplicas] :: IndexSettings -> ReplicaCount
+ Database.Bloodhound.Client.Cluster: [indexShards] :: IndexSettings -> ShardCount
+ Database.Bloodhound.Client.Cluster: [jvmBufferPoolStatsCount] :: JVMBufferPoolStats -> Int
+ Database.Bloodhound.Client.Cluster: [jvmBufferPoolStatsTotalCapacity] :: JVMBufferPoolStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [jvmBufferPoolStatsUsed] :: JVMBufferPoolStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [jvmGCCollector] :: JVMGCCollector -> Text
+ Database.Bloodhound.Client.Cluster: [jvmGCStatsCollectionCount] :: JVMGCStats -> Int
+ Database.Bloodhound.Client.Cluster: [jvmGCStatsCollectionTime] :: JVMGCStats -> NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [jvmMemoryInfoDirectMax] :: JVMMemoryInfo -> Bytes
+ Database.Bloodhound.Client.Cluster: [jvmMemoryInfoHeapInit] :: JVMMemoryInfo -> Bytes
+ Database.Bloodhound.Client.Cluster: [jvmMemoryInfoHeapMax] :: JVMMemoryInfo -> Bytes
+ Database.Bloodhound.Client.Cluster: [jvmMemoryInfoNonHeapInit] :: JVMMemoryInfo -> Bytes
+ Database.Bloodhound.Client.Cluster: [jvmMemoryInfoNonHeapMax] :: JVMMemoryInfo -> Bytes
+ Database.Bloodhound.Client.Cluster: [jvmMemoryPool] :: JVMMemoryPool -> Text
+ Database.Bloodhound.Client.Cluster: [jvmPoolStatsMax] :: JVMPoolStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [jvmPoolStatsPeakMax] :: JVMPoolStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [jvmPoolStatsPeakUsed] :: JVMPoolStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [jvmPoolStatsUsed] :: JVMPoolStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [loadAvg15Min] :: LoadAvgs -> Double
+ Database.Bloodhound.Client.Cluster: [loadAvg1Min] :: LoadAvgs -> Double
+ Database.Bloodhound.Client.Cluster: [loadAvg5Min] :: LoadAvgs -> Double
+ Database.Bloodhound.Client.Cluster: [lucene_version] :: Version -> VersionNumber
+ Database.Bloodhound.Client.Cluster: [macAddress] :: MacAddress -> Text
+ Database.Bloodhound.Client.Cluster: [mappingFieldName] :: MappingField -> FieldName
+ Database.Bloodhound.Client.Cluster: [mappingFields] :: Mapping -> [MappingField]
+ Database.Bloodhound.Client.Cluster: [maxNumSegments] :: ForceMergeIndexSettings -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [name] :: Status -> Text
+ Database.Bloodhound.Client.Cluster: [ndtJSON] :: NominalDiffTimeJSON -> NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [networkInterfaceName] :: NetworkInterfaceName -> Text
+ Database.Bloodhound.Client.Cluster: [nodeAttrFilterName] :: NodeAttrFilter -> NodeAttrName
+ Database.Bloodhound.Client.Cluster: [nodeAttrFilterValues] :: NodeAttrFilter -> NonEmpty Text
+ Database.Bloodhound.Client.Cluster: [nodeBreakersEstSize] :: NodeBreakerStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeBreakersLimitSize] :: NodeBreakerStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeBreakersOverhead] :: NodeBreakerStats -> Double
+ Database.Bloodhound.Client.Cluster: [nodeBreakersTripped] :: NodeBreakerStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeDataPathAvailable] :: NodeDataPathStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeDataPathDevice] :: NodeDataPathStats -> Maybe Text
+ Database.Bloodhound.Client.Cluster: [nodeDataPathDiskQueue] :: NodeDataPathStats -> Maybe Double
+ Database.Bloodhound.Client.Cluster: [nodeDataPathDiskServiceTime] :: NodeDataPathStats -> Maybe Double
+ Database.Bloodhound.Client.Cluster: [nodeDataPathFree] :: NodeDataPathStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeDataPathIOOps] :: NodeDataPathStats -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [nodeDataPathIOSize] :: NodeDataPathStats -> Maybe Bytes
+ Database.Bloodhound.Client.Cluster: [nodeDataPathMount] :: NodeDataPathStats -> Text
+ Database.Bloodhound.Client.Cluster: [nodeDataPathPath] :: NodeDataPathStats -> Text
+ Database.Bloodhound.Client.Cluster: [nodeDataPathReadSize] :: NodeDataPathStats -> Maybe Bytes
+ Database.Bloodhound.Client.Cluster: [nodeDataPathReads] :: NodeDataPathStats -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [nodeDataPathTotal] :: NodeDataPathStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeDataPathType] :: NodeDataPathStats -> Maybe Text
+ Database.Bloodhound.Client.Cluster: [nodeDataPathWriteSize] :: NodeDataPathStats -> Maybe Bytes
+ Database.Bloodhound.Client.Cluster: [nodeDataPathWrites] :: NodeDataPathStats -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [nodeFSDataPaths] :: NodeFSStats -> [NodeDataPathStats]
+ Database.Bloodhound.Client.Cluster: [nodeFSTimestamp] :: NodeFSStats -> UTCTime
+ Database.Bloodhound.Client.Cluster: [nodeFSTotalAvailable] :: NodeFSTotalStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeFSTotalDiskQueue] :: NodeFSTotalStats -> Maybe Double
+ Database.Bloodhound.Client.Cluster: [nodeFSTotalDiskServiceTime] :: NodeFSTotalStats -> Maybe Double
+ Database.Bloodhound.Client.Cluster: [nodeFSTotalFree] :: NodeFSTotalStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeFSTotalIOOps] :: NodeFSTotalStats -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [nodeFSTotalIOSize] :: NodeFSTotalStats -> Maybe Bytes
+ Database.Bloodhound.Client.Cluster: [nodeFSTotalReadSize] :: NodeFSTotalStats -> Maybe Bytes
+ Database.Bloodhound.Client.Cluster: [nodeFSTotalReads] :: NodeFSTotalStats -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [nodeFSTotalTotal] :: NodeFSTotalStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeFSTotalWriteSize] :: NodeFSTotalStats -> Maybe Bytes
+ Database.Bloodhound.Client.Cluster: [nodeFSTotalWrites] :: NodeFSTotalStats -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [nodeFSTotal] :: NodeFSStats -> NodeFSTotalStats
+ Database.Bloodhound.Client.Cluster: [nodeHTTPCurrentOpen] :: NodeHTTPStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeHTTPMaxContentLength] :: NodeHTTPInfo -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeHTTPTotalOpened] :: NodeHTTPStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeHTTPbound_address] :: NodeHTTPInfo -> [EsAddress]
+ Database.Bloodhound.Client.Cluster: [nodeHTTPpublishAddress] :: NodeHTTPInfo -> EsAddress
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsCompletionSize] :: NodeIndicesStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsDocsCount] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsDocsDeleted] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsFieldDataEvictions] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsFieldDataMemory] :: NodeIndicesStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsFlushTotalTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsFlushTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsGetCurrent] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsGetExistsTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsGetExistsTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsGetMissingTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsGetMissingTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsGetTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsGetTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsIndexingDeleteCurrent] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsIndexingDeleteTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsIndexingDeleteTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsIndexingIndexCurrent] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsIndexingIndexTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsIndexingIsThrottled] :: NodeIndicesStats -> Maybe Bool
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsIndexingNoopUpdateTotal] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsIndexingThrottleTime] :: NodeIndicesStats -> Maybe NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsIndexingTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsMergesCurrentDocs] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsMergesCurrentSize] :: NodeIndicesStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsMergesCurrent] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsMergesTotalDocs] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsMergesTotalSize] :: NodeIndicesStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsMergesTotalTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsMergesTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsPercolateCurrent] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsPercolateMemory] :: NodeIndicesStats -> Maybe Bytes
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsPercolateQueries] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsPercolateTime] :: NodeIndicesStats -> Maybe NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsPercolateTotal] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsQueryCacheEvictions] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsQueryCacheHits] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsQueryCacheMisses] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsQueryCacheSize] :: NodeIndicesStats -> Maybe Bytes
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsRecoveryCurrentAsSource] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsRecoveryCurrentAsTarget] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsRecoveryThrottleTime] :: NodeIndicesStats -> Maybe NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsRefreshTotalTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsRefreshTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsSearchFetchCurrent] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsSearchFetchTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsSearchFetchTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsSearchOpenContexts] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsSearchQueryCurrent] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsSearchQueryTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsSearchQueryTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsSegCount] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsSegFixedBitSetMemory] :: NodeIndicesStats -> Maybe Bytes
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsSegIndexWriterMaxMemory] :: NodeIndicesStats -> Maybe Bytes
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsSegIndexWriterMemory] :: NodeIndicesStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsSegMemory] :: NodeIndicesStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsSegVersionMapMemory] :: NodeIndicesStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsStoreSize] :: NodeIndicesStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsStoreThrottleTime] :: NodeIndicesStats -> Maybe NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsSuggestCurrent] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsSuggestTime] :: NodeIndicesStats -> Maybe NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsSuggestTotal] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsTranslogOps] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsTranslogSize] :: NodeIndicesStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsWarmerCurrent] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsWarmerTotalTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeIndicesStatsWarmerTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeInfoBuild] :: NodeInfo -> BuildHash
+ Database.Bloodhound.Client.Cluster: [nodeInfoESVersion] :: NodeInfo -> VersionNumber
+ Database.Bloodhound.Client.Cluster: [nodeInfoFullId] :: NodeInfo -> FullNodeId
+ Database.Bloodhound.Client.Cluster: [nodeInfoHTTPAddress] :: NodeInfo -> Maybe EsAddress
+ Database.Bloodhound.Client.Cluster: [nodeInfoHTTP] :: NodeInfo -> NodeHTTPInfo
+ Database.Bloodhound.Client.Cluster: [nodeInfoHost] :: NodeInfo -> Server
+ Database.Bloodhound.Client.Cluster: [nodeInfoIP] :: NodeInfo -> Server
+ Database.Bloodhound.Client.Cluster: [nodeInfoJVM] :: NodeInfo -> NodeJVMInfo
+ Database.Bloodhound.Client.Cluster: [nodeInfoName] :: NodeInfo -> NodeName
+ Database.Bloodhound.Client.Cluster: [nodeInfoNetwork] :: NodeInfo -> Maybe NodeNetworkInfo
+ Database.Bloodhound.Client.Cluster: [nodeInfoOS] :: NodeInfo -> NodeOSInfo
+ Database.Bloodhound.Client.Cluster: [nodeInfoPlugins] :: NodeInfo -> [NodePluginInfo]
+ Database.Bloodhound.Client.Cluster: [nodeInfoProcess] :: NodeInfo -> NodeProcessInfo
+ Database.Bloodhound.Client.Cluster: [nodeInfoSettings] :: NodeInfo -> Object
+ Database.Bloodhound.Client.Cluster: [nodeInfoThreadPool] :: NodeInfo -> Map Text NodeThreadPoolInfo
+ Database.Bloodhound.Client.Cluster: [nodeInfoTransportAddress] :: NodeInfo -> EsAddress
+ Database.Bloodhound.Client.Cluster: [nodeInfoTransport] :: NodeInfo -> NodeTransportInfo
+ Database.Bloodhound.Client.Cluster: [nodeJVMInfoMemoryInfo] :: NodeJVMInfo -> JVMMemoryInfo
+ Database.Bloodhound.Client.Cluster: [nodeJVMInfoMemoryPoolsGCCollectors] :: NodeJVMInfo -> [JVMGCCollector]
+ Database.Bloodhound.Client.Cluster: [nodeJVMInfoMemoryPools] :: NodeJVMInfo -> [JVMMemoryPool]
+ Database.Bloodhound.Client.Cluster: [nodeJVMInfoStartTime] :: NodeJVMInfo -> UTCTime
+ Database.Bloodhound.Client.Cluster: [nodeJVMInfoVMVendor] :: NodeJVMInfo -> Text
+ Database.Bloodhound.Client.Cluster: [nodeJVMPID] :: NodeJVMInfo -> PID
+ Database.Bloodhound.Client.Cluster: [nodeJVMStatsDirectBufferPool] :: NodeJVMStats -> JVMBufferPoolStats
+ Database.Bloodhound.Client.Cluster: [nodeJVMStatsGCOldCollector] :: NodeJVMStats -> JVMGCStats
+ Database.Bloodhound.Client.Cluster: [nodeJVMStatsGCYoungCollector] :: NodeJVMStats -> JVMGCStats
+ Database.Bloodhound.Client.Cluster: [nodeJVMStatsHeapCommitted] :: NodeJVMStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeJVMStatsHeapMax] :: NodeJVMStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeJVMStatsHeapUsedPercent] :: NodeJVMStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeJVMStatsHeapUsed] :: NodeJVMStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeJVMStatsMappedBufferPool] :: NodeJVMStats -> JVMBufferPoolStats
+ Database.Bloodhound.Client.Cluster: [nodeJVMStatsNonHeapCommitted] :: NodeJVMStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeJVMStatsNonHeapUsed] :: NodeJVMStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeJVMStatsOldPool] :: NodeJVMStats -> JVMPoolStats
+ Database.Bloodhound.Client.Cluster: [nodeJVMStatsPeakThreadsCount] :: NodeJVMStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeJVMStatsSurvivorPool] :: NodeJVMStats -> JVMPoolStats
+ Database.Bloodhound.Client.Cluster: [nodeJVMStatsThreadsCount] :: NodeJVMStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeJVMStatsTimestamp] :: NodeJVMStats -> UTCTime
+ Database.Bloodhound.Client.Cluster: [nodeJVMStatsUptime] :: NodeJVMStats -> NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeJVMStatsYoungPool] :: NodeJVMStats -> JVMPoolStats
+ Database.Bloodhound.Client.Cluster: [nodeJVMVMName] :: NodeJVMInfo -> Text
+ Database.Bloodhound.Client.Cluster: [nodeJVMVMVersion] :: NodeJVMInfo -> VersionNumber
+ Database.Bloodhound.Client.Cluster: [nodeJVMVersion] :: NodeJVMInfo -> JVMVersion
+ Database.Bloodhound.Client.Cluster: [nodeName] :: NodeName -> Text
+ Database.Bloodhound.Client.Cluster: [nodeNetIfaceAddress] :: NodeNetworkInterface -> Server
+ Database.Bloodhound.Client.Cluster: [nodeNetIfaceMacAddress] :: NodeNetworkInterface -> MacAddress
+ Database.Bloodhound.Client.Cluster: [nodeNetIfaceName] :: NodeNetworkInterface -> NetworkInterfaceName
+ Database.Bloodhound.Client.Cluster: [nodeNetTCPActiveOpens] :: NodeNetworkStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeNetTCPAttemptFails] :: NodeNetworkStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeNetTCPCurrEstab] :: NodeNetworkStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeNetTCPEstabResets] :: NodeNetworkStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeNetTCPInErrs] :: NodeNetworkStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeNetTCPInSegs] :: NodeNetworkStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeNetTCPOutRSTs] :: NodeNetworkStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeNetTCPOutSegs] :: NodeNetworkStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeNetTCPPassiveOpens] :: NodeNetworkStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeNetTCPRetransSegs] :: NodeNetworkStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeNetworkPrimaryInterface] :: NodeNetworkInfo -> NodeNetworkInterface
+ Database.Bloodhound.Client.Cluster: [nodeNetworkRefreshInterval] :: NodeNetworkInfo -> NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeOSAllocatedProcessors] :: NodeOSInfo -> Int
+ Database.Bloodhound.Client.Cluster: [nodeOSArch] :: NodeOSInfo -> Text
+ Database.Bloodhound.Client.Cluster: [nodeOSAvailableProcessors] :: NodeOSInfo -> Int
+ Database.Bloodhound.Client.Cluster: [nodeOSCPUPercent] :: NodeOSStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeOSLoad] :: NodeOSStats -> Maybe LoadAvgs
+ Database.Bloodhound.Client.Cluster: [nodeOSMemFreePercent] :: NodeOSStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeOSMemFree] :: NodeOSStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeOSMemTotal] :: NodeOSStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeOSMemUsedPercent] :: NodeOSStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeOSMemUsed] :: NodeOSStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeOSName] :: NodeOSInfo -> Text
+ Database.Bloodhound.Client.Cluster: [nodeOSRefreshInterval] :: NodeOSInfo -> NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeOSSwapFree] :: NodeOSStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeOSSwapTotal] :: NodeOSStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeOSSwapUsed] :: NodeOSStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeOSTimestamp] :: NodeOSStats -> UTCTime
+ Database.Bloodhound.Client.Cluster: [nodeOSVersion] :: NodeOSInfo -> Text
+ Database.Bloodhound.Client.Cluster: [nodePluginDescription] :: NodePluginInfo -> Text
+ Database.Bloodhound.Client.Cluster: [nodePluginJVM] :: NodePluginInfo -> Maybe Bool
+ Database.Bloodhound.Client.Cluster: [nodePluginName] :: NodePluginInfo -> PluginName
+ Database.Bloodhound.Client.Cluster: [nodePluginSite] :: NodePluginInfo -> Maybe Bool
+ Database.Bloodhound.Client.Cluster: [nodePluginVersion] :: NodePluginInfo -> MaybeNA VersionNumber
+ Database.Bloodhound.Client.Cluster: [nodeProcessCPUPercent] :: NodeProcessStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeProcessCPUTotal] :: NodeProcessStats -> NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeProcessId] :: NodeProcessInfo -> PID
+ Database.Bloodhound.Client.Cluster: [nodeProcessMLockAll] :: NodeProcessInfo -> Bool
+ Database.Bloodhound.Client.Cluster: [nodeProcessMaxFDs] :: NodeProcessStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeProcessMaxFileDescriptors] :: NodeProcessInfo -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [nodeProcessMemTotalVirtual] :: NodeProcessStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeProcessOpenFDs] :: NodeProcessStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeProcessRefreshInterval] :: NodeProcessInfo -> NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeProcessTimestamp] :: NodeProcessStats -> UTCTime
+ Database.Bloodhound.Client.Cluster: [nodeStatsBreakersStats] :: NodeStats -> Maybe NodeBreakersStats
+ Database.Bloodhound.Client.Cluster: [nodeStatsFS] :: NodeStats -> NodeFSStats
+ Database.Bloodhound.Client.Cluster: [nodeStatsFieldDataBreaker] :: NodeBreakersStats -> NodeBreakerStats
+ Database.Bloodhound.Client.Cluster: [nodeStatsFullId] :: NodeStats -> FullNodeId
+ Database.Bloodhound.Client.Cluster: [nodeStatsHTTP] :: NodeStats -> NodeHTTPStats
+ Database.Bloodhound.Client.Cluster: [nodeStatsIndices] :: NodeStats -> NodeIndicesStats
+ Database.Bloodhound.Client.Cluster: [nodeStatsJVM] :: NodeStats -> NodeJVMStats
+ Database.Bloodhound.Client.Cluster: [nodeStatsName] :: NodeStats -> NodeName
+ Database.Bloodhound.Client.Cluster: [nodeStatsNetwork] :: NodeStats -> Maybe NodeNetworkStats
+ Database.Bloodhound.Client.Cluster: [nodeStatsOS] :: NodeStats -> NodeOSStats
+ Database.Bloodhound.Client.Cluster: [nodeStatsParentBreaker] :: NodeBreakersStats -> NodeBreakerStats
+ Database.Bloodhound.Client.Cluster: [nodeStatsProcess] :: NodeStats -> NodeProcessStats
+ Database.Bloodhound.Client.Cluster: [nodeStatsRequestBreaker] :: NodeBreakersStats -> NodeBreakerStats
+ Database.Bloodhound.Client.Cluster: [nodeStatsThreadPool] :: NodeStats -> Map Text NodeThreadPoolStats
+ Database.Bloodhound.Client.Cluster: [nodeStatsTransport] :: NodeStats -> NodeTransportStats
+ Database.Bloodhound.Client.Cluster: [nodeThreadPoolActive] :: NodeThreadPoolStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeThreadPoolCompleted] :: NodeThreadPoolStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeThreadPoolInfo] :: ThreadPool -> NodeThreadPoolInfo
+ Database.Bloodhound.Client.Cluster: [nodeThreadPoolKeepalive] :: NodeThreadPoolInfo -> Maybe NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [nodeThreadPoolLargest] :: NodeThreadPoolStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeThreadPoolMax] :: NodeThreadPoolInfo -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [nodeThreadPoolMin] :: NodeThreadPoolInfo -> Maybe Int
+ Database.Bloodhound.Client.Cluster: [nodeThreadPoolName] :: ThreadPool -> Text
+ Database.Bloodhound.Client.Cluster: [nodeThreadPoolQueueSize] :: NodeThreadPoolInfo -> ThreadPoolSize
+ Database.Bloodhound.Client.Cluster: [nodeThreadPoolQueue] :: NodeThreadPoolStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeThreadPoolRejected] :: NodeThreadPoolStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeThreadPoolThreads] :: NodeThreadPoolStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeThreadPoolType] :: NodeThreadPoolInfo -> ThreadPoolType
+ Database.Bloodhound.Client.Cluster: [nodeTransportBoundAddress] :: NodeTransportInfo -> [EsAddress]
+ Database.Bloodhound.Client.Cluster: [nodeTransportCount] :: NodeTransportStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeTransportProfiles] :: NodeTransportInfo -> [BoundTransportAddress]
+ Database.Bloodhound.Client.Cluster: [nodeTransportPublishAddress] :: NodeTransportInfo -> EsAddress
+ Database.Bloodhound.Client.Cluster: [nodeTransportRXCount] :: NodeTransportStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeTransportRXSize] :: NodeTransportStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodeTransportServerOpen] :: NodeTransportStats -> Int
+ Database.Bloodhound.Client.Cluster: [nodeTransportTXSize] :: NodeTransportStats -> Bytes
+ Database.Bloodhound.Client.Cluster: [nodesClusterName] :: NodesInfo -> ClusterName
+ Database.Bloodhound.Client.Cluster: [nodesInfo] :: NodesInfo -> [NodeInfo]
+ Database.Bloodhound.Client.Cluster: [nodesStatsClusterName] :: NodesStats -> ClusterName
+ Database.Bloodhound.Client.Cluster: [nodesStats] :: NodesStats -> [NodeStats]
+ Database.Bloodhound.Client.Cluster: [number] :: Version -> VersionNumber
+ Database.Bloodhound.Client.Cluster: [onlyExpungeDeletes] :: ForceMergeIndexSettings -> Bool
+ Database.Bloodhound.Client.Cluster: [pid] :: PID -> Int
+ Database.Bloodhound.Client.Cluster: [pluginName] :: PluginName -> Text
+ Database.Bloodhound.Client.Cluster: [publishAddress] :: BoundTransportAddress -> EsAddress
+ Database.Bloodhound.Client.Cluster: [repoUpdateVerify] :: SnapshotRepoUpdateSettings -> Bool
+ Database.Bloodhound.Client.Cluster: [restoreOverrideReplicas] :: RestoreIndexSettings -> Maybe ReplicaCount
+ Database.Bloodhound.Client.Cluster: [routingValue] :: RoutingValue -> Text
+ Database.Bloodhound.Client.Cluster: [rrGroupRefNum] :: RRGroupRefNum -> Int
+ Database.Bloodhound.Client.Cluster: [rrPattern] :: RestoreRenamePattern -> Text
+ Database.Bloodhound.Client.Cluster: [sSummaryFixedSettings] :: IndexSettingsSummary -> IndexSettings
+ Database.Bloodhound.Client.Cluster: [sSummaryIndexName] :: IndexSettingsSummary -> IndexName
+ Database.Bloodhound.Client.Cluster: [sSummaryUpdateable] :: IndexSettingsSummary -> [UpdatableIndexSetting]
+ Database.Bloodhound.Client.Cluster: [shardTotal] :: ShardResult -> Int
+ Database.Bloodhound.Client.Cluster: [shardsFailed] :: ShardResult -> Int
+ Database.Bloodhound.Client.Cluster: [shardsSkipped] :: ShardResult -> Int
+ Database.Bloodhound.Client.Cluster: [shardsSuccessful] :: ShardResult -> Int
+ Database.Bloodhound.Client.Cluster: [snapIgnoreUnavailable] :: SnapshotCreateSettings -> Bool
+ Database.Bloodhound.Client.Cluster: [snapIncludeGlobalState] :: SnapshotCreateSettings -> Bool
+ Database.Bloodhound.Client.Cluster: [snapIndices] :: SnapshotCreateSettings -> Maybe IndexSelection
+ Database.Bloodhound.Client.Cluster: [snapInfoDuration] :: SnapshotInfo -> NominalDiffTime
+ Database.Bloodhound.Client.Cluster: [snapInfoEndTime] :: SnapshotInfo -> UTCTime
+ Database.Bloodhound.Client.Cluster: [snapInfoFailures] :: SnapshotInfo -> [SnapshotShardFailure]
+ Database.Bloodhound.Client.Cluster: [snapInfoIndices] :: SnapshotInfo -> [IndexName]
+ Database.Bloodhound.Client.Cluster: [snapInfoName] :: SnapshotInfo -> SnapshotName
+ Database.Bloodhound.Client.Cluster: [snapInfoShards] :: SnapshotInfo -> ShardResult
+ Database.Bloodhound.Client.Cluster: [snapInfoStartTime] :: SnapshotInfo -> UTCTime
+ Database.Bloodhound.Client.Cluster: [snapInfoState] :: SnapshotInfo -> SnapshotState
+ Database.Bloodhound.Client.Cluster: [snapPartial] :: SnapshotCreateSettings -> Bool
+ Database.Bloodhound.Client.Cluster: [snapRestoreIgnoreIndexSettings] :: SnapshotRestoreSettings -> Maybe (NonEmpty Text)
+ Database.Bloodhound.Client.Cluster: [snapRestoreIgnoreUnavailable] :: SnapshotRestoreSettings -> Bool
+ Database.Bloodhound.Client.Cluster: [snapRestoreIncludeAliases] :: SnapshotRestoreSettings -> Bool
+ Database.Bloodhound.Client.Cluster: [snapRestoreIncludeGlobalState] :: SnapshotRestoreSettings -> Bool
+ Database.Bloodhound.Client.Cluster: [snapRestoreIndexSettingsOverrides] :: SnapshotRestoreSettings -> Maybe RestoreIndexSettings
+ Database.Bloodhound.Client.Cluster: [snapRestoreIndices] :: SnapshotRestoreSettings -> Maybe IndexSelection
+ Database.Bloodhound.Client.Cluster: [snapRestorePartial] :: SnapshotRestoreSettings -> Bool
+ Database.Bloodhound.Client.Cluster: [snapRestoreRenamePattern] :: SnapshotRestoreSettings -> Maybe RestoreRenamePattern
+ Database.Bloodhound.Client.Cluster: [snapRestoreRenameReplacement] :: SnapshotRestoreSettings -> Maybe (NonEmpty RestoreRenameToken)
+ Database.Bloodhound.Client.Cluster: [snapRestoreWaitForCompletion] :: SnapshotRestoreSettings -> Bool
+ Database.Bloodhound.Client.Cluster: [snapShardFailureIndex] :: SnapshotShardFailure -> IndexName
+ Database.Bloodhound.Client.Cluster: [snapShardFailureNodeId] :: SnapshotShardFailure -> Maybe NodeName
+ Database.Bloodhound.Client.Cluster: [snapShardFailureReason] :: SnapshotShardFailure -> Text
+ Database.Bloodhound.Client.Cluster: [snapShardFailureShardId] :: SnapshotShardFailure -> ShardId
+ Database.Bloodhound.Client.Cluster: [snapWaitForCompletion] :: SnapshotCreateSettings -> Bool
+ Database.Bloodhound.Client.Cluster: [snapshotNodeVerifications] :: SnapshotVerification -> [SnapshotNodeVerification]
+ Database.Bloodhound.Client.Cluster: [snapshotRepoName] :: SnapshotRepoName -> Text
+ Database.Bloodhound.Client.Cluster: [snapshotRepoType] :: SnapshotRepoType -> Text
+ Database.Bloodhound.Client.Cluster: [snvFullId] :: SnapshotNodeVerification -> FullNodeId
+ Database.Bloodhound.Client.Cluster: [snvNodeName] :: SnapshotNodeVerification -> NodeName
+ Database.Bloodhound.Client.Cluster: [srShards] :: ShardsResult -> ShardResult
+ Database.Bloodhound.Client.Cluster: [srcIndex] :: IndexAlias -> IndexName
+ Database.Bloodhound.Client.Cluster: [tagline] :: Status -> Text
+ Database.Bloodhound.Client.Cluster: [templateMappings] :: IndexTemplate -> Value
+ Database.Bloodhound.Client.Cluster: [templatePatterns] :: IndexTemplate -> [IndexPattern]
+ Database.Bloodhound.Client.Cluster: [templateSettings] :: IndexTemplate -> Maybe IndexSettings
+ Database.Bloodhound.Client.Cluster: [unBH] :: BH m a -> ReaderT BHEnv (ExceptT EsError m) a
+ Database.Bloodhound.Client.Cluster: [unJVMVersion] :: JVMVersion -> Text
+ Database.Bloodhound.Client.Cluster: [versionNumber] :: VersionNumber -> Version
+ Database.Bloodhound.Client.Cluster: [version] :: Status -> Version
+ Database.Bloodhound.Client.Cluster: aliasCreateFilterLens :: Lens' IndexAliasCreate (Maybe Filter)
+ Database.Bloodhound.Client.Cluster: aliasCreateRoutingLens :: Lens' IndexAliasCreate (Maybe AliasRouting)
+ Database.Bloodhound.Client.Cluster: baiActionLens :: Lens' BulkActionItem BulkAction
+ Database.Bloodhound.Client.Cluster: baiItemLens :: Lens' BulkActionItem BulkItem
+ Database.Bloodhound.Client.Cluster: beReasonLens :: Lens' BulkError Text
+ Database.Bloodhound.Client.Cluster: beTypeLens :: Lens' BulkError Text
+ Database.Bloodhound.Client.Cluster: biErrorLens :: Lens' BulkItem (Maybe BulkError)
+ Database.Bloodhound.Client.Cluster: biIdLens :: Lens' BulkItem Text
+ Database.Bloodhound.Client.Cluster: biIndexLens :: Lens' BulkItem Text
+ Database.Bloodhound.Client.Cluster: biStatusLens :: Lens' BulkItem (Maybe Int)
+ Database.Bloodhound.Client.Cluster: buildUpsertActionMetadata :: UpsertActionMetadata -> Pair
+ Database.Bloodhound.Client.Cluster: bulkActionItemsLens :: Lens' BulkResponse [BulkActionItem]
+ Database.Bloodhound.Client.Cluster: bulkErrorsLens :: Lens' BulkResponse Bool
+ Database.Bloodhound.Client.Cluster: bulkTookLens :: Lens' BulkResponse Int
+ Database.Bloodhound.Client.Cluster: class (Functor m, Applicative m, MonadIO m, MonadCatch m) => MonadBH m
+ Database.Bloodhound.Client.Cluster: class SnapshotRepo r
+ Database.Bloodhound.Client.Cluster: clusterNameLens :: Lens' Status Text
+ Database.Bloodhound.Client.Cluster: clusterUuidLens :: Lens' Status Text
+ Database.Bloodhound.Client.Cluster: cpuCacheSizeLens :: Lens' CPUInfo Bytes
+ Database.Bloodhound.Client.Cluster: cpuCoresPerSocketLens :: Lens' CPUInfo Int
+ Database.Bloodhound.Client.Cluster: cpuMHZLens :: Lens' CPUInfo Int
+ Database.Bloodhound.Client.Cluster: cpuModelLens :: Lens' CPUInfo Text
+ Database.Bloodhound.Client.Cluster: cpuTotalCoresLens :: Lens' CPUInfo Int
+ Database.Bloodhound.Client.Cluster: cpuTotalSocketsLens :: Lens' CPUInfo Int
+ Database.Bloodhound.Client.Cluster: cpuVendorLens :: Lens' CPUInfo Text
+ Database.Bloodhound.Client.Cluster: crCountLens :: Lens' CountResponse Natural
+ Database.Bloodhound.Client.Cluster: crShardsLens :: Lens' CountResponse CountShards
+ Database.Bloodhound.Client.Cluster: csFailedLens :: Lens' CountShards Int
+ Database.Bloodhound.Client.Cluster: csSuccessfulLens :: Lens' CountShards Int
+ Database.Bloodhound.Client.Cluster: csTotalLens :: Lens' CountShards Int
+ Database.Bloodhound.Client.Cluster: data AliasRouting
+ Database.Bloodhound.Client.Cluster: data AllocationPolicy
+ Database.Bloodhound.Client.Cluster: data BHEnv
+ Database.Bloodhound.Client.Cluster: data BoundTransportAddress
+ Database.Bloodhound.Client.Cluster: data BulkAction
+ Database.Bloodhound.Client.Cluster: data BulkActionItem
+ Database.Bloodhound.Client.Cluster: data BulkError
+ Database.Bloodhound.Client.Cluster: data BulkItem
+ Database.Bloodhound.Client.Cluster: data BulkOperation
+ Database.Bloodhound.Client.Cluster: data BulkResponse
+ Database.Bloodhound.Client.Cluster: data CPUInfo
+ Database.Bloodhound.Client.Cluster: data CompoundFormat
+ Database.Bloodhound.Client.Cluster: data Compression
+ Database.Bloodhound.Client.Cluster: data CountResponse
+ Database.Bloodhound.Client.Cluster: data CountShards
+ Database.Bloodhound.Client.Cluster: data FSType
+ Database.Bloodhound.Client.Cluster: data FieldType
+ Database.Bloodhound.Client.Cluster: data ForceMergeIndexSettings
+ Database.Bloodhound.Client.Cluster: data FsSnapshotRepo
+ Database.Bloodhound.Client.Cluster: data GenericSnapshotRepo
+ Database.Bloodhound.Client.Cluster: data IndexAlias
+ Database.Bloodhound.Client.Cluster: data IndexAliasAction
+ Database.Bloodhound.Client.Cluster: data IndexAliasCreate
+ Database.Bloodhound.Client.Cluster: data IndexAliasSummary
+ Database.Bloodhound.Client.Cluster: data IndexDocumentSettings
+ Database.Bloodhound.Client.Cluster: data IndexMappingsLimits
+ Database.Bloodhound.Client.Cluster: data IndexSelection
+ Database.Bloodhound.Client.Cluster: data IndexSettings
+ Database.Bloodhound.Client.Cluster: data IndexSettingsSummary
+ Database.Bloodhound.Client.Cluster: data IndexTemplate
+ Database.Bloodhound.Client.Cluster: data InitialShardCount
+ Database.Bloodhound.Client.Cluster: data Interval
+ Database.Bloodhound.Client.Cluster: data JVMBufferPoolStats
+ Database.Bloodhound.Client.Cluster: data JVMGCStats
+ Database.Bloodhound.Client.Cluster: data JVMMemoryInfo
+ Database.Bloodhound.Client.Cluster: data JVMPoolStats
+ Database.Bloodhound.Client.Cluster: data JoinRelation
+ Database.Bloodhound.Client.Cluster: data LoadAvgs
+ Database.Bloodhound.Client.Cluster: data MappingField
+ Database.Bloodhound.Client.Cluster: data NodeAttrFilter
+ Database.Bloodhound.Client.Cluster: data NodeBreakerStats
+ Database.Bloodhound.Client.Cluster: data NodeBreakersStats
+ Database.Bloodhound.Client.Cluster: data NodeDataPathStats
+ Database.Bloodhound.Client.Cluster: data NodeFSStats
+ Database.Bloodhound.Client.Cluster: data NodeFSTotalStats
+ Database.Bloodhound.Client.Cluster: data NodeHTTPInfo
+ Database.Bloodhound.Client.Cluster: data NodeHTTPStats
+ Database.Bloodhound.Client.Cluster: data NodeIndicesStats
+ Database.Bloodhound.Client.Cluster: data NodeInfo
+ Database.Bloodhound.Client.Cluster: data NodeJVMInfo
+ Database.Bloodhound.Client.Cluster: data NodeJVMStats
+ Database.Bloodhound.Client.Cluster: data NodeNetworkInfo
+ Database.Bloodhound.Client.Cluster: data NodeNetworkInterface
+ Database.Bloodhound.Client.Cluster: data NodeNetworkStats
+ Database.Bloodhound.Client.Cluster: data NodeOSInfo
+ Database.Bloodhound.Client.Cluster: data NodeOSStats
+ Database.Bloodhound.Client.Cluster: data NodePluginInfo
+ Database.Bloodhound.Client.Cluster: data NodeProcessInfo
+ Database.Bloodhound.Client.Cluster: data NodeProcessStats
+ Database.Bloodhound.Client.Cluster: data NodeSelection
+ Database.Bloodhound.Client.Cluster: data NodeSelector
+ Database.Bloodhound.Client.Cluster: data NodeStats
+ Database.Bloodhound.Client.Cluster: data NodeThreadPoolInfo
+ Database.Bloodhound.Client.Cluster: data NodeThreadPoolStats
+ Database.Bloodhound.Client.Cluster: data NodeTransportInfo
+ Database.Bloodhound.Client.Cluster: data NodeTransportStats
+ Database.Bloodhound.Client.Cluster: data NodesInfo
+ Database.Bloodhound.Client.Cluster: data NodesStats
+ Database.Bloodhound.Client.Cluster: data OpenCloseIndex
+ Database.Bloodhound.Client.Cluster: data ReplicaBounds
+ Database.Bloodhound.Client.Cluster: data RestoreRenameToken
+ Database.Bloodhound.Client.Cluster: data ShardResult
+ Database.Bloodhound.Client.Cluster: data SnapshotCreateSettings
+ Database.Bloodhound.Client.Cluster: data SnapshotInfo
+ Database.Bloodhound.Client.Cluster: data SnapshotNodeVerification
+ Database.Bloodhound.Client.Cluster: data SnapshotPattern
+ Database.Bloodhound.Client.Cluster: data SnapshotRepoConversionError
+ Database.Bloodhound.Client.Cluster: data SnapshotRepoPattern
+ Database.Bloodhound.Client.Cluster: data SnapshotRepoSelection
+ Database.Bloodhound.Client.Cluster: data SnapshotRestoreSettings
+ Database.Bloodhound.Client.Cluster: data SnapshotSelection
+ Database.Bloodhound.Client.Cluster: data SnapshotShardFailure
+ Database.Bloodhound.Client.Cluster: data SnapshotState
+ Database.Bloodhound.Client.Cluster: data Status
+ Database.Bloodhound.Client.Cluster: data ThreadPool
+ Database.Bloodhound.Client.Cluster: data ThreadPoolSize
+ Database.Bloodhound.Client.Cluster: data ThreadPoolType
+ Database.Bloodhound.Client.Cluster: data TimeInterval
+ Database.Bloodhound.Client.Cluster: data UpdatableIndexSetting
+ Database.Bloodhound.Client.Cluster: data UpsertActionMetadata
+ Database.Bloodhound.Client.Cluster: data UpsertPayload
+ Database.Bloodhound.Client.Cluster: data Version
+ Database.Bloodhound.Client.Cluster: defaultForceMergeIndexSettings :: ForceMergeIndexSettings
+ Database.Bloodhound.Client.Cluster: defaultIndexDocumentSettings :: IndexDocumentSettings
+ Database.Bloodhound.Client.Cluster: defaultIndexMappingsLimits :: IndexMappingsLimits
+ Database.Bloodhound.Client.Cluster: defaultIndexSettings :: IndexSettings
+ Database.Bloodhound.Client.Cluster: defaultSnapshotCreateSettings :: SnapshotCreateSettings
+ Database.Bloodhound.Client.Cluster: defaultSnapshotRepoUpdateSettings :: SnapshotRepoUpdateSettings
+ Database.Bloodhound.Client.Cluster: defaultSnapshotRestoreSettings :: SnapshotRestoreSettings
+ Database.Bloodhound.Client.Cluster: dispatch :: MonadBH m => BHRequest contextualized body -> m (BHResponse contextualized body)
+ Database.Bloodhound.Client.Cluster: emptyBody :: ByteString
+ Database.Bloodhound.Client.Cluster: fieldDefinitionLens :: Lens' MappingField FieldDefinition
+ Database.Bloodhound.Client.Cluster: fieldTypeLens :: Lens' FieldDefinition FieldType
+ Database.Bloodhound.Client.Cluster: flushAfterOptimizeLens :: Lens' ForceMergeIndexSettings Bool
+ Database.Bloodhound.Client.Cluster: fromGSnapshotRepo :: SnapshotRepo r => GenericSnapshotRepo -> Either SnapshotRepoConversionError r
+ Database.Bloodhound.Client.Cluster: fsrChunkSizeLens :: Lens' FsSnapshotRepo (Maybe Bytes)
+ Database.Bloodhound.Client.Cluster: fsrCompressMetadataLens :: Lens' FsSnapshotRepo Bool
+ Database.Bloodhound.Client.Cluster: fsrLocationLens :: Lens' FsSnapshotRepo FilePath
+ Database.Bloodhound.Client.Cluster: fsrMaxRestoreBytesPerSecLens :: Lens' FsSnapshotRepo (Maybe Bytes)
+ Database.Bloodhound.Client.Cluster: fsrMaxSnapshotBytesPerSecLens :: Lens' FsSnapshotRepo (Maybe Bytes)
+ Database.Bloodhound.Client.Cluster: fsrNameLens :: Lens' FsSnapshotRepo SnapshotRepoName
+ Database.Bloodhound.Client.Cluster: gSnapshotRepoNameLens :: Lens' GenericSnapshotRepo SnapshotRepoName
+ Database.Bloodhound.Client.Cluster: gSnapshotRepoSettingsLens :: Lens' GenericSnapshotRepo GenericSnapshotRepoSettings
+ Database.Bloodhound.Client.Cluster: gSnapshotRepoSettingsObjectLens :: Lens' GenericSnapshotRepoSettings Object
+ Database.Bloodhound.Client.Cluster: gSnapshotRepoTypeLens :: Lens' GenericSnapshotRepo SnapshotRepoType
+ Database.Bloodhound.Client.Cluster: gigabytes :: Int -> Bytes
+ Database.Bloodhound.Client.Cluster: idsJoinRelationLens :: Lens' IndexDocumentSettings (Maybe JoinRelation)
+ Database.Bloodhound.Client.Cluster: idsVersionControlLens :: Lens' IndexDocumentSettings VersionControl
+ Database.Bloodhound.Client.Cluster: indexAliasLens :: Lens' IndexAlias IndexAliasName
+ Database.Bloodhound.Client.Cluster: indexAliasSummaryAliasLens :: Lens' IndexAliasSummary IndexAlias
+ Database.Bloodhound.Client.Cluster: indexAliasSummaryCreateLens :: Lens' IndexAliasSummary IndexAliasCreate
+ Database.Bloodhound.Client.Cluster: indexAliasesSummaryLens :: Lens' IndexAliasesSummary [IndexAliasSummary]
+ Database.Bloodhound.Client.Cluster: indexMappingsLimitDepthLens :: Lens' IndexMappingsLimits (Maybe Int)
+ Database.Bloodhound.Client.Cluster: indexMappingsLimitFieldNameLengthLens :: Lens' IndexMappingsLimits (Maybe Int)
+ Database.Bloodhound.Client.Cluster: indexMappingsLimitNestedFieldsLens :: Lens' IndexMappingsLimits (Maybe Int)
+ Database.Bloodhound.Client.Cluster: indexMappingsLimitNestedObjectsLens :: Lens' IndexMappingsLimits (Maybe Int)
+ Database.Bloodhound.Client.Cluster: indexMappingsLimitsLens :: Lens' IndexSettings IndexMappingsLimits
+ Database.Bloodhound.Client.Cluster: indexReplicasLens :: Lens' IndexSettings ReplicaCount
+ Database.Bloodhound.Client.Cluster: indexShardsLens :: Lens' IndexSettings ShardCount
+ Database.Bloodhound.Client.Cluster: instance (GHC.Base.Functor m, GHC.Base.Applicative m, Control.Monad.IO.Class.MonadIO m, Control.Monad.Catch.MonadCatch m, Control.Monad.Catch.MonadThrow m) => Database.Bloodhound.Client.Cluster.MonadBH (Database.Bloodhound.Client.Cluster.BH m)
+ Database.Bloodhound.Client.Cluster: instance Control.Monad.Catch.MonadCatch m => Control.Monad.Catch.MonadCatch (Database.Bloodhound.Client.Cluster.BH m)
+ Database.Bloodhound.Client.Cluster: instance Control.Monad.Catch.MonadMask m => Control.Monad.Catch.MonadMask (Database.Bloodhound.Client.Cluster.BH m)
+ Database.Bloodhound.Client.Cluster: instance Control.Monad.Catch.MonadThrow m => Control.Monad.Catch.MonadThrow (Database.Bloodhound.Client.Cluster.BH m)
+ Database.Bloodhound.Client.Cluster: instance Control.Monad.Fail.MonadFail m => Control.Monad.Fail.MonadFail (Database.Bloodhound.Client.Cluster.BH m)
+ Database.Bloodhound.Client.Cluster: instance Control.Monad.Fix.MonadFix m => Control.Monad.Fix.MonadFix (Database.Bloodhound.Client.Cluster.BH m)
+ Database.Bloodhound.Client.Cluster: instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (Database.Bloodhound.Client.Cluster.BH m)
+ Database.Bloodhound.Client.Cluster: instance Control.Monad.Reader.Class.MonadReader r m => Control.Monad.Reader.Class.MonadReader r (Database.Bloodhound.Client.Cluster.BH m)
+ Database.Bloodhound.Client.Cluster: instance Control.Monad.State.Class.MonadState s m => Control.Monad.State.Class.MonadState s (Database.Bloodhound.Client.Cluster.BH m)
+ Database.Bloodhound.Client.Cluster: instance Control.Monad.Trans.Class.MonadTrans Database.Bloodhound.Client.Cluster.BH
+ Database.Bloodhound.Client.Cluster: instance Control.Monad.Writer.Class.MonadWriter w m => Control.Monad.Writer.Class.MonadWriter w (Database.Bloodhound.Client.Cluster.BH m)
+ Database.Bloodhound.Client.Cluster: instance GHC.Base.Functor m => GHC.Base.Functor (Database.Bloodhound.Client.Cluster.BH m)
+ Database.Bloodhound.Client.Cluster: instance GHC.Base.Monad m => GHC.Base.Alternative (Database.Bloodhound.Client.Cluster.BH m)
+ Database.Bloodhound.Client.Cluster: instance GHC.Base.Monad m => GHC.Base.Applicative (Database.Bloodhound.Client.Cluster.BH m)
+ Database.Bloodhound.Client.Cluster: instance GHC.Base.Monad m => GHC.Base.Monad (Database.Bloodhound.Client.Cluster.BH m)
+ Database.Bloodhound.Client.Cluster: instance GHC.Base.Monad m => GHC.Base.MonadPlus (Database.Bloodhound.Client.Cluster.BH m)
+ Database.Bloodhound.Client.Cluster: kilobytes :: Int -> Bytes
+ Database.Bloodhound.Client.Cluster: mappingFieldNameLens :: Lens' MappingField FieldName
+ Database.Bloodhound.Client.Cluster: mappingFieldsLens :: Lens' Mapping [MappingField]
+ Database.Bloodhound.Client.Cluster: maxNumSegmentsLens :: Lens' ForceMergeIndexSettings (Maybe Int)
+ Database.Bloodhound.Client.Cluster: megabytes :: Int -> Bytes
+ Database.Bloodhound.Client.Cluster: mkBHEnv :: Server -> Manager -> BHEnv
+ Database.Bloodhound.Client.Cluster: mkRRGroupRefNum :: Int -> Maybe RRGroupRefNum
+ Database.Bloodhound.Client.Cluster: nameLens :: Lens' Status Text
+ Database.Bloodhound.Client.Cluster: newtype BH m a
+ Database.Bloodhound.Client.Cluster: newtype BuildHash
+ Database.Bloodhound.Client.Cluster: newtype Bytes
+ Database.Bloodhound.Client.Cluster: newtype ClusterName
+ Database.Bloodhound.Client.Cluster: newtype CountQuery
+ Database.Bloodhound.Client.Cluster: newtype EsAddress
+ Database.Bloodhound.Client.Cluster: newtype EsPassword
+ Database.Bloodhound.Client.Cluster: newtype EsUsername
+ Database.Bloodhound.Client.Cluster: newtype FieldDefinition
+ Database.Bloodhound.Client.Cluster: newtype FullNodeId
+ Database.Bloodhound.Client.Cluster: newtype GenericSnapshotRepoSettings
+ Database.Bloodhound.Client.Cluster: newtype IndexAliasRouting
+ Database.Bloodhound.Client.Cluster: newtype IndexAliasesSummary
+ Database.Bloodhound.Client.Cluster: newtype IndexPattern
+ Database.Bloodhound.Client.Cluster: newtype JVMGCCollector
+ Database.Bloodhound.Client.Cluster: newtype JVMMemoryPool
+ Database.Bloodhound.Client.Cluster: newtype JVMVersion
+ Database.Bloodhound.Client.Cluster: newtype MacAddress
+ Database.Bloodhound.Client.Cluster: newtype Mapping
+ Database.Bloodhound.Client.Cluster: newtype NetworkInterfaceName
+ Database.Bloodhound.Client.Cluster: newtype NodeAttrName
+ Database.Bloodhound.Client.Cluster: newtype NodeName
+ Database.Bloodhound.Client.Cluster: newtype NominalDiffTimeJSON
+ Database.Bloodhound.Client.Cluster: newtype PID
+ Database.Bloodhound.Client.Cluster: newtype PluginName
+ Database.Bloodhound.Client.Cluster: newtype RRGroupRefNum
+ Database.Bloodhound.Client.Cluster: newtype RestoreIndexSettings
+ Database.Bloodhound.Client.Cluster: newtype RestoreRenamePattern
+ Database.Bloodhound.Client.Cluster: newtype RoutingValue
+ Database.Bloodhound.Client.Cluster: newtype SearchAliasRouting
+ Database.Bloodhound.Client.Cluster: newtype ShardsResult
+ Database.Bloodhound.Client.Cluster: newtype SnapshotRepoName
+ Database.Bloodhound.Client.Cluster: newtype SnapshotRepoType
+ Database.Bloodhound.Client.Cluster: newtype SnapshotRepoUpdateSettings
+ Database.Bloodhound.Client.Cluster: newtype SnapshotVerification
+ Database.Bloodhound.Client.Cluster: newtype TemplateName
+ Database.Bloodhound.Client.Cluster: newtype VersionNumber
+ Database.Bloodhound.Client.Cluster: nodeOSAllocatedProcessorsLens :: Lens' NodeOSInfo Int
+ Database.Bloodhound.Client.Cluster: nodeOSArchLens :: Lens' NodeOSInfo Text
+ Database.Bloodhound.Client.Cluster: nodeOSAvailableProcessorsLens :: Lens' NodeOSInfo Int
+ Database.Bloodhound.Client.Cluster: nodeOSNameLens :: Lens' NodeOSInfo Text
+ Database.Bloodhound.Client.Cluster: nodeOSRefreshIntervalLens :: Lens' NodeOSInfo NominalDiffTime
+ Database.Bloodhound.Client.Cluster: nodeOSVersionLens :: Lens' NodeOSInfo Text
+ Database.Bloodhound.Client.Cluster: nodeProcessIdLens :: Lens' NodeProcessInfo PID
+ Database.Bloodhound.Client.Cluster: nodeProcessMLockAllLens :: Lens' NodeProcessInfo Bool
+ Database.Bloodhound.Client.Cluster: nodeProcessMaxFileDescriptorsLens :: Lens' NodeProcessInfo (Maybe Int)
+ Database.Bloodhound.Client.Cluster: nodeProcessRefreshIntervalLens :: Lens' NodeProcessInfo NominalDiffTime
+ Database.Bloodhound.Client.Cluster: onlyExpungeDeletesLens :: Lens' ForceMergeIndexSettings Bool
+ Database.Bloodhound.Client.Cluster: parseStringInterval :: (Monad m, MonadFail m) => String -> m NominalDiffTime
+ Database.Bloodhound.Client.Cluster: performBHRequest :: (MonadBH m, MonadThrow m, ParseBHResponse contextualized) => BHRequest contextualized a -> m a
+ Database.Bloodhound.Client.Cluster: repoUpdateVerifyLens :: Lens' SnapshotRepoUpdateSettings Bool
+ Database.Bloodhound.Client.Cluster: restoreOverrideReplicasLens :: Lens' RestoreIndexSettings (Maybe ReplicaCount)
+ Database.Bloodhound.Client.Cluster: routingValueLens :: Lens' RoutingValue Text
+ Database.Bloodhound.Client.Cluster: rrPatternLens :: Lens' RestoreRenamePattern Text
+ Database.Bloodhound.Client.Cluster: runBH :: BHEnv -> BH m a -> m (Either EsError a)
+ Database.Bloodhound.Client.Cluster: sSummaryFixedSettingsLens :: Lens' IndexSettingsSummary IndexSettings
+ Database.Bloodhound.Client.Cluster: sSummaryIndexNameLens :: Lens' IndexSettingsSummary IndexName
+ Database.Bloodhound.Client.Cluster: sSummaryUpdateableLens :: Lens' IndexSettingsSummary [UpdatableIndexSetting]
+ Database.Bloodhound.Client.Cluster: shardTotalLens :: Lens' ShardResult Int
+ Database.Bloodhound.Client.Cluster: shardsFailedLens :: Lens' ShardResult Int
+ Database.Bloodhound.Client.Cluster: shardsSkippedLens :: Lens' ShardResult Int
+ Database.Bloodhound.Client.Cluster: shardsSuccessfulLens :: Lens' ShardResult Int
+ Database.Bloodhound.Client.Cluster: snapIgnoreUnavailableLens :: Lens' SnapshotCreateSettings Bool
+ Database.Bloodhound.Client.Cluster: snapIncludeGlobalStateLens :: Lens' SnapshotCreateSettings Bool
+ Database.Bloodhound.Client.Cluster: snapIndicesLens :: Lens' SnapshotCreateSettings (Maybe IndexSelection)
+ Database.Bloodhound.Client.Cluster: snapInfoDurationLens :: Lens' SnapshotInfo NominalDiffTime
+ Database.Bloodhound.Client.Cluster: snapInfoEndTimeLens :: Lens' SnapshotInfo UTCTime
+ Database.Bloodhound.Client.Cluster: snapInfoFailuresLens :: Lens' SnapshotInfo [SnapshotShardFailure]
+ Database.Bloodhound.Client.Cluster: snapInfoIndicesLens :: Lens' SnapshotInfo [IndexName]
+ Database.Bloodhound.Client.Cluster: snapInfoNameLens :: Lens' SnapshotInfo SnapshotName
+ Database.Bloodhound.Client.Cluster: snapInfoShardsLens :: Lens' SnapshotInfo ShardResult
+ Database.Bloodhound.Client.Cluster: snapInfoStartTimeLens :: Lens' SnapshotInfo UTCTime
+ Database.Bloodhound.Client.Cluster: snapInfoStateLens :: Lens' SnapshotInfo SnapshotState
+ Database.Bloodhound.Client.Cluster: snapPartialLens :: Lens' SnapshotCreateSettings Bool
+ Database.Bloodhound.Client.Cluster: snapRestoreIgnoreIndexSettingsLens :: Lens' SnapshotRestoreSettings (Maybe (NonEmpty Text))
+ Database.Bloodhound.Client.Cluster: snapRestoreIgnoreUnavailableLens :: Lens' SnapshotRestoreSettings Bool
+ Database.Bloodhound.Client.Cluster: snapRestoreIncludeAliasesLens :: Lens' SnapshotRestoreSettings Bool
+ Database.Bloodhound.Client.Cluster: snapRestoreIncludeGlobalStateLens :: Lens' SnapshotRestoreSettings Bool
+ Database.Bloodhound.Client.Cluster: snapRestoreIndexSettingsOverridesLens :: Lens' SnapshotRestoreSettings (Maybe RestoreIndexSettings)
+ Database.Bloodhound.Client.Cluster: snapRestoreIndicesLens :: Lens' SnapshotRestoreSettings (Maybe IndexSelection)
+ Database.Bloodhound.Client.Cluster: snapRestorePartialLens :: Lens' SnapshotRestoreSettings Bool
+ Database.Bloodhound.Client.Cluster: snapRestoreRenamePatternLens :: Lens' SnapshotRestoreSettings (Maybe RestoreRenamePattern)
+ Database.Bloodhound.Client.Cluster: snapRestoreRenameReplacementLens :: Lens' SnapshotRestoreSettings (Maybe (NonEmpty RestoreRenameToken))
+ Database.Bloodhound.Client.Cluster: snapRestoreWaitForCompletionLens :: Lens' SnapshotRestoreSettings Bool
+ Database.Bloodhound.Client.Cluster: snapShardFailureIndexLens :: Lens' SnapshotShardFailure IndexName
+ Database.Bloodhound.Client.Cluster: snapShardFailureNodeIdLens :: Lens' SnapshotShardFailure (Maybe NodeName)
+ Database.Bloodhound.Client.Cluster: snapShardFailureReasonLens :: Lens' SnapshotShardFailure Text
+ Database.Bloodhound.Client.Cluster: snapShardFailureShardIdLens :: Lens' SnapshotShardFailure ShardId
+ Database.Bloodhound.Client.Cluster: snapWaitForCompletionLens :: Lens' SnapshotCreateSettings Bool
+ Database.Bloodhound.Client.Cluster: snapshotNodeVerificationsLens :: Lens' SnapshotVerification [SnapshotNodeVerification]
+ Database.Bloodhound.Client.Cluster: snapshotRepoNameLens :: Lens' SnapshotRepoName Text
+ Database.Bloodhound.Client.Cluster: snapshotRepoTypeLens :: Lens' SnapshotRepoType Text
+ Database.Bloodhound.Client.Cluster: snvFullIdLens :: Lens' SnapshotNodeVerification FullNodeId
+ Database.Bloodhound.Client.Cluster: snvNodeNameLens :: Lens' SnapshotNodeVerification NodeName
+ Database.Bloodhound.Client.Cluster: srShardsLens :: Lens' ShardsResult ShardResult
+ Database.Bloodhound.Client.Cluster: srcIndexLens :: Lens' IndexAlias IndexName
+ Database.Bloodhound.Client.Cluster: taglineLens :: Lens' Status Text
+ Database.Bloodhound.Client.Cluster: templateMappingsLens :: Lens' IndexTemplate Value
+ Database.Bloodhound.Client.Cluster: templatePatternsLens :: Lens' IndexTemplate [IndexPattern]
+ Database.Bloodhound.Client.Cluster: templateSettingsLens :: Lens' IndexTemplate (Maybe IndexSettings)
+ Database.Bloodhound.Client.Cluster: throwEsError :: MonadBH m => EsError -> m a
+ Database.Bloodhound.Client.Cluster: toGSnapshotRepo :: SnapshotRepo r => r -> GenericSnapshotRepo
+ Database.Bloodhound.Client.Cluster: tryEsError :: MonadBH m => m a -> m (Either EsError a)
+ Database.Bloodhound.Client.Cluster: tryPerformBHRequest :: (MonadBH m, MonadThrow m, ParseBHResponse contextualized) => BHRequest contextualized a -> m (ParsedEsResponse a)
+ Database.Bloodhound.Client.Cluster: versionBuildDateLens :: Lens' Version UTCTime
+ Database.Bloodhound.Client.Cluster: versionBuildHashLens :: Lens' Version BuildHash
+ Database.Bloodhound.Client.Cluster: versionBuildSnapshotLens :: Lens' Version Bool
+ Database.Bloodhound.Client.Cluster: versionLens :: Lens' Status Version
+ Database.Bloodhound.Client.Cluster: versionLuceneVersionLens :: Lens' Version VersionNumber
+ Database.Bloodhound.Client.Cluster: versionNumberLens :: Lens' Version VersionNumber
+ Database.Bloodhound.Common.Client: Accepted :: Bool -> Accepted
+ Database.Bloodhound.Common.Client: Acknowledged :: Bool -> Acknowledged
+ Database.Bloodhound.Common.Client: DeletedDocuments :: Int -> Bool -> Int -> Int -> Int -> Int -> Int -> DeletedDocumentsRetries -> Int -> Float -> Int -> [Value] -> DeletedDocuments
+ Database.Bloodhound.Common.Client: DeletedDocumentsRetries :: Int -> Int -> DeletedDocumentsRetries
+ Database.Bloodhound.Common.Client: HealthStatus :: Text -> Text -> Bool -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Float -> HealthStatus
+ Database.Bloodhound.Common.Client: IgnoredBody :: IgnoredBody
+ Database.Bloodhound.Common.Client: IndexedDocument :: Text -> Maybe Text -> Text -> Int -> Text -> ShardResult -> Int -> Int -> IndexedDocument
+ Database.Bloodhound.Common.Client: [delDocsBatches] :: DeletedDocuments -> Int
+ Database.Bloodhound.Common.Client: [delDocsDeleted] :: DeletedDocuments -> Int
+ Database.Bloodhound.Common.Client: [delDocsFailures] :: DeletedDocuments -> [Value]
+ Database.Bloodhound.Common.Client: [delDocsNoops] :: DeletedDocuments -> Int
+ Database.Bloodhound.Common.Client: [delDocsRequestsPerSecond] :: DeletedDocuments -> Float
+ Database.Bloodhound.Common.Client: [delDocsRetriesBulk] :: DeletedDocumentsRetries -> Int
+ Database.Bloodhound.Common.Client: [delDocsRetriesSearch] :: DeletedDocumentsRetries -> Int
+ Database.Bloodhound.Common.Client: [delDocsRetries] :: DeletedDocuments -> DeletedDocumentsRetries
+ Database.Bloodhound.Common.Client: [delDocsThrottledMillis] :: DeletedDocuments -> Int
+ Database.Bloodhound.Common.Client: [delDocsThrottledUntilMillis] :: DeletedDocuments -> Int
+ Database.Bloodhound.Common.Client: [delDocsTimedOut] :: DeletedDocuments -> Bool
+ Database.Bloodhound.Common.Client: [delDocsTook] :: DeletedDocuments -> Int
+ Database.Bloodhound.Common.Client: [delDocsTotal] :: DeletedDocuments -> Int
+ Database.Bloodhound.Common.Client: [delDocsVersionConflicts] :: DeletedDocuments -> Int
+ Database.Bloodhound.Common.Client: [healthStatusActivePrimaryShards] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Client: [healthStatusActiveShardsPercentAsNumber] :: HealthStatus -> Float
+ Database.Bloodhound.Common.Client: [healthStatusActiveShards] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Client: [healthStatusClusterName] :: HealthStatus -> Text
+ Database.Bloodhound.Common.Client: [healthStatusDelayedUnassignedShards] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Client: [healthStatusInitializingShards] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Client: [healthStatusNumberOfDataNodes] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Client: [healthStatusNumberOfInFlightFetch] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Client: [healthStatusNumberOfNodes] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Client: [healthStatusNumberOfPendingTasks] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Client: [healthStatusRelocatingShards] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Client: [healthStatusStatus] :: HealthStatus -> Text
+ Database.Bloodhound.Common.Client: [healthStatusTaskMaxWaitingInQueueMillis] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Client: [healthStatusTimedOut] :: HealthStatus -> Bool
+ Database.Bloodhound.Common.Client: [healthStatusUnassignedShards] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Client: [idxDocId] :: IndexedDocument -> Text
+ Database.Bloodhound.Common.Client: [idxDocIndex] :: IndexedDocument -> Text
+ Database.Bloodhound.Common.Client: [idxDocPrimaryTerm] :: IndexedDocument -> Int
+ Database.Bloodhound.Common.Client: [idxDocResult] :: IndexedDocument -> Text
+ Database.Bloodhound.Common.Client: [idxDocSeqNo] :: IndexedDocument -> Int
+ Database.Bloodhound.Common.Client: [idxDocShards] :: IndexedDocument -> ShardResult
+ Database.Bloodhound.Common.Client: [idxDocType] :: IndexedDocument -> Maybe Text
+ Database.Bloodhound.Common.Client: [idxDocVersion] :: IndexedDocument -> Int
+ Database.Bloodhound.Common.Client: [isAccepted] :: Accepted -> Bool
+ Database.Bloodhound.Common.Client: [isAcknowledged] :: Acknowledged -> Bool
+ Database.Bloodhound.Common.Client: advanceScroll :: forall a m. (MonadBH m, FromJSON a) => ScrollId -> NominalDiffTime -> m (SearchResult a)
+ Database.Bloodhound.Common.Client: basicAuthHook :: Monad m => EsUsername -> EsPassword -> Request -> m Request
+ Database.Bloodhound.Common.Client: bulk :: forall m. MonadBH m => Vector BulkOperation -> m BulkResponse
+ Database.Bloodhound.Common.Client: catIndices :: MonadBH m => m [(IndexName, Int)]
+ Database.Bloodhound.Common.Client: closeIndex :: MonadBH m => IndexName -> m Acknowledged
+ Database.Bloodhound.Common.Client: countByIndex :: MonadBH m => IndexName -> CountQuery -> m CountResponse
+ Database.Bloodhound.Common.Client: createIndex :: MonadBH m => IndexSettings -> IndexName -> m Acknowledged
+ Database.Bloodhound.Common.Client: createIndexWith :: MonadBH m => [UpdatableIndexSetting] -> Int -> IndexName -> m Acknowledged
+ Database.Bloodhound.Common.Client: createSnapshot :: MonadBH m => SnapshotRepoName -> SnapshotName -> SnapshotCreateSettings -> m Acknowledged
+ Database.Bloodhound.Common.Client: data DeletedDocuments
+ Database.Bloodhound.Common.Client: data DeletedDocumentsRetries
+ Database.Bloodhound.Common.Client: data HealthStatus
+ Database.Bloodhound.Common.Client: data IgnoredBody
+ Database.Bloodhound.Common.Client: data IndexedDocument
+ Database.Bloodhound.Common.Client: deleteByQuery :: MonadBH m => IndexName -> Query -> m DeletedDocuments
+ Database.Bloodhound.Common.Client: deleteDocument :: MonadBH m => IndexName -> DocId -> m IndexedDocument
+ Database.Bloodhound.Common.Client: deleteIndex :: MonadBH m => IndexName -> m Acknowledged
+ Database.Bloodhound.Common.Client: deleteIndexAlias :: MonadBH m => IndexAliasName -> m Acknowledged
+ Database.Bloodhound.Common.Client: deleteSearchTemplate :: MonadBH m => SearchTemplateId -> m Acknowledged
+ Database.Bloodhound.Common.Client: deleteSnapshot :: MonadBH m => SnapshotRepoName -> SnapshotName -> m Acknowledged
+ Database.Bloodhound.Common.Client: deleteSnapshotRepo :: MonadBH m => SnapshotRepoName -> m Acknowledged
+ Database.Bloodhound.Common.Client: deleteTemplate :: MonadBH m => TemplateName -> m Acknowledged
+ Database.Bloodhound.Common.Client: documentExists :: MonadBH m => IndexName -> DocId -> m Bool
+ Database.Bloodhound.Common.Client: encodeBulkOperation :: BulkOperation -> ByteString
+ Database.Bloodhound.Common.Client: encodeBulkOperations :: Vector BulkOperation -> ByteString
+ Database.Bloodhound.Common.Client: flushIndex :: MonadBH m => IndexName -> m ShardResult
+ Database.Bloodhound.Common.Client: forceMergeIndex :: MonadBH m => IndexSelection -> ForceMergeIndexSettings -> m ShardsResult
+ Database.Bloodhound.Common.Client: getDocument :: FromJSON a => IndexName -> DocId -> BHRequest StatusIndependant (EsResult a)
+ Database.Bloodhound.Common.Client: getIndexAliases :: MonadBH m => m IndexAliasesSummary
+ Database.Bloodhound.Common.Client: getIndexSettings :: MonadBH m => IndexName -> m IndexSettingsSummary
+ Database.Bloodhound.Common.Client: getInitialScroll :: forall a m. (MonadBH m, FromJSON a) => IndexName -> Search -> m (ParsedEsResponse (SearchResult a))
+ Database.Bloodhound.Common.Client: getInitialSortedScroll :: forall a m. (MonadBH m, FromJSON a) => IndexName -> Search -> m (SearchResult a)
+ Database.Bloodhound.Common.Client: getNodesInfo :: MonadBH m => NodeSelection -> m NodesInfo
+ Database.Bloodhound.Common.Client: getNodesStats :: MonadBH m => NodeSelection -> m NodesStats
+ Database.Bloodhound.Common.Client: getSearchTemplate :: MonadBH m => SearchTemplateId -> m GetTemplateScript
+ Database.Bloodhound.Common.Client: getSnapshotRepos :: MonadBH m => SnapshotRepoSelection -> m [GenericSnapshotRepo]
+ Database.Bloodhound.Common.Client: getSnapshots :: MonadBH m => SnapshotRepoName -> SnapshotSelection -> m [SnapshotInfo]
+ Database.Bloodhound.Common.Client: getStatus :: MonadBH m => m Status
+ Database.Bloodhound.Common.Client: getTask :: (MonadBH m, FromJSON a) => TaskNodeId -> m (TaskResponse a)
+ Database.Bloodhound.Common.Client: indexDocument :: forall doc m. (MonadBH m, ToJSON doc) => IndexName -> IndexDocumentSettings -> doc -> DocId -> m IndexedDocument
+ Database.Bloodhound.Common.Client: indexExists :: MonadBH m => IndexName -> m Bool
+ Database.Bloodhound.Common.Client: listIndices :: MonadBH m => m [IndexName]
+ Database.Bloodhound.Common.Client: mkAggregateSearch :: Maybe Query -> Aggregations -> Search
+ Database.Bloodhound.Common.Client: mkHighlightSearch :: Maybe Query -> Highlights -> Search
+ Database.Bloodhound.Common.Client: mkReplicaCount :: Int -> Maybe ReplicaCount
+ Database.Bloodhound.Common.Client: mkSearch :: Maybe Query -> Maybe Filter -> Search
+ Database.Bloodhound.Common.Client: mkSearchTemplate :: Either SearchTemplateId SearchTemplateSource -> TemplateQueryKeyValuePairs -> SearchTemplate
+ Database.Bloodhound.Common.Client: mkShardCount :: Int -> Maybe ShardCount
+ Database.Bloodhound.Common.Client: newtype Accepted
+ Database.Bloodhound.Common.Client: newtype Acknowledged
+ Database.Bloodhound.Common.Client: openIndex :: MonadBH m => IndexName -> m Acknowledged
+ Database.Bloodhound.Common.Client: pageSearch :: From -> Size -> Search -> Search
+ Database.Bloodhound.Common.Client: putMapping :: forall r a m. (MonadBH m, FromJSON r, ToJSON a) => IndexName -> a -> m r
+ Database.Bloodhound.Common.Client: putTemplate :: MonadBH m => IndexTemplate -> TemplateName -> m Acknowledged
+ Database.Bloodhound.Common.Client: refreshIndex :: MonadBH m => IndexName -> m ShardResult
+ Database.Bloodhound.Common.Client: reindex :: MonadBH m => ReindexRequest -> m ReindexResponse
+ Database.Bloodhound.Common.Client: reindexAsync :: MonadBH m => ReindexRequest -> m TaskNodeId
+ Database.Bloodhound.Common.Client: restoreSnapshot :: MonadBH m => SnapshotRepoName -> SnapshotName -> SnapshotRestoreSettings -> m Accepted
+ Database.Bloodhound.Common.Client: scanSearch :: forall a m. (FromJSON a, MonadBH m) => IndexName -> Search -> m [Hit a]
+ Database.Bloodhound.Common.Client: searchAll :: forall a m. (MonadBH m, FromJSON a) => Search -> m (SearchResult a)
+ Database.Bloodhound.Common.Client: searchByIndex :: forall a m. (MonadBH m, FromJSON a) => IndexName -> Search -> m (SearchResult a)
+ Database.Bloodhound.Common.Client: searchByIndexTemplate :: forall a m. (MonadBH m, FromJSON a) => IndexName -> SearchTemplate -> m (SearchResult a)
+ Database.Bloodhound.Common.Client: searchByIndices :: forall a m. (MonadBH m, FromJSON a) => NonEmpty IndexName -> Search -> m (SearchResult a)
+ Database.Bloodhound.Common.Client: searchByIndicesTemplate :: forall a m. (MonadBH m, FromJSON a) => NonEmpty IndexName -> SearchTemplate -> m (SearchResult a)
+ Database.Bloodhound.Common.Client: storeSearchTemplate :: MonadBH m => SearchTemplateId -> SearchTemplateSource -> m Acknowledged
+ Database.Bloodhound.Common.Client: templateExists :: MonadBH m => TemplateName -> m Bool
+ Database.Bloodhound.Common.Client: updateByQuery :: (MonadBH m, FromJSON a) => IndexName -> Query -> Maybe Script -> m a
+ Database.Bloodhound.Common.Client: updateDocument :: forall patch m. (MonadBH m, ToJSON patch) => IndexName -> IndexDocumentSettings -> patch -> DocId -> m IndexedDocument
+ Database.Bloodhound.Common.Client: updateIndexAliases :: MonadBH m => NonEmpty IndexAliasAction -> m Acknowledged
+ Database.Bloodhound.Common.Client: updateIndexSettings :: MonadBH m => NonEmpty UpdatableIndexSetting -> IndexName -> m Acknowledged
+ Database.Bloodhound.Common.Client: updateSnapshotRepo :: MonadBH m => SnapshotRepo repo => SnapshotRepoUpdateSettings -> repo -> m Acknowledged
+ Database.Bloodhound.Common.Client: verifySnapshotRepo :: MonadBH m => SnapshotRepoName -> m SnapshotVerification
+ Database.Bloodhound.Common.Client: waitForYellowIndex :: MonadBH m => IndexName -> m HealthStatus
+ Database.Bloodhound.Common.Client: withBH :: ManagerSettings -> Server -> BH IO a -> IO a
+ Database.Bloodhound.Common.Requests: Accepted :: Bool -> Accepted
+ Database.Bloodhound.Common.Requests: Acknowledged :: Bool -> Acknowledged
+ Database.Bloodhound.Common.Requests: DeletedDocuments :: Int -> Bool -> Int -> Int -> Int -> Int -> Int -> DeletedDocumentsRetries -> Int -> Float -> Int -> [Value] -> DeletedDocuments
+ Database.Bloodhound.Common.Requests: DeletedDocumentsRetries :: Int -> Int -> DeletedDocumentsRetries
+ Database.Bloodhound.Common.Requests: HealthStatus :: Text -> Text -> Bool -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Float -> HealthStatus
+ Database.Bloodhound.Common.Requests: IgnoredBody :: IgnoredBody
+ Database.Bloodhound.Common.Requests: IndexedDocument :: Text -> Maybe Text -> Text -> Int -> Text -> ShardResult -> Int -> Int -> IndexedDocument
+ Database.Bloodhound.Common.Requests: [delDocsBatches] :: DeletedDocuments -> Int
+ Database.Bloodhound.Common.Requests: [delDocsDeleted] :: DeletedDocuments -> Int
+ Database.Bloodhound.Common.Requests: [delDocsFailures] :: DeletedDocuments -> [Value]
+ Database.Bloodhound.Common.Requests: [delDocsNoops] :: DeletedDocuments -> Int
+ Database.Bloodhound.Common.Requests: [delDocsRequestsPerSecond] :: DeletedDocuments -> Float
+ Database.Bloodhound.Common.Requests: [delDocsRetriesBulk] :: DeletedDocumentsRetries -> Int
+ Database.Bloodhound.Common.Requests: [delDocsRetriesSearch] :: DeletedDocumentsRetries -> Int
+ Database.Bloodhound.Common.Requests: [delDocsRetries] :: DeletedDocuments -> DeletedDocumentsRetries
+ Database.Bloodhound.Common.Requests: [delDocsThrottledMillis] :: DeletedDocuments -> Int
+ Database.Bloodhound.Common.Requests: [delDocsThrottledUntilMillis] :: DeletedDocuments -> Int
+ Database.Bloodhound.Common.Requests: [delDocsTimedOut] :: DeletedDocuments -> Bool
+ Database.Bloodhound.Common.Requests: [delDocsTook] :: DeletedDocuments -> Int
+ Database.Bloodhound.Common.Requests: [delDocsTotal] :: DeletedDocuments -> Int
+ Database.Bloodhound.Common.Requests: [delDocsVersionConflicts] :: DeletedDocuments -> Int
+ Database.Bloodhound.Common.Requests: [healthStatusActivePrimaryShards] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Requests: [healthStatusActiveShardsPercentAsNumber] :: HealthStatus -> Float
+ Database.Bloodhound.Common.Requests: [healthStatusActiveShards] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Requests: [healthStatusClusterName] :: HealthStatus -> Text
+ Database.Bloodhound.Common.Requests: [healthStatusDelayedUnassignedShards] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Requests: [healthStatusInitializingShards] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Requests: [healthStatusNumberOfDataNodes] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Requests: [healthStatusNumberOfInFlightFetch] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Requests: [healthStatusNumberOfNodes] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Requests: [healthStatusNumberOfPendingTasks] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Requests: [healthStatusRelocatingShards] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Requests: [healthStatusStatus] :: HealthStatus -> Text
+ Database.Bloodhound.Common.Requests: [healthStatusTaskMaxWaitingInQueueMillis] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Requests: [healthStatusTimedOut] :: HealthStatus -> Bool
+ Database.Bloodhound.Common.Requests: [healthStatusUnassignedShards] :: HealthStatus -> Int
+ Database.Bloodhound.Common.Requests: [idxDocId] :: IndexedDocument -> Text
+ Database.Bloodhound.Common.Requests: [idxDocIndex] :: IndexedDocument -> Text
+ Database.Bloodhound.Common.Requests: [idxDocPrimaryTerm] :: IndexedDocument -> Int
+ Database.Bloodhound.Common.Requests: [idxDocResult] :: IndexedDocument -> Text
+ Database.Bloodhound.Common.Requests: [idxDocSeqNo] :: IndexedDocument -> Int
+ Database.Bloodhound.Common.Requests: [idxDocShards] :: IndexedDocument -> ShardResult
+ Database.Bloodhound.Common.Requests: [idxDocType] :: IndexedDocument -> Maybe Text
+ Database.Bloodhound.Common.Requests: [idxDocVersion] :: IndexedDocument -> Int
+ Database.Bloodhound.Common.Requests: [isAccepted] :: Accepted -> Bool
+ Database.Bloodhound.Common.Requests: [isAcknowledged] :: Acknowledged -> Bool
+ Database.Bloodhound.Common.Requests: advanceScroll :: FromJSON a => ScrollId -> NominalDiffTime -> BHRequest StatusDependant (SearchResult a)
+ Database.Bloodhound.Common.Requests: bulk :: ParseBHResponse contextualized => Vector BulkOperation -> BHRequest contextualized BulkResponse
+ Database.Bloodhound.Common.Requests: catIndices :: BHRequest StatusDependant [(IndexName, Int)]
+ Database.Bloodhound.Common.Requests: closeIndex :: IndexName -> BHRequest StatusIndependant Acknowledged
+ Database.Bloodhound.Common.Requests: countByIndex :: IndexName -> CountQuery -> BHRequest StatusDependant CountResponse
+ Database.Bloodhound.Common.Requests: createIndex :: IndexSettings -> IndexName -> BHRequest StatusDependant Acknowledged
+ Database.Bloodhound.Common.Requests: createIndexWith :: [UpdatableIndexSetting] -> Int -> IndexName -> BHRequest StatusIndependant Acknowledged
+ Database.Bloodhound.Common.Requests: createSnapshot :: SnapshotRepoName -> SnapshotName -> SnapshotCreateSettings -> BHRequest StatusIndependant Acknowledged
+ Database.Bloodhound.Common.Requests: data DeletedDocuments
+ Database.Bloodhound.Common.Requests: data DeletedDocumentsRetries
+ Database.Bloodhound.Common.Requests: data HealthStatus
+ Database.Bloodhound.Common.Requests: data IgnoredBody
+ Database.Bloodhound.Common.Requests: data IndexedDocument
+ Database.Bloodhound.Common.Requests: decodeResponse :: FromJSON a => BHResponse StatusIndependant a -> Maybe a
+ Database.Bloodhound.Common.Requests: deleteByQuery :: IndexName -> Query -> BHRequest StatusDependant DeletedDocuments
+ Database.Bloodhound.Common.Requests: deleteDocument :: IndexName -> DocId -> BHRequest StatusDependant IndexedDocument
+ Database.Bloodhound.Common.Requests: deleteIndex :: IndexName -> BHRequest StatusDependant Acknowledged
+ Database.Bloodhound.Common.Requests: deleteIndexAlias :: IndexAliasName -> BHRequest StatusIndependant Acknowledged
+ Database.Bloodhound.Common.Requests: deleteSearchTemplate :: SearchTemplateId -> BHRequest StatusIndependant Acknowledged
+ Database.Bloodhound.Common.Requests: deleteSnapshot :: SnapshotRepoName -> SnapshotName -> BHRequest StatusIndependant Acknowledged
+ Database.Bloodhound.Common.Requests: deleteSnapshotRepo :: SnapshotRepoName -> BHRequest StatusIndependant Acknowledged
+ Database.Bloodhound.Common.Requests: deleteTemplate :: TemplateName -> BHRequest StatusIndependant Acknowledged
+ Database.Bloodhound.Common.Requests: dispatchSearch :: FromJSON a => Endpoint -> Search -> BHRequest StatusDependant (SearchResult a)
+ Database.Bloodhound.Common.Requests: documentExists :: IndexName -> DocId -> BHRequest StatusDependant Bool
+ Database.Bloodhound.Common.Requests: eitherDecodeResponse :: FromJSON a => BHResponse StatusIndependant a -> Either String a
+ Database.Bloodhound.Common.Requests: encodeBulkOperation :: BulkOperation -> ByteString
+ Database.Bloodhound.Common.Requests: encodeBulkOperations :: Vector BulkOperation -> ByteString
+ Database.Bloodhound.Common.Requests: flushIndex :: IndexName -> BHRequest StatusDependant ShardResult
+ Database.Bloodhound.Common.Requests: forceMergeIndex :: IndexSelection -> ForceMergeIndexSettings -> BHRequest StatusDependant ShardsResult
+ Database.Bloodhound.Common.Requests: getDocument :: FromJSON a => IndexName -> DocId -> BHRequest StatusIndependant (EsResult a)
+ Database.Bloodhound.Common.Requests: getIndexAliases :: BHRequest StatusDependant IndexAliasesSummary
+ Database.Bloodhound.Common.Requests: getIndexSettings :: IndexName -> BHRequest StatusDependant IndexSettingsSummary
+ Database.Bloodhound.Common.Requests: getInitialScroll :: FromJSON a => IndexName -> Search -> BHRequest StatusDependant (ParsedEsResponse (SearchResult a))
+ Database.Bloodhound.Common.Requests: getInitialSortedScroll :: FromJSON a => IndexName -> Search -> BHRequest StatusDependant (SearchResult a)
+ Database.Bloodhound.Common.Requests: getNodesInfo :: NodeSelection -> BHRequest StatusDependant NodesInfo
+ Database.Bloodhound.Common.Requests: getNodesStats :: NodeSelection -> BHRequest StatusDependant NodesStats
+ Database.Bloodhound.Common.Requests: getSearchTemplate :: SearchTemplateId -> BHRequest StatusIndependant GetTemplateScript
+ Database.Bloodhound.Common.Requests: getSnapshotRepos :: SnapshotRepoSelection -> BHRequest StatusDependant [GenericSnapshotRepo]
+ Database.Bloodhound.Common.Requests: getSnapshots :: SnapshotRepoName -> SnapshotSelection -> BHRequest StatusDependant [SnapshotInfo]
+ Database.Bloodhound.Common.Requests: getStatus :: BHRequest StatusDependant Status
+ Database.Bloodhound.Common.Requests: getTask :: FromJSON a => TaskNodeId -> BHRequest StatusDependant (TaskResponse a)
+ Database.Bloodhound.Common.Requests: indexDocument :: ToJSON doc => IndexName -> IndexDocumentSettings -> doc -> DocId -> BHRequest StatusDependant IndexedDocument
+ Database.Bloodhound.Common.Requests: indexExists :: IndexName -> BHRequest StatusDependant Bool
+ Database.Bloodhound.Common.Requests: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Common.Requests.DeletedDocuments
+ Database.Bloodhound.Common.Requests: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Common.Requests.DeletedDocumentsRetries
+ Database.Bloodhound.Common.Requests: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Common.Requests.GSRs
+ Database.Bloodhound.Common.Requests: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Common.Requests.HealthStatus
+ Database.Bloodhound.Common.Requests: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Common.Requests.IndexedDocument
+ Database.Bloodhound.Common.Requests: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Common.Requests.ListedIndexName
+ Database.Bloodhound.Common.Requests: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Common.Requests.ListedIndexNameWithCount
+ Database.Bloodhound.Common.Requests: instance Data.Aeson.Types.FromJSON.FromJSON Database.Bloodhound.Common.Requests.SIs
+ Database.Bloodhound.Common.Requests: instance GHC.Classes.Eq Database.Bloodhound.Common.Requests.DeletedDocuments
+ Database.Bloodhound.Common.Requests: instance GHC.Classes.Eq Database.Bloodhound.Common.Requests.DeletedDocumentsRetries
+ Database.Bloodhound.Common.Requests: instance GHC.Classes.Eq Database.Bloodhound.Common.Requests.HealthStatus
+ Database.Bloodhound.Common.Requests: instance GHC.Classes.Eq Database.Bloodhound.Common.Requests.IndexedDocument
+ Database.Bloodhound.Common.Requests: instance GHC.Classes.Eq Database.Bloodhound.Common.Requests.ListedIndexName
+ Database.Bloodhound.Common.Requests: instance GHC.Classes.Eq Database.Bloodhound.Common.Requests.ListedIndexNameWithCount
+ Database.Bloodhound.Common.Requests: instance GHC.Show.Show Database.Bloodhound.Common.Requests.DeletedDocuments
+ Database.Bloodhound.Common.Requests: instance GHC.Show.Show Database.Bloodhound.Common.Requests.DeletedDocumentsRetries
+ Database.Bloodhound.Common.Requests: instance GHC.Show.Show Database.Bloodhound.Common.Requests.HealthStatus
+ Database.Bloodhound.Common.Requests: instance GHC.Show.Show Database.Bloodhound.Common.Requests.IndexedDocument
+ Database.Bloodhound.Common.Requests: instance GHC.Show.Show Database.Bloodhound.Common.Requests.ListedIndexName
+ Database.Bloodhound.Common.Requests: instance GHC.Show.Show Database.Bloodhound.Common.Requests.ListedIndexNameWithCount
+ Database.Bloodhound.Common.Requests: isCreated :: BHResponse parsingContext a -> Bool
+ Database.Bloodhound.Common.Requests: isSuccess :: BHResponse parsingContext a -> Bool
+ Database.Bloodhound.Common.Requests: isVersionConflict :: BHResponse parsingContext a -> Bool
+ Database.Bloodhound.Common.Requests: joinBHResponse :: forall a parsingContext. BHRequest parsingContext (Either EsProtocolException (ParsedEsResponse a)) -> BHRequest parsingContext a
+ Database.Bloodhound.Common.Requests: keepBHResponse :: forall a parsingContext. BHRequest parsingContext a -> BHRequest StatusDependant (BHResponse StatusDependant a, a)
+ Database.Bloodhound.Common.Requests: listIndices :: BHRequest StatusDependant [IndexName]
+ Database.Bloodhound.Common.Requests: mkAggregateSearch :: Maybe Query -> Aggregations -> Search
+ Database.Bloodhound.Common.Requests: mkHighlightSearch :: Maybe Query -> Highlights -> Search
+ Database.Bloodhound.Common.Requests: mkReplicaCount :: Int -> Maybe ReplicaCount
+ Database.Bloodhound.Common.Requests: mkSearch :: Maybe Query -> Maybe Filter -> Search
+ Database.Bloodhound.Common.Requests: mkSearchTemplate :: Either SearchTemplateId SearchTemplateSource -> TemplateQueryKeyValuePairs -> SearchTemplate
+ Database.Bloodhound.Common.Requests: mkShardCount :: Int -> Maybe ShardCount
+ Database.Bloodhound.Common.Requests: newtype Accepted
+ Database.Bloodhound.Common.Requests: newtype Acknowledged
+ Database.Bloodhound.Common.Requests: openIndex :: IndexName -> BHRequest StatusIndependant Acknowledged
+ Database.Bloodhound.Common.Requests: pageSearch :: From -> Size -> Search -> Search
+ Database.Bloodhound.Common.Requests: parseEsResponse :: FromJSON body => BHResponse parsingContext body -> Either EsProtocolException (ParsedEsResponse body)
+ Database.Bloodhound.Common.Requests: parseEsResponseWith :: (MonadThrow m, FromJSON body) => (body -> Either String parsed) -> BHResponse parsingContext body -> m parsed
+ Database.Bloodhound.Common.Requests: performBHRequest :: (MonadBH m, MonadThrow m, ParseBHResponse contextualized) => BHRequest contextualized a -> m a
+ Database.Bloodhound.Common.Requests: putMapping :: (FromJSON r, ToJSON a) => IndexName -> a -> BHRequest StatusDependant r
+ Database.Bloodhound.Common.Requests: putTemplate :: IndexTemplate -> TemplateName -> BHRequest StatusIndependant Acknowledged
+ Database.Bloodhound.Common.Requests: refreshIndex :: IndexName -> BHRequest StatusDependant ShardResult
+ Database.Bloodhound.Common.Requests: reindex :: ReindexRequest -> BHRequest StatusDependant ReindexResponse
+ Database.Bloodhound.Common.Requests: reindexAsync :: ReindexRequest -> BHRequest StatusDependant TaskNodeId
+ Database.Bloodhound.Common.Requests: restoreSnapshot :: SnapshotRepoName -> SnapshotName -> SnapshotRestoreSettings -> BHRequest StatusIndependant Accepted
+ Database.Bloodhound.Common.Requests: searchAll :: FromJSON a => Search -> BHRequest StatusDependant (SearchResult a)
+ Database.Bloodhound.Common.Requests: searchByIndex :: FromJSON a => IndexName -> Search -> BHRequest StatusDependant (SearchResult a)
+ Database.Bloodhound.Common.Requests: searchByIndexTemplate :: FromJSON a => IndexName -> SearchTemplate -> BHRequest StatusDependant (SearchResult a)
+ Database.Bloodhound.Common.Requests: searchByIndices :: FromJSON a => NonEmpty IndexName -> Search -> BHRequest StatusDependant (SearchResult a)
+ Database.Bloodhound.Common.Requests: searchByIndicesTemplate :: FromJSON a => NonEmpty IndexName -> SearchTemplate -> BHRequest StatusDependant (SearchResult a)
+ Database.Bloodhound.Common.Requests: storeSearchTemplate :: SearchTemplateId -> SearchTemplateSource -> BHRequest StatusDependant Acknowledged
+ Database.Bloodhound.Common.Requests: templateExists :: TemplateName -> BHRequest StatusDependant Bool
+ Database.Bloodhound.Common.Requests: tryPerformBHRequest :: (MonadBH m, MonadThrow m, ParseBHResponse contextualized) => BHRequest contextualized a -> m (ParsedEsResponse a)
+ Database.Bloodhound.Common.Requests: updateByQuery :: FromJSON a => IndexName -> Query -> Maybe Script -> BHRequest StatusDependant a
+ Database.Bloodhound.Common.Requests: updateDocument :: ToJSON patch => IndexName -> IndexDocumentSettings -> patch -> DocId -> BHRequest StatusDependant IndexedDocument
+ Database.Bloodhound.Common.Requests: updateIndexAliases :: NonEmpty IndexAliasAction -> BHRequest StatusIndependant Acknowledged
+ Database.Bloodhound.Common.Requests: updateIndexSettings :: NonEmpty UpdatableIndexSetting -> IndexName -> BHRequest StatusIndependant Acknowledged
+ Database.Bloodhound.Common.Requests: updateSnapshotRepo :: SnapshotRepo repo => SnapshotRepoUpdateSettings -> repo -> BHRequest StatusIndependant Acknowledged
+ Database.Bloodhound.Common.Requests: verifySnapshotRepo :: SnapshotRepoName -> BHRequest StatusDependant SnapshotVerification
+ Database.Bloodhound.Common.Requests: waitForYellowIndex :: IndexName -> BHRequest StatusIndependant HealthStatus
+ Database.Bloodhound.Common.Requests: withBHResponse :: forall a parsingContext b. (Either EsProtocolException (ParsedEsResponse a) -> BHResponse StatusDependant a -> b) -> BHRequest parsingContext a -> BHRequest StatusDependant b
+ Database.Bloodhound.Common.Requests: withBHResponseParsedEsResponse :: forall a parsingContext. BHRequest parsingContext a -> BHRequest StatusDependant (ParsedEsResponse a)
+ Database.Bloodhound.Common.Requests: withBHResponse_ :: forall a parsingContext b. (BHResponse StatusDependant a -> b) -> BHRequest parsingContext a -> BHRequest StatusDependant b
+ Database.Bloodhound.Common.Types: Accepted :: Bool -> Accepted
+ Database.Bloodhound.Common.Types: Acknowledged :: Bool -> Acknowledged
+ Database.Bloodhound.Common.Types: AddAlias :: IndexAlias -> IndexAliasCreate -> IndexAliasAction
+ Database.Bloodhound.Common.Types: AddTime :: Int -> DateMathUnit -> DateMathModifier
+ Database.Bloodhound.Common.Types: AggregateParentScore :: Bool -> AggregateParentScore
+ Database.Bloodhound.Common.Types: AllAliasRouting :: RoutingValue -> AliasRouting
+ Database.Bloodhound.Common.Types: AllIndexes :: IndexSelection
+ Database.Bloodhound.Common.Types: AllNodes :: NodeSelection
+ Database.Bloodhound.Common.Types: AllRegexpFlags :: RegexpFlags
+ Database.Bloodhound.Common.Types: AllSnapshotRepos :: SnapshotRepoSelection
+ Database.Bloodhound.Common.Types: AllSnapshots :: SnapshotSelection
+ Database.Bloodhound.Common.Types: AllocAll :: AllocationPolicy
+ Database.Bloodhound.Common.Types: AllocNewPrimaries :: AllocationPolicy
+ Database.Bloodhound.Common.Types: AllocNone :: AllocationPolicy
+ Database.Bloodhound.Common.Types: AllocPrimaries :: AllocationPolicy
+ Database.Bloodhound.Common.Types: AllowLeadingWildcard :: Bool -> AllowLeadingWildcard
+ Database.Bloodhound.Common.Types: Analysis :: Map Text AnalyzerDefinition -> Map Text TokenizerDefinition -> Map Text TokenFilterDefinition -> Map Text CharFilterDefinition -> Analysis
+ Database.Bloodhound.Common.Types: AnalysisSetting :: Analysis -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: AnalyzeWildcard :: Bool -> AnalyzeWildcard
+ Database.Bloodhound.Common.Types: Analyzer :: Text -> Analyzer
+ Database.Bloodhound.Common.Types: AnalyzerDefinition :: Maybe Tokenizer -> [TokenFilter] -> [CharFilter] -> AnalyzerDefinition
+ Database.Bloodhound.Common.Types: And :: BooleanOperator
+ Database.Bloodhound.Common.Types: AnyString :: RegexpFlag
+ Database.Bloodhound.Common.Types: Arabic :: Language
+ Database.Bloodhound.Common.Types: Arc :: DistanceType
+ Database.Bloodhound.Common.Types: Armenian :: Language
+ Database.Bloodhound.Common.Types: Ascending :: SortOrder
+ Database.Bloodhound.Common.Types: AutoExpandReplicas :: ReplicaBounds -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: Automaton :: RegexpFlag
+ Database.Bloodhound.Common.Types: BHRequest :: Method -> Endpoint -> Maybe ByteString -> (BHResponse parsingContext responseBody -> Either EsProtocolException (ParsedEsResponse responseBody)) -> BHRequest parsingContext responseBody
+ Database.Bloodhound.Common.Types: BHResponse :: Response ByteString -> BHResponse parsingContext body
+ Database.Bloodhound.Common.Types: Basic :: StatsType
+ Database.Bloodhound.Common.Types: Basque :: Language
+ Database.Bloodhound.Common.Types: Bengali :: Language
+ Database.Bloodhound.Common.Types: BlocksMetaData :: Bool -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: BlocksRead :: Bool -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: BlocksReadOnly :: Bool -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: BlocksWrite :: Bool -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: BoolQuery :: [Query] -> [Filter] -> [Query] -> [Query] -> Maybe MinimumMatch -> Maybe Boost -> Maybe DisableCoord -> BoolQuery
+ Database.Bloodhound.Common.Types: BoolValue :: Bool -> BucketValue
+ Database.Bloodhound.Common.Types: Boost :: Double -> Boost
+ Database.Bloodhound.Common.Types: BoostModeAvg :: BoostMode
+ Database.Bloodhound.Common.Types: BoostModeMax :: BoostMode
+ Database.Bloodhound.Common.Types: BoostModeMin :: BoostMode
+ Database.Bloodhound.Common.Types: BoostModeMultiply :: BoostMode
+ Database.Bloodhound.Common.Types: BoostModeReplace :: BoostMode
+ Database.Bloodhound.Common.Types: BoostModeSum :: BoostMode
+ Database.Bloodhound.Common.Types: BoostTerms :: Double -> BoostTerms
+ Database.Bloodhound.Common.Types: BoostingQuery :: Query -> Query -> Boost -> BoostingQuery
+ Database.Bloodhound.Common.Types: BoundTransportAddress :: EsAddress -> [EsAddress] -> BoundTransportAddress
+ Database.Bloodhound.Common.Types: Brazilian :: Language
+ Database.Bloodhound.Common.Types: BreadthFirst :: CollectionMode
+ Database.Bloodhound.Common.Types: Bucket :: [a] -> Bucket a
+ Database.Bloodhound.Common.Types: BuildHash :: Text -> BuildHash
+ Database.Bloodhound.Common.Types: Bulgarian :: Language
+ Database.Bloodhound.Common.Types: BulkActionItem :: BulkAction -> BulkItem -> BulkActionItem
+ Database.Bloodhound.Common.Types: BulkCreate :: IndexName -> DocId -> Value -> BulkOperation
+ Database.Bloodhound.Common.Types: BulkCreateEncoding :: IndexName -> DocId -> Encoding -> BulkOperation
+ Database.Bloodhound.Common.Types: BulkDelete :: IndexName -> DocId -> BulkOperation
+ Database.Bloodhound.Common.Types: BulkError :: Text -> Text -> BulkError
+ Database.Bloodhound.Common.Types: BulkIndex :: IndexName -> DocId -> Value -> BulkOperation
+ Database.Bloodhound.Common.Types: BulkIndexAuto :: IndexName -> Value -> BulkOperation
+ Database.Bloodhound.Common.Types: BulkIndexEncodingAuto :: IndexName -> Encoding -> BulkOperation
+ Database.Bloodhound.Common.Types: BulkItem :: Text -> Text -> Maybe Int -> Maybe BulkError -> BulkItem
+ Database.Bloodhound.Common.Types: BulkResponse :: Int -> Bool -> [BulkActionItem] -> BulkResponse
+ Database.Bloodhound.Common.Types: BulkUpdate :: IndexName -> DocId -> Value -> BulkOperation
+ Database.Bloodhound.Common.Types: BulkUpsert :: IndexName -> DocId -> UpsertPayload -> [UpsertActionMetadata] -> BulkOperation
+ Database.Bloodhound.Common.Types: ByteType :: FieldType
+ Database.Bloodhound.Common.Types: Bytes :: Int -> Bytes
+ Database.Bloodhound.Common.Types: CPUInfo :: Bytes -> Int -> Int -> Int -> Int -> Text -> Text -> CPUInfo
+ Database.Bloodhound.Common.Types: CacheFilterExpire :: Maybe NominalDiffTime -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: CacheFilterMaxSize :: Maybe Bytes -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: CacheKey :: Text -> CacheKey
+ Database.Bloodhound.Common.Types: CacheName :: Text -> CacheName
+ Database.Bloodhound.Common.Types: CardinalityAgg :: CardinalityAggregation -> Aggregation
+ Database.Bloodhound.Common.Types: CardinalityAggregation :: FieldName -> Maybe Int -> CardinalityAggregation
+ Database.Bloodhound.Common.Types: Catalan :: Language
+ Database.Bloodhound.Common.Types: Centimeters :: DistanceUnit
+ Database.Bloodhound.Common.Types: CharFilter :: Text -> CharFilter
+ Database.Bloodhound.Common.Types: CharFilterDefinitionMapping :: Map Text Text -> CharFilterDefinition
+ Database.Bloodhound.Common.Types: CharFilterDefinitionPatternReplace :: Text -> Text -> Maybe Text -> CharFilterDefinition
+ Database.Bloodhound.Common.Types: ChildDocument :: FieldName -> RelationName -> DocId -> JoinRelation
+ Database.Bloodhound.Common.Types: Cjk :: Language
+ Database.Bloodhound.Common.Types: CloseIndex :: OpenCloseIndex
+ Database.Bloodhound.Common.Types: ClusterName :: Text -> ClusterName
+ Database.Bloodhound.Common.Types: CommonHighlight :: Maybe Text -> Maybe Bool -> Maybe HighlightTag -> Maybe HighlightEncoder -> Maybe Int -> Maybe Query -> Maybe Bool -> CommonHighlight
+ Database.Bloodhound.Common.Types: CommonMinimumMatch :: MinimumMatch -> CommonMinimumMatch
+ Database.Bloodhound.Common.Types: CommonMinimumMatchHighLow :: MinimumMatchHighLow -> CommonMinimumMatch
+ Database.Bloodhound.Common.Types: CommonTermsQuery :: FieldName -> QueryString -> CutoffFrequency -> BooleanOperator -> BooleanOperator -> Maybe CommonMinimumMatch -> Maybe Boost -> Maybe Analyzer -> Maybe DisableCoord -> CommonTermsQuery
+ Database.Bloodhound.Common.Types: Complement :: RegexpFlag
+ Database.Bloodhound.Common.Types: ComponentFunctionScoreFunction :: Maybe Filter -> FunctionScoreFunction -> Maybe Weight -> ComponentFunctionScoreFunction
+ Database.Bloodhound.Common.Types: CompoundFileFormat :: Bool -> CompoundFormat
+ Database.Bloodhound.Common.Types: CompressionBest :: Compression
+ Database.Bloodhound.Common.Types: CompressionDefault :: Compression
+ Database.Bloodhound.Common.Types: CompressionSetting :: Compression -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: ConstantScoreQuery :: Query -> Boost -> Query
+ Database.Bloodhound.Common.Types: CountQuery :: Query -> CountQuery
+ Database.Bloodhound.Common.Types: CountResponse :: Natural -> CountShards -> CountResponse
+ Database.Bloodhound.Common.Types: CountShards :: Int -> Int -> Int -> CountShards
+ Database.Bloodhound.Common.Types: Create :: BulkAction
+ Database.Bloodhound.Common.Types: CustomMissing :: Text -> Missing
+ Database.Bloodhound.Common.Types: CustomTags :: ([Text], [Text]) -> HighlightTag
+ Database.Bloodhound.Common.Types: CutoffFrequency :: Double -> CutoffFrequency
+ Database.Bloodhound.Common.Types: Czech :: Language
+ Database.Bloodhound.Common.Types: DMDate :: Day -> DateMathAnchor
+ Database.Bloodhound.Common.Types: DMDay :: DateMathUnit
+ Database.Bloodhound.Common.Types: DMHour :: DateMathUnit
+ Database.Bloodhound.Common.Types: DMMinute :: DateMathUnit
+ Database.Bloodhound.Common.Types: DMMonth :: DateMathUnit
+ Database.Bloodhound.Common.Types: DMNow :: DateMathAnchor
+ Database.Bloodhound.Common.Types: DMSecond :: DateMathUnit
+ Database.Bloodhound.Common.Types: DMWeek :: DateMathUnit
+ Database.Bloodhound.Common.Types: DMYear :: DateMathUnit
+ Database.Bloodhound.Common.Types: Danish :: Language
+ Database.Bloodhound.Common.Types: DateHistogramAgg :: DateHistogramAggregation -> Aggregation
+ Database.Bloodhound.Common.Types: DateHistogramAggregation :: FieldName -> Interval -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Aggregations -> DateHistogramAggregation
+ Database.Bloodhound.Common.Types: DateHistogramResult :: Int -> Maybe Text -> Int -> Maybe AggregationResults -> DateHistogramResult
+ Database.Bloodhound.Common.Types: DateMathExpr :: DateMathAnchor -> [DateMathModifier] -> DateMathExpr
+ Database.Bloodhound.Common.Types: DateRangeAgg :: DateRangeAggregation -> Aggregation
+ Database.Bloodhound.Common.Types: DateRangeAggregation :: FieldName -> Maybe Text -> NonEmpty DateRangeAggRange -> DateRangeAggregation
+ Database.Bloodhound.Common.Types: DateRangeFrom :: DateMathExpr -> DateRangeAggRange
+ Database.Bloodhound.Common.Types: DateRangeFromAndTo :: DateMathExpr -> DateMathExpr -> DateRangeAggRange
+ Database.Bloodhound.Common.Types: DateRangeResult :: Text -> Maybe UTCTime -> Maybe Text -> Maybe UTCTime -> Maybe Text -> Int -> Maybe AggregationResults -> DateRangeResult
+ Database.Bloodhound.Common.Types: DateRangeTo :: DateMathExpr -> DateRangeAggRange
+ Database.Bloodhound.Common.Types: Day :: Interval
+ Database.Bloodhound.Common.Types: Days :: TimeInterval
+ Database.Bloodhound.Common.Types: DefaultEncoder :: HighlightEncoder
+ Database.Bloodhound.Common.Types: DefaultSort :: FieldName -> SortOrder -> Maybe Text -> Maybe SortMode -> Maybe Missing -> Maybe Filter -> DefaultSort
+ Database.Bloodhound.Common.Types: DefaultSortSpec :: DefaultSort -> SortSpec
+ Database.Bloodhound.Common.Types: Delete :: BulkAction
+ Database.Bloodhound.Common.Types: DepthFirst :: CollectionMode
+ Database.Bloodhound.Common.Types: Descending :: SortOrder
+ Database.Bloodhound.Common.Types: DirectGeneratorSuggestModeAlways :: DirectGeneratorSuggestModeTypes
+ Database.Bloodhound.Common.Types: DirectGeneratorSuggestModeMissing :: DirectGeneratorSuggestModeTypes
+ Database.Bloodhound.Common.Types: DirectGeneratorSuggestModePopular :: DirectGeneratorSuggestModeTypes
+ Database.Bloodhound.Common.Types: DirectGenerators :: FieldName -> Maybe Int -> DirectGeneratorSuggestModeTypes -> Maybe Double -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Double -> Maybe Double -> Maybe Text -> Maybe Text -> DirectGenerators
+ Database.Bloodhound.Common.Types: DisMaxQuery :: [Query] -> Tiebreaker -> Maybe Boost -> DisMaxQuery
+ Database.Bloodhound.Common.Types: DisableCoord :: Bool -> DisableCoord
+ Database.Bloodhound.Common.Types: Distance :: Double -> DistanceUnit -> Distance
+ Database.Bloodhound.Common.Types: DistanceRange :: Distance -> Distance -> DistanceRange
+ Database.Bloodhound.Common.Types: DocId :: Text -> DocId
+ Database.Bloodhound.Common.Types: DocVersion :: Int -> DocVersion
+ Database.Bloodhound.Common.Types: Dutch :: Language
+ Database.Bloodhound.Common.Types: EdgeNgramFilterSideBack :: EdgeNgramFilterSide
+ Database.Bloodhound.Common.Types: EdgeNgramFilterSideFront :: EdgeNgramFilterSide
+ Database.Bloodhound.Common.Types: Empty :: RegexpFlag
+ Database.Bloodhound.Common.Types: EnablePositionIncrements :: Bool -> EnablePositionIncrements
+ Database.Bloodhound.Common.Types: Endpoint :: [Text] -> [(Text, Maybe Text)] -> Endpoint
+ Database.Bloodhound.Common.Types: English :: Language
+ Database.Bloodhound.Common.Types: EsAddress :: Text -> EsAddress
+ Database.Bloodhound.Common.Types: EsError :: Maybe Int -> Text -> EsError
+ Database.Bloodhound.Common.Types: EsPassword :: Text -> EsPassword
+ Database.Bloodhound.Common.Types: EsProtocolException :: !Text -> !ByteString -> EsProtocolException
+ Database.Bloodhound.Common.Types: EsResult :: Text -> Maybe Text -> Text -> Maybe (EsResultFound a) -> EsResult a
+ Database.Bloodhound.Common.Types: EsResultFound :: DocVersion -> a -> EsResultFound a
+ Database.Bloodhound.Common.Types: EsUsername :: Text -> EsUsername
+ Database.Bloodhound.Common.Types: ExactRepo :: SnapshotRepoName -> SnapshotRepoPattern
+ Database.Bloodhound.Common.Types: ExactSnap :: SnapshotName -> SnapshotPattern
+ Database.Bloodhound.Common.Types: Exclude :: [Pattern] -> Exclude
+ Database.Bloodhound.Common.Types: Existence :: Bool -> Existence
+ Database.Bloodhound.Common.Types: ExpandWildcardsAll :: ExpandWildcards
+ Database.Bloodhound.Common.Types: ExpandWildcardsClosed :: ExpandWildcards
+ Database.Bloodhound.Common.Types: ExpandWildcardsNone :: ExpandWildcards
+ Database.Bloodhound.Common.Types: ExpandWildcardsOpen :: ExpandWildcards
+ Database.Bloodhound.Common.Types: ExplicitShards :: Int -> InitialShardCount
+ Database.Bloodhound.Common.Types: Extended :: StatsType
+ Database.Bloodhound.Common.Types: ExternalDocVersion :: DocVersion -> ExternalDocVersion
+ Database.Bloodhound.Common.Types: ExternalGT :: ExternalDocVersion -> VersionControl
+ Database.Bloodhound.Common.Types: ExternalGTE :: ExternalDocVersion -> VersionControl
+ Database.Bloodhound.Common.Types: FSBuffered :: FSType
+ Database.Bloodhound.Common.Types: FSSimple :: FSType
+ Database.Bloodhound.Common.Types: Factor :: Float -> Factor
+ Database.Bloodhound.Common.Types: FactorMissingFieldValue :: Float -> FactorMissingFieldValue
+ Database.Bloodhound.Common.Types: FactorModifierLn :: FactorModifier
+ Database.Bloodhound.Common.Types: FactorModifierLn1p :: FactorModifier
+ Database.Bloodhound.Common.Types: FactorModifierLn2p :: FactorModifier
+ Database.Bloodhound.Common.Types: FactorModifierLog :: FactorModifier
+ Database.Bloodhound.Common.Types: FactorModifierLog1p :: FactorModifier
+ Database.Bloodhound.Common.Types: FactorModifierLog2p :: FactorModifier
+ Database.Bloodhound.Common.Types: FactorModifierNone :: FactorModifier
+ Database.Bloodhound.Common.Types: FactorModifierReciprocal :: FactorModifier
+ Database.Bloodhound.Common.Types: FactorModifierSqrt :: FactorModifier
+ Database.Bloodhound.Common.Types: FactorModifierSquare :: FactorModifier
+ Database.Bloodhound.Common.Types: FailOnMergeFailure :: Bool -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: FastVector :: FastVectorHighlight -> HighlightSettings
+ Database.Bloodhound.Common.Types: FastVectorHighlight :: Maybe CommonHighlight -> Maybe NonPostings -> Maybe Text -> Maybe Int -> Maybe Int -> [Text] -> Maybe Int -> FastVectorHighlight
+ Database.Bloodhound.Common.Types: Feet :: DistanceUnit
+ Database.Bloodhound.Common.Types: FieldDefinition :: FieldType -> FieldDefinition
+ Database.Bloodhound.Common.Types: FieldHighlight :: FieldName -> Maybe HighlightSettings -> FieldHighlight
+ Database.Bloodhound.Common.Types: FieldName :: Text -> FieldName
+ Database.Bloodhound.Common.Types: FieldValueCount :: FieldName -> ValueCountAggregation
+ Database.Bloodhound.Common.Types: FieldValueFactor :: FieldName -> Maybe Factor -> Maybe FactorModifier -> Maybe FactorMissingFieldValue -> FieldValueFactor
+ Database.Bloodhound.Common.Types: Filter :: Query -> Filter
+ Database.Bloodhound.Common.Types: FilterAgg :: FilterAggregation -> Aggregation
+ Database.Bloodhound.Common.Types: FilterAggregation :: Filter -> Maybe Aggregations -> FilterAggregation
+ Database.Bloodhound.Common.Types: Finnish :: Language
+ Database.Bloodhound.Common.Types: FirstMissing :: Missing
+ Database.Bloodhound.Common.Types: FloatType :: FieldType
+ Database.Bloodhound.Common.Types: FofField :: FieldName -> FieldOrFields
+ Database.Bloodhound.Common.Types: FofFields :: NonEmpty FieldName -> FieldOrFields
+ Database.Bloodhound.Common.Types: ForceMergeIndexSettings :: Maybe Int -> Bool -> Bool -> ForceMergeIndexSettings
+ Database.Bloodhound.Common.Types: ForceVersion :: ExternalDocVersion -> VersionControl
+ Database.Bloodhound.Common.Types: French :: Language
+ Database.Bloodhound.Common.Types: From :: Int -> From
+ Database.Bloodhound.Common.Types: FsSnapshotRepo :: SnapshotRepoName -> FilePath -> Bool -> Maybe Bytes -> Maybe Bytes -> Maybe Bytes -> FsSnapshotRepo
+ Database.Bloodhound.Common.Types: FullMinus1Shards :: InitialShardCount
+ Database.Bloodhound.Common.Types: FullNodeId :: Text -> FullNodeId
+ Database.Bloodhound.Common.Types: FullShards :: InitialShardCount
+ Database.Bloodhound.Common.Types: FunctionScoreFunctionFieldValueFactor :: FieldValueFactor -> FunctionScoreFunction
+ Database.Bloodhound.Common.Types: FunctionScoreFunctionRandom :: Seed -> FunctionScoreFunction
+ Database.Bloodhound.Common.Types: FunctionScoreFunctionScript :: Script -> FunctionScoreFunction
+ Database.Bloodhound.Common.Types: FunctionScoreMultiple :: NonEmpty ComponentFunctionScoreFunction -> FunctionScoreFunctions
+ Database.Bloodhound.Common.Types: FunctionScoreQuery :: Maybe Query -> Maybe Boost -> FunctionScoreFunctions -> Maybe Boost -> Maybe BoostMode -> Score -> Maybe ScoreMode -> FunctionScoreQuery
+ Database.Bloodhound.Common.Types: FunctionScoreSingle :: FunctionScoreFunction -> FunctionScoreFunctions
+ Database.Bloodhound.Common.Types: Fuzziness :: Double -> Fuzziness
+ Database.Bloodhound.Common.Types: FuzzinessAuto :: Fuzziness
+ Database.Bloodhound.Common.Types: FuzzyLikeFieldQuery :: FieldName -> Text -> MaxQueryTerms -> IgnoreTermFrequency -> Fuzziness -> PrefixLength -> Boost -> Maybe Analyzer -> FuzzyLikeFieldQuery
+ Database.Bloodhound.Common.Types: FuzzyLikeThisQuery :: [FieldName] -> Text -> MaxQueryTerms -> IgnoreTermFrequency -> Fuzziness -> PrefixLength -> Boost -> Maybe Analyzer -> FuzzyLikeThisQuery
+ Database.Bloodhound.Common.Types: FuzzyQuery :: FieldName -> Text -> PrefixLength -> MaxExpansions -> Fuzziness -> Maybe Boost -> FuzzyQuery
+ Database.Bloodhound.Common.Types: GCDeletes :: NominalDiffTime -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: Galician :: Language
+ Database.Bloodhound.Common.Types: GatewaySnapshotInterval :: NominalDiffTime -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: GeneratePhraseQueries :: Bool -> GeneratePhraseQueries
+ Database.Bloodhound.Common.Types: GenericSnapshotRepo :: SnapshotRepoName -> SnapshotRepoType -> GenericSnapshotRepoSettings -> GenericSnapshotRepo
+ Database.Bloodhound.Common.Types: GenericSnapshotRepoSettings :: Object -> GenericSnapshotRepoSettings
+ Database.Bloodhound.Common.Types: GeoBoundingBox :: LatLon -> LatLon -> GeoBoundingBox
+ Database.Bloodhound.Common.Types: GeoBoundingBoxConstraint :: FieldName -> GeoBoundingBox -> Cache -> GeoFilterType -> GeoBoundingBoxConstraint
+ Database.Bloodhound.Common.Types: GeoDistanceSortSpec :: SortOrder -> GeoPoint -> DistanceUnit -> SortSpec
+ Database.Bloodhound.Common.Types: GeoFilterIndexed :: GeoFilterType
+ Database.Bloodhound.Common.Types: GeoFilterMemory :: GeoFilterType
+ Database.Bloodhound.Common.Types: GeoPoint :: FieldName -> LatLon -> GeoPoint
+ Database.Bloodhound.Common.Types: GeoPointType :: FieldType
+ Database.Bloodhound.Common.Types: GeoShapeType :: FieldType
+ Database.Bloodhound.Common.Types: German :: Language
+ Database.Bloodhound.Common.Types: German2 :: Language
+ Database.Bloodhound.Common.Types: GetTemplateScript :: Maybe Text -> Maybe SearchTemplateSource -> Maybe (HashMap Text Text) -> Text -> Bool -> GetTemplateScript
+ Database.Bloodhound.Common.Types: GlobalOrdinals :: ExecutionHint
+ Database.Bloodhound.Common.Types: GranularAliasRouting :: Maybe SearchAliasRouting -> Maybe IndexAliasRouting -> AliasRouting
+ Database.Bloodhound.Common.Types: GreaterThan :: Double -> GreaterThan
+ Database.Bloodhound.Common.Types: GreaterThanD :: UTCTime -> GreaterThanD
+ Database.Bloodhound.Common.Types: GreaterThanEq :: Double -> GreaterThanEq
+ Database.Bloodhound.Common.Types: GreaterThanEqD :: UTCTime -> GreaterThanEqD
+ Database.Bloodhound.Common.Types: Greek :: Language
+ Database.Bloodhound.Common.Types: HTMLEncoder :: HighlightEncoder
+ Database.Bloodhound.Common.Types: HTR_EQ :: HitsTotalRelation
+ Database.Bloodhound.Common.Types: HTR_GTE :: HitsTotalRelation
+ Database.Bloodhound.Common.Types: HasChildQuery :: RelationName -> Query -> Maybe ScoreType -> Maybe IgnoreUnmapped -> Maybe MinChildren -> Maybe MaxChildren -> HasChildQuery
+ Database.Bloodhound.Common.Types: HasParentQuery :: RelationName -> Query -> Maybe AggregateParentScore -> Maybe IgnoreUnmapped -> HasParentQuery
+ Database.Bloodhound.Common.Types: Highlights :: Maybe HighlightSettings -> [FieldHighlight] -> Highlights
+ Database.Bloodhound.Common.Types: Hindi :: Language
+ Database.Bloodhound.Common.Types: Hit :: IndexName -> DocId -> Score -> Maybe a -> Maybe SearchAfterKey -> Maybe HitFields -> Maybe HitHighlight -> Maybe (KeyMap (TopHitResult Value)) -> Hit a
+ Database.Bloodhound.Common.Types: HitFields :: Map Text [Value] -> HitFields
+ Database.Bloodhound.Common.Types: HitsTotal :: Int -> HitsTotalRelation -> HitsTotal
+ Database.Bloodhound.Common.Types: Hour :: Interval
+ Database.Bloodhound.Common.Types: Hours :: TimeInterval
+ Database.Bloodhound.Common.Types: Hungarian :: Language
+ Database.Bloodhound.Common.Types: IdsQuery :: [DocId] -> Query
+ Database.Bloodhound.Common.Types: IgnoreTermFrequency :: Bool -> IgnoreTermFrequency
+ Database.Bloodhound.Common.Types: IgnoreUnmapped :: Bool -> IgnoreUnmapped
+ Database.Bloodhound.Common.Types: IgnoredBody :: IgnoredBody
+ Database.Bloodhound.Common.Types: Inches :: DistanceUnit
+ Database.Bloodhound.Common.Types: Include :: [Pattern] -> Include
+ Database.Bloodhound.Common.Types: Index :: BulkAction
+ Database.Bloodhound.Common.Types: IndexAlias :: IndexName -> IndexAliasName -> IndexAlias
+ Database.Bloodhound.Common.Types: IndexAliasCreate :: Maybe AliasRouting -> Maybe Filter -> IndexAliasCreate
+ Database.Bloodhound.Common.Types: IndexAliasName :: IndexName -> IndexAliasName
+ Database.Bloodhound.Common.Types: IndexAliasRouting :: RoutingValue -> IndexAliasRouting
+ Database.Bloodhound.Common.Types: IndexAliasSummary :: IndexAlias -> IndexAliasCreate -> IndexAliasSummary
+ Database.Bloodhound.Common.Types: IndexAliasesSummary :: [IndexAliasSummary] -> IndexAliasesSummary
+ Database.Bloodhound.Common.Types: IndexCompoundFormat :: CompoundFormat -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: IndexCompoundOnFlush :: Bool -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: IndexConcurrency :: Int -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: IndexDocumentSettings :: VersionControl -> Maybe JoinRelation -> IndexDocumentSettings
+ Database.Bloodhound.Common.Types: IndexList :: NonEmpty IndexName -> IndexSelection
+ Database.Bloodhound.Common.Types: IndexMappingsLimits :: Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> IndexMappingsLimits
+ Database.Bloodhound.Common.Types: IndexPattern :: Text -> IndexPattern
+ Database.Bloodhound.Common.Types: IndexSettings :: ShardCount -> ReplicaCount -> IndexMappingsLimits -> IndexSettings
+ Database.Bloodhound.Common.Types: IndexSettingsSummary :: IndexName -> IndexSettings -> [UpdatableIndexSetting] -> IndexSettingsSummary
+ Database.Bloodhound.Common.Types: IndexTemplate :: [IndexPattern] -> Maybe IndexSettings -> Value -> IndexTemplate
+ Database.Bloodhound.Common.Types: IndicesQuery :: [IndexName] -> Query -> Maybe Query -> IndicesQuery
+ Database.Bloodhound.Common.Types: Indonesian :: Language
+ Database.Bloodhound.Common.Types: InnerHits :: Maybe Integer -> Maybe Integer -> InnerHits
+ Database.Bloodhound.Common.Types: IntegerType :: FieldType
+ Database.Bloodhound.Common.Types: InternalVersion :: DocVersion -> VersionControl
+ Database.Bloodhound.Common.Types: Intersection :: RegexpFlag
+ Database.Bloodhound.Common.Types: Interval :: RegexpFlag
+ Database.Bloodhound.Common.Types: Irish :: Language
+ Database.Bloodhound.Common.Types: Italian :: Language
+ Database.Bloodhound.Common.Types: JVMBufferPoolStats :: Bytes -> Bytes -> Int -> JVMBufferPoolStats
+ Database.Bloodhound.Common.Types: JVMGCCollector :: Text -> JVMGCCollector
+ Database.Bloodhound.Common.Types: JVMGCStats :: NominalDiffTime -> Int -> JVMGCStats
+ Database.Bloodhound.Common.Types: JVMMemoryInfo :: Bytes -> Bytes -> Bytes -> Bytes -> Bytes -> JVMMemoryInfo
+ Database.Bloodhound.Common.Types: JVMMemoryPool :: Text -> JVMMemoryPool
+ Database.Bloodhound.Common.Types: JVMPoolStats :: Bytes -> Bytes -> Bytes -> Bytes -> JVMPoolStats
+ Database.Bloodhound.Common.Types: JVMVersion :: Text -> JVMVersion
+ Database.Bloodhound.Common.Types: Kilometers :: DistanceUnit
+ Database.Bloodhound.Common.Types: Kp :: Language
+ Database.Bloodhound.Common.Types: LastMissing :: Missing
+ Database.Bloodhound.Common.Types: LatLon :: Double -> Double -> LatLon
+ Database.Bloodhound.Common.Types: Latvian :: Language
+ Database.Bloodhound.Common.Types: Lenient :: Bool -> Lenient
+ Database.Bloodhound.Common.Types: LessThan :: Double -> LessThan
+ Database.Bloodhound.Common.Types: LessThanD :: UTCTime -> LessThanD
+ Database.Bloodhound.Common.Types: LessThanEq :: Double -> LessThanEq
+ Database.Bloodhound.Common.Types: LessThanEqD :: UTCTime -> LessThanEqD
+ Database.Bloodhound.Common.Types: Lithuanian :: Language
+ Database.Bloodhound.Common.Types: LoadAvgs :: Double -> Double -> Double -> LoadAvgs
+ Database.Bloodhound.Common.Types: LocalNode :: NodeSelection
+ Database.Bloodhound.Common.Types: Locale :: Text -> Locale
+ Database.Bloodhound.Common.Types: LongType :: FieldType
+ Database.Bloodhound.Common.Types: Lovins :: Language
+ Database.Bloodhound.Common.Types: LowercaseExpanded :: Bool -> LowercaseExpanded
+ Database.Bloodhound.Common.Types: MS :: NominalDiffTime -> MS
+ Database.Bloodhound.Common.Types: MacAddress :: Text -> MacAddress
+ Database.Bloodhound.Common.Types: Map :: ExecutionHint
+ Database.Bloodhound.Common.Types: Mapping :: [MappingField] -> Mapping
+ Database.Bloodhound.Common.Types: MappingField :: FieldName -> FieldDefinition -> MappingField
+ Database.Bloodhound.Common.Types: MappingTotalFieldsLimit :: Int -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: MatchAllQuery :: Maybe Boost -> Query
+ Database.Bloodhound.Common.Types: MatchPhrase :: MatchQueryType
+ Database.Bloodhound.Common.Types: MatchPhrasePrefix :: MatchQueryType
+ Database.Bloodhound.Common.Types: MatchQuery :: FieldName -> QueryString -> BooleanOperator -> ZeroTermsQuery -> Maybe CutoffFrequency -> Maybe MatchQueryType -> Maybe Analyzer -> Maybe MaxExpansions -> Maybe Lenient -> Maybe Boost -> Maybe Text -> Maybe Fuzziness -> MatchQuery
+ Database.Bloodhound.Common.Types: MaxChildren :: Int -> MaxChildren
+ Database.Bloodhound.Common.Types: MaxDocFrequency :: Int -> MaxDocFrequency
+ Database.Bloodhound.Common.Types: MaxExpansions :: Int -> MaxExpansions
+ Database.Bloodhound.Common.Types: MaxQueryTerms :: Int -> MaxQueryTerms
+ Database.Bloodhound.Common.Types: MaxWordLength :: Int -> MaxWordLength
+ Database.Bloodhound.Common.Types: MaybeNA :: Maybe a -> MaybeNA a
+ Database.Bloodhound.Common.Types: MergeSegmentVsTotalIndex :: Double -> CompoundFormat
+ Database.Bloodhound.Common.Types: Meters :: DistanceUnit
+ Database.Bloodhound.Common.Types: Miles :: DistanceUnit
+ Database.Bloodhound.Common.Types: Millimeters :: DistanceUnit
+ Database.Bloodhound.Common.Types: MinChildren :: Int -> MinChildren
+ Database.Bloodhound.Common.Types: MinDocFrequency :: Int -> MinDocFrequency
+ Database.Bloodhound.Common.Types: MinWordLength :: Int -> MinWordLength
+ Database.Bloodhound.Common.Types: MinimumMatch :: Int -> MinimumMatch
+ Database.Bloodhound.Common.Types: MinimumMatchHighLow :: MinimumMatch -> MinimumMatch -> MinimumMatchHighLow
+ Database.Bloodhound.Common.Types: MinimumTermFrequency :: Int -> MinimumTermFrequency
+ Database.Bloodhound.Common.Types: Minute :: Interval
+ Database.Bloodhound.Common.Types: Minutes :: TimeInterval
+ Database.Bloodhound.Common.Types: MissingAgg :: MissingAggregation -> Aggregation
+ Database.Bloodhound.Common.Types: MissingAggregation :: Text -> MissingAggregation
+ Database.Bloodhound.Common.Types: MissingResult :: Int -> MissingResult
+ Database.Bloodhound.Common.Types: Month :: Interval
+ Database.Bloodhound.Common.Types: MoreLikeThisFieldQuery :: Text -> FieldName -> Maybe PercentMatch -> Maybe MinimumTermFrequency -> Maybe MaxQueryTerms -> Maybe (NonEmpty StopWord) -> Maybe MinDocFrequency -> Maybe MaxDocFrequency -> Maybe MinWordLength -> Maybe MaxWordLength -> Maybe BoostTerms -> Maybe Boost -> Maybe Analyzer -> MoreLikeThisFieldQuery
+ Database.Bloodhound.Common.Types: MoreLikeThisQuery :: Text -> Maybe (NonEmpty FieldName) -> Maybe PercentMatch -> Maybe MinimumTermFrequency -> Maybe MaxQueryTerms -> Maybe (NonEmpty StopWord) -> Maybe MinDocFrequency -> Maybe MaxDocFrequency -> Maybe MinWordLength -> Maybe MaxWordLength -> Maybe BoostTerms -> Maybe Boost -> Maybe Analyzer -> MoreLikeThisQuery
+ Database.Bloodhound.Common.Types: MultiMatchBestFields :: MultiMatchQueryType
+ Database.Bloodhound.Common.Types: MultiMatchCrossFields :: MultiMatchQueryType
+ Database.Bloodhound.Common.Types: MultiMatchMostFields :: MultiMatchQueryType
+ Database.Bloodhound.Common.Types: MultiMatchPhrase :: MultiMatchQueryType
+ Database.Bloodhound.Common.Types: MultiMatchPhrasePrefix :: MultiMatchQueryType
+ Database.Bloodhound.Common.Types: MultiMatchQuery :: [FieldName] -> QueryString -> BooleanOperator -> ZeroTermsQuery -> Maybe Tiebreaker -> Maybe MultiMatchQueryType -> Maybe CutoffFrequency -> Maybe Analyzer -> Maybe MaxExpansions -> Maybe Lenient -> MultiMatchQuery
+ Database.Bloodhound.Common.Types: MustMatch :: Term -> Cache -> BoolMatch
+ Database.Bloodhound.Common.Types: MustNotMatch :: Term -> Cache -> BoolMatch
+ Database.Bloodhound.Common.Types: NamedSuggestionResponse :: Text -> [SuggestResponse] -> NamedSuggestionResponse
+ Database.Bloodhound.Common.Types: NauticalMiles :: DistanceUnit
+ Database.Bloodhound.Common.Types: NestedQuery :: QueryPath -> ScoreType -> Query -> Maybe InnerHits -> NestedQuery
+ Database.Bloodhound.Common.Types: NetworkInterfaceName :: Text -> NetworkInterfaceName
+ Database.Bloodhound.Common.Types: Ngram :: Int -> Int -> [TokenChar] -> Ngram
+ Database.Bloodhound.Common.Types: NgramFilter :: Int -> Int -> NgramFilter
+ Database.Bloodhound.Common.Types: NoOptimizeBbox :: OptimizeBbox
+ Database.Bloodhound.Common.Types: NoRegexpFlags :: RegexpFlags
+ Database.Bloodhound.Common.Types: NoSource :: Source
+ Database.Bloodhound.Common.Types: NoVersionControl :: VersionControl
+ Database.Bloodhound.Common.Types: NodeAttrFilter :: NodeAttrName -> NonEmpty Text -> NodeAttrFilter
+ Database.Bloodhound.Common.Types: NodeAttrName :: Text -> NodeAttrName
+ Database.Bloodhound.Common.Types: NodeBreakerStats :: Int -> Double -> Bytes -> Bytes -> NodeBreakerStats
+ Database.Bloodhound.Common.Types: NodeBreakersStats :: NodeBreakerStats -> NodeBreakerStats -> NodeBreakerStats -> NodeBreakersStats
+ Database.Bloodhound.Common.Types: NodeByAttribute :: NodeAttrName -> Text -> NodeSelector
+ Database.Bloodhound.Common.Types: NodeByFullNodeId :: FullNodeId -> NodeSelector
+ Database.Bloodhound.Common.Types: NodeByHost :: Server -> NodeSelector
+ Database.Bloodhound.Common.Types: NodeByName :: NodeName -> NodeSelector
+ Database.Bloodhound.Common.Types: NodeDataPathStats :: Maybe Double -> Maybe Double -> Maybe Bytes -> Maybe Bytes -> Maybe Bytes -> Maybe Int -> Maybe Int -> Maybe Int -> Bytes -> Bytes -> Bytes -> Maybe Text -> Maybe Text -> Text -> Text -> NodeDataPathStats
+ Database.Bloodhound.Common.Types: NodeFSStats :: [NodeDataPathStats] -> NodeFSTotalStats -> UTCTime -> NodeFSStats
+ Database.Bloodhound.Common.Types: NodeFSTotalStats :: Maybe Double -> Maybe Double -> Maybe Bytes -> Maybe Bytes -> Maybe Bytes -> Maybe Int -> Maybe Int -> Maybe Int -> Bytes -> Bytes -> Bytes -> NodeFSTotalStats
+ Database.Bloodhound.Common.Types: NodeHTTPInfo :: Bytes -> EsAddress -> [EsAddress] -> NodeHTTPInfo
+ Database.Bloodhound.Common.Types: NodeHTTPStats :: Int -> Int -> NodeHTTPStats
+ Database.Bloodhound.Common.Types: NodeIndicesStats :: Maybe NominalDiffTime -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Bytes -> Maybe Int -> Maybe NominalDiffTime -> Maybe Int -> Bytes -> Int -> Maybe Bytes -> Bytes -> Maybe Bytes -> Bytes -> Bytes -> Int -> Bytes -> Maybe Int -> Maybe Bytes -> Maybe Int -> Maybe NominalDiffTime -> Maybe Int -> Int -> Bytes -> NominalDiffTime -> Int -> Int -> NominalDiffTime -> Int -> NominalDiffTime -> Int -> Bytes -> Int -> NominalDiffTime -> Int -> Bytes -> Int -> Int -> Int -> NominalDiffTime -> Int -> Int -> NominalDiffTime -> Int -> Int -> Int -> NominalDiffTime -> Int -> NominalDiffTime -> Int -> NominalDiffTime -> Int -> Maybe NominalDiffTime -> Maybe Bool -> Maybe Int -> Int -> NominalDiffTime -> Int -> Int -> NominalDiffTime -> Int -> Maybe NominalDiffTime -> Bytes -> Int -> Int -> NodeIndicesStats
+ Database.Bloodhound.Common.Types: NodeInfo :: Maybe EsAddress -> BuildHash -> VersionNumber -> Server -> Server -> EsAddress -> NodeName -> FullNodeId -> [NodePluginInfo] -> NodeHTTPInfo -> NodeTransportInfo -> Maybe NodeNetworkInfo -> Map Text NodeThreadPoolInfo -> NodeJVMInfo -> NodeProcessInfo -> NodeOSInfo -> Object -> NodeInfo
+ Database.Bloodhound.Common.Types: NodeJVMInfo :: [JVMMemoryPool] -> [JVMGCCollector] -> JVMMemoryInfo -> UTCTime -> Text -> VersionNumber -> Text -> JVMVersion -> PID -> NodeJVMInfo
+ Database.Bloodhound.Common.Types: NodeJVMStats :: JVMBufferPoolStats -> JVMBufferPoolStats -> JVMGCStats -> JVMGCStats -> Int -> Int -> JVMPoolStats -> JVMPoolStats -> JVMPoolStats -> Bytes -> Bytes -> Bytes -> Bytes -> Int -> Bytes -> NominalDiffTime -> UTCTime -> NodeJVMStats
+ Database.Bloodhound.Common.Types: NodeList :: NonEmpty NodeSelector -> NodeSelection
+ Database.Bloodhound.Common.Types: NodeName :: Text -> NodeName
+ Database.Bloodhound.Common.Types: NodeNetworkInfo :: NodeNetworkInterface -> NominalDiffTime -> NodeNetworkInfo
+ Database.Bloodhound.Common.Types: NodeNetworkInterface :: MacAddress -> NetworkInterfaceName -> Server -> NodeNetworkInterface
+ Database.Bloodhound.Common.Types: NodeNetworkStats :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> NodeNetworkStats
+ Database.Bloodhound.Common.Types: NodeOSInfo :: NominalDiffTime -> Text -> Text -> Text -> Int -> Int -> NodeOSInfo
+ Database.Bloodhound.Common.Types: NodeOSStats :: UTCTime -> Int -> Maybe LoadAvgs -> Bytes -> Bytes -> Int -> Bytes -> Int -> Bytes -> Bytes -> Bytes -> NodeOSStats
+ Database.Bloodhound.Common.Types: NodePluginInfo :: Maybe Bool -> Maybe Bool -> Text -> MaybeNA VersionNumber -> PluginName -> NodePluginInfo
+ Database.Bloodhound.Common.Types: NodeProcessInfo :: Bool -> Maybe Int -> PID -> NominalDiffTime -> NodeProcessInfo
+ Database.Bloodhound.Common.Types: NodeProcessStats :: UTCTime -> Int -> Int -> Int -> NominalDiffTime -> Bytes -> NodeProcessStats
+ Database.Bloodhound.Common.Types: NodeStats :: NodeName -> FullNodeId -> Maybe NodeBreakersStats -> NodeHTTPStats -> NodeTransportStats -> NodeFSStats -> Maybe NodeNetworkStats -> Map Text NodeThreadPoolStats -> NodeJVMStats -> NodeProcessStats -> NodeOSStats -> NodeIndicesStats -> NodeStats
+ Database.Bloodhound.Common.Types: NodeThreadPoolInfo :: ThreadPoolSize -> Maybe NominalDiffTime -> Maybe Int -> Maybe Int -> ThreadPoolType -> NodeThreadPoolInfo
+ Database.Bloodhound.Common.Types: NodeThreadPoolStats :: Int -> Int -> Int -> Int -> Int -> Int -> NodeThreadPoolStats
+ Database.Bloodhound.Common.Types: NodeTransportInfo :: [BoundTransportAddress] -> EsAddress -> [EsAddress] -> NodeTransportInfo
+ Database.Bloodhound.Common.Types: NodeTransportStats :: Bytes -> Int -> Bytes -> Int -> Int -> NodeTransportStats
+ Database.Bloodhound.Common.Types: NodesInfo :: [NodeInfo] -> ClusterName -> NodesInfo
+ Database.Bloodhound.Common.Types: NodesStats :: [NodeStats] -> ClusterName -> NodesStats
+ Database.Bloodhound.Common.Types: NominalDiffTimeJSON :: NominalDiffTime -> NominalDiffTimeJSON
+ Database.Bloodhound.Common.Types: NonPostings :: Maybe Int -> Maybe Int -> NonPostings
+ Database.Bloodhound.Common.Types: Norwegian :: Language
+ Database.Bloodhound.Common.Types: NullValue :: Bool -> NullValue
+ Database.Bloodhound.Common.Types: NumberOfReplicas :: ReplicaCount -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: OpCreate :: ReindexOpType
+ Database.Bloodhound.Common.Types: OpIndex :: ReindexOpType
+ Database.Bloodhound.Common.Types: OpenIndex :: OpenCloseIndex
+ Database.Bloodhound.Common.Types: OptimizeGeoFilterType :: GeoFilterType -> OptimizeBbox
+ Database.Bloodhound.Common.Types: Or :: BooleanOperator
+ Database.Bloodhound.Common.Types: OtherRepoConversionError :: Text -> SnapshotRepoConversionError
+ Database.Bloodhound.Common.Types: PID :: Int -> PID
+ Database.Bloodhound.Common.Types: POSIXMS :: UTCTime -> POSIXMS
+ Database.Bloodhound.Common.Types: ParentDocument :: FieldName -> RelationName -> JoinRelation
+ Database.Bloodhound.Common.Types: Pattern :: Text -> Pattern
+ Database.Bloodhound.Common.Types: PercentMatch :: Double -> PercentMatch
+ Database.Bloodhound.Common.Types: Persian :: Language
+ Database.Bloodhound.Common.Types: PhraseSlop :: Int -> PhraseSlop
+ Database.Bloodhound.Common.Types: PhraseSuggester :: FieldName -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Size -> Maybe Analyzer -> Maybe Int -> Maybe PhraseSuggesterHighlighter -> Maybe PhraseSuggesterCollate -> [DirectGenerators] -> PhraseSuggester
+ Database.Bloodhound.Common.Types: PhraseSuggesterCollate :: Query -> TemplateQueryKeyValuePairs -> Bool -> PhraseSuggesterCollate
+ Database.Bloodhound.Common.Types: PhraseSuggesterHighlighter :: Text -> Text -> PhraseSuggesterHighlighter
+ Database.Bloodhound.Common.Types: Plain :: PlainHighlight -> HighlightSettings
+ Database.Bloodhound.Common.Types: PlainHighlight :: Maybe CommonHighlight -> Maybe NonPostings -> PlainHighlight
+ Database.Bloodhound.Common.Types: Plane :: DistanceType
+ Database.Bloodhound.Common.Types: PluginName :: Text -> PluginName
+ Database.Bloodhound.Common.Types: PointInTime :: Text -> Text -> PointInTime
+ Database.Bloodhound.Common.Types: PopPattern :: Pattern -> PatternOrPatterns
+ Database.Bloodhound.Common.Types: PopPatterns :: [Pattern] -> PatternOrPatterns
+ Database.Bloodhound.Common.Types: Porter :: Language
+ Database.Bloodhound.Common.Types: Portuguese :: Language
+ Database.Bloodhound.Common.Types: Postings :: PostingsHighlight -> HighlightSettings
+ Database.Bloodhound.Common.Types: PostingsHighlight :: Maybe CommonHighlight -> PostingsHighlight
+ Database.Bloodhound.Common.Types: PrefixLength :: Int -> PrefixLength
+ Database.Bloodhound.Common.Types: PrefixQuery :: FieldName -> Text -> Maybe Boost -> PrefixQuery
+ Database.Bloodhound.Common.Types: Quarter :: Interval
+ Database.Bloodhound.Common.Types: QueryBoolQuery :: BoolQuery -> Query
+ Database.Bloodhound.Common.Types: QueryBoostingQuery :: BoostingQuery -> Query
+ Database.Bloodhound.Common.Types: QueryCommonTermsQuery :: CommonTermsQuery -> Query
+ Database.Bloodhound.Common.Types: QueryDisMaxQuery :: DisMaxQuery -> Query
+ Database.Bloodhound.Common.Types: QueryExistsQuery :: FieldName -> Query
+ Database.Bloodhound.Common.Types: QueryFunctionScoreQuery :: FunctionScoreQuery -> Query
+ Database.Bloodhound.Common.Types: QueryFuzzyLikeFieldQuery :: FuzzyLikeFieldQuery -> Query
+ Database.Bloodhound.Common.Types: QueryFuzzyLikeThisQuery :: FuzzyLikeThisQuery -> Query
+ Database.Bloodhound.Common.Types: QueryFuzzyQuery :: FuzzyQuery -> Query
+ Database.Bloodhound.Common.Types: QueryHasChildQuery :: HasChildQuery -> Query
+ Database.Bloodhound.Common.Types: QueryHasParentQuery :: HasParentQuery -> Query
+ Database.Bloodhound.Common.Types: QueryIndicesQuery :: IndicesQuery -> Query
+ Database.Bloodhound.Common.Types: QueryMatchNoneQuery :: Query
+ Database.Bloodhound.Common.Types: QueryMatchQuery :: MatchQuery -> Query
+ Database.Bloodhound.Common.Types: QueryMoreLikeThisFieldQuery :: MoreLikeThisFieldQuery -> Query
+ Database.Bloodhound.Common.Types: QueryMoreLikeThisQuery :: MoreLikeThisQuery -> Query
+ Database.Bloodhound.Common.Types: QueryMultiMatchQuery :: MultiMatchQuery -> Query
+ Database.Bloodhound.Common.Types: QueryNestedQuery :: NestedQuery -> Query
+ Database.Bloodhound.Common.Types: QueryPath :: Text -> QueryPath
+ Database.Bloodhound.Common.Types: QueryPrefixQuery :: PrefixQuery -> Query
+ Database.Bloodhound.Common.Types: QueryQueryStringQuery :: QueryStringQuery -> Query
+ Database.Bloodhound.Common.Types: QueryRangeQuery :: RangeQuery -> Query
+ Database.Bloodhound.Common.Types: QueryRegexpQuery :: RegexpQuery -> Query
+ Database.Bloodhound.Common.Types: QuerySimpleQueryStringQuery :: SimpleQueryStringQuery -> Query
+ Database.Bloodhound.Common.Types: QueryString :: Text -> QueryString
+ Database.Bloodhound.Common.Types: QueryStringQuery :: QueryString -> Maybe FieldName -> Maybe BooleanOperator -> Maybe Analyzer -> Maybe AllowLeadingWildcard -> Maybe LowercaseExpanded -> Maybe EnablePositionIncrements -> Maybe MaxExpansions -> Maybe Fuzziness -> Maybe PrefixLength -> Maybe PhraseSlop -> Maybe Boost -> Maybe AnalyzeWildcard -> Maybe GeneratePhraseQueries -> Maybe MinimumMatch -> Maybe Lenient -> Maybe Locale -> QueryStringQuery
+ Database.Bloodhound.Common.Types: QueryWildcardQuery :: WildcardQuery -> Query
+ Database.Bloodhound.Common.Types: QuorumMinus1Shards :: InitialShardCount
+ Database.Bloodhound.Common.Types: QuorumShards :: InitialShardCount
+ Database.Bloodhound.Common.Types: RRGroupRefNum :: Int -> RRGroupRefNum
+ Database.Bloodhound.Common.Types: RRSubGroup :: RRGroupRefNum -> RestoreRenameToken
+ Database.Bloodhound.Common.Types: RRSubWholeMatch :: RestoreRenameToken
+ Database.Bloodhound.Common.Types: RRTLit :: Text -> RestoreRenameToken
+ Database.Bloodhound.Common.Types: RangeDateGt :: GreaterThanD -> RangeValue
+ Database.Bloodhound.Common.Types: RangeDateGtLt :: GreaterThanD -> LessThanD -> RangeValue
+ Database.Bloodhound.Common.Types: RangeDateGtLte :: GreaterThanD -> LessThanEqD -> RangeValue
+ Database.Bloodhound.Common.Types: RangeDateGte :: GreaterThanEqD -> RangeValue
+ Database.Bloodhound.Common.Types: RangeDateGteLt :: GreaterThanEqD -> LessThanD -> RangeValue
+ Database.Bloodhound.Common.Types: RangeDateGteLte :: GreaterThanEqD -> LessThanEqD -> RangeValue
+ Database.Bloodhound.Common.Types: RangeDateLt :: LessThanD -> RangeValue
+ Database.Bloodhound.Common.Types: RangeDateLte :: LessThanEqD -> RangeValue
+ Database.Bloodhound.Common.Types: RangeDoubleGt :: GreaterThan -> RangeValue
+ Database.Bloodhound.Common.Types: RangeDoubleGtLt :: GreaterThan -> LessThan -> RangeValue
+ Database.Bloodhound.Common.Types: RangeDoubleGtLte :: GreaterThan -> LessThanEq -> RangeValue
+ Database.Bloodhound.Common.Types: RangeDoubleGte :: GreaterThanEq -> RangeValue
+ Database.Bloodhound.Common.Types: RangeDoubleGteLt :: GreaterThanEq -> LessThan -> RangeValue
+ Database.Bloodhound.Common.Types: RangeDoubleGteLte :: GreaterThanEq -> LessThanEq -> RangeValue
+ Database.Bloodhound.Common.Types: RangeDoubleLt :: LessThan -> RangeValue
+ Database.Bloodhound.Common.Types: RangeDoubleLte :: LessThanEq -> RangeValue
+ Database.Bloodhound.Common.Types: RangeExecutionFielddata :: RangeExecution
+ Database.Bloodhound.Common.Types: RangeExecutionIndex :: RangeExecution
+ Database.Bloodhound.Common.Types: RangeQuery :: FieldName -> RangeValue -> Boost -> RangeQuery
+ Database.Bloodhound.Common.Types: RecoveryInitialShards :: InitialShardCount -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: RefreshInterval :: NominalDiffTime -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: Regexp :: Text -> Regexp
+ Database.Bloodhound.Common.Types: RegexpQuery :: FieldName -> Regexp -> RegexpFlags -> Maybe Boost -> RegexpQuery
+ Database.Bloodhound.Common.Types: ReindexAbortOnConflicts :: ReindexConflicts
+ Database.Bloodhound.Common.Types: ReindexDest :: IndexName -> Maybe VersionType -> Maybe ReindexOpType -> ReindexDest
+ Database.Bloodhound.Common.Types: ReindexProceedOnConflicts :: ReindexConflicts
+ Database.Bloodhound.Common.Types: ReindexRequest :: Maybe ReindexConflicts -> ReindexSource -> ReindexDest -> Maybe ReindexScript -> ReindexRequest
+ Database.Bloodhound.Common.Types: ReindexResponse :: Maybe Int -> Int -> Int -> Int -> Int -> Int -> ReindexResponse
+ Database.Bloodhound.Common.Types: ReindexScript :: ScriptLanguage -> Text -> ReindexScript
+ Database.Bloodhound.Common.Types: ReindexSlice :: Maybe Int -> Maybe Int -> ReindexSlice
+ Database.Bloodhound.Common.Types: ReindexSource :: NonEmpty IndexName -> Maybe Int -> Maybe Query -> Maybe Int -> Maybe ReindexSlice -> ReindexSource
+ Database.Bloodhound.Common.Types: RelationName :: Text -> RelationName
+ Database.Bloodhound.Common.Types: RemoveAlias :: IndexAlias -> IndexAliasAction
+ Database.Bloodhound.Common.Types: ReplicaCount :: Int -> ReplicaCount
+ Database.Bloodhound.Common.Types: ReplicasBounded :: Int -> Int -> ReplicaBounds
+ Database.Bloodhound.Common.Types: ReplicasLowerBounded :: Int -> ReplicaBounds
+ Database.Bloodhound.Common.Types: ReplicasUnbounded :: ReplicaBounds
+ Database.Bloodhound.Common.Types: RepoPattern :: Text -> SnapshotRepoPattern
+ Database.Bloodhound.Common.Types: RepoTypeMismatch :: SnapshotRepoType -> SnapshotRepoType -> SnapshotRepoConversionError
+ Database.Bloodhound.Common.Types: RestoreIndexSettings :: Maybe ReplicaCount -> RestoreIndexSettings
+ Database.Bloodhound.Common.Types: RestoreRenamePattern :: Text -> RestoreRenamePattern
+ Database.Bloodhound.Common.Types: Romanian :: Language
+ Database.Bloodhound.Common.Types: RoundDownTo :: DateMathUnit -> DateMathModifier
+ Database.Bloodhound.Common.Types: RoutingAllocationEnable :: AllocationPolicy -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: RoutingAllocationExclude :: NonEmpty NodeAttrFilter -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: RoutingAllocationInclude :: NonEmpty NodeAttrFilter -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: RoutingAllocationRequire :: NonEmpty NodeAttrFilter -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: RoutingAllocationShardsPerNode :: ShardCount -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: RoutingValue :: Text -> RoutingValue
+ Database.Bloodhound.Common.Types: Russian :: Language
+ Database.Bloodhound.Common.Types: ScientificValue :: Scientific -> BucketValue
+ Database.Bloodhound.Common.Types: ScoreModeAvg :: ScoreMode
+ Database.Bloodhound.Common.Types: ScoreModeFirst :: ScoreMode
+ Database.Bloodhound.Common.Types: ScoreModeMax :: ScoreMode
+ Database.Bloodhound.Common.Types: ScoreModeMin :: ScoreMode
+ Database.Bloodhound.Common.Types: ScoreModeMultiply :: ScoreMode
+ Database.Bloodhound.Common.Types: ScoreModeSum :: ScoreMode
+ Database.Bloodhound.Common.Types: ScoreTypeAvg :: ScoreType
+ Database.Bloodhound.Common.Types: ScoreTypeMax :: ScoreType
+ Database.Bloodhound.Common.Types: ScoreTypeNone :: ScoreType
+ Database.Bloodhound.Common.Types: ScoreTypeSum :: ScoreType
+ Database.Bloodhound.Common.Types: Script :: Maybe ScriptLanguage -> ScriptSource -> Maybe ScriptParams -> Script
+ Database.Bloodhound.Common.Types: ScriptFields :: KeyMap ScriptFieldValue -> ScriptFields
+ Database.Bloodhound.Common.Types: ScriptId :: Text -> ScriptSource
+ Database.Bloodhound.Common.Types: ScriptInline :: Text -> ScriptSource
+ Database.Bloodhound.Common.Types: ScriptLanguage :: Text -> ScriptLanguage
+ Database.Bloodhound.Common.Types: ScriptParams :: KeyMap ScriptParamValue -> ScriptParams
+ Database.Bloodhound.Common.Types: ScriptValueCount :: Script -> ValueCountAggregation
+ Database.Bloodhound.Common.Types: ScrollId :: Text -> ScrollId
+ Database.Bloodhound.Common.Types: Search :: Maybe Query -> Maybe Filter -> Maybe Sort -> Maybe Aggregations -> Maybe Highlights -> TrackSortScores -> From -> Size -> SearchType -> Maybe SearchAfterKey -> Maybe [FieldName] -> Maybe ScriptFields -> Maybe Source -> Maybe Suggest -> Maybe PointInTime -> Search
+ Database.Bloodhound.Common.Types: SearchAliasRouting :: NonEmpty RoutingValue -> SearchAliasRouting
+ Database.Bloodhound.Common.Types: SearchHits :: HitsTotal -> Score -> [Hit a] -> SearchHits a
+ Database.Bloodhound.Common.Types: SearchResult :: Int -> Bool -> ShardResult -> SearchHits a -> Maybe AggregationResults -> Maybe ScrollId -> Maybe NamedSuggestionResponse -> Maybe Text -> SearchResult a
+ Database.Bloodhound.Common.Types: SearchTemplate :: Either SearchTemplateId SearchTemplateSource -> TemplateQueryKeyValuePairs -> Maybe Bool -> Maybe Bool -> SearchTemplate
+ Database.Bloodhound.Common.Types: SearchTemplateId :: Text -> SearchTemplateId
+ Database.Bloodhound.Common.Types: SearchTemplateSource :: Text -> SearchTemplateSource
+ Database.Bloodhound.Common.Types: SearchTypeDfsQueryThenFetch :: SearchType
+ Database.Bloodhound.Common.Types: SearchTypeQueryThenFetch :: SearchType
+ Database.Bloodhound.Common.Types: Second :: Interval
+ Database.Bloodhound.Common.Types: Seconds :: TimeInterval
+ Database.Bloodhound.Common.Types: Seed :: Float -> Seed
+ Database.Bloodhound.Common.Types: Server :: Text -> Server
+ Database.Bloodhound.Common.Types: ShardCount :: Int -> ShardCount
+ Database.Bloodhound.Common.Types: ShardId :: Int -> ShardId
+ Database.Bloodhound.Common.Types: ShardResult :: Int -> Int -> Int -> Int -> ShardResult
+ Database.Bloodhound.Common.Types: ShardsResult :: ShardResult -> ShardsResult
+ Database.Bloodhound.Common.Types: Shingle :: Int -> Int -> Bool -> Bool -> Text -> Text -> Shingle
+ Database.Bloodhound.Common.Types: ShortType :: FieldType
+ Database.Bloodhound.Common.Types: ShouldMatch :: [Term] -> Cache -> BoolMatch
+ Database.Bloodhound.Common.Types: SimpleQueryAll :: SimpleQueryFlag
+ Database.Bloodhound.Common.Types: SimpleQueryAnd :: SimpleQueryFlag
+ Database.Bloodhound.Common.Types: SimpleQueryEscape :: SimpleQueryFlag
+ Database.Bloodhound.Common.Types: SimpleQueryFuzzy :: SimpleQueryFlag
+ Database.Bloodhound.Common.Types: SimpleQueryNear :: SimpleQueryFlag
+ Database.Bloodhound.Common.Types: SimpleQueryNone :: SimpleQueryFlag
+ Database.Bloodhound.Common.Types: SimpleQueryOr :: SimpleQueryFlag
+ Database.Bloodhound.Common.Types: SimpleQueryPhrase :: SimpleQueryFlag
+ Database.Bloodhound.Common.Types: SimpleQueryPrecedence :: SimpleQueryFlag
+ Database.Bloodhound.Common.Types: SimpleQueryPrefix :: SimpleQueryFlag
+ Database.Bloodhound.Common.Types: SimpleQuerySlop :: SimpleQueryFlag
+ Database.Bloodhound.Common.Types: SimpleQueryStringQuery :: QueryString -> Maybe FieldOrFields -> Maybe BooleanOperator -> Maybe Analyzer -> Maybe (NonEmpty SimpleQueryFlag) -> Maybe LowercaseExpanded -> Maybe Locale -> SimpleQueryStringQuery
+ Database.Bloodhound.Common.Types: SimpleQueryWhitespace :: SimpleQueryFlag
+ Database.Bloodhound.Common.Types: Size :: Int -> Size
+ Database.Bloodhound.Common.Types: SloppyArc :: DistanceType
+ Database.Bloodhound.Common.Types: SnapPattern :: Text -> SnapshotPattern
+ Database.Bloodhound.Common.Types: SnapshotAborted :: SnapshotState
+ Database.Bloodhound.Common.Types: SnapshotCreateSettings :: Bool -> Maybe IndexSelection -> Bool -> Bool -> Bool -> SnapshotCreateSettings
+ Database.Bloodhound.Common.Types: SnapshotFailed :: SnapshotState
+ Database.Bloodhound.Common.Types: SnapshotInfo :: ShardResult -> [SnapshotShardFailure] -> NominalDiffTime -> UTCTime -> UTCTime -> SnapshotState -> [IndexName] -> SnapshotName -> SnapshotInfo
+ Database.Bloodhound.Common.Types: SnapshotInit :: SnapshotState
+ Database.Bloodhound.Common.Types: SnapshotList :: NonEmpty SnapshotPattern -> SnapshotSelection
+ Database.Bloodhound.Common.Types: SnapshotMissing :: SnapshotState
+ Database.Bloodhound.Common.Types: SnapshotName :: Text -> SnapshotName
+ Database.Bloodhound.Common.Types: SnapshotNodeVerification :: FullNodeId -> NodeName -> SnapshotNodeVerification
+ Database.Bloodhound.Common.Types: SnapshotRepoList :: NonEmpty SnapshotRepoPattern -> SnapshotRepoSelection
+ Database.Bloodhound.Common.Types: SnapshotRepoName :: Text -> SnapshotRepoName
+ Database.Bloodhound.Common.Types: SnapshotRepoType :: Text -> SnapshotRepoType
+ Database.Bloodhound.Common.Types: SnapshotRepoUpdateSettings :: Bool -> SnapshotRepoUpdateSettings
+ Database.Bloodhound.Common.Types: SnapshotRestoreSettings :: Bool -> Maybe IndexSelection -> Bool -> Bool -> Maybe RestoreRenamePattern -> Maybe (NonEmpty RestoreRenameToken) -> Bool -> Bool -> Maybe RestoreIndexSettings -> Maybe (NonEmpty Text) -> SnapshotRestoreSettings
+ Database.Bloodhound.Common.Types: SnapshotShardFailure :: IndexName -> Maybe NodeName -> Text -> ShardId -> SnapshotShardFailure
+ Database.Bloodhound.Common.Types: SnapshotStarted :: SnapshotState
+ Database.Bloodhound.Common.Types: SnapshotSuccess :: SnapshotState
+ Database.Bloodhound.Common.Types: SnapshotVerification :: [SnapshotNodeVerification] -> SnapshotVerification
+ Database.Bloodhound.Common.Types: SnapshotWaiting :: SnapshotState
+ Database.Bloodhound.Common.Types: SomeRegexpFlags :: NonEmpty RegexpFlag -> RegexpFlags
+ Database.Bloodhound.Common.Types: Sorani :: Language
+ Database.Bloodhound.Common.Types: SortAvg :: SortMode
+ Database.Bloodhound.Common.Types: SortMax :: SortMode
+ Database.Bloodhound.Common.Types: SortMin :: SortMode
+ Database.Bloodhound.Common.Types: SortSum :: SortMode
+ Database.Bloodhound.Common.Types: SourceIncludeExclude :: Include -> Exclude -> Source
+ Database.Bloodhound.Common.Types: SourcePatterns :: PatternOrPatterns -> Source
+ Database.Bloodhound.Common.Types: Spanish :: Language
+ Database.Bloodhound.Common.Types: StatisticsAggregation :: StatsType -> FieldName -> StatisticsAggregation
+ Database.Bloodhound.Common.Types: StatsAgg :: StatisticsAggregation -> Aggregation
+ Database.Bloodhound.Common.Types: Status :: Text -> Text -> Text -> Version -> Text -> Status
+ Database.Bloodhound.Common.Types: StopWord :: Text -> StopWord
+ Database.Bloodhound.Common.Types: SubtractTime :: Int -> DateMathUnit -> DateMathModifier
+ Database.Bloodhound.Common.Types: Suggest :: Text -> Text -> SuggestType -> Suggest
+ Database.Bloodhound.Common.Types: SuggestOptions :: Text -> Double -> Maybe Int -> Maybe Text -> SuggestOptions
+ Database.Bloodhound.Common.Types: SuggestResponse :: Text -> Int -> Int -> [SuggestOptions] -> SuggestResponse
+ Database.Bloodhound.Common.Types: SuggestTypePhraseSuggester :: PhraseSuggester -> SuggestType
+ Database.Bloodhound.Common.Types: SumAgg :: SumAggregation -> Aggregation
+ Database.Bloodhound.Common.Types: SumAggregation :: FieldName -> SumAggregation
+ Database.Bloodhound.Common.Types: Swedish :: Language
+ Database.Bloodhound.Common.Types: TTLDisablePurge :: Bool -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: TagSchema :: Text -> HighlightTag
+ Database.Bloodhound.Common.Types: Task :: Text -> Int -> Text -> Text -> a -> Text -> Integer -> Integer -> Bool -> Task a
+ Database.Bloodhound.Common.Types: TaskNodeId :: Text -> TaskNodeId
+ Database.Bloodhound.Common.Types: TaskResponse :: Bool -> Task a -> Maybe a -> Maybe Object -> TaskResponse a
+ Database.Bloodhound.Common.Types: TemplateName :: Text -> TemplateName
+ Database.Bloodhound.Common.Types: TemplateQueryKeyValuePairs :: KeyMap TemplateQueryValue -> TemplateQueryKeyValuePairs
+ Database.Bloodhound.Common.Types: Term :: Key -> Text -> Term
+ Database.Bloodhound.Common.Types: TermInclusion :: Text -> TermInclusion
+ Database.Bloodhound.Common.Types: TermOrder :: Text -> SortOrder -> TermOrder
+ Database.Bloodhound.Common.Types: TermPattern :: Text -> Text -> TermInclusion
+ Database.Bloodhound.Common.Types: TermQuery :: Term -> Maybe Boost -> Query
+ Database.Bloodhound.Common.Types: TermsAgg :: TermsAggregation -> Aggregation
+ Database.Bloodhound.Common.Types: TermsAggregation :: Either Text Text -> Maybe TermInclusion -> Maybe TermInclusion -> Maybe TermOrder -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe CollectionMode -> Maybe ExecutionHint -> Maybe Aggregations -> TermsAggregation
+ Database.Bloodhound.Common.Types: TermsQuery :: Key -> NonEmpty Text -> Query
+ Database.Bloodhound.Common.Types: TermsResult :: BucketValue -> Int -> Maybe AggregationResults -> TermsResult
+ Database.Bloodhound.Common.Types: TextValue :: Text -> BucketValue
+ Database.Bloodhound.Common.Types: Thai :: Language
+ Database.Bloodhound.Common.Types: ThreadPool :: Text -> NodeThreadPoolInfo -> ThreadPool
+ Database.Bloodhound.Common.Types: ThreadPoolBounded :: Int -> ThreadPoolSize
+ Database.Bloodhound.Common.Types: ThreadPoolCached :: ThreadPoolType
+ Database.Bloodhound.Common.Types: ThreadPoolFixed :: ThreadPoolType
+ Database.Bloodhound.Common.Types: ThreadPoolFixedAutoQueueSize :: ThreadPoolType
+ Database.Bloodhound.Common.Types: ThreadPoolScaling :: ThreadPoolType
+ Database.Bloodhound.Common.Types: ThreadPoolUnbounded :: ThreadPoolSize
+ Database.Bloodhound.Common.Types: Tiebreaker :: Double -> Tiebreaker
+ Database.Bloodhound.Common.Types: TimeUnitDays :: TimeUnits
+ Database.Bloodhound.Common.Types: TimeUnitHours :: TimeUnits
+ Database.Bloodhound.Common.Types: TimeUnitMicroseconds :: TimeUnits
+ Database.Bloodhound.Common.Types: TimeUnitMilliseconds :: TimeUnits
+ Database.Bloodhound.Common.Types: TimeUnitMinutes :: TimeUnits
+ Database.Bloodhound.Common.Types: TimeUnitNanoseconds :: TimeUnits
+ Database.Bloodhound.Common.Types: TimeUnitSeconds :: TimeUnits
+ Database.Bloodhound.Common.Types: TokenDigit :: TokenChar
+ Database.Bloodhound.Common.Types: TokenFilter :: Text -> TokenFilter
+ Database.Bloodhound.Common.Types: TokenFilterDefinitionApostrophe :: TokenFilterDefinition
+ Database.Bloodhound.Common.Types: TokenFilterDefinitionEdgeNgram :: NgramFilter -> Maybe EdgeNgramFilterSide -> TokenFilterDefinition
+ Database.Bloodhound.Common.Types: TokenFilterDefinitionLowercase :: Maybe Language -> TokenFilterDefinition
+ Database.Bloodhound.Common.Types: TokenFilterDefinitionNgram :: NgramFilter -> TokenFilterDefinition
+ Database.Bloodhound.Common.Types: TokenFilterDefinitionReverse :: TokenFilterDefinition
+ Database.Bloodhound.Common.Types: TokenFilterDefinitionShingle :: Shingle -> TokenFilterDefinition
+ Database.Bloodhound.Common.Types: TokenFilterDefinitionSnowball :: Language -> TokenFilterDefinition
+ Database.Bloodhound.Common.Types: TokenFilterDefinitionStemmer :: Language -> TokenFilterDefinition
+ Database.Bloodhound.Common.Types: TokenFilterDefinitionStop :: Either Language [StopWord] -> TokenFilterDefinition
+ Database.Bloodhound.Common.Types: TokenFilterDefinitionUppercase :: Maybe Language -> TokenFilterDefinition
+ Database.Bloodhound.Common.Types: TokenFilterTruncate :: Int -> TokenFilterDefinition
+ Database.Bloodhound.Common.Types: TokenLetter :: TokenChar
+ Database.Bloodhound.Common.Types: TokenPunctuation :: TokenChar
+ Database.Bloodhound.Common.Types: TokenSymbol :: TokenChar
+ Database.Bloodhound.Common.Types: TokenWhitespace :: TokenChar
+ Database.Bloodhound.Common.Types: Tokenizer :: Text -> Tokenizer
+ Database.Bloodhound.Common.Types: TokenizerDefinitionEdgeNgram :: Ngram -> TokenizerDefinition
+ Database.Bloodhound.Common.Types: TokenizerDefinitionNgram :: Ngram -> TokenizerDefinition
+ Database.Bloodhound.Common.Types: TopHitResult :: SearchHits a -> TopHitResult a
+ Database.Bloodhound.Common.Types: TopHitsAgg :: TopHitsAggregation -> Aggregation
+ Database.Bloodhound.Common.Types: TopHitsAggregation :: Maybe From -> Maybe Size -> Maybe Sort -> TopHitsAggregation
+ Database.Bloodhound.Common.Types: TranslogDisableFlush :: Bool -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: TranslogFSType :: FSType -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: TranslogFlushThresholdOps :: Int -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: TranslogFlushThresholdPeriod :: NominalDiffTime -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: TranslogFlushThresholdSize :: Bytes -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: Turkish :: Language
+ Database.Bloodhound.Common.Types: UA_RetryOnConflict :: Int -> UpsertActionMetadata
+ Database.Bloodhound.Common.Types: UA_Version :: Int -> UpsertActionMetadata
+ Database.Bloodhound.Common.Types: UnassignedNodeLeftDelayedTimeout :: NominalDiffTime -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: Update :: BulkAction
+ Database.Bloodhound.Common.Types: UpsertDoc :: Value -> UpsertPayload
+ Database.Bloodhound.Common.Types: UpsertScript :: Bool -> Script -> Value -> UpsertPayload
+ Database.Bloodhound.Common.Types: ValueCountAgg :: ValueCountAggregation -> Aggregation
+ Database.Bloodhound.Common.Types: Version :: VersionNumber -> BuildHash -> UTCTime -> Bool -> VersionNumber -> Version
+ Database.Bloodhound.Common.Types: VersionNumber :: Version -> VersionNumber
+ Database.Bloodhound.Common.Types: VersionTypeExternal :: VersionType
+ Database.Bloodhound.Common.Types: VersionTypeExternalGT :: VersionType
+ Database.Bloodhound.Common.Types: VersionTypeExternalGTE :: VersionType
+ Database.Bloodhound.Common.Types: VersionTypeInternal :: VersionType
+ Database.Bloodhound.Common.Types: WarmerEnabled :: Bool -> UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: Week :: Interval
+ Database.Bloodhound.Common.Types: Weeks :: TimeInterval
+ Database.Bloodhound.Common.Types: Weight :: Float -> Weight
+ Database.Bloodhound.Common.Types: WildcardQuery :: FieldName -> Key -> Maybe Boost -> WildcardQuery
+ Database.Bloodhound.Common.Types: Yards :: DistanceUnit
+ Database.Bloodhound.Common.Types: Year :: Interval
+ Database.Bloodhound.Common.Types: ZeroTermsAll :: ZeroTermsQuery
+ Database.Bloodhound.Common.Types: ZeroTermsNone :: ZeroTermsQuery
+ Database.Bloodhound.Common.Types: [_id] :: EsResult a -> Text
+ Database.Bloodhound.Common.Types: [_index] :: EsResult a -> Text
+ Database.Bloodhound.Common.Types: [_source] :: EsResultFound a -> a
+ Database.Bloodhound.Common.Types: [_type] :: EsResult a -> Maybe Text
+ Database.Bloodhound.Common.Types: [_version] :: EsResultFound a -> DocVersion
+ Database.Bloodhound.Common.Types: [aggBody] :: Search -> Maybe Aggregations
+ Database.Bloodhound.Common.Types: [aggregations] :: SearchResult a -> Maybe AggregationResults
+ Database.Bloodhound.Common.Types: [aliasCreateFilter] :: IndexAliasCreate -> Maybe Filter
+ Database.Bloodhound.Common.Types: [aliasCreateRouting] :: IndexAliasCreate -> Maybe AliasRouting
+ Database.Bloodhound.Common.Types: [analysisAnalyzer] :: Analysis -> Map Text AnalyzerDefinition
+ Database.Bloodhound.Common.Types: [analysisCharFilter] :: Analysis -> Map Text CharFilterDefinition
+ Database.Bloodhound.Common.Types: [analysisTokenFilter] :: Analysis -> Map Text TokenFilterDefinition
+ Database.Bloodhound.Common.Types: [analysisTokenizer] :: Analysis -> Map Text TokenizerDefinition
+ Database.Bloodhound.Common.Types: [analyzerDefinitionCharFilter] :: AnalyzerDefinition -> [CharFilter]
+ Database.Bloodhound.Common.Types: [analyzerDefinitionFilter] :: AnalyzerDefinition -> [TokenFilter]
+ Database.Bloodhound.Common.Types: [analyzerDefinitionTokenizer] :: AnalyzerDefinition -> Maybe Tokenizer
+ Database.Bloodhound.Common.Types: [baiAction] :: BulkActionItem -> BulkAction
+ Database.Bloodhound.Common.Types: [baiItem] :: BulkActionItem -> BulkItem
+ Database.Bloodhound.Common.Types: [bbConstraintcache] :: GeoBoundingBoxConstraint -> Cache
+ Database.Bloodhound.Common.Types: [beReason] :: BulkError -> Text
+ Database.Bloodhound.Common.Types: [beType] :: BulkError -> Text
+ Database.Bloodhound.Common.Types: [bhRequestBody] :: BHRequest parsingContext responseBody -> Maybe ByteString
+ Database.Bloodhound.Common.Types: [bhRequestEndpoint] :: BHRequest parsingContext responseBody -> Endpoint
+ Database.Bloodhound.Common.Types: [bhRequestMethod] :: BHRequest parsingContext responseBody -> Method
+ Database.Bloodhound.Common.Types: [bhRequestParser] :: BHRequest parsingContext responseBody -> BHResponse parsingContext responseBody -> Either EsProtocolException (ParsedEsResponse responseBody)
+ Database.Bloodhound.Common.Types: [biError] :: BulkItem -> Maybe BulkError
+ Database.Bloodhound.Common.Types: [biId] :: BulkItem -> Text
+ Database.Bloodhound.Common.Types: [biIndex] :: BulkItem -> Text
+ Database.Bloodhound.Common.Types: [biStatus] :: BulkItem -> Maybe Int
+ Database.Bloodhound.Common.Types: [boolQueryBoost] :: BoolQuery -> Maybe Boost
+ Database.Bloodhound.Common.Types: [boolQueryDisableCoord] :: BoolQuery -> Maybe DisableCoord
+ Database.Bloodhound.Common.Types: [boolQueryFilter] :: BoolQuery -> [Filter]
+ Database.Bloodhound.Common.Types: [boolQueryMinimumShouldMatch] :: BoolQuery -> Maybe MinimumMatch
+ Database.Bloodhound.Common.Types: [boolQueryMustMatch] :: BoolQuery -> [Query]
+ Database.Bloodhound.Common.Types: [boolQueryMustNotMatch] :: BoolQuery -> [Query]
+ Database.Bloodhound.Common.Types: [boolQueryShouldMatch] :: BoolQuery -> [Query]
+ Database.Bloodhound.Common.Types: [bottomRight] :: GeoBoundingBox -> LatLon
+ Database.Bloodhound.Common.Types: [boundAddress] :: BoundTransportAddress -> [EsAddress]
+ Database.Bloodhound.Common.Types: [boundaryChars] :: FastVectorHighlight -> Maybe Text
+ Database.Bloodhound.Common.Types: [boundaryMaxScan] :: FastVectorHighlight -> Maybe Int
+ Database.Bloodhound.Common.Types: [buckets] :: Bucket a -> [a]
+ Database.Bloodhound.Common.Types: [buildHash] :: BuildHash -> Text
+ Database.Bloodhound.Common.Types: [build_date] :: Version -> UTCTime
+ Database.Bloodhound.Common.Types: [build_hash] :: Version -> BuildHash
+ Database.Bloodhound.Common.Types: [build_snapshot] :: Version -> Bool
+ Database.Bloodhound.Common.Types: [bulkActionItems] :: BulkResponse -> [BulkActionItem]
+ Database.Bloodhound.Common.Types: [bulkErrors] :: BulkResponse -> Bool
+ Database.Bloodhound.Common.Types: [bulkTook] :: BulkResponse -> Int
+ Database.Bloodhound.Common.Types: [cardinalityField] :: CardinalityAggregation -> FieldName
+ Database.Bloodhound.Common.Types: [charFilterDefinitionPatternReplaceFlags] :: CharFilterDefinition -> Maybe Text
+ Database.Bloodhound.Common.Types: [charFilterDefinitionPatternReplacePattern] :: CharFilterDefinition -> Text
+ Database.Bloodhound.Common.Types: [charFilterDefinitionPatternReplaceReplacement] :: CharFilterDefinition -> Text
+ Database.Bloodhound.Common.Types: [clusterName] :: ClusterName -> Text
+ Database.Bloodhound.Common.Types: [cluster_name] :: Status -> Text
+ Database.Bloodhound.Common.Types: [cluster_uuid] :: Status -> Text
+ Database.Bloodhound.Common.Types: [coefficient] :: Distance -> Double
+ Database.Bloodhound.Common.Types: [commonAnalyzer] :: CommonTermsQuery -> Maybe Analyzer
+ Database.Bloodhound.Common.Types: [commonBoost] :: CommonTermsQuery -> Maybe Boost
+ Database.Bloodhound.Common.Types: [commonCutoffFrequency] :: CommonTermsQuery -> CutoffFrequency
+ Database.Bloodhound.Common.Types: [commonDisableCoord] :: CommonTermsQuery -> Maybe DisableCoord
+ Database.Bloodhound.Common.Types: [commonField] :: CommonTermsQuery -> FieldName
+ Database.Bloodhound.Common.Types: [commonHighFreqOperator] :: CommonTermsQuery -> BooleanOperator
+ Database.Bloodhound.Common.Types: [commonLowFreqOperator] :: CommonTermsQuery -> BooleanOperator
+ Database.Bloodhound.Common.Types: [commonMinimumShouldMatch] :: CommonTermsQuery -> Maybe CommonMinimumMatch
+ Database.Bloodhound.Common.Types: [commonQuery] :: CommonTermsQuery -> QueryString
+ Database.Bloodhound.Common.Types: [componentScoreFunctionFilter] :: ComponentFunctionScoreFunction -> Maybe Filter
+ Database.Bloodhound.Common.Types: [componentScoreFunctionWeight] :: ComponentFunctionScoreFunction -> Maybe Weight
+ Database.Bloodhound.Common.Types: [componentScoreFunction] :: ComponentFunctionScoreFunction -> FunctionScoreFunction
+ Database.Bloodhound.Common.Types: [constraintBox] :: GeoBoundingBoxConstraint -> GeoBoundingBox
+ Database.Bloodhound.Common.Types: [countQuery] :: CountQuery -> Query
+ Database.Bloodhound.Common.Types: [cpuCacheSize] :: CPUInfo -> Bytes
+ Database.Bloodhound.Common.Types: [cpuCoresPerSocket] :: CPUInfo -> Int
+ Database.Bloodhound.Common.Types: [cpuMHZ] :: CPUInfo -> Int
+ Database.Bloodhound.Common.Types: [cpuModel] :: CPUInfo -> Text
+ Database.Bloodhound.Common.Types: [cpuTotalCores] :: CPUInfo -> Int
+ Database.Bloodhound.Common.Types: [cpuTotalSockets] :: CPUInfo -> Int
+ Database.Bloodhound.Common.Types: [cpuVendor] :: CPUInfo -> Text
+ Database.Bloodhound.Common.Types: [crCount] :: CountResponse -> Natural
+ Database.Bloodhound.Common.Types: [crShards] :: CountResponse -> CountShards
+ Database.Bloodhound.Common.Types: [csFailed] :: CountShards -> Int
+ Database.Bloodhound.Common.Types: [csSuccessful] :: CountShards -> Int
+ Database.Bloodhound.Common.Types: [csTotal] :: CountShards -> Int
+ Database.Bloodhound.Common.Types: [dateAggs] :: DateHistogramAggregation -> Maybe Aggregations
+ Database.Bloodhound.Common.Types: [dateDocCount] :: DateHistogramResult -> Int
+ Database.Bloodhound.Common.Types: [dateField] :: DateHistogramAggregation -> FieldName
+ Database.Bloodhound.Common.Types: [dateFormat] :: DateHistogramAggregation -> Maybe Text
+ Database.Bloodhound.Common.Types: [dateHistogramAggs] :: DateHistogramResult -> Maybe AggregationResults
+ Database.Bloodhound.Common.Types: [dateInterval] :: DateHistogramAggregation -> Interval
+ Database.Bloodhound.Common.Types: [dateKeyStr] :: DateHistogramResult -> Maybe Text
+ Database.Bloodhound.Common.Types: [dateKey] :: DateHistogramResult -> Int
+ Database.Bloodhound.Common.Types: [datePostOffset] :: DateHistogramAggregation -> Maybe Text
+ Database.Bloodhound.Common.Types: [datePostZone] :: DateHistogramAggregation -> Maybe Text
+ Database.Bloodhound.Common.Types: [datePreOffset] :: DateHistogramAggregation -> Maybe Text
+ Database.Bloodhound.Common.Types: [datePreZone] :: DateHistogramAggregation -> Maybe Text
+ Database.Bloodhound.Common.Types: [dateRangeAggs] :: DateRangeResult -> Maybe AggregationResults
+ Database.Bloodhound.Common.Types: [dateRangeDocCount] :: DateRangeResult -> Int
+ Database.Bloodhound.Common.Types: [dateRangeFromAsString] :: DateRangeResult -> Maybe Text
+ Database.Bloodhound.Common.Types: [dateRangeFrom] :: DateRangeResult -> Maybe UTCTime
+ Database.Bloodhound.Common.Types: [dateRangeKey] :: DateRangeResult -> Text
+ Database.Bloodhound.Common.Types: [dateRangeToAsString] :: DateRangeResult -> Maybe Text
+ Database.Bloodhound.Common.Types: [dateRangeTo] :: DateRangeResult -> Maybe UTCTime
+ Database.Bloodhound.Common.Types: [directGeneratorMaxEdits] :: DirectGenerators -> Maybe Double
+ Database.Bloodhound.Common.Types: [directGeneratorMaxInspections] :: DirectGenerators -> Maybe Int
+ Database.Bloodhound.Common.Types: [directGeneratorMaxTermFreq] :: DirectGenerators -> Maybe Double
+ Database.Bloodhound.Common.Types: [directGeneratorMinDocFreq] :: DirectGenerators -> Maybe Double
+ Database.Bloodhound.Common.Types: [directGeneratorMinWordLength] :: DirectGenerators -> Maybe Int
+ Database.Bloodhound.Common.Types: [directGeneratorPostFilter] :: DirectGenerators -> Maybe Text
+ Database.Bloodhound.Common.Types: [directGeneratorPreFilter] :: DirectGenerators -> Maybe Text
+ Database.Bloodhound.Common.Types: [directGeneratorPrefixLength] :: DirectGenerators -> Maybe Int
+ Database.Bloodhound.Common.Types: [directGeneratorSuggestMode] :: DirectGenerators -> DirectGeneratorSuggestModeTypes
+ Database.Bloodhound.Common.Types: [directGeneratorsField] :: DirectGenerators -> FieldName
+ Database.Bloodhound.Common.Types: [directGeneratorsSize] :: DirectGenerators -> Maybe Int
+ Database.Bloodhound.Common.Types: [disMaxBoost] :: DisMaxQuery -> Maybe Boost
+ Database.Bloodhound.Common.Types: [disMaxQueries] :: DisMaxQuery -> [Query]
+ Database.Bloodhound.Common.Types: [disMaxTiebreaker] :: DisMaxQuery -> Tiebreaker
+ Database.Bloodhound.Common.Types: [distanceFrom] :: DistanceRange -> Distance
+ Database.Bloodhound.Common.Types: [distanceTo] :: DistanceRange -> Distance
+ Database.Bloodhound.Common.Types: [docVersionNumber] :: DocVersion -> Int
+ Database.Bloodhound.Common.Types: [draField] :: DateRangeAggregation -> FieldName
+ Database.Bloodhound.Common.Types: [draFormat] :: DateRangeAggregation -> Maybe Text
+ Database.Bloodhound.Common.Types: [draRanges] :: DateRangeAggregation -> NonEmpty DateRangeAggRange
+ Database.Bloodhound.Common.Types: [encoder] :: CommonHighlight -> Maybe HighlightEncoder
+ Database.Bloodhound.Common.Types: [errorMessage] :: EsError -> Text
+ Database.Bloodhound.Common.Types: [errorStatus] :: EsError -> Maybe Int
+ Database.Bloodhound.Common.Types: [esAddress] :: EsAddress -> Text
+ Database.Bloodhound.Common.Types: [esPassword] :: EsPassword -> Text
+ Database.Bloodhound.Common.Types: [esProtoExMessage] :: EsProtocolException -> !Text
+ Database.Bloodhound.Common.Types: [esProtoExResponse] :: EsProtocolException -> !ByteString
+ Database.Bloodhound.Common.Types: [esUsername] :: EsUsername -> Text
+ Database.Bloodhound.Common.Types: [explainSearchTemplate] :: SearchTemplate -> Maybe Bool
+ Database.Bloodhound.Common.Types: [faAggs] :: FilterAggregation -> Maybe Aggregations
+ Database.Bloodhound.Common.Types: [faFilter] :: FilterAggregation -> Filter
+ Database.Bloodhound.Common.Types: [fieldDefinition] :: MappingField -> FieldDefinition
+ Database.Bloodhound.Common.Types: [fieldType] :: FieldDefinition -> FieldType
+ Database.Bloodhound.Common.Types: [fieldValueFactorField] :: FieldValueFactor -> FieldName
+ Database.Bloodhound.Common.Types: [fieldValueFactorMissing] :: FieldValueFactor -> Maybe FactorMissingFieldValue
+ Database.Bloodhound.Common.Types: [fieldValueFactorModifier] :: FieldValueFactor -> Maybe FactorModifier
+ Database.Bloodhound.Common.Types: [fieldValueFactor] :: FieldValueFactor -> Maybe Factor
+ Database.Bloodhound.Common.Types: [fields] :: Search -> Maybe [FieldName]
+ Database.Bloodhound.Common.Types: [filterBody] :: Search -> Maybe Filter
+ Database.Bloodhound.Common.Types: [flushAfterOptimize] :: ForceMergeIndexSettings -> Bool
+ Database.Bloodhound.Common.Types: [forceSource] :: CommonHighlight -> Maybe Bool
+ Database.Bloodhound.Common.Types: [foundResult] :: EsResult a -> Maybe (EsResultFound a)
+ Database.Bloodhound.Common.Types: [fragmentOffset] :: FastVectorHighlight -> Maybe Int
+ Database.Bloodhound.Common.Types: [fragmentSize] :: NonPostings -> Maybe Int
+ Database.Bloodhound.Common.Types: [from] :: Search -> From
+ Database.Bloodhound.Common.Types: [fsrChunkSize] :: FsSnapshotRepo -> Maybe Bytes
+ Database.Bloodhound.Common.Types: [fsrCompressMetadata] :: FsSnapshotRepo -> Bool
+ Database.Bloodhound.Common.Types: [fsrLocation] :: FsSnapshotRepo -> FilePath
+ Database.Bloodhound.Common.Types: [fsrMaxRestoreBytesPerSec] :: FsSnapshotRepo -> Maybe Bytes
+ Database.Bloodhound.Common.Types: [fsrMaxSnapshotBytesPerSec] :: FsSnapshotRepo -> Maybe Bytes
+ Database.Bloodhound.Common.Types: [fsrName] :: FsSnapshotRepo -> SnapshotRepoName
+ Database.Bloodhound.Common.Types: [fullNodeId] :: FullNodeId -> Text
+ Database.Bloodhound.Common.Types: [functionScoreBoostMode] :: FunctionScoreQuery -> Maybe BoostMode
+ Database.Bloodhound.Common.Types: [functionScoreBoost] :: FunctionScoreQuery -> Maybe Boost
+ Database.Bloodhound.Common.Types: [functionScoreFunctions] :: FunctionScoreQuery -> FunctionScoreFunctions
+ Database.Bloodhound.Common.Types: [functionScoreMaxBoost] :: FunctionScoreQuery -> Maybe Boost
+ Database.Bloodhound.Common.Types: [functionScoreMinScore] :: FunctionScoreQuery -> Score
+ Database.Bloodhound.Common.Types: [functionScoreQuery] :: FunctionScoreQuery -> Maybe Query
+ Database.Bloodhound.Common.Types: [functionScoreScoreMode] :: FunctionScoreQuery -> Maybe ScoreMode
+ Database.Bloodhound.Common.Types: [fuzzyLikeAnalyzer] :: FuzzyLikeThisQuery -> Maybe Analyzer
+ Database.Bloodhound.Common.Types: [fuzzyLikeBoost] :: FuzzyLikeThisQuery -> Boost
+ Database.Bloodhound.Common.Types: [fuzzyLikeFieldAnalyzer] :: FuzzyLikeFieldQuery -> Maybe Analyzer
+ Database.Bloodhound.Common.Types: [fuzzyLikeFieldBoost] :: FuzzyLikeFieldQuery -> Boost
+ Database.Bloodhound.Common.Types: [fuzzyLikeFieldFuzziness] :: FuzzyLikeFieldQuery -> Fuzziness
+ Database.Bloodhound.Common.Types: [fuzzyLikeFieldIgnoreTermFrequency] :: FuzzyLikeFieldQuery -> IgnoreTermFrequency
+ Database.Bloodhound.Common.Types: [fuzzyLikeFieldMaxQueryTerms] :: FuzzyLikeFieldQuery -> MaxQueryTerms
+ Database.Bloodhound.Common.Types: [fuzzyLikeFieldPrefixLength] :: FuzzyLikeFieldQuery -> PrefixLength
+ Database.Bloodhound.Common.Types: [fuzzyLikeFieldText] :: FuzzyLikeFieldQuery -> Text
+ Database.Bloodhound.Common.Types: [fuzzyLikeField] :: FuzzyLikeFieldQuery -> FieldName
+ Database.Bloodhound.Common.Types: [fuzzyLikeFields] :: FuzzyLikeThisQuery -> [FieldName]
+ Database.Bloodhound.Common.Types: [fuzzyLikeFuzziness] :: FuzzyLikeThisQuery -> Fuzziness
+ Database.Bloodhound.Common.Types: [fuzzyLikeIgnoreTermFrequency] :: FuzzyLikeThisQuery -> IgnoreTermFrequency
+ Database.Bloodhound.Common.Types: [fuzzyLikeMaxQueryTerms] :: FuzzyLikeThisQuery -> MaxQueryTerms
+ Database.Bloodhound.Common.Types: [fuzzyLikePrefixLength] :: FuzzyLikeThisQuery -> PrefixLength
+ Database.Bloodhound.Common.Types: [fuzzyLikeText] :: FuzzyLikeThisQuery -> Text
+ Database.Bloodhound.Common.Types: [fuzzyQueryBoost] :: FuzzyQuery -> Maybe Boost
+ Database.Bloodhound.Common.Types: [fuzzyQueryField] :: FuzzyQuery -> FieldName
+ Database.Bloodhound.Common.Types: [fuzzyQueryFuzziness] :: FuzzyQuery -> Fuzziness
+ Database.Bloodhound.Common.Types: [fuzzyQueryMaxExpansions] :: FuzzyQuery -> MaxExpansions
+ Database.Bloodhound.Common.Types: [fuzzyQueryPrefixLength] :: FuzzyQuery -> PrefixLength
+ Database.Bloodhound.Common.Types: [fuzzyQueryValue] :: FuzzyQuery -> Text
+ Database.Bloodhound.Common.Types: [fvCommon] :: FastVectorHighlight -> Maybe CommonHighlight
+ Database.Bloodhound.Common.Types: [fvNonPostSettings] :: FastVectorHighlight -> Maybe NonPostings
+ Database.Bloodhound.Common.Types: [gSnapshotRepoName] :: GenericSnapshotRepo -> SnapshotRepoName
+ Database.Bloodhound.Common.Types: [gSnapshotRepoSettingsObject] :: GenericSnapshotRepoSettings -> Object
+ Database.Bloodhound.Common.Types: [gSnapshotRepoSettings] :: GenericSnapshotRepo -> GenericSnapshotRepoSettings
+ Database.Bloodhound.Common.Types: [gSnapshotRepoType] :: GenericSnapshotRepo -> SnapshotRepoType
+ Database.Bloodhound.Common.Types: [geoBBField] :: GeoBoundingBoxConstraint -> FieldName
+ Database.Bloodhound.Common.Types: [geoField] :: GeoPoint -> FieldName
+ Database.Bloodhound.Common.Types: [geoType] :: GeoBoundingBoxConstraint -> GeoFilterType
+ Database.Bloodhound.Common.Types: [getRawEndpointQueries] :: Endpoint -> [(Text, Maybe Text)]
+ Database.Bloodhound.Common.Types: [getRawEndpoint] :: Endpoint -> [Text]
+ Database.Bloodhound.Common.Types: [getResponse] :: BHResponse parsingContext body -> Response ByteString
+ Database.Bloodhound.Common.Types: [getTemplateScriptFound] :: GetTemplateScript -> Bool
+ Database.Bloodhound.Common.Types: [getTemplateScriptId] :: GetTemplateScript -> Text
+ Database.Bloodhound.Common.Types: [getTemplateScriptLang] :: GetTemplateScript -> Maybe Text
+ Database.Bloodhound.Common.Types: [getTemplateScriptOptions] :: GetTemplateScript -> Maybe (HashMap Text Text)
+ Database.Bloodhound.Common.Types: [getTemplateScriptSource] :: GetTemplateScript -> Maybe SearchTemplateSource
+ Database.Bloodhound.Common.Types: [globalsettings] :: Highlights -> Maybe HighlightSettings
+ Database.Bloodhound.Common.Types: [hasChildIgnoreUnmappped] :: HasChildQuery -> Maybe IgnoreUnmapped
+ Database.Bloodhound.Common.Types: [hasChildMaxChildren] :: HasChildQuery -> Maybe MaxChildren
+ Database.Bloodhound.Common.Types: [hasChildMinChildren] :: HasChildQuery -> Maybe MinChildren
+ Database.Bloodhound.Common.Types: [hasChildQueryScoreType] :: HasChildQuery -> Maybe ScoreType
+ Database.Bloodhound.Common.Types: [hasChildQueryType] :: HasChildQuery -> RelationName
+ Database.Bloodhound.Common.Types: [hasChildQuery] :: HasChildQuery -> Query
+ Database.Bloodhound.Common.Types: [hasParentIgnoreUnmapped] :: HasParentQuery -> Maybe IgnoreUnmapped
+ Database.Bloodhound.Common.Types: [hasParentQueryScore] :: HasParentQuery -> Maybe AggregateParentScore
+ Database.Bloodhound.Common.Types: [hasParentQueryType] :: HasParentQuery -> RelationName
+ Database.Bloodhound.Common.Types: [hasParentQuery] :: HasParentQuery -> Query
+ Database.Bloodhound.Common.Types: [highFreq] :: MinimumMatchHighLow -> MinimumMatch
+ Database.Bloodhound.Common.Types: [highlightFields] :: Highlights -> [FieldHighlight]
+ Database.Bloodhound.Common.Types: [highlightQuery] :: CommonHighlight -> Maybe Query
+ Database.Bloodhound.Common.Types: [highlight] :: Search -> Maybe Highlights
+ Database.Bloodhound.Common.Types: [hitDocId] :: Hit a -> DocId
+ Database.Bloodhound.Common.Types: [hitFields] :: Hit a -> Maybe HitFields
+ Database.Bloodhound.Common.Types: [hitHighlight] :: Hit a -> Maybe HitHighlight
+ Database.Bloodhound.Common.Types: [hitIndex] :: Hit a -> IndexName
+ Database.Bloodhound.Common.Types: [hitInnerHits] :: Hit a -> Maybe (KeyMap (TopHitResult Value))
+ Database.Bloodhound.Common.Types: [hitScore] :: Hit a -> Score
+ Database.Bloodhound.Common.Types: [hitSort] :: Hit a -> Maybe SearchAfterKey
+ Database.Bloodhound.Common.Types: [hitSource] :: Hit a -> Maybe a
+ Database.Bloodhound.Common.Types: [hitsTotal] :: SearchHits a -> HitsTotal
+ Database.Bloodhound.Common.Types: [hits] :: SearchHits a -> [Hit a]
+ Database.Bloodhound.Common.Types: [idsJoinRelation] :: IndexDocumentSettings -> Maybe JoinRelation
+ Database.Bloodhound.Common.Types: [idsVersionControl] :: IndexDocumentSettings -> VersionControl
+ Database.Bloodhound.Common.Types: [ignoreUnmapped] :: DefaultSort -> Maybe Text
+ Database.Bloodhound.Common.Types: [indexAliasName] :: IndexAliasName -> IndexName
+ Database.Bloodhound.Common.Types: [indexAliasSummaryAlias] :: IndexAliasSummary -> IndexAlias
+ Database.Bloodhound.Common.Types: [indexAliasSummaryCreate] :: IndexAliasSummary -> IndexAliasCreate
+ Database.Bloodhound.Common.Types: [indexAlias] :: IndexAlias -> IndexAliasName
+ Database.Bloodhound.Common.Types: [indexAliasesSummary] :: IndexAliasesSummary -> [IndexAliasSummary]
+ Database.Bloodhound.Common.Types: [indexMappingsLimitDepth] :: IndexMappingsLimits -> Maybe Int
+ Database.Bloodhound.Common.Types: [indexMappingsLimitFieldNameLength] :: IndexMappingsLimits -> Maybe Int
+ Database.Bloodhound.Common.Types: [indexMappingsLimitNestedFields] :: IndexMappingsLimits -> Maybe Int
+ Database.Bloodhound.Common.Types: [indexMappingsLimitNestedObjects] :: IndexMappingsLimits -> Maybe Int
+ Database.Bloodhound.Common.Types: [indexMappingsLimits] :: IndexSettings -> IndexMappingsLimits
+ Database.Bloodhound.Common.Types: [indexReplicas] :: IndexSettings -> ReplicaCount
+ Database.Bloodhound.Common.Types: [indexShards] :: IndexSettings -> ShardCount
+ Database.Bloodhound.Common.Types: [indicesQueryIndices] :: IndicesQuery -> [IndexName]
+ Database.Bloodhound.Common.Types: [indicesQueryNoMatch] :: IndicesQuery -> Maybe Query
+ Database.Bloodhound.Common.Types: [indicesQuery] :: IndicesQuery -> Query
+ Database.Bloodhound.Common.Types: [innerHitsFrom] :: InnerHits -> Maybe Integer
+ Database.Bloodhound.Common.Types: [innerHitsSize] :: InnerHits -> Maybe Integer
+ Database.Bloodhound.Common.Types: [isAccepted] :: Accepted -> Bool
+ Database.Bloodhound.Common.Types: [isAcknowledged] :: Acknowledged -> Bool
+ Database.Bloodhound.Common.Types: [jvmBufferPoolStatsCount] :: JVMBufferPoolStats -> Int
+ Database.Bloodhound.Common.Types: [jvmBufferPoolStatsTotalCapacity] :: JVMBufferPoolStats -> Bytes
+ Database.Bloodhound.Common.Types: [jvmBufferPoolStatsUsed] :: JVMBufferPoolStats -> Bytes
+ Database.Bloodhound.Common.Types: [jvmGCCollector] :: JVMGCCollector -> Text
+ Database.Bloodhound.Common.Types: [jvmGCStatsCollectionCount] :: JVMGCStats -> Int
+ Database.Bloodhound.Common.Types: [jvmGCStatsCollectionTime] :: JVMGCStats -> NominalDiffTime
+ Database.Bloodhound.Common.Types: [jvmMemoryInfoDirectMax] :: JVMMemoryInfo -> Bytes
+ Database.Bloodhound.Common.Types: [jvmMemoryInfoHeapInit] :: JVMMemoryInfo -> Bytes
+ Database.Bloodhound.Common.Types: [jvmMemoryInfoHeapMax] :: JVMMemoryInfo -> Bytes
+ Database.Bloodhound.Common.Types: [jvmMemoryInfoNonHeapInit] :: JVMMemoryInfo -> Bytes
+ Database.Bloodhound.Common.Types: [jvmMemoryInfoNonHeapMax] :: JVMMemoryInfo -> Bytes
+ Database.Bloodhound.Common.Types: [jvmMemoryPool] :: JVMMemoryPool -> Text
+ Database.Bloodhound.Common.Types: [jvmPoolStatsMax] :: JVMPoolStats -> Bytes
+ Database.Bloodhound.Common.Types: [jvmPoolStatsPeakMax] :: JVMPoolStats -> Bytes
+ Database.Bloodhound.Common.Types: [jvmPoolStatsPeakUsed] :: JVMPoolStats -> Bytes
+ Database.Bloodhound.Common.Types: [jvmPoolStatsUsed] :: JVMPoolStats -> Bytes
+ Database.Bloodhound.Common.Types: [latLon] :: GeoPoint -> LatLon
+ Database.Bloodhound.Common.Types: [lat] :: LatLon -> Double
+ Database.Bloodhound.Common.Types: [loadAvg15Min] :: LoadAvgs -> Double
+ Database.Bloodhound.Common.Types: [loadAvg1Min] :: LoadAvgs -> Double
+ Database.Bloodhound.Common.Types: [loadAvg5Min] :: LoadAvgs -> Double
+ Database.Bloodhound.Common.Types: [lon] :: LatLon -> Double
+ Database.Bloodhound.Common.Types: [lowFreq] :: MinimumMatchHighLow -> MinimumMatch
+ Database.Bloodhound.Common.Types: [lucene_version] :: Version -> VersionNumber
+ Database.Bloodhound.Common.Types: [maField] :: MissingAggregation -> Text
+ Database.Bloodhound.Common.Types: [macAddress] :: MacAddress -> Text
+ Database.Bloodhound.Common.Types: [mappingFieldName] :: MappingField -> FieldName
+ Database.Bloodhound.Common.Types: [mappingFields] :: Mapping -> [MappingField]
+ Database.Bloodhound.Common.Types: [matchQueryAnalyzer] :: MatchQuery -> Maybe Analyzer
+ Database.Bloodhound.Common.Types: [matchQueryBoost] :: MatchQuery -> Maybe Boost
+ Database.Bloodhound.Common.Types: [matchQueryCutoffFrequency] :: MatchQuery -> Maybe CutoffFrequency
+ Database.Bloodhound.Common.Types: [matchQueryField] :: MatchQuery -> FieldName
+ Database.Bloodhound.Common.Types: [matchQueryFuzziness] :: MatchQuery -> Maybe Fuzziness
+ Database.Bloodhound.Common.Types: [matchQueryLenient] :: MatchQuery -> Maybe Lenient
+ Database.Bloodhound.Common.Types: [matchQueryMatchType] :: MatchQuery -> Maybe MatchQueryType
+ Database.Bloodhound.Common.Types: [matchQueryMaxExpansions] :: MatchQuery -> Maybe MaxExpansions
+ Database.Bloodhound.Common.Types: [matchQueryMinimumShouldMatch] :: MatchQuery -> Maybe Text
+ Database.Bloodhound.Common.Types: [matchQueryOperator] :: MatchQuery -> BooleanOperator
+ Database.Bloodhound.Common.Types: [matchQueryQueryString] :: MatchQuery -> QueryString
+ Database.Bloodhound.Common.Types: [matchQueryZeroTerms] :: MatchQuery -> ZeroTermsQuery
+ Database.Bloodhound.Common.Types: [matchedFields] :: FastVectorHighlight -> [Text]
+ Database.Bloodhound.Common.Types: [maxNumSegments] :: ForceMergeIndexSettings -> Maybe Int
+ Database.Bloodhound.Common.Types: [maxScore] :: SearchHits a -> Score
+ Database.Bloodhound.Common.Types: [missingDocCount] :: MissingResult -> Int
+ Database.Bloodhound.Common.Types: [missingSort] :: DefaultSort -> Maybe Missing
+ Database.Bloodhound.Common.Types: [moreLikeThisAnalyzer] :: MoreLikeThisQuery -> Maybe Analyzer
+ Database.Bloodhound.Common.Types: [moreLikeThisBoostTerms] :: MoreLikeThisQuery -> Maybe BoostTerms
+ Database.Bloodhound.Common.Types: [moreLikeThisBoost] :: MoreLikeThisQuery -> Maybe Boost
+ Database.Bloodhound.Common.Types: [moreLikeThisFieldAnalyzer] :: MoreLikeThisFieldQuery -> Maybe Analyzer
+ Database.Bloodhound.Common.Types: [moreLikeThisFieldBoostTerms] :: MoreLikeThisFieldQuery -> Maybe BoostTerms
+ Database.Bloodhound.Common.Types: [moreLikeThisFieldBoost] :: MoreLikeThisFieldQuery -> Maybe Boost
+ Database.Bloodhound.Common.Types: [moreLikeThisFieldFields] :: MoreLikeThisFieldQuery -> FieldName
+ Database.Bloodhound.Common.Types: [moreLikeThisFieldMaxDocFrequency] :: MoreLikeThisFieldQuery -> Maybe MaxDocFrequency
+ Database.Bloodhound.Common.Types: [moreLikeThisFieldMaxQueryTerms] :: MoreLikeThisFieldQuery -> Maybe MaxQueryTerms
+ Database.Bloodhound.Common.Types: [moreLikeThisFieldMaxWordLength] :: MoreLikeThisFieldQuery -> Maybe MaxWordLength
+ Database.Bloodhound.Common.Types: [moreLikeThisFieldMinDocFrequency] :: MoreLikeThisFieldQuery -> Maybe MinDocFrequency
+ Database.Bloodhound.Common.Types: [moreLikeThisFieldMinWordLength] :: MoreLikeThisFieldQuery -> Maybe MinWordLength
+ Database.Bloodhound.Common.Types: [moreLikeThisFieldMinimumTermFreq] :: MoreLikeThisFieldQuery -> Maybe MinimumTermFrequency
+ Database.Bloodhound.Common.Types: [moreLikeThisFieldPercentMatch] :: MoreLikeThisFieldQuery -> Maybe PercentMatch
+ Database.Bloodhound.Common.Types: [moreLikeThisFieldStopWords] :: MoreLikeThisFieldQuery -> Maybe (NonEmpty StopWord)
+ Database.Bloodhound.Common.Types: [moreLikeThisFieldText] :: MoreLikeThisFieldQuery -> Text
+ Database.Bloodhound.Common.Types: [moreLikeThisFields] :: MoreLikeThisQuery -> Maybe (NonEmpty FieldName)
+ Database.Bloodhound.Common.Types: [moreLikeThisMaxDocFrequency] :: MoreLikeThisQuery -> Maybe MaxDocFrequency
+ Database.Bloodhound.Common.Types: [moreLikeThisMaxQueryTerms] :: MoreLikeThisQuery -> Maybe MaxQueryTerms
+ Database.Bloodhound.Common.Types: [moreLikeThisMaxWordLength] :: MoreLikeThisQuery -> Maybe MaxWordLength
+ Database.Bloodhound.Common.Types: [moreLikeThisMinDocFrequency] :: MoreLikeThisQuery -> Maybe MinDocFrequency
+ Database.Bloodhound.Common.Types: [moreLikeThisMinWordLength] :: MoreLikeThisQuery -> Maybe MinWordLength
+ Database.Bloodhound.Common.Types: [moreLikeThisMinimumTermFreq] :: MoreLikeThisQuery -> Maybe MinimumTermFrequency
+ Database.Bloodhound.Common.Types: [moreLikeThisPercentMatch] :: MoreLikeThisQuery -> Maybe PercentMatch
+ Database.Bloodhound.Common.Types: [moreLikeThisStopWords] :: MoreLikeThisQuery -> Maybe (NonEmpty StopWord)
+ Database.Bloodhound.Common.Types: [moreLikeThisText] :: MoreLikeThisQuery -> Text
+ Database.Bloodhound.Common.Types: [multiMatchQueryAnalyzer] :: MultiMatchQuery -> Maybe Analyzer
+ Database.Bloodhound.Common.Types: [multiMatchQueryCutoffFrequency] :: MultiMatchQuery -> Maybe CutoffFrequency
+ Database.Bloodhound.Common.Types: [multiMatchQueryFields] :: MultiMatchQuery -> [FieldName]
+ Database.Bloodhound.Common.Types: [multiMatchQueryLenient] :: MultiMatchQuery -> Maybe Lenient
+ Database.Bloodhound.Common.Types: [multiMatchQueryMaxExpansions] :: MultiMatchQuery -> Maybe MaxExpansions
+ Database.Bloodhound.Common.Types: [multiMatchQueryOperator] :: MultiMatchQuery -> BooleanOperator
+ Database.Bloodhound.Common.Types: [multiMatchQueryString] :: MultiMatchQuery -> QueryString
+ Database.Bloodhound.Common.Types: [multiMatchQueryTiebreaker] :: MultiMatchQuery -> Maybe Tiebreaker
+ Database.Bloodhound.Common.Types: [multiMatchQueryType] :: MultiMatchQuery -> Maybe MultiMatchQueryType
+ Database.Bloodhound.Common.Types: [multiMatchQueryZeroTerms] :: MultiMatchQuery -> ZeroTermsQuery
+ Database.Bloodhound.Common.Types: [name] :: Status -> Text
+ Database.Bloodhound.Common.Types: [ndtJSON] :: NominalDiffTimeJSON -> NominalDiffTime
+ Database.Bloodhound.Common.Types: [negativeBoost] :: BoostingQuery -> Boost
+ Database.Bloodhound.Common.Types: [negativeQuery] :: BoostingQuery -> Query
+ Database.Bloodhound.Common.Types: [nestedFilter] :: DefaultSort -> Maybe Filter
+ Database.Bloodhound.Common.Types: [nestedQueryInnerHits] :: NestedQuery -> Maybe InnerHits
+ Database.Bloodhound.Common.Types: [nestedQueryPath] :: NestedQuery -> QueryPath
+ Database.Bloodhound.Common.Types: [nestedQueryScoreType] :: NestedQuery -> ScoreType
+ Database.Bloodhound.Common.Types: [nestedQuery] :: NestedQuery -> Query
+ Database.Bloodhound.Common.Types: [networkInterfaceName] :: NetworkInterfaceName -> Text
+ Database.Bloodhound.Common.Types: [ngramFilterMaxGram] :: NgramFilter -> Int
+ Database.Bloodhound.Common.Types: [ngramFilterMinGram] :: NgramFilter -> Int
+ Database.Bloodhound.Common.Types: [ngramMaxGram] :: Ngram -> Int
+ Database.Bloodhound.Common.Types: [ngramMinGram] :: Ngram -> Int
+ Database.Bloodhound.Common.Types: [ngramTokenChars] :: Ngram -> [TokenChar]
+ Database.Bloodhound.Common.Types: [noMatchSize] :: CommonHighlight -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeAttrFilterName] :: NodeAttrFilter -> NodeAttrName
+ Database.Bloodhound.Common.Types: [nodeAttrFilterValues] :: NodeAttrFilter -> NonEmpty Text
+ Database.Bloodhound.Common.Types: [nodeBreakersEstSize] :: NodeBreakerStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeBreakersLimitSize] :: NodeBreakerStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeBreakersOverhead] :: NodeBreakerStats -> Double
+ Database.Bloodhound.Common.Types: [nodeBreakersTripped] :: NodeBreakerStats -> Int
+ Database.Bloodhound.Common.Types: [nodeDataPathAvailable] :: NodeDataPathStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeDataPathDevice] :: NodeDataPathStats -> Maybe Text
+ Database.Bloodhound.Common.Types: [nodeDataPathDiskQueue] :: NodeDataPathStats -> Maybe Double
+ Database.Bloodhound.Common.Types: [nodeDataPathDiskServiceTime] :: NodeDataPathStats -> Maybe Double
+ Database.Bloodhound.Common.Types: [nodeDataPathFree] :: NodeDataPathStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeDataPathIOOps] :: NodeDataPathStats -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeDataPathIOSize] :: NodeDataPathStats -> Maybe Bytes
+ Database.Bloodhound.Common.Types: [nodeDataPathMount] :: NodeDataPathStats -> Text
+ Database.Bloodhound.Common.Types: [nodeDataPathPath] :: NodeDataPathStats -> Text
+ Database.Bloodhound.Common.Types: [nodeDataPathReadSize] :: NodeDataPathStats -> Maybe Bytes
+ Database.Bloodhound.Common.Types: [nodeDataPathReads] :: NodeDataPathStats -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeDataPathTotal] :: NodeDataPathStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeDataPathType] :: NodeDataPathStats -> Maybe Text
+ Database.Bloodhound.Common.Types: [nodeDataPathWriteSize] :: NodeDataPathStats -> Maybe Bytes
+ Database.Bloodhound.Common.Types: [nodeDataPathWrites] :: NodeDataPathStats -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeFSDataPaths] :: NodeFSStats -> [NodeDataPathStats]
+ Database.Bloodhound.Common.Types: [nodeFSTimestamp] :: NodeFSStats -> UTCTime
+ Database.Bloodhound.Common.Types: [nodeFSTotalAvailable] :: NodeFSTotalStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeFSTotalDiskQueue] :: NodeFSTotalStats -> Maybe Double
+ Database.Bloodhound.Common.Types: [nodeFSTotalDiskServiceTime] :: NodeFSTotalStats -> Maybe Double
+ Database.Bloodhound.Common.Types: [nodeFSTotalFree] :: NodeFSTotalStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeFSTotalIOOps] :: NodeFSTotalStats -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeFSTotalIOSize] :: NodeFSTotalStats -> Maybe Bytes
+ Database.Bloodhound.Common.Types: [nodeFSTotalReadSize] :: NodeFSTotalStats -> Maybe Bytes
+ Database.Bloodhound.Common.Types: [nodeFSTotalReads] :: NodeFSTotalStats -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeFSTotalTotal] :: NodeFSTotalStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeFSTotalWriteSize] :: NodeFSTotalStats -> Maybe Bytes
+ Database.Bloodhound.Common.Types: [nodeFSTotalWrites] :: NodeFSTotalStats -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeFSTotal] :: NodeFSStats -> NodeFSTotalStats
+ Database.Bloodhound.Common.Types: [nodeHTTPCurrentOpen] :: NodeHTTPStats -> Int
+ Database.Bloodhound.Common.Types: [nodeHTTPMaxContentLength] :: NodeHTTPInfo -> Bytes
+ Database.Bloodhound.Common.Types: [nodeHTTPTotalOpened] :: NodeHTTPStats -> Int
+ Database.Bloodhound.Common.Types: [nodeHTTPbound_address] :: NodeHTTPInfo -> [EsAddress]
+ Database.Bloodhound.Common.Types: [nodeHTTPpublishAddress] :: NodeHTTPInfo -> EsAddress
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsCompletionSize] :: NodeIndicesStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsDocsCount] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsDocsDeleted] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsFieldDataEvictions] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsFieldDataMemory] :: NodeIndicesStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsFlushTotalTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsFlushTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsGetCurrent] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsGetExistsTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsGetExistsTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsGetMissingTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsGetMissingTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsGetTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsGetTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsIndexingDeleteCurrent] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsIndexingDeleteTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsIndexingDeleteTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsIndexingIndexCurrent] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsIndexingIndexTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsIndexingIsThrottled] :: NodeIndicesStats -> Maybe Bool
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsIndexingNoopUpdateTotal] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsIndexingThrottleTime] :: NodeIndicesStats -> Maybe NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsIndexingTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsMergesCurrentDocs] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsMergesCurrentSize] :: NodeIndicesStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsMergesCurrent] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsMergesTotalDocs] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsMergesTotalSize] :: NodeIndicesStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsMergesTotalTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsMergesTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsPercolateCurrent] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsPercolateMemory] :: NodeIndicesStats -> Maybe Bytes
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsPercolateQueries] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsPercolateTime] :: NodeIndicesStats -> Maybe NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsPercolateTotal] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsQueryCacheEvictions] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsQueryCacheHits] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsQueryCacheMisses] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsQueryCacheSize] :: NodeIndicesStats -> Maybe Bytes
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsRecoveryCurrentAsSource] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsRecoveryCurrentAsTarget] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsRecoveryThrottleTime] :: NodeIndicesStats -> Maybe NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsRefreshTotalTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsRefreshTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsSearchFetchCurrent] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsSearchFetchTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsSearchFetchTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsSearchOpenContexts] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsSearchQueryCurrent] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsSearchQueryTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsSearchQueryTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsSegCount] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsSegFixedBitSetMemory] :: NodeIndicesStats -> Maybe Bytes
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsSegIndexWriterMaxMemory] :: NodeIndicesStats -> Maybe Bytes
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsSegIndexWriterMemory] :: NodeIndicesStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsSegMemory] :: NodeIndicesStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsSegVersionMapMemory] :: NodeIndicesStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsStoreSize] :: NodeIndicesStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsStoreThrottleTime] :: NodeIndicesStats -> Maybe NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsSuggestCurrent] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsSuggestTime] :: NodeIndicesStats -> Maybe NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsSuggestTotal] :: NodeIndicesStats -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsTranslogOps] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsTranslogSize] :: NodeIndicesStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsWarmerCurrent] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsWarmerTotalTime] :: NodeIndicesStats -> NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeIndicesStatsWarmerTotal] :: NodeIndicesStats -> Int
+ Database.Bloodhound.Common.Types: [nodeInfoBuild] :: NodeInfo -> BuildHash
+ Database.Bloodhound.Common.Types: [nodeInfoESVersion] :: NodeInfo -> VersionNumber
+ Database.Bloodhound.Common.Types: [nodeInfoFullId] :: NodeInfo -> FullNodeId
+ Database.Bloodhound.Common.Types: [nodeInfoHTTPAddress] :: NodeInfo -> Maybe EsAddress
+ Database.Bloodhound.Common.Types: [nodeInfoHTTP] :: NodeInfo -> NodeHTTPInfo
+ Database.Bloodhound.Common.Types: [nodeInfoHost] :: NodeInfo -> Server
+ Database.Bloodhound.Common.Types: [nodeInfoIP] :: NodeInfo -> Server
+ Database.Bloodhound.Common.Types: [nodeInfoJVM] :: NodeInfo -> NodeJVMInfo
+ Database.Bloodhound.Common.Types: [nodeInfoName] :: NodeInfo -> NodeName
+ Database.Bloodhound.Common.Types: [nodeInfoNetwork] :: NodeInfo -> Maybe NodeNetworkInfo
+ Database.Bloodhound.Common.Types: [nodeInfoOS] :: NodeInfo -> NodeOSInfo
+ Database.Bloodhound.Common.Types: [nodeInfoPlugins] :: NodeInfo -> [NodePluginInfo]
+ Database.Bloodhound.Common.Types: [nodeInfoProcess] :: NodeInfo -> NodeProcessInfo
+ Database.Bloodhound.Common.Types: [nodeInfoSettings] :: NodeInfo -> Object
+ Database.Bloodhound.Common.Types: [nodeInfoThreadPool] :: NodeInfo -> Map Text NodeThreadPoolInfo
+ Database.Bloodhound.Common.Types: [nodeInfoTransportAddress] :: NodeInfo -> EsAddress
+ Database.Bloodhound.Common.Types: [nodeInfoTransport] :: NodeInfo -> NodeTransportInfo
+ Database.Bloodhound.Common.Types: [nodeJVMInfoMemoryInfo] :: NodeJVMInfo -> JVMMemoryInfo
+ Database.Bloodhound.Common.Types: [nodeJVMInfoMemoryPoolsGCCollectors] :: NodeJVMInfo -> [JVMGCCollector]
+ Database.Bloodhound.Common.Types: [nodeJVMInfoMemoryPools] :: NodeJVMInfo -> [JVMMemoryPool]
+ Database.Bloodhound.Common.Types: [nodeJVMInfoStartTime] :: NodeJVMInfo -> UTCTime
+ Database.Bloodhound.Common.Types: [nodeJVMInfoVMVendor] :: NodeJVMInfo -> Text
+ Database.Bloodhound.Common.Types: [nodeJVMPID] :: NodeJVMInfo -> PID
+ Database.Bloodhound.Common.Types: [nodeJVMStatsDirectBufferPool] :: NodeJVMStats -> JVMBufferPoolStats
+ Database.Bloodhound.Common.Types: [nodeJVMStatsGCOldCollector] :: NodeJVMStats -> JVMGCStats
+ Database.Bloodhound.Common.Types: [nodeJVMStatsGCYoungCollector] :: NodeJVMStats -> JVMGCStats
+ Database.Bloodhound.Common.Types: [nodeJVMStatsHeapCommitted] :: NodeJVMStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeJVMStatsHeapMax] :: NodeJVMStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeJVMStatsHeapUsedPercent] :: NodeJVMStats -> Int
+ Database.Bloodhound.Common.Types: [nodeJVMStatsHeapUsed] :: NodeJVMStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeJVMStatsMappedBufferPool] :: NodeJVMStats -> JVMBufferPoolStats
+ Database.Bloodhound.Common.Types: [nodeJVMStatsNonHeapCommitted] :: NodeJVMStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeJVMStatsNonHeapUsed] :: NodeJVMStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeJVMStatsOldPool] :: NodeJVMStats -> JVMPoolStats
+ Database.Bloodhound.Common.Types: [nodeJVMStatsPeakThreadsCount] :: NodeJVMStats -> Int
+ Database.Bloodhound.Common.Types: [nodeJVMStatsSurvivorPool] :: NodeJVMStats -> JVMPoolStats
+ Database.Bloodhound.Common.Types: [nodeJVMStatsThreadsCount] :: NodeJVMStats -> Int
+ Database.Bloodhound.Common.Types: [nodeJVMStatsTimestamp] :: NodeJVMStats -> UTCTime
+ Database.Bloodhound.Common.Types: [nodeJVMStatsUptime] :: NodeJVMStats -> NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeJVMStatsYoungPool] :: NodeJVMStats -> JVMPoolStats
+ Database.Bloodhound.Common.Types: [nodeJVMVMName] :: NodeJVMInfo -> Text
+ Database.Bloodhound.Common.Types: [nodeJVMVMVersion] :: NodeJVMInfo -> VersionNumber
+ Database.Bloodhound.Common.Types: [nodeJVMVersion] :: NodeJVMInfo -> JVMVersion
+ Database.Bloodhound.Common.Types: [nodeName] :: NodeName -> Text
+ Database.Bloodhound.Common.Types: [nodeNetIfaceAddress] :: NodeNetworkInterface -> Server
+ Database.Bloodhound.Common.Types: [nodeNetIfaceMacAddress] :: NodeNetworkInterface -> MacAddress
+ Database.Bloodhound.Common.Types: [nodeNetIfaceName] :: NodeNetworkInterface -> NetworkInterfaceName
+ Database.Bloodhound.Common.Types: [nodeNetTCPActiveOpens] :: NodeNetworkStats -> Int
+ Database.Bloodhound.Common.Types: [nodeNetTCPAttemptFails] :: NodeNetworkStats -> Int
+ Database.Bloodhound.Common.Types: [nodeNetTCPCurrEstab] :: NodeNetworkStats -> Int
+ Database.Bloodhound.Common.Types: [nodeNetTCPEstabResets] :: NodeNetworkStats -> Int
+ Database.Bloodhound.Common.Types: [nodeNetTCPInErrs] :: NodeNetworkStats -> Int
+ Database.Bloodhound.Common.Types: [nodeNetTCPInSegs] :: NodeNetworkStats -> Int
+ Database.Bloodhound.Common.Types: [nodeNetTCPOutRSTs] :: NodeNetworkStats -> Int
+ Database.Bloodhound.Common.Types: [nodeNetTCPOutSegs] :: NodeNetworkStats -> Int
+ Database.Bloodhound.Common.Types: [nodeNetTCPPassiveOpens] :: NodeNetworkStats -> Int
+ Database.Bloodhound.Common.Types: [nodeNetTCPRetransSegs] :: NodeNetworkStats -> Int
+ Database.Bloodhound.Common.Types: [nodeNetworkPrimaryInterface] :: NodeNetworkInfo -> NodeNetworkInterface
+ Database.Bloodhound.Common.Types: [nodeNetworkRefreshInterval] :: NodeNetworkInfo -> NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeOSAllocatedProcessors] :: NodeOSInfo -> Int
+ Database.Bloodhound.Common.Types: [nodeOSArch] :: NodeOSInfo -> Text
+ Database.Bloodhound.Common.Types: [nodeOSAvailableProcessors] :: NodeOSInfo -> Int
+ Database.Bloodhound.Common.Types: [nodeOSCPUPercent] :: NodeOSStats -> Int
+ Database.Bloodhound.Common.Types: [nodeOSLoad] :: NodeOSStats -> Maybe LoadAvgs
+ Database.Bloodhound.Common.Types: [nodeOSMemFreePercent] :: NodeOSStats -> Int
+ Database.Bloodhound.Common.Types: [nodeOSMemFree] :: NodeOSStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeOSMemTotal] :: NodeOSStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeOSMemUsedPercent] :: NodeOSStats -> Int
+ Database.Bloodhound.Common.Types: [nodeOSMemUsed] :: NodeOSStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeOSName] :: NodeOSInfo -> Text
+ Database.Bloodhound.Common.Types: [nodeOSRefreshInterval] :: NodeOSInfo -> NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeOSSwapFree] :: NodeOSStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeOSSwapTotal] :: NodeOSStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeOSSwapUsed] :: NodeOSStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeOSTimestamp] :: NodeOSStats -> UTCTime
+ Database.Bloodhound.Common.Types: [nodeOSVersion] :: NodeOSInfo -> Text
+ Database.Bloodhound.Common.Types: [nodePluginDescription] :: NodePluginInfo -> Text
+ Database.Bloodhound.Common.Types: [nodePluginJVM] :: NodePluginInfo -> Maybe Bool
+ Database.Bloodhound.Common.Types: [nodePluginName] :: NodePluginInfo -> PluginName
+ Database.Bloodhound.Common.Types: [nodePluginSite] :: NodePluginInfo -> Maybe Bool
+ Database.Bloodhound.Common.Types: [nodePluginVersion] :: NodePluginInfo -> MaybeNA VersionNumber
+ Database.Bloodhound.Common.Types: [nodeProcessCPUPercent] :: NodeProcessStats -> Int
+ Database.Bloodhound.Common.Types: [nodeProcessCPUTotal] :: NodeProcessStats -> NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeProcessId] :: NodeProcessInfo -> PID
+ Database.Bloodhound.Common.Types: [nodeProcessMLockAll] :: NodeProcessInfo -> Bool
+ Database.Bloodhound.Common.Types: [nodeProcessMaxFDs] :: NodeProcessStats -> Int
+ Database.Bloodhound.Common.Types: [nodeProcessMaxFileDescriptors] :: NodeProcessInfo -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeProcessMemTotalVirtual] :: NodeProcessStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeProcessOpenFDs] :: NodeProcessStats -> Int
+ Database.Bloodhound.Common.Types: [nodeProcessRefreshInterval] :: NodeProcessInfo -> NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeProcessTimestamp] :: NodeProcessStats -> UTCTime
+ Database.Bloodhound.Common.Types: [nodeStatsBreakersStats] :: NodeStats -> Maybe NodeBreakersStats
+ Database.Bloodhound.Common.Types: [nodeStatsFS] :: NodeStats -> NodeFSStats
+ Database.Bloodhound.Common.Types: [nodeStatsFieldDataBreaker] :: NodeBreakersStats -> NodeBreakerStats
+ Database.Bloodhound.Common.Types: [nodeStatsFullId] :: NodeStats -> FullNodeId
+ Database.Bloodhound.Common.Types: [nodeStatsHTTP] :: NodeStats -> NodeHTTPStats
+ Database.Bloodhound.Common.Types: [nodeStatsIndices] :: NodeStats -> NodeIndicesStats
+ Database.Bloodhound.Common.Types: [nodeStatsJVM] :: NodeStats -> NodeJVMStats
+ Database.Bloodhound.Common.Types: [nodeStatsName] :: NodeStats -> NodeName
+ Database.Bloodhound.Common.Types: [nodeStatsNetwork] :: NodeStats -> Maybe NodeNetworkStats
+ Database.Bloodhound.Common.Types: [nodeStatsOS] :: NodeStats -> NodeOSStats
+ Database.Bloodhound.Common.Types: [nodeStatsParentBreaker] :: NodeBreakersStats -> NodeBreakerStats
+ Database.Bloodhound.Common.Types: [nodeStatsProcess] :: NodeStats -> NodeProcessStats
+ Database.Bloodhound.Common.Types: [nodeStatsRequestBreaker] :: NodeBreakersStats -> NodeBreakerStats
+ Database.Bloodhound.Common.Types: [nodeStatsThreadPool] :: NodeStats -> Map Text NodeThreadPoolStats
+ Database.Bloodhound.Common.Types: [nodeStatsTransport] :: NodeStats -> NodeTransportStats
+ Database.Bloodhound.Common.Types: [nodeThreadPoolActive] :: NodeThreadPoolStats -> Int
+ Database.Bloodhound.Common.Types: [nodeThreadPoolCompleted] :: NodeThreadPoolStats -> Int
+ Database.Bloodhound.Common.Types: [nodeThreadPoolInfo] :: ThreadPool -> NodeThreadPoolInfo
+ Database.Bloodhound.Common.Types: [nodeThreadPoolKeepalive] :: NodeThreadPoolInfo -> Maybe NominalDiffTime
+ Database.Bloodhound.Common.Types: [nodeThreadPoolLargest] :: NodeThreadPoolStats -> Int
+ Database.Bloodhound.Common.Types: [nodeThreadPoolMax] :: NodeThreadPoolInfo -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeThreadPoolMin] :: NodeThreadPoolInfo -> Maybe Int
+ Database.Bloodhound.Common.Types: [nodeThreadPoolName] :: ThreadPool -> Text
+ Database.Bloodhound.Common.Types: [nodeThreadPoolQueueSize] :: NodeThreadPoolInfo -> ThreadPoolSize
+ Database.Bloodhound.Common.Types: [nodeThreadPoolQueue] :: NodeThreadPoolStats -> Int
+ Database.Bloodhound.Common.Types: [nodeThreadPoolRejected] :: NodeThreadPoolStats -> Int
+ Database.Bloodhound.Common.Types: [nodeThreadPoolThreads] :: NodeThreadPoolStats -> Int
+ Database.Bloodhound.Common.Types: [nodeThreadPoolType] :: NodeThreadPoolInfo -> ThreadPoolType
+ Database.Bloodhound.Common.Types: [nodeTransportBoundAddress] :: NodeTransportInfo -> [EsAddress]
+ Database.Bloodhound.Common.Types: [nodeTransportCount] :: NodeTransportStats -> Int
+ Database.Bloodhound.Common.Types: [nodeTransportProfiles] :: NodeTransportInfo -> [BoundTransportAddress]
+ Database.Bloodhound.Common.Types: [nodeTransportPublishAddress] :: NodeTransportInfo -> EsAddress
+ Database.Bloodhound.Common.Types: [nodeTransportRXCount] :: NodeTransportStats -> Int
+ Database.Bloodhound.Common.Types: [nodeTransportRXSize] :: NodeTransportStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodeTransportServerOpen] :: NodeTransportStats -> Int
+ Database.Bloodhound.Common.Types: [nodeTransportTXSize] :: NodeTransportStats -> Bytes
+ Database.Bloodhound.Common.Types: [nodesClusterName] :: NodesInfo -> ClusterName
+ Database.Bloodhound.Common.Types: [nodesInfo] :: NodesInfo -> [NodeInfo]
+ Database.Bloodhound.Common.Types: [nodesStatsClusterName] :: NodesStats -> ClusterName
+ Database.Bloodhound.Common.Types: [nodesStats] :: NodesStats -> [NodeStats]
+ Database.Bloodhound.Common.Types: [nsrName] :: NamedSuggestionResponse -> Text
+ Database.Bloodhound.Common.Types: [nsrResponses] :: NamedSuggestionResponse -> [SuggestResponse]
+ Database.Bloodhound.Common.Types: [numberOfFragments] :: NonPostings -> Maybe Int
+ Database.Bloodhound.Common.Types: [number] :: Version -> VersionNumber
+ Database.Bloodhound.Common.Types: [onlyExpungeDeletes] :: ForceMergeIndexSettings -> Bool
+ Database.Bloodhound.Common.Types: [order] :: CommonHighlight -> Maybe Text
+ Database.Bloodhound.Common.Types: [params] :: SearchTemplate -> TemplateQueryKeyValuePairs
+ Database.Bloodhound.Common.Types: [phraseLimit] :: FastVectorHighlight -> Maybe Int
+ Database.Bloodhound.Common.Types: [phraseSuggesterAnalyzer] :: PhraseSuggester -> Maybe Analyzer
+ Database.Bloodhound.Common.Types: [phraseSuggesterCandidateGenerators] :: PhraseSuggester -> [DirectGenerators]
+ Database.Bloodhound.Common.Types: [phraseSuggesterCollateParams] :: PhraseSuggesterCollate -> TemplateQueryKeyValuePairs
+ Database.Bloodhound.Common.Types: [phraseSuggesterCollatePrune] :: PhraseSuggesterCollate -> Bool
+ Database.Bloodhound.Common.Types: [phraseSuggesterCollateTemplateQuery] :: PhraseSuggesterCollate -> Query
+ Database.Bloodhound.Common.Types: [phraseSuggesterCollate] :: PhraseSuggester -> Maybe PhraseSuggesterCollate
+ Database.Bloodhound.Common.Types: [phraseSuggesterConfidence] :: PhraseSuggester -> Maybe Int
+ Database.Bloodhound.Common.Types: [phraseSuggesterField] :: PhraseSuggester -> FieldName
+ Database.Bloodhound.Common.Types: [phraseSuggesterGramSize] :: PhraseSuggester -> Maybe Int
+ Database.Bloodhound.Common.Types: [phraseSuggesterHighlight] :: PhraseSuggester -> Maybe PhraseSuggesterHighlighter
+ Database.Bloodhound.Common.Types: [phraseSuggesterHighlighterPostTag] :: PhraseSuggesterHighlighter -> Text
+ Database.Bloodhound.Common.Types: [phraseSuggesterHighlighterPreTag] :: PhraseSuggesterHighlighter -> Text
+ Database.Bloodhound.Common.Types: [phraseSuggesterMaxErrors] :: PhraseSuggester -> Maybe Int
+ Database.Bloodhound.Common.Types: [phraseSuggesterRealWordErrorLikelihood] :: PhraseSuggester -> Maybe Int
+ Database.Bloodhound.Common.Types: [phraseSuggesterSeparator] :: PhraseSuggester -> Maybe Text
+ Database.Bloodhound.Common.Types: [phraseSuggesterShardSize] :: PhraseSuggester -> Maybe Int
+ Database.Bloodhound.Common.Types: [phraseSuggesterSize] :: PhraseSuggester -> Maybe Size
+ Database.Bloodhound.Common.Types: [pid] :: PID -> Int
+ Database.Bloodhound.Common.Types: [pitId] :: SearchResult a -> Maybe Text
+ Database.Bloodhound.Common.Types: [plainCommon] :: PlainHighlight -> Maybe CommonHighlight
+ Database.Bloodhound.Common.Types: [plainNonPost] :: PlainHighlight -> Maybe NonPostings
+ Database.Bloodhound.Common.Types: [pluginName] :: PluginName -> Text
+ Database.Bloodhound.Common.Types: [pointInTimeId] :: PointInTime -> Text
+ Database.Bloodhound.Common.Types: [pointInTimeKeepAlive] :: PointInTime -> Text
+ Database.Bloodhound.Common.Types: [pointInTime] :: Search -> Maybe PointInTime
+ Database.Bloodhound.Common.Types: [positiveQuery] :: BoostingQuery -> Query
+ Database.Bloodhound.Common.Types: [posixMS] :: POSIXMS -> UTCTime
+ Database.Bloodhound.Common.Types: [precisionThreshold] :: CardinalityAggregation -> Maybe Int
+ Database.Bloodhound.Common.Types: [prefixQueryBoost] :: PrefixQuery -> Maybe Boost
+ Database.Bloodhound.Common.Types: [prefixQueryField] :: PrefixQuery -> FieldName
+ Database.Bloodhound.Common.Types: [prefixQueryPrefixValue] :: PrefixQuery -> Text
+ Database.Bloodhound.Common.Types: [profileSearchTemplate] :: SearchTemplate -> Maybe Bool
+ Database.Bloodhound.Common.Types: [publishAddress] :: BoundTransportAddress -> EsAddress
+ Database.Bloodhound.Common.Types: [queryBody] :: Search -> Maybe Query
+ Database.Bloodhound.Common.Types: [queryStringAllowLeadingWildcard] :: QueryStringQuery -> Maybe AllowLeadingWildcard
+ Database.Bloodhound.Common.Types: [queryStringAnalyzeWildcard] :: QueryStringQuery -> Maybe AnalyzeWildcard
+ Database.Bloodhound.Common.Types: [queryStringAnalyzer] :: QueryStringQuery -> Maybe Analyzer
+ Database.Bloodhound.Common.Types: [queryStringBoost] :: QueryStringQuery -> Maybe Boost
+ Database.Bloodhound.Common.Types: [queryStringDefaultField] :: QueryStringQuery -> Maybe FieldName
+ Database.Bloodhound.Common.Types: [queryStringEnablePositionIncrements] :: QueryStringQuery -> Maybe EnablePositionIncrements
+ Database.Bloodhound.Common.Types: [queryStringFuzziness] :: QueryStringQuery -> Maybe Fuzziness
+ Database.Bloodhound.Common.Types: [queryStringFuzzyMaxExpansions] :: QueryStringQuery -> Maybe MaxExpansions
+ Database.Bloodhound.Common.Types: [queryStringFuzzyPrefixLength] :: QueryStringQuery -> Maybe PrefixLength
+ Database.Bloodhound.Common.Types: [queryStringGeneratePhraseQueries] :: QueryStringQuery -> Maybe GeneratePhraseQueries
+ Database.Bloodhound.Common.Types: [queryStringLenient] :: QueryStringQuery -> Maybe Lenient
+ Database.Bloodhound.Common.Types: [queryStringLocale] :: QueryStringQuery -> Maybe Locale
+ Database.Bloodhound.Common.Types: [queryStringLowercaseExpanded] :: QueryStringQuery -> Maybe LowercaseExpanded
+ Database.Bloodhound.Common.Types: [queryStringMinimumShouldMatch] :: QueryStringQuery -> Maybe MinimumMatch
+ Database.Bloodhound.Common.Types: [queryStringOperator] :: QueryStringQuery -> Maybe BooleanOperator
+ Database.Bloodhound.Common.Types: [queryStringPhraseSlop] :: QueryStringQuery -> Maybe PhraseSlop
+ Database.Bloodhound.Common.Types: [queryStringQuery] :: QueryStringQuery -> QueryString
+ Database.Bloodhound.Common.Types: [rangeQueryBoost] :: RangeQuery -> Boost
+ Database.Bloodhound.Common.Types: [rangeQueryField] :: RangeQuery -> FieldName
+ Database.Bloodhound.Common.Types: [rangeQueryRange] :: RangeQuery -> RangeValue
+ Database.Bloodhound.Common.Types: [regexpQueryBoost] :: RegexpQuery -> Maybe Boost
+ Database.Bloodhound.Common.Types: [regexpQueryField] :: RegexpQuery -> FieldName
+ Database.Bloodhound.Common.Types: [regexpQueryFlags] :: RegexpQuery -> RegexpFlags
+ Database.Bloodhound.Common.Types: [regexpQuery] :: RegexpQuery -> Regexp
+ Database.Bloodhound.Common.Types: [reindexConflicts] :: ReindexRequest -> Maybe ReindexConflicts
+ Database.Bloodhound.Common.Types: [reindexDestIndex] :: ReindexDest -> IndexName
+ Database.Bloodhound.Common.Types: [reindexDestOpType] :: ReindexDest -> Maybe ReindexOpType
+ Database.Bloodhound.Common.Types: [reindexDestVersionType] :: ReindexDest -> Maybe VersionType
+ Database.Bloodhound.Common.Types: [reindexDest] :: ReindexRequest -> ReindexDest
+ Database.Bloodhound.Common.Types: [reindexResponseBatches] :: ReindexResponse -> Int
+ Database.Bloodhound.Common.Types: [reindexResponseCreated] :: ReindexResponse -> Int
+ Database.Bloodhound.Common.Types: [reindexResponseThrottledMillis] :: ReindexResponse -> Int
+ Database.Bloodhound.Common.Types: [reindexResponseTook] :: ReindexResponse -> Maybe Int
+ Database.Bloodhound.Common.Types: [reindexResponseUpdated] :: ReindexResponse -> Int
+ Database.Bloodhound.Common.Types: [reindexResponseVersionConflicts] :: ReindexResponse -> Int
+ Database.Bloodhound.Common.Types: [reindexScriptLanguage] :: ReindexScript -> ScriptLanguage
+ Database.Bloodhound.Common.Types: [reindexScriptSource] :: ReindexScript -> Text
+ Database.Bloodhound.Common.Types: [reindexScript] :: ReindexRequest -> Maybe ReindexScript
+ Database.Bloodhound.Common.Types: [reindexSliceId] :: ReindexSlice -> Maybe Int
+ Database.Bloodhound.Common.Types: [reindexSliceMax] :: ReindexSlice -> Maybe Int
+ Database.Bloodhound.Common.Types: [reindexSourceIndex] :: ReindexSource -> NonEmpty IndexName
+ Database.Bloodhound.Common.Types: [reindexSourceMaxDocs] :: ReindexSource -> Maybe Int
+ Database.Bloodhound.Common.Types: [reindexSourceQuery] :: ReindexSource -> Maybe Query
+ Database.Bloodhound.Common.Types: [reindexSourceSize] :: ReindexSource -> Maybe Int
+ Database.Bloodhound.Common.Types: [reindexSourceSlice] :: ReindexSource -> Maybe ReindexSlice
+ Database.Bloodhound.Common.Types: [reindexSource] :: ReindexRequest -> ReindexSource
+ Database.Bloodhound.Common.Types: [relation] :: HitsTotal -> HitsTotalRelation
+ Database.Bloodhound.Common.Types: [repoUpdateVerify] :: SnapshotRepoUpdateSettings -> Bool
+ Database.Bloodhound.Common.Types: [requireFieldMatch] :: CommonHighlight -> Maybe Bool
+ Database.Bloodhound.Common.Types: [restoreOverrideReplicas] :: RestoreIndexSettings -> Maybe ReplicaCount
+ Database.Bloodhound.Common.Types: [routingValue] :: RoutingValue -> Text
+ Database.Bloodhound.Common.Types: [rrGroupRefNum] :: RRGroupRefNum -> Int
+ Database.Bloodhound.Common.Types: [rrPattern] :: RestoreRenamePattern -> Text
+ Database.Bloodhound.Common.Types: [sSummaryFixedSettings] :: IndexSettingsSummary -> IndexSettings
+ Database.Bloodhound.Common.Types: [sSummaryIndexName] :: IndexSettingsSummary -> IndexName
+ Database.Bloodhound.Common.Types: [sSummaryUpdateable] :: IndexSettingsSummary -> [UpdatableIndexSetting]
+ Database.Bloodhound.Common.Types: [scriptFields] :: Search -> Maybe ScriptFields
+ Database.Bloodhound.Common.Types: [scriptLanguage] :: Script -> Maybe ScriptLanguage
+ Database.Bloodhound.Common.Types: [scriptParams] :: Script -> Maybe ScriptParams
+ Database.Bloodhound.Common.Types: [scriptSource] :: Script -> ScriptSource
+ Database.Bloodhound.Common.Types: [scrollId] :: SearchResult a -> Maybe ScrollId
+ Database.Bloodhound.Common.Types: [searchAfterKey] :: Search -> Maybe SearchAfterKey
+ Database.Bloodhound.Common.Types: [searchHits] :: SearchResult a -> SearchHits a
+ Database.Bloodhound.Common.Types: [searchTemplate] :: SearchTemplate -> Either SearchTemplateId SearchTemplateSource
+ Database.Bloodhound.Common.Types: [searchType] :: Search -> SearchType
+ Database.Bloodhound.Common.Types: [shardId] :: ShardId -> Int
+ Database.Bloodhound.Common.Types: [shardTotal] :: ShardResult -> Int
+ Database.Bloodhound.Common.Types: [shardsFailed] :: ShardResult -> Int
+ Database.Bloodhound.Common.Types: [shardsSkipped] :: ShardResult -> Int
+ Database.Bloodhound.Common.Types: [shardsSuccessful] :: ShardResult -> Int
+ Database.Bloodhound.Common.Types: [shards] :: SearchResult a -> ShardResult
+ Database.Bloodhound.Common.Types: [shingleFillerToken] :: Shingle -> Text
+ Database.Bloodhound.Common.Types: [shingleMaxSize] :: Shingle -> Int
+ Database.Bloodhound.Common.Types: [shingleMinSize] :: Shingle -> Int
+ Database.Bloodhound.Common.Types: [shingleOutputUnigramsIfNoShingles] :: Shingle -> Bool
+ Database.Bloodhound.Common.Types: [shingleOutputUnigrams] :: Shingle -> Bool
+ Database.Bloodhound.Common.Types: [shingleTokenSeparator] :: Shingle -> Text
+ Database.Bloodhound.Common.Types: [simpleQueryStringAnalyzer] :: SimpleQueryStringQuery -> Maybe Analyzer
+ Database.Bloodhound.Common.Types: [simpleQueryStringField] :: SimpleQueryStringQuery -> Maybe FieldOrFields
+ Database.Bloodhound.Common.Types: [simpleQueryStringFlags] :: SimpleQueryStringQuery -> Maybe (NonEmpty SimpleQueryFlag)
+ Database.Bloodhound.Common.Types: [simpleQueryStringLocale] :: SimpleQueryStringQuery -> Maybe Locale
+ Database.Bloodhound.Common.Types: [simpleQueryStringLowercaseExpanded] :: SimpleQueryStringQuery -> Maybe LowercaseExpanded
+ Database.Bloodhound.Common.Types: [simpleQueryStringOperator] :: SimpleQueryStringQuery -> Maybe BooleanOperator
+ Database.Bloodhound.Common.Types: [simpleQueryStringQuery] :: SimpleQueryStringQuery -> QueryString
+ Database.Bloodhound.Common.Types: [size] :: Search -> Size
+ Database.Bloodhound.Common.Types: [snapIgnoreUnavailable] :: SnapshotCreateSettings -> Bool
+ Database.Bloodhound.Common.Types: [snapIncludeGlobalState] :: SnapshotCreateSettings -> Bool
+ Database.Bloodhound.Common.Types: [snapIndices] :: SnapshotCreateSettings -> Maybe IndexSelection
+ Database.Bloodhound.Common.Types: [snapInfoDuration] :: SnapshotInfo -> NominalDiffTime
+ Database.Bloodhound.Common.Types: [snapInfoEndTime] :: SnapshotInfo -> UTCTime
+ Database.Bloodhound.Common.Types: [snapInfoFailures] :: SnapshotInfo -> [SnapshotShardFailure]
+ Database.Bloodhound.Common.Types: [snapInfoIndices] :: SnapshotInfo -> [IndexName]
+ Database.Bloodhound.Common.Types: [snapInfoName] :: SnapshotInfo -> SnapshotName
+ Database.Bloodhound.Common.Types: [snapInfoShards] :: SnapshotInfo -> ShardResult
+ Database.Bloodhound.Common.Types: [snapInfoStartTime] :: SnapshotInfo -> UTCTime
+ Database.Bloodhound.Common.Types: [snapInfoState] :: SnapshotInfo -> SnapshotState
+ Database.Bloodhound.Common.Types: [snapPartial] :: SnapshotCreateSettings -> Bool
+ Database.Bloodhound.Common.Types: [snapRestoreIgnoreIndexSettings] :: SnapshotRestoreSettings -> Maybe (NonEmpty Text)
+ Database.Bloodhound.Common.Types: [snapRestoreIgnoreUnavailable] :: SnapshotRestoreSettings -> Bool
+ Database.Bloodhound.Common.Types: [snapRestoreIncludeAliases] :: SnapshotRestoreSettings -> Bool
+ Database.Bloodhound.Common.Types: [snapRestoreIncludeGlobalState] :: SnapshotRestoreSettings -> Bool
+ Database.Bloodhound.Common.Types: [snapRestoreIndexSettingsOverrides] :: SnapshotRestoreSettings -> Maybe RestoreIndexSettings
+ Database.Bloodhound.Common.Types: [snapRestoreIndices] :: SnapshotRestoreSettings -> Maybe IndexSelection
+ Database.Bloodhound.Common.Types: [snapRestorePartial] :: SnapshotRestoreSettings -> Bool
+ Database.Bloodhound.Common.Types: [snapRestoreRenamePattern] :: SnapshotRestoreSettings -> Maybe RestoreRenamePattern
+ Database.Bloodhound.Common.Types: [snapRestoreRenameReplacement] :: SnapshotRestoreSettings -> Maybe (NonEmpty RestoreRenameToken)
+ Database.Bloodhound.Common.Types: [snapRestoreWaitForCompletion] :: SnapshotRestoreSettings -> Bool
+ Database.Bloodhound.Common.Types: [snapShardFailureIndex] :: SnapshotShardFailure -> IndexName
+ Database.Bloodhound.Common.Types: [snapShardFailureNodeId] :: SnapshotShardFailure -> Maybe NodeName
+ Database.Bloodhound.Common.Types: [snapShardFailureReason] :: SnapshotShardFailure -> Text
+ Database.Bloodhound.Common.Types: [snapShardFailureShardId] :: SnapshotShardFailure -> ShardId
+ Database.Bloodhound.Common.Types: [snapWaitForCompletion] :: SnapshotCreateSettings -> Bool
+ Database.Bloodhound.Common.Types: [snapshotName] :: SnapshotName -> Text
+ Database.Bloodhound.Common.Types: [snapshotNodeVerifications] :: SnapshotVerification -> [SnapshotNodeVerification]
+ Database.Bloodhound.Common.Types: [snapshotRepoName] :: SnapshotRepoName -> Text
+ Database.Bloodhound.Common.Types: [snapshotRepoType] :: SnapshotRepoType -> Text
+ Database.Bloodhound.Common.Types: [snvFullId] :: SnapshotNodeVerification -> FullNodeId
+ Database.Bloodhound.Common.Types: [snvNodeName] :: SnapshotNodeVerification -> NodeName
+ Database.Bloodhound.Common.Types: [sortBody] :: Search -> Maybe Sort
+ Database.Bloodhound.Common.Types: [sortFieldName] :: DefaultSort -> FieldName
+ Database.Bloodhound.Common.Types: [sortMode] :: DefaultSort -> Maybe SortMode
+ Database.Bloodhound.Common.Types: [sortOrder] :: DefaultSort -> SortOrder
+ Database.Bloodhound.Common.Types: [source] :: Search -> Maybe Source
+ Database.Bloodhound.Common.Types: [srShards] :: ShardsResult -> ShardResult
+ Database.Bloodhound.Common.Types: [srcIndex] :: IndexAlias -> IndexName
+ Database.Bloodhound.Common.Types: [statsField] :: StatisticsAggregation -> FieldName
+ Database.Bloodhound.Common.Types: [statsType] :: StatisticsAggregation -> StatsType
+ Database.Bloodhound.Common.Types: [suggestBody] :: Search -> Maybe Suggest
+ Database.Bloodhound.Common.Types: [suggestName] :: Suggest -> Text
+ Database.Bloodhound.Common.Types: [suggestOptionsFreq] :: SuggestOptions -> Maybe Int
+ Database.Bloodhound.Common.Types: [suggestOptionsHighlighted] :: SuggestOptions -> Maybe Text
+ Database.Bloodhound.Common.Types: [suggestOptionsScore] :: SuggestOptions -> Double
+ Database.Bloodhound.Common.Types: [suggestOptionsText] :: SuggestOptions -> Text
+ Database.Bloodhound.Common.Types: [suggestResponseLength] :: SuggestResponse -> Int
+ Database.Bloodhound.Common.Types: [suggestResponseOffset] :: SuggestResponse -> Int
+ Database.Bloodhound.Common.Types: [suggestResponseOptions] :: SuggestResponse -> [SuggestOptions]
+ Database.Bloodhound.Common.Types: [suggestResponseText] :: SuggestResponse -> Text
+ Database.Bloodhound.Common.Types: [suggestText] :: Suggest -> Text
+ Database.Bloodhound.Common.Types: [suggestType] :: Suggest -> SuggestType
+ Database.Bloodhound.Common.Types: [suggest] :: SearchResult a -> Maybe NamedSuggestionResponse
+ Database.Bloodhound.Common.Types: [sumAggregationField] :: SumAggregation -> FieldName
+ Database.Bloodhound.Common.Types: [taFrom] :: TopHitsAggregation -> Maybe From
+ Database.Bloodhound.Common.Types: [taSize] :: TopHitsAggregation -> Maybe Size
+ Database.Bloodhound.Common.Types: [taSort] :: TopHitsAggregation -> Maybe Sort
+ Database.Bloodhound.Common.Types: [tag] :: CommonHighlight -> Maybe HighlightTag
+ Database.Bloodhound.Common.Types: [tagline] :: Status -> Text
+ Database.Bloodhound.Common.Types: [tarHits] :: TopHitResult a -> SearchHits a
+ Database.Bloodhound.Common.Types: [taskAction] :: Task a -> Text
+ Database.Bloodhound.Common.Types: [taskCancellable] :: Task a -> Bool
+ Database.Bloodhound.Common.Types: [taskDescription] :: Task a -> Text
+ Database.Bloodhound.Common.Types: [taskId] :: Task a -> Int
+ Database.Bloodhound.Common.Types: [taskNode] :: Task a -> Text
+ Database.Bloodhound.Common.Types: [taskResponseCompleted] :: TaskResponse a -> Bool
+ Database.Bloodhound.Common.Types: [taskResponseError] :: TaskResponse a -> Maybe Object
+ Database.Bloodhound.Common.Types: [taskResponseReponse] :: TaskResponse a -> Maybe a
+ Database.Bloodhound.Common.Types: [taskResponseTask] :: TaskResponse a -> Task a
+ Database.Bloodhound.Common.Types: [taskRunningTimeInNanos] :: Task a -> Integer
+ Database.Bloodhound.Common.Types: [taskStartTimeInMillis] :: Task a -> Integer
+ Database.Bloodhound.Common.Types: [taskStatus] :: Task a -> a
+ Database.Bloodhound.Common.Types: [taskType] :: Task a -> Text
+ Database.Bloodhound.Common.Types: [templateMappings] :: IndexTemplate -> Value
+ Database.Bloodhound.Common.Types: [templatePatterns] :: IndexTemplate -> [IndexPattern]
+ Database.Bloodhound.Common.Types: [templateSettings] :: IndexTemplate -> Maybe IndexSettings
+ Database.Bloodhound.Common.Types: [termAggs] :: TermsAggregation -> Maybe Aggregations
+ Database.Bloodhound.Common.Types: [termCollectMode] :: TermsAggregation -> Maybe CollectionMode
+ Database.Bloodhound.Common.Types: [termExclude] :: TermsAggregation -> Maybe TermInclusion
+ Database.Bloodhound.Common.Types: [termExecutionHint] :: TermsAggregation -> Maybe ExecutionHint
+ Database.Bloodhound.Common.Types: [termField] :: Term -> Key
+ Database.Bloodhound.Common.Types: [termInclude] :: TermsAggregation -> Maybe TermInclusion
+ Database.Bloodhound.Common.Types: [termKey] :: TermsResult -> BucketValue
+ Database.Bloodhound.Common.Types: [termMinDocCount] :: TermsAggregation -> Maybe Int
+ Database.Bloodhound.Common.Types: [termOrder] :: TermsAggregation -> Maybe TermOrder
+ Database.Bloodhound.Common.Types: [termShardSize] :: TermsAggregation -> Maybe Int
+ Database.Bloodhound.Common.Types: [termSize] :: TermsAggregation -> Maybe Int
+ Database.Bloodhound.Common.Types: [termSortField] :: TermOrder -> Text
+ Database.Bloodhound.Common.Types: [termSortOrder] :: TermOrder -> SortOrder
+ Database.Bloodhound.Common.Types: [termValue] :: Term -> Text
+ Database.Bloodhound.Common.Types: [term] :: TermsAggregation -> Either Text Text
+ Database.Bloodhound.Common.Types: [termsAggs] :: TermsResult -> Maybe AggregationResults
+ Database.Bloodhound.Common.Types: [termsDocCount] :: TermsResult -> Int
+ Database.Bloodhound.Common.Types: [timedOut] :: SearchResult a -> Bool
+ Database.Bloodhound.Common.Types: [took] :: SearchResult a -> Int
+ Database.Bloodhound.Common.Types: [topLeft] :: GeoBoundingBox -> LatLon
+ Database.Bloodhound.Common.Types: [trackSortScores] :: Search -> TrackSortScores
+ Database.Bloodhound.Common.Types: [unFilter] :: Filter -> Query
+ Database.Bloodhound.Common.Types: [unJVMVersion] :: JVMVersion -> Text
+ Database.Bloodhound.Common.Types: [unMaybeNA] :: MaybeNA a -> Maybe a
+ Database.Bloodhound.Common.Types: [unit] :: Distance -> DistanceUnit
+ Database.Bloodhound.Common.Types: [value] :: HitsTotal -> Int
+ Database.Bloodhound.Common.Types: [versionNumber] :: VersionNumber -> Version
+ Database.Bloodhound.Common.Types: [version] :: Status -> Version
+ Database.Bloodhound.Common.Types: [wildcardQueryBoost] :: WildcardQuery -> Maybe Boost
+ Database.Bloodhound.Common.Types: [wildcardQueryField] :: WildcardQuery -> FieldName
+ Database.Bloodhound.Common.Types: [wildcardQuery] :: WildcardQuery -> Key
+ Database.Bloodhound.Common.Types: aggregationsLens :: Lens' (SearchResult a) (Maybe AggregationResults)
+ Database.Bloodhound.Common.Types: aggs :: BucketAggregation a => a -> Maybe AggregationResults
+ Database.Bloodhound.Common.Types: aliasCreateFilterLens :: Lens' IndexAliasCreate (Maybe Filter)
+ Database.Bloodhound.Common.Types: aliasCreateRoutingLens :: Lens' IndexAliasCreate (Maybe AliasRouting)
+ Database.Bloodhound.Common.Types: analysisAnalyzerLens :: Lens' Analysis (Map Text AnalyzerDefinition)
+ Database.Bloodhound.Common.Types: analysisCharFilterLens :: Lens' Analysis (Map Text CharFilterDefinition)
+ Database.Bloodhound.Common.Types: analysisTokenFilterLens :: Lens' Analysis (Map Text TokenFilterDefinition)
+ Database.Bloodhound.Common.Types: analysisTokenizerLens :: Lens' Analysis (Map Text TokenizerDefinition)
+ Database.Bloodhound.Common.Types: analyzerDefinitionCharFilterLens :: Lens' AnalyzerDefinition [CharFilter]
+ Database.Bloodhound.Common.Types: analyzerDefinitionFilterLens :: Lens' AnalyzerDefinition [TokenFilter]
+ Database.Bloodhound.Common.Types: analyzerDefinitionTokenizerLens :: Lens' AnalyzerDefinition (Maybe Tokenizer)
+ Database.Bloodhound.Common.Types: baiActionLens :: Lens' BulkActionItem BulkAction
+ Database.Bloodhound.Common.Types: baiItemLens :: Lens' BulkActionItem BulkItem
+ Database.Bloodhound.Common.Types: beReasonLens :: Lens' BulkError Text
+ Database.Bloodhound.Common.Types: beTypeLens :: Lens' BulkError Text
+ Database.Bloodhound.Common.Types: biErrorLens :: Lens' BulkItem (Maybe BulkError)
+ Database.Bloodhound.Common.Types: biIdLens :: Lens' BulkItem Text
+ Database.Bloodhound.Common.Types: biIndexLens :: Lens' BulkItem Text
+ Database.Bloodhound.Common.Types: biStatusLens :: Lens' BulkItem (Maybe Int)
+ Database.Bloodhound.Common.Types: bucketsLens :: Lens' (Bucket a) [a]
+ Database.Bloodhound.Common.Types: buildUpsertActionMetadata :: UpsertActionMetadata -> Pair
+ Database.Bloodhound.Common.Types: bulkActionItemsLens :: Lens' BulkResponse [BulkActionItem]
+ Database.Bloodhound.Common.Types: bulkErrorsLens :: Lens' BulkResponse Bool
+ Database.Bloodhound.Common.Types: bulkTookLens :: Lens' BulkResponse Int
+ Database.Bloodhound.Common.Types: cardinalityFieldLens :: Lens' CardinalityAggregation FieldName
+ Database.Bloodhound.Common.Types: class BucketAggregation a
+ Database.Bloodhound.Common.Types: class ParseBHResponse parsingContext
+ Database.Bloodhound.Common.Types: class SnapshotRepo r
+ Database.Bloodhound.Common.Types: clusterNameLens :: Lens' Status Text
+ Database.Bloodhound.Common.Types: clusterUuidLens :: Lens' Status Text
+ Database.Bloodhound.Common.Types: commonHighlightPairs :: Maybe CommonHighlight -> [Pair]
+ Database.Bloodhound.Common.Types: cpuCacheSizeLens :: Lens' CPUInfo Bytes
+ Database.Bloodhound.Common.Types: cpuCoresPerSocketLens :: Lens' CPUInfo Int
+ Database.Bloodhound.Common.Types: cpuMHZLens :: Lens' CPUInfo Int
+ Database.Bloodhound.Common.Types: cpuModelLens :: Lens' CPUInfo Text
+ Database.Bloodhound.Common.Types: cpuTotalCoresLens :: Lens' CPUInfo Int
+ Database.Bloodhound.Common.Types: cpuTotalSocketsLens :: Lens' CPUInfo Int
+ Database.Bloodhound.Common.Types: cpuVendorLens :: Lens' CPUInfo Text
+ Database.Bloodhound.Common.Types: crCountLens :: Lens' CountResponse Natural
+ Database.Bloodhound.Common.Types: crShardsLens :: Lens' CountResponse CountShards
+ Database.Bloodhound.Common.Types: csFailedLens :: Lens' CountShards Int
+ Database.Bloodhound.Common.Types: csSuccessfulLens :: Lens' CountShards Int
+ Database.Bloodhound.Common.Types: csTotalLens :: Lens' CountShards Int
+ Database.Bloodhound.Common.Types: data Aggregation
+ Database.Bloodhound.Common.Types: data AliasRouting
+ Database.Bloodhound.Common.Types: data AllocationPolicy
+ Database.Bloodhound.Common.Types: data Analysis
+ Database.Bloodhound.Common.Types: data AnalyzerDefinition
+ Database.Bloodhound.Common.Types: data BHRequest parsingContext responseBody
+ Database.Bloodhound.Common.Types: data BoolMatch
+ Database.Bloodhound.Common.Types: data BoolQuery
+ Database.Bloodhound.Common.Types: data BooleanOperator
+ Database.Bloodhound.Common.Types: data BoostMode
+ Database.Bloodhound.Common.Types: data BoostingQuery
+ Database.Bloodhound.Common.Types: data BoundTransportAddress
+ Database.Bloodhound.Common.Types: data Bucket a
+ Database.Bloodhound.Common.Types: data BucketValue
+ Database.Bloodhound.Common.Types: data BulkAction
+ Database.Bloodhound.Common.Types: data BulkActionItem
+ Database.Bloodhound.Common.Types: data BulkError
+ Database.Bloodhound.Common.Types: data BulkItem
+ Database.Bloodhound.Common.Types: data BulkOperation
+ Database.Bloodhound.Common.Types: data BulkResponse
+ Database.Bloodhound.Common.Types: data CPUInfo
+ Database.Bloodhound.Common.Types: data CardinalityAggregation
+ Database.Bloodhound.Common.Types: data CharFilterDefinition
+ Database.Bloodhound.Common.Types: data CollectionMode
+ Database.Bloodhound.Common.Types: data CommonHighlight
+ Database.Bloodhound.Common.Types: data CommonMinimumMatch
+ Database.Bloodhound.Common.Types: data CommonTermsQuery
+ Database.Bloodhound.Common.Types: data ComponentFunctionScoreFunction
+ Database.Bloodhound.Common.Types: data CompoundFormat
+ Database.Bloodhound.Common.Types: data Compression
+ Database.Bloodhound.Common.Types: data CountResponse
+ Database.Bloodhound.Common.Types: data CountShards
+ Database.Bloodhound.Common.Types: data DateHistogramAggregation
+ Database.Bloodhound.Common.Types: data DateHistogramResult
+ Database.Bloodhound.Common.Types: data DateMathAnchor
+ Database.Bloodhound.Common.Types: data DateMathExpr
+ Database.Bloodhound.Common.Types: data DateMathModifier
+ Database.Bloodhound.Common.Types: data DateMathUnit
+ Database.Bloodhound.Common.Types: data DateRangeAggRange
+ Database.Bloodhound.Common.Types: data DateRangeAggregation
+ Database.Bloodhound.Common.Types: data DateRangeResult
+ Database.Bloodhound.Common.Types: data DefaultSort
+ Database.Bloodhound.Common.Types: data DirectGeneratorSuggestModeTypes
+ Database.Bloodhound.Common.Types: data DirectGenerators
+ Database.Bloodhound.Common.Types: data DisMaxQuery
+ Database.Bloodhound.Common.Types: data Distance
+ Database.Bloodhound.Common.Types: data DistanceRange
+ Database.Bloodhound.Common.Types: data DistanceType
+ Database.Bloodhound.Common.Types: data DistanceUnit
+ Database.Bloodhound.Common.Types: data EdgeNgramFilterSide
+ Database.Bloodhound.Common.Types: data Endpoint
+ Database.Bloodhound.Common.Types: data EsError
+ Database.Bloodhound.Common.Types: data EsProtocolException
+ Database.Bloodhound.Common.Types: data EsResult a
+ Database.Bloodhound.Common.Types: data EsResultFound a
+ Database.Bloodhound.Common.Types: data Exclude
+ Database.Bloodhound.Common.Types: data ExecutionHint
+ Database.Bloodhound.Common.Types: data ExpandWildcards
+ Database.Bloodhound.Common.Types: data FSType
+ Database.Bloodhound.Common.Types: data FactorModifier
+ Database.Bloodhound.Common.Types: data FastVectorHighlight
+ Database.Bloodhound.Common.Types: data FieldHighlight
+ Database.Bloodhound.Common.Types: data FieldOrFields
+ Database.Bloodhound.Common.Types: data FieldType
+ Database.Bloodhound.Common.Types: data FieldValueFactor
+ Database.Bloodhound.Common.Types: data FilterAggregation
+ Database.Bloodhound.Common.Types: data ForceMergeIndexSettings
+ Database.Bloodhound.Common.Types: data FsSnapshotRepo
+ Database.Bloodhound.Common.Types: data FunctionScoreFunction
+ Database.Bloodhound.Common.Types: data FunctionScoreFunctions
+ Database.Bloodhound.Common.Types: data FunctionScoreQuery
+ Database.Bloodhound.Common.Types: data Fuzziness
+ Database.Bloodhound.Common.Types: data FuzzyLikeFieldQuery
+ Database.Bloodhound.Common.Types: data FuzzyLikeThisQuery
+ Database.Bloodhound.Common.Types: data FuzzyQuery
+ Database.Bloodhound.Common.Types: data GenericSnapshotRepo
+ Database.Bloodhound.Common.Types: data GeoBoundingBox
+ Database.Bloodhound.Common.Types: data GeoBoundingBoxConstraint
+ Database.Bloodhound.Common.Types: data GeoFilterType
+ Database.Bloodhound.Common.Types: data GeoPoint
+ Database.Bloodhound.Common.Types: data GetTemplateScript
+ Database.Bloodhound.Common.Types: data HasChildQuery
+ Database.Bloodhound.Common.Types: data HasParentQuery
+ Database.Bloodhound.Common.Types: data HighlightEncoder
+ Database.Bloodhound.Common.Types: data HighlightSettings
+ Database.Bloodhound.Common.Types: data HighlightTag
+ Database.Bloodhound.Common.Types: data Highlights
+ Database.Bloodhound.Common.Types: data Hit a
+ Database.Bloodhound.Common.Types: data HitsTotal
+ Database.Bloodhound.Common.Types: data HitsTotalRelation
+ Database.Bloodhound.Common.Types: data IgnoredBody
+ Database.Bloodhound.Common.Types: data Include
+ Database.Bloodhound.Common.Types: data IndexAlias
+ Database.Bloodhound.Common.Types: data IndexAliasAction
+ Database.Bloodhound.Common.Types: data IndexAliasCreate
+ Database.Bloodhound.Common.Types: data IndexAliasSummary
+ Database.Bloodhound.Common.Types: data IndexDocumentSettings
+ Database.Bloodhound.Common.Types: data IndexMappingsLimits
+ Database.Bloodhound.Common.Types: data IndexName
+ Database.Bloodhound.Common.Types: data IndexSelection
+ Database.Bloodhound.Common.Types: data IndexSettings
+ Database.Bloodhound.Common.Types: data IndexSettingsSummary
+ Database.Bloodhound.Common.Types: data IndexTemplate
+ Database.Bloodhound.Common.Types: data IndicesQuery
+ Database.Bloodhound.Common.Types: data InitialShardCount
+ Database.Bloodhound.Common.Types: data InnerHits
+ Database.Bloodhound.Common.Types: data Interval
+ Database.Bloodhound.Common.Types: data JVMBufferPoolStats
+ Database.Bloodhound.Common.Types: data JVMGCStats
+ Database.Bloodhound.Common.Types: data JVMMemoryInfo
+ Database.Bloodhound.Common.Types: data JVMPoolStats
+ Database.Bloodhound.Common.Types: data JoinRelation
+ Database.Bloodhound.Common.Types: data Language
+ Database.Bloodhound.Common.Types: data LatLon
+ Database.Bloodhound.Common.Types: data LoadAvgs
+ Database.Bloodhound.Common.Types: data MappingField
+ Database.Bloodhound.Common.Types: data MatchQuery
+ Database.Bloodhound.Common.Types: data MatchQueryType
+ Database.Bloodhound.Common.Types: data MinimumMatchHighLow
+ Database.Bloodhound.Common.Types: data Missing
+ Database.Bloodhound.Common.Types: data MissingAggregation
+ Database.Bloodhound.Common.Types: data MissingResult
+ Database.Bloodhound.Common.Types: data MoreLikeThisFieldQuery
+ Database.Bloodhound.Common.Types: data MoreLikeThisQuery
+ Database.Bloodhound.Common.Types: data MultiMatchQuery
+ Database.Bloodhound.Common.Types: data MultiMatchQueryType
+ Database.Bloodhound.Common.Types: data NamedSuggestionResponse
+ Database.Bloodhound.Common.Types: data NestedQuery
+ Database.Bloodhound.Common.Types: data Ngram
+ Database.Bloodhound.Common.Types: data NgramFilter
+ Database.Bloodhound.Common.Types: data NodeAttrFilter
+ Database.Bloodhound.Common.Types: data NodeBreakerStats
+ Database.Bloodhound.Common.Types: data NodeBreakersStats
+ Database.Bloodhound.Common.Types: data NodeDataPathStats
+ Database.Bloodhound.Common.Types: data NodeFSStats
+ Database.Bloodhound.Common.Types: data NodeFSTotalStats
+ Database.Bloodhound.Common.Types: data NodeHTTPInfo
+ Database.Bloodhound.Common.Types: data NodeHTTPStats
+ Database.Bloodhound.Common.Types: data NodeIndicesStats
+ Database.Bloodhound.Common.Types: data NodeInfo
+ Database.Bloodhound.Common.Types: data NodeJVMInfo
+ Database.Bloodhound.Common.Types: data NodeJVMStats
+ Database.Bloodhound.Common.Types: data NodeNetworkInfo
+ Database.Bloodhound.Common.Types: data NodeNetworkInterface
+ Database.Bloodhound.Common.Types: data NodeNetworkStats
+ Database.Bloodhound.Common.Types: data NodeOSInfo
+ Database.Bloodhound.Common.Types: data NodeOSStats
+ Database.Bloodhound.Common.Types: data NodePluginInfo
+ Database.Bloodhound.Common.Types: data NodeProcessInfo
+ Database.Bloodhound.Common.Types: data NodeProcessStats
+ Database.Bloodhound.Common.Types: data NodeSelection
+ Database.Bloodhound.Common.Types: data NodeSelector
+ Database.Bloodhound.Common.Types: data NodeStats
+ Database.Bloodhound.Common.Types: data NodeThreadPoolInfo
+ Database.Bloodhound.Common.Types: data NodeThreadPoolStats
+ Database.Bloodhound.Common.Types: data NodeTransportInfo
+ Database.Bloodhound.Common.Types: data NodeTransportStats
+ Database.Bloodhound.Common.Types: data NodesInfo
+ Database.Bloodhound.Common.Types: data NodesStats
+ Database.Bloodhound.Common.Types: data NonPostings
+ Database.Bloodhound.Common.Types: data OpenCloseIndex
+ Database.Bloodhound.Common.Types: data OptimizeBbox
+ Database.Bloodhound.Common.Types: data PatternOrPatterns
+ Database.Bloodhound.Common.Types: data PhraseSuggester
+ Database.Bloodhound.Common.Types: data PhraseSuggesterCollate
+ Database.Bloodhound.Common.Types: data PhraseSuggesterHighlighter
+ Database.Bloodhound.Common.Types: data PlainHighlight
+ Database.Bloodhound.Common.Types: data PointInTime
+ Database.Bloodhound.Common.Types: data PostingsHighlight
+ Database.Bloodhound.Common.Types: data PrefixQuery
+ Database.Bloodhound.Common.Types: data Query
+ Database.Bloodhound.Common.Types: data QueryStringQuery
+ Database.Bloodhound.Common.Types: data RangeExecution
+ Database.Bloodhound.Common.Types: data RangeQuery
+ Database.Bloodhound.Common.Types: data RangeValue
+ Database.Bloodhound.Common.Types: data RegexpFlag
+ Database.Bloodhound.Common.Types: data RegexpFlags
+ Database.Bloodhound.Common.Types: data RegexpQuery
+ Database.Bloodhound.Common.Types: data ReindexConflicts
+ Database.Bloodhound.Common.Types: data ReindexDest
+ Database.Bloodhound.Common.Types: data ReindexOpType
+ Database.Bloodhound.Common.Types: data ReindexRequest
+ Database.Bloodhound.Common.Types: data ReindexResponse
+ Database.Bloodhound.Common.Types: data ReindexScript
+ Database.Bloodhound.Common.Types: data ReindexSlice
+ Database.Bloodhound.Common.Types: data ReindexSource
+ Database.Bloodhound.Common.Types: data ReplicaBounds
+ Database.Bloodhound.Common.Types: data RestoreRenameToken
+ Database.Bloodhound.Common.Types: data ScoreMode
+ Database.Bloodhound.Common.Types: data ScoreType
+ Database.Bloodhound.Common.Types: data Script
+ Database.Bloodhound.Common.Types: data ScriptSource
+ Database.Bloodhound.Common.Types: data Search
+ Database.Bloodhound.Common.Types: data SearchHits a
+ Database.Bloodhound.Common.Types: data SearchResult a
+ Database.Bloodhound.Common.Types: data SearchTemplate
+ Database.Bloodhound.Common.Types: data SearchType
+ Database.Bloodhound.Common.Types: data ShardResult
+ Database.Bloodhound.Common.Types: data Shingle
+ Database.Bloodhound.Common.Types: data SimpleQueryFlag
+ Database.Bloodhound.Common.Types: data SimpleQueryStringQuery
+ Database.Bloodhound.Common.Types: data SnapshotCreateSettings
+ Database.Bloodhound.Common.Types: data SnapshotInfo
+ Database.Bloodhound.Common.Types: data SnapshotNodeVerification
+ Database.Bloodhound.Common.Types: data SnapshotPattern
+ Database.Bloodhound.Common.Types: data SnapshotRepoConversionError
+ Database.Bloodhound.Common.Types: data SnapshotRepoPattern
+ Database.Bloodhound.Common.Types: data SnapshotRepoSelection
+ Database.Bloodhound.Common.Types: data SnapshotRestoreSettings
+ Database.Bloodhound.Common.Types: data SnapshotSelection
+ Database.Bloodhound.Common.Types: data SnapshotShardFailure
+ Database.Bloodhound.Common.Types: data SnapshotState
+ Database.Bloodhound.Common.Types: data SortMode
+ Database.Bloodhound.Common.Types: data SortOrder
+ Database.Bloodhound.Common.Types: data SortSpec
+ Database.Bloodhound.Common.Types: data Source
+ Database.Bloodhound.Common.Types: data StatisticsAggregation
+ Database.Bloodhound.Common.Types: data StatsType
+ Database.Bloodhound.Common.Types: data Status
+ Database.Bloodhound.Common.Types: data StatusDependant
+ Database.Bloodhound.Common.Types: data StatusIndependant
+ Database.Bloodhound.Common.Types: data Suggest
+ Database.Bloodhound.Common.Types: data SuggestOptions
+ Database.Bloodhound.Common.Types: data SuggestResponse
+ Database.Bloodhound.Common.Types: data SuggestType
+ Database.Bloodhound.Common.Types: data Task a
+ Database.Bloodhound.Common.Types: data TaskResponse a
+ Database.Bloodhound.Common.Types: data Term
+ Database.Bloodhound.Common.Types: data TermInclusion
+ Database.Bloodhound.Common.Types: data TermOrder
+ Database.Bloodhound.Common.Types: data TermsAggregation
+ Database.Bloodhound.Common.Types: data TermsResult
+ Database.Bloodhound.Common.Types: data ThreadPool
+ Database.Bloodhound.Common.Types: data ThreadPoolSize
+ Database.Bloodhound.Common.Types: data ThreadPoolType
+ Database.Bloodhound.Common.Types: data TimeInterval
+ Database.Bloodhound.Common.Types: data TimeUnits
+ Database.Bloodhound.Common.Types: data TokenChar
+ Database.Bloodhound.Common.Types: data TokenFilterDefinition
+ Database.Bloodhound.Common.Types: data TokenizerDefinition
+ Database.Bloodhound.Common.Types: data TopHitResult a
+ Database.Bloodhound.Common.Types: data TopHitsAggregation
+ Database.Bloodhound.Common.Types: data UpdatableIndexSetting
+ Database.Bloodhound.Common.Types: data UpsertActionMetadata
+ Database.Bloodhound.Common.Types: data UpsertPayload
+ Database.Bloodhound.Common.Types: data ValueCountAggregation
+ Database.Bloodhound.Common.Types: data Version
+ Database.Bloodhound.Common.Types: data VersionControl
+ Database.Bloodhound.Common.Types: data VersionType
+ Database.Bloodhound.Common.Types: data WildcardQuery
+ Database.Bloodhound.Common.Types: data ZeroTermsQuery
+ Database.Bloodhound.Common.Types: dateAggsLens :: Lens' DateHistogramAggregation (Maybe Aggregations)
+ Database.Bloodhound.Common.Types: dateDocCountLens :: Lens' DateHistogramResult Int
+ Database.Bloodhound.Common.Types: dateFieldLens :: Lens' DateHistogramAggregation FieldName
+ Database.Bloodhound.Common.Types: dateFormatLens :: Lens' DateHistogramAggregation (Maybe Text)
+ Database.Bloodhound.Common.Types: dateHistogramAggsLens :: Lens' DateHistogramResult (Maybe AggregationResults)
+ Database.Bloodhound.Common.Types: dateIntervalLens :: Lens' DateHistogramAggregation Interval
+ Database.Bloodhound.Common.Types: dateKeyLens :: Lens' DateHistogramResult Int
+ Database.Bloodhound.Common.Types: dateKeyStrLens :: Lens' DateHistogramResult (Maybe Text)
+ Database.Bloodhound.Common.Types: datePostOffsetLens :: Lens' DateHistogramAggregation (Maybe Text)
+ Database.Bloodhound.Common.Types: datePostZoneLens :: Lens' DateHistogramAggregation (Maybe Text)
+ Database.Bloodhound.Common.Types: datePreOffsetLens :: Lens' DateHistogramAggregation (Maybe Text)
+ Database.Bloodhound.Common.Types: datePreZoneLens :: Lens' DateHistogramAggregation (Maybe Text)
+ Database.Bloodhound.Common.Types: dateRangeAggsLens :: Lens' DateRangeResult (Maybe AggregationResults)
+ Database.Bloodhound.Common.Types: dateRangeDocCountLens :: Lens' DateRangeResult Int
+ Database.Bloodhound.Common.Types: dateRangeFromAsStringLens :: Lens' DateRangeResult (Maybe Text)
+ Database.Bloodhound.Common.Types: dateRangeFromLens :: Lens' DateRangeResult (Maybe UTCTime)
+ Database.Bloodhound.Common.Types: dateRangeKeyLens :: Lens' DateRangeResult Text
+ Database.Bloodhound.Common.Types: dateRangeToAsStringLens :: Lens' DateRangeResult (Maybe Text)
+ Database.Bloodhound.Common.Types: dateRangeToLens :: Lens' DateRangeResult (Maybe UTCTime)
+ Database.Bloodhound.Common.Types: decodeResponse :: FromJSON a => BHResponse StatusIndependant a -> Maybe a
+ Database.Bloodhound.Common.Types: defaultCache :: Cache
+ Database.Bloodhound.Common.Types: defaultForceMergeIndexSettings :: ForceMergeIndexSettings
+ Database.Bloodhound.Common.Types: defaultIndexDocumentSettings :: IndexDocumentSettings
+ Database.Bloodhound.Common.Types: defaultIndexMappingsLimits :: IndexMappingsLimits
+ Database.Bloodhound.Common.Types: defaultIndexSettings :: IndexSettings
+ Database.Bloodhound.Common.Types: defaultSnapshotCreateSettings :: SnapshotCreateSettings
+ Database.Bloodhound.Common.Types: defaultSnapshotRepoUpdateSettings :: SnapshotRepoUpdateSettings
+ Database.Bloodhound.Common.Types: defaultSnapshotRestoreSettings :: SnapshotRestoreSettings
+ Database.Bloodhound.Common.Types: directGeneratorMaxEditsLens :: Lens' DirectGenerators (Maybe Double)
+ Database.Bloodhound.Common.Types: directGeneratorMaxInspectionsLens :: Lens' DirectGenerators (Maybe Int)
+ Database.Bloodhound.Common.Types: directGeneratorMaxTermFreqLens :: Lens' DirectGenerators (Maybe Double)
+ Database.Bloodhound.Common.Types: directGeneratorMinDocFreqLens :: Lens' DirectGenerators (Maybe Double)
+ Database.Bloodhound.Common.Types: directGeneratorMinWordLengthLens :: Lens' DirectGenerators (Maybe Int)
+ Database.Bloodhound.Common.Types: directGeneratorPostFilterLens :: Lens' DirectGenerators (Maybe Text)
+ Database.Bloodhound.Common.Types: directGeneratorPreFilterLens :: Lens' DirectGenerators (Maybe Text)
+ Database.Bloodhound.Common.Types: directGeneratorPrefixLengthLens :: Lens' DirectGenerators (Maybe Int)
+ Database.Bloodhound.Common.Types: directGeneratorSuggestModeLens :: Lens' DirectGenerators DirectGeneratorSuggestModeTypes
+ Database.Bloodhound.Common.Types: directGeneratorsFieldLens :: Lens' DirectGenerators FieldName
+ Database.Bloodhound.Common.Types: directGeneratorsSizeLens :: Lens' DirectGenerators (Maybe Int)
+ Database.Bloodhound.Common.Types: docCount :: BucketAggregation a => a -> Int
+ Database.Bloodhound.Common.Types: draFieldLens :: Lens' DateRangeAggregation FieldName
+ Database.Bloodhound.Common.Types: draFormatLens :: Lens' DateRangeAggregation (Maybe Text)
+ Database.Bloodhound.Common.Types: draRangesLens :: Lens' DateRangeAggregation (NonEmpty DateRangeAggRange)
+ Database.Bloodhound.Common.Types: eitherDecodeResponse :: FromJSON a => BHResponse StatusIndependant a -> Either String a
+ Database.Bloodhound.Common.Types: emptyAggregations :: Aggregations
+ Database.Bloodhound.Common.Types: faAggsLens :: Lens' FilterAggregation (Maybe Aggregations)
+ Database.Bloodhound.Common.Types: faFilterLens :: Lens' FilterAggregation Filter
+ Database.Bloodhound.Common.Types: fastVectorHighPairs :: Maybe FastVectorHighlight -> [Pair]
+ Database.Bloodhound.Common.Types: fieldDefinitionLens :: Lens' MappingField FieldDefinition
+ Database.Bloodhound.Common.Types: fieldTagged :: (Monad m, MonadFail m) => (FieldName -> Object -> m a) -> Object -> m a
+ Database.Bloodhound.Common.Types: fieldTypeLens :: Lens' FieldDefinition FieldType
+ Database.Bloodhound.Common.Types: flushAfterOptimizeLens :: Lens' ForceMergeIndexSettings Bool
+ Database.Bloodhound.Common.Types: fromGSnapshotRepo :: SnapshotRepo r => GenericSnapshotRepo -> Either SnapshotRepoConversionError r
+ Database.Bloodhound.Common.Types: fsrChunkSizeLens :: Lens' FsSnapshotRepo (Maybe Bytes)
+ Database.Bloodhound.Common.Types: fsrCompressMetadataLens :: Lens' FsSnapshotRepo Bool
+ Database.Bloodhound.Common.Types: fsrLocationLens :: Lens' FsSnapshotRepo FilePath
+ Database.Bloodhound.Common.Types: fsrMaxRestoreBytesPerSecLens :: Lens' FsSnapshotRepo (Maybe Bytes)
+ Database.Bloodhound.Common.Types: fsrMaxSnapshotBytesPerSecLens :: Lens' FsSnapshotRepo (Maybe Bytes)
+ Database.Bloodhound.Common.Types: fsrNameLens :: Lens' FsSnapshotRepo SnapshotRepoName
+ Database.Bloodhound.Common.Types: functionScoreFunctionPair :: FunctionScoreFunction -> (Key, Value)
+ Database.Bloodhound.Common.Types: functionScoreFunctionsPair :: FunctionScoreFunctions -> (Key, Value)
+ Database.Bloodhound.Common.Types: gSnapshotRepoNameLens :: Lens' GenericSnapshotRepo SnapshotRepoName
+ Database.Bloodhound.Common.Types: gSnapshotRepoSettingsLens :: Lens' GenericSnapshotRepo GenericSnapshotRepoSettings
+ Database.Bloodhound.Common.Types: gSnapshotRepoSettingsObjectLens :: Lens' GenericSnapshotRepoSettings Object
+ Database.Bloodhound.Common.Types: gSnapshotRepoTypeLens :: Lens' GenericSnapshotRepo SnapshotRepoType
+ Database.Bloodhound.Common.Types: getEndpoint :: Server -> Endpoint -> Text
+ Database.Bloodhound.Common.Types: getNamedSubAgg :: Object -> [Key] -> Maybe AggregationResults
+ Database.Bloodhound.Common.Types: getTemplateScriptFoundLens :: Lens' GetTemplateScript Bool
+ Database.Bloodhound.Common.Types: getTemplateScriptIdLens :: Lens' GetTemplateScript Text
+ Database.Bloodhound.Common.Types: getTemplateScriptLangLens :: Lens' GetTemplateScript (Maybe Text)
+ Database.Bloodhound.Common.Types: getTemplateScriptOptionsLens :: Lens' GetTemplateScript (Maybe (HashMap Text Text))
+ Database.Bloodhound.Common.Types: getTemplateScriptSourceLens :: Lens' GetTemplateScript (Maybe SearchTemplateSource)
+ Database.Bloodhound.Common.Types: gigabytes :: Int -> Bytes
+ Database.Bloodhound.Common.Types: highlightSettingsPairs :: Maybe HighlightSettings -> [Pair]
+ Database.Bloodhound.Common.Types: highlightTagToPairs :: Maybe HighlightTag -> [Pair]
+ Database.Bloodhound.Common.Types: hitDocIdLens :: Lens' (Hit a) DocId
+ Database.Bloodhound.Common.Types: hitFieldsLens :: Lens' (Hit a) (Maybe HitFields)
+ Database.Bloodhound.Common.Types: hitHighlightLens :: Lens' (Hit a) (Maybe HitHighlight)
+ Database.Bloodhound.Common.Types: hitIndexLens :: Lens' (Hit a) IndexName
+ Database.Bloodhound.Common.Types: hitInnerHitsLens :: Lens' (Hit a) (Maybe (KeyMap (TopHitResult Value)))
+ Database.Bloodhound.Common.Types: hitScoreLens :: Lens' (Hit a) Score
+ Database.Bloodhound.Common.Types: hitSortLens :: Lens' (Hit a) (Maybe SearchAfterKey)
+ Database.Bloodhound.Common.Types: hitSourceLens :: Lens' (Hit a) (Maybe a)
+ Database.Bloodhound.Common.Types: hitsTotalRelationLens :: Lens' HitsTotal HitsTotalRelation
+ Database.Bloodhound.Common.Types: hitsTotalValueLens :: Lens' HitsTotal Int
+ Database.Bloodhound.Common.Types: idsJoinRelationLens :: Lens' IndexDocumentSettings (Maybe JoinRelation)
+ Database.Bloodhound.Common.Types: idsVersionControlLens :: Lens' IndexDocumentSettings VersionControl
+ Database.Bloodhound.Common.Types: ignoreUnmappedLens :: Lens' DefaultSort (Maybe Text)
+ Database.Bloodhound.Common.Types: indexAliasLens :: Lens' IndexAlias IndexAliasName
+ Database.Bloodhound.Common.Types: indexAliasSummaryAliasLens :: Lens' IndexAliasSummary IndexAlias
+ Database.Bloodhound.Common.Types: indexAliasSummaryCreateLens :: Lens' IndexAliasSummary IndexAliasCreate
+ Database.Bloodhound.Common.Types: indexAliasesSummaryLens :: Lens' IndexAliasesSummary [IndexAliasSummary]
+ Database.Bloodhound.Common.Types: indexMappingsLimitDepthLens :: Lens' IndexMappingsLimits (Maybe Int)
+ Database.Bloodhound.Common.Types: indexMappingsLimitFieldNameLengthLens :: Lens' IndexMappingsLimits (Maybe Int)
+ Database.Bloodhound.Common.Types: indexMappingsLimitNestedFieldsLens :: Lens' IndexMappingsLimits (Maybe Int)
+ Database.Bloodhound.Common.Types: indexMappingsLimitNestedObjectsLens :: Lens' IndexMappingsLimits (Maybe Int)
+ Database.Bloodhound.Common.Types: indexMappingsLimitsLens :: Lens' IndexSettings IndexMappingsLimits
+ Database.Bloodhound.Common.Types: indexReplicasLens :: Lens' IndexSettings ReplicaCount
+ Database.Bloodhound.Common.Types: indexShardsLens :: Lens' IndexSettings ShardCount
+ Database.Bloodhound.Common.Types: isCreated :: BHResponse parsingContext a -> Bool
+ Database.Bloodhound.Common.Types: isSuccess :: BHResponse parsingContext a -> Bool
+ Database.Bloodhound.Common.Types: isVersionConflict :: BHResponse parsingContext a -> Bool
+ Database.Bloodhound.Common.Types: joinBHResponse :: forall a parsingContext. BHRequest parsingContext (Either EsProtocolException (ParsedEsResponse a)) -> BHRequest parsingContext a
+ Database.Bloodhound.Common.Types: keepBHResponse :: forall a parsingContext. BHRequest parsingContext a -> BHRequest StatusDependant (BHResponse StatusDependant a, a)
+ Database.Bloodhound.Common.Types: key :: BucketAggregation a => a -> BucketValue
+ Database.Bloodhound.Common.Types: kilobytes :: Int -> Bytes
+ Database.Bloodhound.Common.Types: languageFromText :: Text -> Maybe Language
+ Database.Bloodhound.Common.Types: languageToText :: Language -> Text
+ Database.Bloodhound.Common.Types: maFieldLens :: Lens' MissingAggregation Text
+ Database.Bloodhound.Common.Types: mappingFieldNameLens :: Lens' MappingField FieldName
+ Database.Bloodhound.Common.Types: mappingFieldsLens :: Lens' Mapping [MappingField]
+ Database.Bloodhound.Common.Types: maxNumSegmentsLens :: Lens' ForceMergeIndexSettings (Maybe Int)
+ Database.Bloodhound.Common.Types: megabytes :: Int -> Bytes
+ Database.Bloodhound.Common.Types: missingSortLens :: Lens' DefaultSort (Maybe Missing)
+ Database.Bloodhound.Common.Types: mkAggregations :: Key -> Aggregation -> Aggregations
+ Database.Bloodhound.Common.Types: mkBoolQuery :: [Query] -> [Filter] -> [Query] -> [Query] -> BoolQuery
+ Database.Bloodhound.Common.Types: mkCardinalityAggregation :: FieldName -> CardinalityAggregation
+ Database.Bloodhound.Common.Types: mkDateHistogram :: FieldName -> Interval -> DateHistogramAggregation
+ Database.Bloodhound.Common.Types: mkDirectGenerators :: FieldName -> DirectGenerators
+ Database.Bloodhound.Common.Types: mkDocVersion :: Int -> Maybe DocVersion
+ Database.Bloodhound.Common.Types: mkEndpoint :: [Text] -> Endpoint
+ Database.Bloodhound.Common.Types: mkExtendedStatsAggregation :: FieldName -> StatisticsAggregation
+ Database.Bloodhound.Common.Types: mkFullRequest :: (ParseBHResponse parsingContext, FromJSON responseBody) => Method -> Endpoint -> ByteString -> BHRequest parsingContext responseBody
+ Database.Bloodhound.Common.Types: mkIndexName :: Text -> Either Text IndexName
+ Database.Bloodhound.Common.Types: mkMatchQuery :: FieldName -> QueryString -> MatchQuery
+ Database.Bloodhound.Common.Types: mkMultiMatchQuery :: [FieldName] -> QueryString -> MultiMatchQuery
+ Database.Bloodhound.Common.Types: mkPhraseSuggester :: FieldName -> PhraseSuggester
+ Database.Bloodhound.Common.Types: mkQueryStringQuery :: QueryString -> QueryStringQuery
+ Database.Bloodhound.Common.Types: mkRRGroupRefNum :: Int -> Maybe RRGroupRefNum
+ Database.Bloodhound.Common.Types: mkRangeQuery :: FieldName -> RangeValue -> RangeQuery
+ Database.Bloodhound.Common.Types: mkReindexRequest :: IndexName -> IndexName -> ReindexRequest
+ Database.Bloodhound.Common.Types: mkSimpleRequest :: (ParseBHResponse parsingContext, FromJSON responseBody) => Method -> Endpoint -> BHRequest parsingContext responseBody
+ Database.Bloodhound.Common.Types: mkSort :: FieldName -> SortOrder -> DefaultSort
+ Database.Bloodhound.Common.Types: mkStatsAggregation :: FieldName -> StatisticsAggregation
+ Database.Bloodhound.Common.Types: mkTermsAggregation :: Text -> TermsAggregation
+ Database.Bloodhound.Common.Types: mkTermsScriptAggregation :: Text -> TermsAggregation
+ Database.Bloodhound.Common.Types: nameLens :: Lens' Status Text
+ Database.Bloodhound.Common.Types: nestedFilterLens :: Lens' DefaultSort (Maybe Filter)
+ Database.Bloodhound.Common.Types: newtype Accepted
+ Database.Bloodhound.Common.Types: newtype Acknowledged
+ Database.Bloodhound.Common.Types: newtype AggregateParentScore
+ Database.Bloodhound.Common.Types: newtype AllowLeadingWildcard
+ Database.Bloodhound.Common.Types: newtype AnalyzeWildcard
+ Database.Bloodhound.Common.Types: newtype Analyzer
+ Database.Bloodhound.Common.Types: newtype BHResponse parsingContext body
+ Database.Bloodhound.Common.Types: newtype Boost
+ Database.Bloodhound.Common.Types: newtype BoostTerms
+ Database.Bloodhound.Common.Types: newtype BuildHash
+ Database.Bloodhound.Common.Types: newtype Bytes
+ Database.Bloodhound.Common.Types: newtype CacheKey
+ Database.Bloodhound.Common.Types: newtype CacheName
+ Database.Bloodhound.Common.Types: newtype CharFilter
+ Database.Bloodhound.Common.Types: newtype ClusterName
+ Database.Bloodhound.Common.Types: newtype CountQuery
+ Database.Bloodhound.Common.Types: newtype CutoffFrequency
+ Database.Bloodhound.Common.Types: newtype DisableCoord
+ Database.Bloodhound.Common.Types: newtype DocId
+ Database.Bloodhound.Common.Types: newtype DocVersion
+ Database.Bloodhound.Common.Types: newtype EnablePositionIncrements
+ Database.Bloodhound.Common.Types: newtype EsAddress
+ Database.Bloodhound.Common.Types: newtype EsPassword
+ Database.Bloodhound.Common.Types: newtype EsUsername
+ Database.Bloodhound.Common.Types: newtype Existence
+ Database.Bloodhound.Common.Types: newtype ExternalDocVersion
+ Database.Bloodhound.Common.Types: newtype Factor
+ Database.Bloodhound.Common.Types: newtype FactorMissingFieldValue
+ Database.Bloodhound.Common.Types: newtype FieldDefinition
+ Database.Bloodhound.Common.Types: newtype FieldName
+ Database.Bloodhound.Common.Types: newtype Filter
+ Database.Bloodhound.Common.Types: newtype From
+ Database.Bloodhound.Common.Types: newtype FullNodeId
+ Database.Bloodhound.Common.Types: newtype GeneratePhraseQueries
+ Database.Bloodhound.Common.Types: newtype GenericSnapshotRepoSettings
+ Database.Bloodhound.Common.Types: newtype GreaterThan
+ Database.Bloodhound.Common.Types: newtype GreaterThanD
+ Database.Bloodhound.Common.Types: newtype GreaterThanEq
+ Database.Bloodhound.Common.Types: newtype GreaterThanEqD
+ Database.Bloodhound.Common.Types: newtype HitFields
+ Database.Bloodhound.Common.Types: newtype IgnoreTermFrequency
+ Database.Bloodhound.Common.Types: newtype IgnoreUnmapped
+ Database.Bloodhound.Common.Types: newtype IndexAliasName
+ Database.Bloodhound.Common.Types: newtype IndexAliasRouting
+ Database.Bloodhound.Common.Types: newtype IndexAliasesSummary
+ Database.Bloodhound.Common.Types: newtype IndexPattern
+ Database.Bloodhound.Common.Types: newtype JVMGCCollector
+ Database.Bloodhound.Common.Types: newtype JVMMemoryPool
+ Database.Bloodhound.Common.Types: newtype JVMVersion
+ Database.Bloodhound.Common.Types: newtype Lenient
+ Database.Bloodhound.Common.Types: newtype LessThan
+ Database.Bloodhound.Common.Types: newtype LessThanD
+ Database.Bloodhound.Common.Types: newtype LessThanEq
+ Database.Bloodhound.Common.Types: newtype LessThanEqD
+ Database.Bloodhound.Common.Types: newtype Locale
+ Database.Bloodhound.Common.Types: newtype LowercaseExpanded
+ Database.Bloodhound.Common.Types: newtype MS
+ Database.Bloodhound.Common.Types: newtype MacAddress
+ Database.Bloodhound.Common.Types: newtype Mapping
+ Database.Bloodhound.Common.Types: newtype MaxChildren
+ Database.Bloodhound.Common.Types: newtype MaxDocFrequency
+ Database.Bloodhound.Common.Types: newtype MaxExpansions
+ Database.Bloodhound.Common.Types: newtype MaxQueryTerms
+ Database.Bloodhound.Common.Types: newtype MaxWordLength
+ Database.Bloodhound.Common.Types: newtype MaybeNA a
+ Database.Bloodhound.Common.Types: newtype MinChildren
+ Database.Bloodhound.Common.Types: newtype MinDocFrequency
+ Database.Bloodhound.Common.Types: newtype MinWordLength
+ Database.Bloodhound.Common.Types: newtype MinimumMatch
+ Database.Bloodhound.Common.Types: newtype MinimumTermFrequency
+ Database.Bloodhound.Common.Types: newtype NetworkInterfaceName
+ Database.Bloodhound.Common.Types: newtype NodeAttrName
+ Database.Bloodhound.Common.Types: newtype NodeName
+ Database.Bloodhound.Common.Types: newtype NominalDiffTimeJSON
+ Database.Bloodhound.Common.Types: newtype NullValue
+ Database.Bloodhound.Common.Types: newtype PID
+ Database.Bloodhound.Common.Types: newtype POSIXMS
+ Database.Bloodhound.Common.Types: newtype Pattern
+ Database.Bloodhound.Common.Types: newtype PercentMatch
+ Database.Bloodhound.Common.Types: newtype PhraseSlop
+ Database.Bloodhound.Common.Types: newtype PluginName
+ Database.Bloodhound.Common.Types: newtype PrefixLength
+ Database.Bloodhound.Common.Types: newtype QueryPath
+ Database.Bloodhound.Common.Types: newtype QueryString
+ Database.Bloodhound.Common.Types: newtype RRGroupRefNum
+ Database.Bloodhound.Common.Types: newtype Regexp
+ Database.Bloodhound.Common.Types: newtype RelationName
+ Database.Bloodhound.Common.Types: newtype ReplicaCount
+ Database.Bloodhound.Common.Types: newtype RestoreIndexSettings
+ Database.Bloodhound.Common.Types: newtype RestoreRenamePattern
+ Database.Bloodhound.Common.Types: newtype RoutingValue
+ Database.Bloodhound.Common.Types: newtype ScriptFields
+ Database.Bloodhound.Common.Types: newtype ScriptLanguage
+ Database.Bloodhound.Common.Types: newtype ScriptParams
+ Database.Bloodhound.Common.Types: newtype ScrollId
+ Database.Bloodhound.Common.Types: newtype SearchAliasRouting
+ Database.Bloodhound.Common.Types: newtype SearchTemplateId
+ Database.Bloodhound.Common.Types: newtype SearchTemplateSource
+ Database.Bloodhound.Common.Types: newtype Seed
+ Database.Bloodhound.Common.Types: newtype Server
+ Database.Bloodhound.Common.Types: newtype ShardCount
+ Database.Bloodhound.Common.Types: newtype ShardId
+ Database.Bloodhound.Common.Types: newtype ShardsResult
+ Database.Bloodhound.Common.Types: newtype Size
+ Database.Bloodhound.Common.Types: newtype SnapshotName
+ Database.Bloodhound.Common.Types: newtype SnapshotRepoName
+ Database.Bloodhound.Common.Types: newtype SnapshotRepoType
+ Database.Bloodhound.Common.Types: newtype SnapshotRepoUpdateSettings
+ Database.Bloodhound.Common.Types: newtype SnapshotVerification
+ Database.Bloodhound.Common.Types: newtype StopWord
+ Database.Bloodhound.Common.Types: newtype SumAggregation
+ Database.Bloodhound.Common.Types: newtype TaskNodeId
+ Database.Bloodhound.Common.Types: newtype TemplateName
+ Database.Bloodhound.Common.Types: newtype TemplateQueryKeyValuePairs
+ Database.Bloodhound.Common.Types: newtype Tiebreaker
+ Database.Bloodhound.Common.Types: newtype TokenFilter
+ Database.Bloodhound.Common.Types: newtype Tokenizer
+ Database.Bloodhound.Common.Types: newtype VersionNumber
+ Database.Bloodhound.Common.Types: newtype Weight
+ Database.Bloodhound.Common.Types: ngramFilterFromJSONObject :: Object -> Parser NgramFilter
+ Database.Bloodhound.Common.Types: ngramFilterToPairs :: NgramFilter -> [Pair]
+ Database.Bloodhound.Common.Types: nodeOSAllocatedProcessorsLens :: Lens' NodeOSInfo Int
+ Database.Bloodhound.Common.Types: nodeOSArchLens :: Lens' NodeOSInfo Text
+ Database.Bloodhound.Common.Types: nodeOSAvailableProcessorsLens :: Lens' NodeOSInfo Int
+ Database.Bloodhound.Common.Types: nodeOSNameLens :: Lens' NodeOSInfo Text
+ Database.Bloodhound.Common.Types: nodeOSRefreshIntervalLens :: Lens' NodeOSInfo NominalDiffTime
+ Database.Bloodhound.Common.Types: nodeOSVersionLens :: Lens' NodeOSInfo Text
+ Database.Bloodhound.Common.Types: nodeProcessIdLens :: Lens' NodeProcessInfo PID
+ Database.Bloodhound.Common.Types: nodeProcessMLockAllLens :: Lens' NodeProcessInfo Bool
+ Database.Bloodhound.Common.Types: nodeProcessMaxFileDescriptorsLens :: Lens' NodeProcessInfo (Maybe Int)
+ Database.Bloodhound.Common.Types: nodeProcessRefreshIntervalLens :: Lens' NodeProcessInfo NominalDiffTime
+ Database.Bloodhound.Common.Types: nonPostingsToPairs :: Maybe NonPostings -> [Pair]
+ Database.Bloodhound.Common.Types: nsrNameLens :: Lens' NamedSuggestionResponse Text
+ Database.Bloodhound.Common.Types: nsrResponsesLens :: Lens' NamedSuggestionResponse [SuggestResponse]
+ Database.Bloodhound.Common.Types: onlyExpungeDeletesLens :: Lens' ForceMergeIndexSettings Bool
+ Database.Bloodhound.Common.Types: parseBHResponse :: (ParseBHResponse parsingContext, FromJSON a) => BHResponse parsingContext a -> Either EsProtocolException (ParsedEsResponse a)
+ Database.Bloodhound.Common.Types: parseEsResponse :: FromJSON body => BHResponse parsingContext body -> Either EsProtocolException (ParsedEsResponse body)
+ Database.Bloodhound.Common.Types: parseEsResponseWith :: (MonadThrow m, FromJSON body) => (body -> Either String parsed) -> BHResponse parsingContext body -> m parsed
+ Database.Bloodhound.Common.Types: parseFunctionScoreFunction :: Object -> Parser FunctionScoreFunction
+ Database.Bloodhound.Common.Types: parseStringInterval :: (Monad m, MonadFail m) => String -> m NominalDiffTime
+ Database.Bloodhound.Common.Types: phraseSuggesterAnalyzerLens :: Lens' PhraseSuggester (Maybe Analyzer)
+ Database.Bloodhound.Common.Types: phraseSuggesterCandidateGeneratorsLens :: Lens' PhraseSuggester [DirectGenerators]
+ Database.Bloodhound.Common.Types: phraseSuggesterCollateLens :: Lens' PhraseSuggester (Maybe PhraseSuggesterCollate)
+ Database.Bloodhound.Common.Types: phraseSuggesterCollateParamsLens :: Lens' PhraseSuggesterCollate TemplateQueryKeyValuePairs
+ Database.Bloodhound.Common.Types: phraseSuggesterCollatePruneLens :: Lens' PhraseSuggesterCollate Bool
+ Database.Bloodhound.Common.Types: phraseSuggesterCollateTemplateQueryLens :: Lens' PhraseSuggesterCollate Query
+ Database.Bloodhound.Common.Types: phraseSuggesterConfidenceLens :: Lens' PhraseSuggester (Maybe Int)
+ Database.Bloodhound.Common.Types: phraseSuggesterFieldLens :: Lens' PhraseSuggester FieldName
+ Database.Bloodhound.Common.Types: phraseSuggesterGramSizeLens :: Lens' PhraseSuggester (Maybe Int)
+ Database.Bloodhound.Common.Types: phraseSuggesterHighlightLens :: Lens' PhraseSuggester (Maybe PhraseSuggesterHighlighter)
+ Database.Bloodhound.Common.Types: phraseSuggesterHighlighterPostTagLens :: Lens' PhraseSuggesterHighlighter Text
+ Database.Bloodhound.Common.Types: phraseSuggesterHighlighterPreTagLens :: Lens' PhraseSuggesterHighlighter Text
+ Database.Bloodhound.Common.Types: phraseSuggesterMaxErrorsLens :: Lens' PhraseSuggester (Maybe Int)
+ Database.Bloodhound.Common.Types: phraseSuggesterRealWordErrorLikelihoodLens :: Lens' PhraseSuggester (Maybe Int)
+ Database.Bloodhound.Common.Types: phraseSuggesterSeparatorLens :: Lens' PhraseSuggester (Maybe Text)
+ Database.Bloodhound.Common.Types: phraseSuggesterShardSizeLens :: Lens' PhraseSuggester (Maybe Int)
+ Database.Bloodhound.Common.Types: phraseSuggesterSizeLens :: Lens' PhraseSuggester (Maybe Size)
+ Database.Bloodhound.Common.Types: pitIdLens :: Lens' (SearchResult a) (Maybe Text)
+ Database.Bloodhound.Common.Types: plainHighPairs :: Maybe PlainHighlight -> [Pair]
+ Database.Bloodhound.Common.Types: pointInTimeIdLens :: Lens' PointInTime Text
+ Database.Bloodhound.Common.Types: pointInTimeKeepAliveLens :: Lens' PointInTime Text
+ Database.Bloodhound.Common.Types: postHighPairs :: Maybe PostingsHighlight -> [Pair]
+ Database.Bloodhound.Common.Types: precisionThresholdLens :: Lens' CardinalityAggregation (Maybe Int)
+ Database.Bloodhound.Common.Types: qqIndexName :: QuasiQuoter
+ Database.Bloodhound.Common.Types: reindexConflictsLens :: Lens' ReindexRequest (Maybe ReindexConflicts)
+ Database.Bloodhound.Common.Types: reindexDestIndexLens :: Lens' ReindexDest IndexName
+ Database.Bloodhound.Common.Types: reindexDestLens :: Lens' ReindexRequest ReindexDest
+ Database.Bloodhound.Common.Types: reindexDestOpTypeLens :: Lens' ReindexDest (Maybe ReindexOpType)
+ Database.Bloodhound.Common.Types: reindexDestVersionTypeLens :: Lens' ReindexDest (Maybe VersionType)
+ Database.Bloodhound.Common.Types: reindexResponseBatchesLens :: Lens' ReindexResponse Int
+ Database.Bloodhound.Common.Types: reindexResponseCreatedLens :: Lens' ReindexResponse Int
+ Database.Bloodhound.Common.Types: reindexResponseThrottledMillisLens :: Lens' ReindexResponse Int
+ Database.Bloodhound.Common.Types: reindexResponseTookLens :: Lens' ReindexResponse (Maybe Int)
+ Database.Bloodhound.Common.Types: reindexResponseUpdatedLens :: Lens' ReindexResponse Int
+ Database.Bloodhound.Common.Types: reindexResponseVersionConflictsLens :: Lens' ReindexResponse Int
+ Database.Bloodhound.Common.Types: reindexScriptLanguageLens :: Lens' ReindexScript ScriptLanguage
+ Database.Bloodhound.Common.Types: reindexScriptLens :: Lens' ReindexRequest (Maybe ReindexScript)
+ Database.Bloodhound.Common.Types: reindexScriptSourceLens :: Lens' ReindexScript Text
+ Database.Bloodhound.Common.Types: reindexSliceIdLens :: Lens' ReindexSlice (Maybe Int)
+ Database.Bloodhound.Common.Types: reindexSliceMaxLens :: Lens' ReindexSlice (Maybe Int)
+ Database.Bloodhound.Common.Types: reindexSourceIndexLens :: Lens' ReindexSource (NonEmpty IndexName)
+ Database.Bloodhound.Common.Types: reindexSourceLens :: Lens' ReindexRequest ReindexSource
+ Database.Bloodhound.Common.Types: reindexSourceMaxDocsLens :: Lens' ReindexSource (Maybe Int)
+ Database.Bloodhound.Common.Types: reindexSourceQueryLens :: Lens' ReindexSource (Maybe Query)
+ Database.Bloodhound.Common.Types: reindexSourceSizeLens :: Lens' ReindexSource (Maybe Int)
+ Database.Bloodhound.Common.Types: reindexSourceSliceLens :: Lens' ReindexSource (Maybe ReindexSlice)
+ Database.Bloodhound.Common.Types: repoUpdateVerifyLens :: Lens' SnapshotRepoUpdateSettings Bool
+ Database.Bloodhound.Common.Types: restoreOverrideReplicasLens :: Lens' RestoreIndexSettings (Maybe ReplicaCount)
+ Database.Bloodhound.Common.Types: routingValueLens :: Lens' RoutingValue Text
+ Database.Bloodhound.Common.Types: rrPatternLens :: Lens' RestoreRenamePattern Text
+ Database.Bloodhound.Common.Types: sSummaryFixedSettingsLens :: Lens' IndexSettingsSummary IndexSettings
+ Database.Bloodhound.Common.Types: sSummaryIndexNameLens :: Lens' IndexSettingsSummary IndexName
+ Database.Bloodhound.Common.Types: sSummaryUpdateableLens :: Lens' IndexSettingsSummary [UpdatableIndexSetting]
+ Database.Bloodhound.Common.Types: scriptLanguageLens :: Lens' Script (Maybe ScriptLanguage)
+ Database.Bloodhound.Common.Types: scriptParamsLens :: Lens' Script (Maybe ScriptParams)
+ Database.Bloodhound.Common.Types: scriptSourceLens :: Lens' Script ScriptSource
+ Database.Bloodhound.Common.Types: scrollIdLens :: Lens' (SearchResult a) (Maybe ScrollId)
+ Database.Bloodhound.Common.Types: searchHitsHitsLens :: Lens' (SearchHits a) [Hit a]
+ Database.Bloodhound.Common.Types: searchHitsHitsTotalLens :: Lens' (SearchHits a) HitsTotal
+ Database.Bloodhound.Common.Types: searchHitsLens :: Lens' (SearchResult a) (SearchHits a)
+ Database.Bloodhound.Common.Types: searchHitsMaxScoreLens :: Lens' (SearchHits a) Score
+ Database.Bloodhound.Common.Types: shardTotalLens :: Lens' ShardResult Int
+ Database.Bloodhound.Common.Types: shardsFailedLens :: Lens' ShardResult Int
+ Database.Bloodhound.Common.Types: shardsLens :: Lens' (SearchResult a) ShardResult
+ Database.Bloodhound.Common.Types: shardsSkippedLens :: Lens' ShardResult Int
+ Database.Bloodhound.Common.Types: shardsSuccessfulLens :: Lens' ShardResult Int
+ Database.Bloodhound.Common.Types: shingleFillerTokenLens :: Lens' Shingle Text
+ Database.Bloodhound.Common.Types: shingleMaxSizeLens :: Lens' Shingle Int
+ Database.Bloodhound.Common.Types: shingleMinSizeLens :: Lens' Shingle Int
+ Database.Bloodhound.Common.Types: shingleOutputUnigramsIfNoShinglesLens :: Lens' Shingle Bool
+ Database.Bloodhound.Common.Types: shingleOutputUnigramsLens :: Lens' Shingle Bool
+ Database.Bloodhound.Common.Types: shingleTokenSeparatorLens :: Lens' Shingle Text
+ Database.Bloodhound.Common.Types: showDistanceUnit :: DistanceUnit -> Text
+ Database.Bloodhound.Common.Types: snapIgnoreUnavailableLens :: Lens' SnapshotCreateSettings Bool
+ Database.Bloodhound.Common.Types: snapIncludeGlobalStateLens :: Lens' SnapshotCreateSettings Bool
+ Database.Bloodhound.Common.Types: snapIndicesLens :: Lens' SnapshotCreateSettings (Maybe IndexSelection)
+ Database.Bloodhound.Common.Types: snapInfoDurationLens :: Lens' SnapshotInfo NominalDiffTime
+ Database.Bloodhound.Common.Types: snapInfoEndTimeLens :: Lens' SnapshotInfo UTCTime
+ Database.Bloodhound.Common.Types: snapInfoFailuresLens :: Lens' SnapshotInfo [SnapshotShardFailure]
+ Database.Bloodhound.Common.Types: snapInfoIndicesLens :: Lens' SnapshotInfo [IndexName]
+ Database.Bloodhound.Common.Types: snapInfoNameLens :: Lens' SnapshotInfo SnapshotName
+ Database.Bloodhound.Common.Types: snapInfoShardsLens :: Lens' SnapshotInfo ShardResult
+ Database.Bloodhound.Common.Types: snapInfoStartTimeLens :: Lens' SnapshotInfo UTCTime
+ Database.Bloodhound.Common.Types: snapInfoStateLens :: Lens' SnapshotInfo SnapshotState
+ Database.Bloodhound.Common.Types: snapPartialLens :: Lens' SnapshotCreateSettings Bool
+ Database.Bloodhound.Common.Types: snapRestoreIgnoreIndexSettingsLens :: Lens' SnapshotRestoreSettings (Maybe (NonEmpty Text))
+ Database.Bloodhound.Common.Types: snapRestoreIgnoreUnavailableLens :: Lens' SnapshotRestoreSettings Bool
+ Database.Bloodhound.Common.Types: snapRestoreIncludeAliasesLens :: Lens' SnapshotRestoreSettings Bool
+ Database.Bloodhound.Common.Types: snapRestoreIncludeGlobalStateLens :: Lens' SnapshotRestoreSettings Bool
+ Database.Bloodhound.Common.Types: snapRestoreIndexSettingsOverridesLens :: Lens' SnapshotRestoreSettings (Maybe RestoreIndexSettings)
+ Database.Bloodhound.Common.Types: snapRestoreIndicesLens :: Lens' SnapshotRestoreSettings (Maybe IndexSelection)
+ Database.Bloodhound.Common.Types: snapRestorePartialLens :: Lens' SnapshotRestoreSettings Bool
+ Database.Bloodhound.Common.Types: snapRestoreRenamePatternLens :: Lens' SnapshotRestoreSettings (Maybe RestoreRenamePattern)
+ Database.Bloodhound.Common.Types: snapRestoreRenameReplacementLens :: Lens' SnapshotRestoreSettings (Maybe (NonEmpty RestoreRenameToken))
+ Database.Bloodhound.Common.Types: snapRestoreWaitForCompletionLens :: Lens' SnapshotRestoreSettings Bool
+ Database.Bloodhound.Common.Types: snapShardFailureIndexLens :: Lens' SnapshotShardFailure IndexName
+ Database.Bloodhound.Common.Types: snapShardFailureNodeIdLens :: Lens' SnapshotShardFailure (Maybe NodeName)
+ Database.Bloodhound.Common.Types: snapShardFailureReasonLens :: Lens' SnapshotShardFailure Text
+ Database.Bloodhound.Common.Types: snapShardFailureShardIdLens :: Lens' SnapshotShardFailure ShardId
+ Database.Bloodhound.Common.Types: snapWaitForCompletionLens :: Lens' SnapshotCreateSettings Bool
+ Database.Bloodhound.Common.Types: snapshotNodeVerificationsLens :: Lens' SnapshotVerification [SnapshotNodeVerification]
+ Database.Bloodhound.Common.Types: snapshotRepoNameLens :: Lens' SnapshotRepoName Text
+ Database.Bloodhound.Common.Types: snapshotRepoTypeLens :: Lens' SnapshotRepoType Text
+ Database.Bloodhound.Common.Types: snvFullIdLens :: Lens' SnapshotNodeVerification FullNodeId
+ Database.Bloodhound.Common.Types: snvNodeNameLens :: Lens' SnapshotNodeVerification NodeName
+ Database.Bloodhound.Common.Types: sortFieldNameLens :: Lens' DefaultSort FieldName
+ Database.Bloodhound.Common.Types: sortModeLens :: Lens' DefaultSort (Maybe SortMode)
+ Database.Bloodhound.Common.Types: sortOrderLens :: Lens' DefaultSort SortOrder
+ Database.Bloodhound.Common.Types: srShardsLens :: Lens' ShardsResult ShardResult
+ Database.Bloodhound.Common.Types: srcIndexLens :: Lens' IndexAlias IndexName
+ Database.Bloodhound.Common.Types: statsFieldLens :: Lens' StatisticsAggregation FieldName
+ Database.Bloodhound.Common.Types: statsTypeLens :: Lens' StatisticsAggregation StatsType
+ Database.Bloodhound.Common.Types: statusCodeIs :: (Int, Int) -> BHResponse parsingContext body -> Bool
+ Database.Bloodhound.Common.Types: suggestLens :: Lens' (SearchResult a) (Maybe NamedSuggestionResponse)
+ Database.Bloodhound.Common.Types: suggestNameLens :: Lens' Suggest Text
+ Database.Bloodhound.Common.Types: suggestOptionsFreqLens :: Lens' SuggestOptions (Maybe Int)
+ Database.Bloodhound.Common.Types: suggestOptionsHighlightedLens :: Lens' SuggestOptions (Maybe Text)
+ Database.Bloodhound.Common.Types: suggestOptionsScoreLens :: Lens' SuggestOptions Double
+ Database.Bloodhound.Common.Types: suggestOptionsTextLens :: Lens' SuggestOptions Text
+ Database.Bloodhound.Common.Types: suggestResponseLengthLens :: Lens' SuggestResponse Int
+ Database.Bloodhound.Common.Types: suggestResponseOffsetLens :: Lens' SuggestResponse Int
+ Database.Bloodhound.Common.Types: suggestResponseOptionsLens :: Lens' SuggestResponse [SuggestOptions]
+ Database.Bloodhound.Common.Types: suggestResponseTextLens :: Lens' SuggestResponse Text
+ Database.Bloodhound.Common.Types: suggestTextLens :: Lens' Suggest Text
+ Database.Bloodhound.Common.Types: suggestTypeLens :: Lens' Suggest SuggestType
+ Database.Bloodhound.Common.Types: taFromLens :: Lens' TopHitsAggregation (Maybe From)
+ Database.Bloodhound.Common.Types: taSizeLens :: Lens' TopHitsAggregation (Maybe Size)
+ Database.Bloodhound.Common.Types: taSortLens :: Lens' TopHitsAggregation (Maybe Sort)
+ Database.Bloodhound.Common.Types: taglineLens :: Lens' Status Text
+ Database.Bloodhound.Common.Types: taskActionLens :: Lens' (Task a) Text
+ Database.Bloodhound.Common.Types: taskCancellableLens :: Lens' (Task a) Bool
+ Database.Bloodhound.Common.Types: taskDescriptionLens :: Lens' (Task a) Text
+ Database.Bloodhound.Common.Types: taskIdLens :: Lens' (Task a) Int
+ Database.Bloodhound.Common.Types: taskNodeLens :: Lens' (Task a) Text
+ Database.Bloodhound.Common.Types: taskResponseCompletedLens :: Lens' (TaskResponse a) Bool
+ Database.Bloodhound.Common.Types: taskResponseErrorLens :: Lens' (TaskResponse a) (Maybe Object)
+ Database.Bloodhound.Common.Types: taskResponseReponseLens :: Lens' (TaskResponse a) (Maybe a)
+ Database.Bloodhound.Common.Types: taskResponseTaskLens :: Lens' (TaskResponse a) (Task a)
+ Database.Bloodhound.Common.Types: taskRunningTimeInNanosLens :: Lens' (Task a) Integer
+ Database.Bloodhound.Common.Types: taskStartTimeInMillisLens :: Lens' (Task a) Integer
+ Database.Bloodhound.Common.Types: taskStatusLens :: Lens' (Task a) a
+ Database.Bloodhound.Common.Types: taskTypeLens :: Lens' (Task a) Text
+ Database.Bloodhound.Common.Types: templateMappingsLens :: Lens' IndexTemplate Value
+ Database.Bloodhound.Common.Types: templatePatternsLens :: Lens' IndexTemplate [IndexPattern]
+ Database.Bloodhound.Common.Types: templateSettingsLens :: Lens' IndexTemplate (Maybe IndexSettings)
+ Database.Bloodhound.Common.Types: termAggsLens :: Lens' TermsAggregation (Maybe Aggregations)
+ Database.Bloodhound.Common.Types: termCollectModeLens :: Lens' TermsAggregation (Maybe CollectionMode)
+ Database.Bloodhound.Common.Types: termExcludeLens :: Lens' TermsAggregation (Maybe TermInclusion)
+ Database.Bloodhound.Common.Types: termExecutionHintLens :: Lens' TermsAggregation (Maybe ExecutionHint)
+ Database.Bloodhound.Common.Types: termIncludeLens :: Lens' TermsAggregation (Maybe TermInclusion)
+ Database.Bloodhound.Common.Types: termKeyLens :: Lens' TermsResult BucketValue
+ Database.Bloodhound.Common.Types: termLens :: Lens' TermsAggregation (Either Text Text)
+ Database.Bloodhound.Common.Types: termMinDocCountLens :: Lens' TermsAggregation (Maybe Int)
+ Database.Bloodhound.Common.Types: termOrderLens :: Lens' TermsAggregation (Maybe TermOrder)
+ Database.Bloodhound.Common.Types: termShardSizeLens :: Lens' TermsAggregation (Maybe Int)
+ Database.Bloodhound.Common.Types: termSizeLens :: Lens' TermsAggregation (Maybe Int)
+ Database.Bloodhound.Common.Types: termSortFieldLens :: Lens' TermOrder Text
+ Database.Bloodhound.Common.Types: termSortOrderLens :: Lens' TermOrder SortOrder
+ Database.Bloodhound.Common.Types: termsAggsLens :: Lens' TermsResult (Maybe AggregationResults)
+ Database.Bloodhound.Common.Types: termsDocCountLens :: Lens' TermsResult Int
+ Database.Bloodhound.Common.Types: timedOutLens :: Lens' (SearchResult a) Bool
+ Database.Bloodhound.Common.Types: toAggResult :: FromJSON a => Key -> AggregationResults -> Maybe a
+ Database.Bloodhound.Common.Types: toDateHistogram :: Key -> AggregationResults -> Maybe (Bucket DateHistogramResult)
+ Database.Bloodhound.Common.Types: toGSnapshotRepo :: SnapshotRepo r => r -> GenericSnapshotRepo
+ Database.Bloodhound.Common.Types: toMissing :: Key -> AggregationResults -> Maybe MissingResult
+ Database.Bloodhound.Common.Types: toTerms :: Key -> AggregationResults -> Maybe (Bucket TermsResult)
+ Database.Bloodhound.Common.Types: toTopHits :: FromJSON a => Key -> AggregationResults -> Maybe (TopHitResult a)
+ Database.Bloodhound.Common.Types: tookLens :: Lens' (SearchResult a) Int
+ Database.Bloodhound.Common.Types: type AggregationResults = Map Key Value
+ Database.Bloodhound.Common.Types: type Aggregations = Map Key Aggregation
+ Database.Bloodhound.Common.Types: type Cache = Bool
+ Database.Bloodhound.Common.Types: type HitHighlight = Map Text [Text]
+ Database.Bloodhound.Common.Types: type ParsedEsResponse a = Either EsError a
+ Database.Bloodhound.Common.Types: type Score = Maybe Double
+ Database.Bloodhound.Common.Types: type ScriptFieldValue = Value
+ Database.Bloodhound.Common.Types: type ScriptParamValue = Value
+ Database.Bloodhound.Common.Types: type SearchAfterKey = [Value]
+ Database.Bloodhound.Common.Types: type Sort = [SortSpec]
+ Database.Bloodhound.Common.Types: type TemplateQueryValue = Text
+ Database.Bloodhound.Common.Types: type TrackSortScores = Bool
+ Database.Bloodhound.Common.Types: unIndexName :: IndexName -> Text
+ Database.Bloodhound.Common.Types: unMS :: MS -> NominalDiffTime
+ Database.Bloodhound.Common.Types: unpackId :: DocId -> Text
+ Database.Bloodhound.Common.Types: versionBuildDateLens :: Lens' Version UTCTime
+ Database.Bloodhound.Common.Types: versionBuildHashLens :: Lens' Version BuildHash
+ Database.Bloodhound.Common.Types: versionBuildSnapshotLens :: Lens' Version Bool
+ Database.Bloodhound.Common.Types: versionLens :: Lens' Status Version
+ Database.Bloodhound.Common.Types: versionLuceneVersionLens :: Lens' Version VersionNumber
+ Database.Bloodhound.Common.Types: versionNumberLens :: Lens' Version VersionNumber
+ Database.Bloodhound.Common.Types: withBHResponse :: forall a parsingContext b. (Either EsProtocolException (ParsedEsResponse a) -> BHResponse StatusDependant a -> b) -> BHRequest parsingContext a -> BHRequest StatusDependant b
+ Database.Bloodhound.Common.Types: withBHResponseParsedEsResponse :: forall a parsingContext. BHRequest parsingContext a -> BHRequest StatusDependant (ParsedEsResponse a)
+ Database.Bloodhound.Common.Types: withBHResponse_ :: forall a parsingContext b. (BHResponse StatusDependant a -> b) -> BHRequest parsingContext a -> BHRequest StatusDependant b
+ Database.Bloodhound.Common.Types: withQueries :: Endpoint -> [(Text, Maybe Text)] -> Endpoint
+ Database.Bloodhound.ElasticSearch7.Client: closePointInTime :: MonadBH m => ClosePointInTime -> m (ParsedEsResponse ClosePointInTimeResponse)
+ Database.Bloodhound.ElasticSearch7.Client: openPointInTime :: MonadBH m => IndexName -> m (ParsedEsResponse OpenPointInTimeResponse)
+ Database.Bloodhound.ElasticSearch7.Client: pitSearch :: forall a m. (FromJSON a, MonadBH m) => IndexName -> Search -> m [Hit a]
+ Database.Bloodhound.ElasticSearch7.Requests: closePointInTime :: ClosePointInTime -> BHRequest StatusDependant (ParsedEsResponse ClosePointInTimeResponse)
+ Database.Bloodhound.ElasticSearch7.Requests: openPointInTime :: IndexName -> BHRequest StatusDependant (ParsedEsResponse OpenPointInTimeResponse)
+ Database.Bloodhound.ElasticSearch7.Types: ClosePointInTime :: Text -> ClosePointInTime
+ Database.Bloodhound.ElasticSearch7.Types: ClosePointInTimeResponse :: Bool -> Int -> ClosePointInTimeResponse
+ Database.Bloodhound.ElasticSearch7.Types: OpenPointInTimeResponse :: Text -> OpenPointInTimeResponse
+ Database.Bloodhound.ElasticSearch7.Types: [cPitId] :: ClosePointInTime -> Text
+ Database.Bloodhound.ElasticSearch7.Types: [numFreed] :: ClosePointInTimeResponse -> Int
+ Database.Bloodhound.ElasticSearch7.Types: [oPitId] :: OpenPointInTimeResponse -> Text
+ Database.Bloodhound.ElasticSearch7.Types: [succeeded] :: ClosePointInTimeResponse -> Bool
+ Database.Bloodhound.ElasticSearch7.Types: cPitIdLens :: Lens' ClosePointInTime Text
+ Database.Bloodhound.ElasticSearch7.Types: data ClosePointInTime
+ Database.Bloodhound.ElasticSearch7.Types: data ClosePointInTimeResponse
+ Database.Bloodhound.ElasticSearch7.Types: data OpenPointInTimeResponse
+ Database.Bloodhound.ElasticSearch7.Types: numFreedLens :: Lens' ClosePointInTimeResponse Int
+ Database.Bloodhound.ElasticSearch7.Types: oPitIdLens :: Lens' OpenPointInTimeResponse Text
+ Database.Bloodhound.ElasticSearch7.Types: succeededLens :: Lens' ClosePointInTimeResponse Bool
+ Database.Bloodhound.OpenSearch2.Client: closePointInTime :: MonadBH m => ClosePointInTime -> m (ParsedEsResponse ClosePointInTimeResponse)
+ Database.Bloodhound.OpenSearch2.Client: openPointInTime :: MonadBH m => IndexName -> m (ParsedEsResponse OpenPointInTimeResponse)
+ Database.Bloodhound.OpenSearch2.Client: pitSearch :: forall a m. (FromJSON a, MonadBH m) => IndexName -> Search -> m [Hit a]
+ Database.Bloodhound.OpenSearch2.Requests: closePointInTime :: ClosePointInTime -> BHRequest StatusDependant (ParsedEsResponse ClosePointInTimeResponse)
+ Database.Bloodhound.OpenSearch2.Requests: openPointInTime :: IndexName -> BHRequest StatusDependant (ParsedEsResponse OpenPointInTimeResponse)
+ Database.Bloodhound.OpenSearch2.Types: ClosePointInTime :: Text -> ClosePointInTime
+ Database.Bloodhound.OpenSearch2.Types: ClosePointInTimeResponse :: Bool -> Int -> ClosePointInTimeResponse
+ Database.Bloodhound.OpenSearch2.Types: OpenPointInTimeResponse :: Text -> ShardResult -> POSIXTime -> OpenPointInTimeResponse
+ Database.Bloodhound.OpenSearch2.Types: [cPitId] :: ClosePointInTime -> Text
+ Database.Bloodhound.OpenSearch2.Types: [numFreed] :: ClosePointInTimeResponse -> Int
+ Database.Bloodhound.OpenSearch2.Types: [oos2CreationTime] :: OpenPointInTimeResponse -> POSIXTime
+ Database.Bloodhound.OpenSearch2.Types: [oos2PitId] :: OpenPointInTimeResponse -> Text
+ Database.Bloodhound.OpenSearch2.Types: [oos2Shards] :: OpenPointInTimeResponse -> ShardResult
+ Database.Bloodhound.OpenSearch2.Types: [succeeded] :: ClosePointInTimeResponse -> Bool
+ Database.Bloodhound.OpenSearch2.Types: cPitIdLens :: Lens' ClosePointInTime Text
+ Database.Bloodhound.OpenSearch2.Types: data ClosePointInTime
+ Database.Bloodhound.OpenSearch2.Types: data ClosePointInTimeResponse
+ Database.Bloodhound.OpenSearch2.Types: data OpenPointInTimeResponse
+ Database.Bloodhound.OpenSearch2.Types: numFreedLens :: Lens' ClosePointInTimeResponse Int
+ Database.Bloodhound.OpenSearch2.Types: oos2CreationTimeLens :: Lens' OpenPointInTimeResponse POSIXTime
+ Database.Bloodhound.OpenSearch2.Types: oos2PitIdLens :: Lens' OpenPointInTimeResponse Text
+ Database.Bloodhound.OpenSearch2.Types: oos2ShardsLens :: Lens' OpenPointInTimeResponse ShardResult
+ Database.Bloodhound.OpenSearch2.Types: succeededLens :: Lens' ClosePointInTimeResponse Bool
Files
- bloodhound.cabal +143/−69
- changelog.md +43/−0
- src/Bloodhound/Import.hs +0/−102
- src/Database/Bloodhound/Client.hs +7/−1513
- src/Database/Bloodhound/Client/Cluster.hs +133/−0
- src/Database/Bloodhound/Common/Client.hs +690/−0
- src/Database/Bloodhound/Common/Requests.hs +1320/−0
- src/Database/Bloodhound/Common/Script.hs +0/−248
- src/Database/Bloodhound/Common/Types.hs +35/−0
- src/Database/Bloodhound/ElasticSearch7/Client.hs +90/−0
- src/Database/Bloodhound/ElasticSearch7/Requests.hs +39/−0
- src/Database/Bloodhound/ElasticSearch7/Types.hs +7/−0
- src/Database/Bloodhound/Internal/Aggregation.hs +0/−578
- src/Database/Bloodhound/Internal/Analysis.hs +0/−481
- src/Database/Bloodhound/Internal/Client.hs +0/−2486
- src/Database/Bloodhound/Internal/Client/BHRequest.hs +172/−42
- src/Database/Bloodhound/Internal/Client/Doc.hs +2/−5
- src/Database/Bloodhound/Internal/Count.hs +0/−46
- src/Database/Bloodhound/Internal/Highlight.hs +0/−183
- src/Database/Bloodhound/Internal/Newtypes.hs +0/−278
- src/Database/Bloodhound/Internal/PointInTime.hs +0/−69
- src/Database/Bloodhound/Internal/Query.hs +0/−2030
- src/Database/Bloodhound/Internal/Sort.hs +0/−119
- src/Database/Bloodhound/Internal/StringlyTyped.hs +0/−49
- src/Database/Bloodhound/Internal/Suggest.hs +0/−310
- src/Database/Bloodhound/Internal/Utils/Imports.hs +122/−0
- src/Database/Bloodhound/Internal/Utils/Requests.hs +46/−0
- src/Database/Bloodhound/Internal/Utils/StringlyTyped.hs +49/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Aggregation.hs +760/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Analysis.hs +536/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Bulk.hs +186/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Count.hs +77/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Highlight.hs +182/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Indices.hs +913/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Newtypes.hs +409/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Nodes.hs +1545/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/PointInTime.hs +29/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Query.hs +935/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Query/CommonTerms.hs +101/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Query/Commons.hs +64/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Query/Fuzzy.hs +157/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Query/Match.hs +204/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Query/MoreLikeThis.hs +84/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Query/MoreLikeThisField.hs +83/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Query/Prefix.hs +35/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Query/QueryString.hs +121/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Query/Range.hs +198/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Query/Regexp.hs +96/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Query/SimpleQueryString.hs +116/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Query/Wildcard.hs +40/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Reindex.hs +297/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Script.hs +255/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Search.hs +363/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Snapshots.hs +630/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Sort.hs +135/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Suggest.hs +431/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Task.hs +95/−0
- src/Database/Bloodhound/Internal/Versions/Common/Types/Units.hs +100/−0
- src/Database/Bloodhound/Internal/Versions/ElasticSearch7/Types/PointInTime.hs +64/−0
- src/Database/Bloodhound/Internal/Versions/OpenSearch2/Types/PointInTime.hs +77/−0
- src/Database/Bloodhound/OpenSearch1/Client.hs +6/−0
- src/Database/Bloodhound/OpenSearch1/Requests.hs +6/−0
- src/Database/Bloodhound/OpenSearch1/Types.hs +6/−0
- src/Database/Bloodhound/OpenSearch2/Client.hs +91/−0
- src/Database/Bloodhound/OpenSearch2/Requests.hs +40/−0
- src/Database/Bloodhound/OpenSearch2/Types.hs +7/−0
- src/Database/Bloodhound/Requests.hs +6/−0
- src/Database/Bloodhound/Types.hs +2/−703
- src/X.hs +0/−90
- tests/Doctests.hs +6/−0
- tests/Spec.hs +1/−0
- tests/Test/Aggregation.hs +0/−165
- tests/Test/AggregationSpec.hs +164/−0
- tests/Test/ApproxEq.hs +0/−75
- tests/Test/BulkAPI.hs +0/−194
- tests/Test/BulkAPISpec.hs +188/−0
- tests/Test/Common.hs +0/−307
- tests/Test/Count.hs +0/−17
- tests/Test/CountSpec.hs +17/−0
- tests/Test/Documents.hs +0/−67
- tests/Test/DocumentsSpec.hs +81/−0
- tests/Test/Generators.hs +0/−597
- tests/Test/Highlights.hs +0/−33
- tests/Test/HighlightsSpec.hs +33/−0
- tests/Test/Import.hs +0/−57
- tests/Test/Indices.hs +0/−190
- tests/Test/IndicesSpec.hs +184/−0
- tests/Test/JSON.hs +0/−247
- tests/Test/JSONSpec.hs +202/−0
- tests/Test/NodesSpec.hs +27/−0
- tests/Test/PointInTimeSpec.hs +98/−0
- tests/Test/Query.hs +0/−176
- tests/Test/QuerySpec.hs +174/−0
- tests/Test/ReindexSpec.hs +49/−0
- tests/Test/ScanScrollSpec.hs +27/−0
- tests/Test/Script.hs +0/−37
- tests/Test/ScriptSpec.hs +33/−0
- tests/Test/SearchAfterSpec.hs +43/−0
- tests/Test/Snapshots.hs +0/−215
- tests/Test/SnapshotsSpec.hs +207/−0
- tests/Test/Sorting.hs +0/−37
- tests/Test/SortingSpec.hs +37/−0
- tests/Test/SourceFiltering.hs +0/−43
- tests/Test/SourceFilteringSpec.hs +43/−0
- tests/Test/Suggest.hs +0/−24
- tests/Test/SuggestSpec.hs +21/−0
- tests/Test/Templates.hs +0/−30
- tests/Test/TemplatesSpec.hs +30/−0
- tests/Test/TypesSpec.hs +61/−0
- tests/TestsUtils/ApproxEq.hs +75/−0
- tests/TestsUtils/Common.hs +323/−0
- tests/TestsUtils/Generators.hs +625/−0
- tests/TestsUtils/Import.hs +56/−0
- tests/tests.hs +0/−196
bloodhound.cabal view
@@ -1,11 +1,7 @@-cabal-version: 1.12---- This file has been generated from package.yaml by hpack version 0.36.1.------ see: https://github.com/sol/hpack+cabal-version: 3.4 name: bloodhound-version: 0.22.0.0+version: 0.23.0.0 synopsis: Elasticsearch client library for Haskell description: Elasticsearch made awesome for Haskell hackers category: Database, Search@@ -14,14 +10,15 @@ author: Chris Allen maintainer: gautier.difolco@gmail.com copyright: 2018 Chris Allen-license: BSD3+license: BSD-3-Clause license-file: LICENSE build-type: Simple-extra-source-files:+extra-doc-files: README.md changelog.md- tests/tests.hs+tested-with: GHC==9.6.2, GHC==9.4.5, GHC==9.2.7, GHC==9.0.2, GHC==8.10.7 + source-repository head type: git location: https://github.com/bitemyapp/bloodhound.git@@ -30,72 +27,124 @@ exposed-modules: Database.Bloodhound Database.Bloodhound.Client+ Database.Bloodhound.Client.Cluster+ Database.Bloodhound.Requests Database.Bloodhound.Types- Database.Bloodhound.Internal.Aggregation- Database.Bloodhound.Internal.Analysis- Database.Bloodhound.Internal.Client- Database.Bloodhound.Internal.Highlight- Database.Bloodhound.Internal.Newtypes- Database.Bloodhound.Internal.Query- Database.Bloodhound.Internal.Sort- Database.Bloodhound.Internal.StringlyTyped- Database.Bloodhound.Internal.Suggest+ Database.Bloodhound.Common.Client+ Database.Bloodhound.Common.Requests+ Database.Bloodhound.Common.Types+ Database.Bloodhound.ElasticSearch7.Client+ Database.Bloodhound.ElasticSearch7.Requests+ Database.Bloodhound.ElasticSearch7.Types+ Database.Bloodhound.OpenSearch1.Client+ Database.Bloodhound.OpenSearch1.Requests+ Database.Bloodhound.OpenSearch1.Types+ Database.Bloodhound.OpenSearch2.Client+ Database.Bloodhound.OpenSearch2.Requests+ Database.Bloodhound.OpenSearch2.Types other-modules:- Bloodhound.Import- Database.Bloodhound.Common.Script Database.Bloodhound.Internal.Client.BHRequest Database.Bloodhound.Internal.Client.Doc- Database.Bloodhound.Internal.Count- Database.Bloodhound.Internal.PointInTime- X+ Database.Bloodhound.Internal.Utils.Requests+ Database.Bloodhound.Internal.Utils.Imports+ Database.Bloodhound.Internal.Utils.StringlyTyped+ Database.Bloodhound.Internal.Versions.Common.Types.Aggregation+ Database.Bloodhound.Internal.Versions.Common.Types.Analysis+ Database.Bloodhound.Internal.Versions.Common.Types.Bulk+ Database.Bloodhound.Internal.Versions.Common.Types.Count+ Database.Bloodhound.Internal.Versions.Common.Types.Highlight+ Database.Bloodhound.Internal.Versions.Common.Types.Indices+ Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+ Database.Bloodhound.Internal.Versions.Common.Types.Nodes+ Database.Bloodhound.Internal.Versions.Common.Types.PointInTime+ Database.Bloodhound.Internal.Versions.Common.Types.Query+ Database.Bloodhound.Internal.Versions.Common.Types.Query.CommonTerms+ Database.Bloodhound.Internal.Versions.Common.Types.Query.Commons+ Database.Bloodhound.Internal.Versions.Common.Types.Query.Fuzzy+ Database.Bloodhound.Internal.Versions.Common.Types.Query.Match+ Database.Bloodhound.Internal.Versions.Common.Types.Query.MoreLikeThis+ Database.Bloodhound.Internal.Versions.Common.Types.Query.MoreLikeThisField+ Database.Bloodhound.Internal.Versions.Common.Types.Query.Prefix+ Database.Bloodhound.Internal.Versions.Common.Types.Query.QueryString+ Database.Bloodhound.Internal.Versions.Common.Types.Query.Range+ Database.Bloodhound.Internal.Versions.Common.Types.Query.Regexp+ Database.Bloodhound.Internal.Versions.Common.Types.Query.SimpleQueryString+ Database.Bloodhound.Internal.Versions.Common.Types.Query.Wildcard+ Database.Bloodhound.Internal.Versions.Common.Types.Reindex+ Database.Bloodhound.Internal.Versions.Common.Types.Script+ Database.Bloodhound.Internal.Versions.Common.Types.Search+ Database.Bloodhound.Internal.Versions.Common.Types.Snapshots+ Database.Bloodhound.Internal.Versions.Common.Types.Sort+ Database.Bloodhound.Internal.Versions.Common.Types.Suggest+ Database.Bloodhound.Internal.Versions.Common.Types.Task+ Database.Bloodhound.Internal.Versions.Common.Types.Units+ Database.Bloodhound.Internal.Versions.ElasticSearch7.Types.PointInTime+ Database.Bloodhound.Internal.Versions.OpenSearch2.Types.PointInTime Paths_bloodhound+ autogen-modules:+ Paths_bloodhound hs-source-dirs: src ghc-options: -Wall build-depends:- aeson >=2.0+ aeson >=2.0 && <3 , base >=4.14 && <5- , blaze-builder- , bytestring >=0.10.0- , containers >=0.5.0.0- , exceptions- , hashable- , http-client >=0.4.30- , http-types >=0.8- , mtl >=1.0- , network-uri >=2.6- , scientific >=0.3.0.0- , semigroups >=0.15- , semver- , text >=0.11- , time >=1.4- , transformers >=0.2- , unordered-containers- , vector >=0.10.9+ , blaze-builder >= 0.1 && <1+ , bytestring >=0.10.0 && <1+ , containers >=0.5.0.0 && <1+ , exceptions >=0.1 && <1+ , hashable >=1 && <2+ , http-client >=0.4.30 && <1+ , http-types >=0.8 && <1+ , mtl >=1.0 && <3+ , network-uri >=2.6 && <3+ , optics-core >=0.4 && <0.5+ , scientific >=0.3.0.0 && <1+ , template-haskell >=2.10 && <3+ , text >=0.11 && <3+ , time >=1.4 && <2+ , unordered-containers >=0.1 && <1+ , vector >=0.10.9 && <1+ , versions >= 5.0.2 && <7 default-language: Haskell2010+ default-extensions:+ DataKinds+ DeriveAnyClass+ DeriveGeneric+ DerivingStrategies+ DerivingVia+ GeneralizedNewtypeDeriving+ KindSignatures+ TypeApplications test-suite bloodhound-tests type: exitcode-stdio-1.0- main-is: tests.hs+ main-is: Spec.hs other-modules:- Test.Aggregation- Test.ApproxEq- Test.BulkAPI- Test.Common- Test.Count- Test.Documents- Test.Generators- Test.Highlights- Test.Import- Test.Indices- Test.JSON- Test.Query- Test.Script- Test.Snapshots- Test.Sorting- Test.SourceFiltering- Test.Suggest- Test.Templates+ Test.AggregationSpec+ Test.BulkAPISpec+ Test.CountSpec+ Test.DocumentsSpec+ Test.HighlightsSpec+ Test.IndicesSpec+ Test.JSONSpec+ Test.NodesSpec+ Test.PointInTimeSpec+ Test.QuerySpec+ Test.ReindexSpec+ Test.ScanScrollSpec+ Test.ScriptSpec+ Test.SearchAfterSpec+ Test.SnapshotsSpec+ Test.SortingSpec+ Test.SourceFilteringSpec+ Test.SuggestSpec+ Test.TemplatesSpec+ Test.TypesSpec+ TestsUtils.ApproxEq+ TestsUtils.Common+ TestsUtils.Generators+ TestsUtils.Import Paths_bloodhound hs-source-dirs: tests@@ -103,32 +152,57 @@ build-depends: QuickCheck , aeson >=2.0+ , aeson-optics , base- , blaze-builder , bloodhound , bytestring >=0.10.0 , containers >=0.5.0.0 , errors , exceptions , generic-random- , hashable , hspec >=1.8+ , hspec-discover , http-client >=0.4.30 , http-types >=0.8 , microlens- , microlens-aeson >=2.4 , mtl >=1.0- , network-uri >=2.6+ , optics , pretty-simple , quickcheck-properties- , scientific >=0.3.0.0- , semigroups >=0.15- , semver , temporary , text >=0.11 , time >=1.4- , transformers >=0.2 , unix-compat- , unordered-containers , vector >=0.10.9+ , versions >= 5.0.2 default-language: Haskell2010+ default-extensions:+ DataKinds+ DefaultSignatures+ DeriveAnyClass+ DeriveGeneric+ DerivingStrategies+ DerivingVia+ DuplicateRecordFields+ GeneralizedNewtypeDeriving+ KindSignatures+ LambdaCase+ OverloadedStrings+ RankNTypes+ RecordWildCards+ ScopedTypeVariables+ TypeApplications+ TypeFamilies+ TypeOperators++test-suite doctests+ type: exitcode-stdio-1.0+ hs-source-dirs: tests+ main-is: Doctests.hs+ ghc-options: -threaded+ build-depends: + aeson+ , base+ , bloodhound+ , doctest >= 0.8+ , text
changelog.md view
@@ -1,3 +1,46 @@+0.23.0.0+========+- @blackheaven+ - Rework `MonadBH` to be function oriented (instead of implementation oriented)+ - `Client`: parsing is done directly+ - Create and expose `Database.Bloodhound.Requests` for low-level operations+ - Fix payload parsing issues and types there and there+ - Import @wireapp fork+ - Support OpenSearch 1.3.12 / 2.9.0+ - Use `versions` instead of `semver` (`VersionNumber` wraps `Data.Versions.Version`)+ - Drop `VMVersion` in favor of `VersionNumber`+ - `EsError.errorStatus` became a `Maybe` and is deprecated+ - `EsResult._type` is deprecated+ - `IndexedDocumentidxDocType` is optional and deprecated+ - Module reorganization (avoid exposing `Internal` and split ElasticSearch/OpenSearch)+ - Rename `ResultsShard`'s shards to `srShards`+ - Upgrade to `Cabal` `3.0`+ - Add `optics` definitions++```+# Migration script+fd --type file -x sed -i -e 's/Database.Bloodhound.Internal.Client/Database.Bloodhound.Client.Cluster/g' {}+fd --type file -x sed -i -e 's/Database.Bloodhound.Internal.Aggregation/Database.Bloodhound.Types/g' {}+fd --type file -x sed -i -e 's/Database.Bloodhound.Internal.Analysis/Database.Bloodhound.Types/g' {}+fd --type file -x sed -i -e 's/Database.Bloodhound.Internal.Highlight/Database.Bloodhound.Types/g' {}+fd --type file -x sed -i -e 's/Database.Bloodhound.Internal.Newtypes/Database.Bloodhound.Types/g' {}+fd --type file -x sed -i -e 's/Database.Bloodhound.Internal.Query/Database.Bloodhound.Types/g' {}+fd --type file -x sed -i -e 's/Database.Bloodhound.Internal.Reindex/Database.Bloodhound.Types/g' {}+fd --type file -x sed -i -e 's/Database.Bloodhound.Internal.Sort/Database.Bloodhound.Types/g' {}+fd --type file -x sed -i -e '/Database.Bloodhound.Internal.StringlyTyped/g' {}+fd --type file -x sed -i -e 's/Database.Bloodhound.Internal.Suggest/Database.Bloodhound.Types/g' {}+fd --type file -x sed -i -e 's/Database.Bloodhound.Internal.Task/Database.Bloodhound.Types/g' {}+```++- @wireapp+ - Implement updateByQuery+ - Implement reindexing/tasks+ - Add support for ngram and edge_ngram filters+ - Add support for edge_ngram tokenizer+ - Fix `CountShared` support ES 5.2+- @robinp+ - Add proper `BulkResponse` to `bulk` (#293)+ 0.22.0.0 ======== - @blackheaven
− src/Bloodhound/Import.hs
@@ -1,102 +0,0 @@-module Bloodhound.Import- ( module X,- LByteString,- Method,- omitNulls,- parseNEJSON,- parseReadText,- readMay,- showText,- deleteSeveral,- oPath,- tshow,- )-where--import Control.Applicative as X (Alternative (..), optional)-import Control.Exception as X (Exception)-import Control.Monad as X (MonadPlus (..), forM, (<=<))-import Control.Monad.Catch as X- ( MonadCatch,- MonadMask,- MonadThrow,- )-import Control.Monad.Except as X (MonadError)-import Control.Monad.Fix as X (MonadFix)-import Control.Monad.IO.Class as X (MonadIO (..))-import Control.Monad.Reader as X- ( MonadReader (..),- MonadTrans (..),- ReaderT (..),- )-import Control.Monad.State as X (MonadState)-import Control.Monad.Writer as X (MonadWriter)-import Data.Aeson as X-import Data.Aeson.Key as X-import qualified Data.Aeson.KeyMap as X-import Data.Aeson.Types as X- ( Pair,- Parser,- emptyObject,- parseEither,- parseMaybe,- typeMismatch,- )-import Data.Bifunctor as X (first)-import qualified Data.ByteString.Lazy as BL-import Data.Char as X (isNumber)-import Data.Hashable as X (Hashable)-import Data.List as X (foldl', intercalate, nub)-import Data.List.NonEmpty as X (NonEmpty (..), toList)-import Data.Maybe as X- ( catMaybes,- fromMaybe,- isNothing,- maybeToList,- )-import Data.Scientific as X (Scientific)-import Data.Semigroup as X (Semigroup (..))-import Data.Text as X (Text)-import qualified Data.Text as T-import Data.Time.Calendar as X (Day (..), showGregorian)-import Data.Time.Clock as X (NominalDiffTime, UTCTime)-import Data.Time.Clock.POSIX as X-import qualified Data.Traversable as DT-import qualified Data.Vector as V-import qualified Network.HTTP.Types.Method as NHTM--type LByteString = BL.ByteString--type Method = NHTM.Method--readMay :: Read a => String -> Maybe a-readMay s = case reads s of- (a, "") : _ -> Just a- _ -> Nothing--parseReadText :: Read a => Text -> Parser a-parseReadText = maybe mzero return . readMay . T.unpack--showText :: Show a => a -> Text-showText = T.pack . show--omitNulls :: [(Key, Value)] -> Value-omitNulls = object . filter notNull- where- notNull (_, Null) = False- notNull (_, Array a) = (not . V.null) a- notNull _ = True--parseNEJSON :: (FromJSON a) => [Value] -> Parser (NonEmpty a)-parseNEJSON [] = fail "Expected non-empty list"-parseNEJSON (x : xs) = DT.mapM parseJSON (x :| xs)--deleteSeveral :: [Key] -> X.KeyMap v -> X.KeyMap v-deleteSeveral ks km = foldr X.delete km ks--oPath :: ToJSON a => NonEmpty Key -> a -> Value-oPath (k :| []) v = object [k .= v]-oPath (k :| (h : t)) v = object [k .= oPath (h :| t) v]--tshow :: Show a => a -> Text-tshow = T.pack . show
src/Database/Bloodhound/Client.hs view
@@ -1,1513 +1,7 @@-{-# LANGUAGE DerivingStrategies #-}-{-# LANGUAGE OverloadedLists #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TupleSections #-}---- |--- Module : Database.Bloodhound.Client--- Copyright : (C) 2014, 2018 Chris Allen--- License : BSD-style (see the file LICENSE)--- Maintainer : Chris Allen <cma@bitemyapp.com>--- Stability : provisional--- Portability : GHC------ Client side functions for talking to Elasticsearch servers.-module Database.Bloodhound.Client- ( -- * Bloodhound client functions-- -- | The examples in this module assume the following code has been run.- -- The :{ and :} will only work in GHCi. You'll only need the data types- -- and typeclass instances for the functions that make use of them.- -- $setup- withBH,-- -- ** Indices- createIndex,- createIndexWith,- flushIndex,- deleteIndex,- updateIndexSettings,- getIndexSettings,- forceMergeIndex,- indexExists,- openIndex,- closeIndex,- listIndices,- catIndices,- waitForYellowIndex,- HealthStatus (..),-- -- *** Index Aliases- updateIndexAliases,- getIndexAliases,- deleteIndexAlias,-- -- *** Index Templates- putTemplate,- templateExists,- deleteTemplate,-- -- ** Mapping- putMapping,-- -- ** Documents- indexDocument,- updateDocument,- getDocument,- documentExists,- deleteDocument,- deleteByQuery,- IndexedDocument (..),- DeletedDocuments (..),- DeletedDocumentsRetries (..),-- -- ** Searching- searchAll,- searchByIndex,- searchByIndices,- searchByIndexTemplate,- searchByIndicesTemplate,- scanSearch,- getInitialScroll,- getInitialSortedScroll,- advanceScroll,- pitSearch,- openPointInTime,- closePointInTime,- refreshIndex,- mkSearch,- mkAggregateSearch,- mkHighlightSearch,- mkSearchTemplate,- bulk,- pageSearch,- mkShardCount,- mkReplicaCount,- getStatus,-- -- ** Templates- storeSearchTemplate,- getSearchTemplate,- deleteSearchTemplate,-- -- ** Snapshot/Restore-- -- *** Snapshot Repos- getSnapshotRepos,- updateSnapshotRepo,- verifySnapshotRepo,- deleteSnapshotRepo,-- -- *** Snapshots- createSnapshot,- getSnapshots,- deleteSnapshot,-- -- *** Restoring Snapshots- restoreSnapshot,-- -- ** Nodes- getNodesInfo,- getNodesStats,-- -- ** Request Utilities- encodeBulkOperations,- encodeBulkOperation,-- -- * Authentication- basicAuthHook,-- -- * BHResponse-handling tools- isVersionConflict,- isSuccess,- isCreated,- parseEsResponse,- parseEsResponseWith,- decodeResponse,- eitherDecodeResponse,-- -- * Count- countByIndex,-- -- * Generic- Acknowledged (..),- Accepted (..),- )-where--import Control.Applicative as A-import Control.Monad-import Control.Monad.Catch-import Control.Monad.IO.Class-import Data.Aeson-import Data.Aeson.Key-import qualified Data.Aeson.KeyMap as X-import Data.ByteString.Builder-import qualified Data.ByteString.Lazy.Char8 as L-import Data.Foldable (toList)-import qualified Data.List as LS (foldl')-import Data.List.NonEmpty (NonEmpty (..))-import Data.Maybe (catMaybes, fromMaybe)-import Data.Monoid-import Data.Text (Text)-import qualified Data.Text as T-import qualified Data.Text.Encoding as T-import Data.Time.Clock-import qualified Data.Vector as V-import Database.Bloodhound.Internal.Client.BHRequest-import Database.Bloodhound.Types-import Network.HTTP.Client-import qualified Network.HTTP.Types.Method as NHTM-import qualified Network.URI as URI-import Prelude hiding (filter, head)---- $setup--- >>> :set -XOverloadedStrings--- >>> :set -XDeriveGeneric--- >>> import Database.Bloodhound--- >>> import Network.HTTP.Client--- >>> let testServer = (Server "http://localhost:9200")--- >>> let runBH' = withBH defaultManagerSettings testServer--- >>> let testIndex = IndexName "twitter"--- >>> let defaultIndexSettings = IndexSettings (ShardCount 1) (ReplicaCount 0)--- >>> data TweetMapping = TweetMapping deriving (Eq, Show)--- >>> _ <- runBH' $ deleteIndex testIndex--- >>> _ <- runBH' $ deleteIndex (IndexName "didimakeanindex")--- >>> import GHC.Generics--- >>> import Data.Time.Calendar (Day (..))--- >>> import Data.Time.Clock (UTCTime (..), secondsToDiffTime)--- >>> :{--- instance ToJSON TweetMapping where--- toJSON TweetMapping =--- object ["properties" .=--- object ["location" .=--- object ["type" .= ("geo_point" :: Text)]]]--- data Location = Location { lat :: Double--- , lon :: Double } deriving (Eq, Generic, Show)--- data Tweet = Tweet { user :: Text--- , postDate :: UTCTime--- , message :: Text--- , age :: Int--- , location :: Location } deriving (Eq, Generic, Show)--- exampleTweet = Tweet { user = "bitemyapp"--- , postDate = UTCTime--- (ModifiedJulianDay 55000)--- (secondsToDiffTime 10)--- , message = "Use haskell!"--- , age = 10000--- , location = Location 40.12 (-71.34) }--- instance ToJSON Tweet where--- toJSON = genericToJSON defaultOptions--- instance FromJSON Tweet where--- parseJSON = genericParseJSON defaultOptions--- instance ToJSON Location where--- toJSON = genericToJSON defaultOptions--- instance FromJSON Location where--- parseJSON = genericParseJSON defaultOptions--- data BulkTest = BulkTest { name :: Text } deriving (Eq, Generic, Show)--- instance FromJSON BulkTest where--- parseJSON = genericParseJSON defaultOptions--- instance ToJSON BulkTest where--- toJSON = genericToJSON defaultOptions--- :}---- | 'mkShardCount' is a straight-forward smart constructor for 'ShardCount'--- which rejects 'Int' values below 1 and above 1000.------ >>> mkShardCount 10--- Just (ShardCount 10)-mkShardCount :: Int -> Maybe ShardCount-mkShardCount n- | n < 1 = Nothing- | n > 1000 = Nothing- | otherwise = Just (ShardCount n)---- | 'mkReplicaCount' is a straight-forward smart constructor for 'ReplicaCount'--- which rejects 'Int' values below 0 and above 1000.------ >>> mkReplicaCount 10--- Just (ReplicaCount 10)-mkReplicaCount :: Int -> Maybe ReplicaCount-mkReplicaCount n- | n < 0 = Nothing- | n > 1000 = Nothing -- ...- | otherwise = Just (ReplicaCount n)--emptyBody :: L.ByteString-emptyBody = L.pack ""--dispatch ::- MonadBH m =>- BHRequest body ->- m (BHResponse body)-dispatch request = do- env <- getBHEnv- let url = getEndpoint (bhServer env) (bhRequestEndpoint request)- initReq <- liftIO $ parseUrl' url- let reqHook = bhRequestHook env- let reqBody = RequestBodyLBS $ fromMaybe emptyBody $ bhRequestBody request- req <-- liftIO $- reqHook $- setRequestIgnoreStatus $- initReq- { method = bhRequestMethod request,- requestHeaders =- -- "application/x-ndjson" for bulk- ("Content-Type", "application/json") : requestHeaders initReq,- requestBody = reqBody- }- -- req <- liftIO $ reqHook $ setRequestIgnoreStatus $ initReq { method = dMethod- -- , requestBody = reqBody }- let mgr = bhManager env- BHResponse <$> liftIO (httpLbs req mgr)---- | Convenience function that sets up a manager and BHEnv and runs--- the given set of bloodhound operations. Connections will be--- pipelined automatically in accordance with the given manager--- settings in IO. If you've got your own monad transformer stack, you--- should use 'runBH' directly.-withBH :: ManagerSettings -> Server -> BH IO a -> IO a-withBH ms s f = do- mgr <- newManager ms- let env = mkBHEnv s mgr- runBH env f---- Shortcut functions for HTTP methods-delete :: MonadBH m => Endpoint -> m (BHResponse body)-delete = dispatch . mkSimpleRequest NHTM.methodDelete--deleteWithBody :: MonadBH m => Endpoint -> L.ByteString -> m (BHResponse body)-deleteWithBody endpoint = dispatch . mkFullRequest NHTM.methodDelete endpoint--get :: MonadBH m => Endpoint -> m (BHResponse body)-get = dispatch . mkSimpleRequest NHTM.methodGet--head :: MonadBH m => Endpoint -> m (BHResponse body)-head = dispatch . mkSimpleRequest NHTM.methodHead--put :: MonadBH m => Endpoint -> L.ByteString -> m (BHResponse body)-put endpoint = dispatch . mkFullRequest NHTM.methodPut endpoint--post :: MonadBH m => Endpoint -> L.ByteString -> m (BHResponse body)-post endpoint = dispatch . mkFullRequest NHTM.methodPost endpoint---- | 'getStatus' fetches the 'Status' of a 'Server'------ >>> serverStatus <- runBH' getStatus--- >>> fmap tagline (serverStatus)--- Just "You Know, for Search"-getStatus :: MonadBH m => m (Either String Status)-getStatus =- eitherDecodeResponse <$> get []---- | 'getSnapshotRepos' gets the definitions of a subset of the--- defined snapshot repos.-getSnapshotRepos ::- ( MonadBH m,- MonadThrow m- ) =>- SnapshotRepoSelection ->- m (ParsedEsResponse [GenericSnapshotRepo])-getSnapshotRepos sel =- fmap (fmap unGSRs) . parseEsResponse =<< get ["_snapshot", selectorSeg]- where- selectorSeg = case sel of- AllSnapshotRepos -> "_all"- SnapshotRepoList (p :| ps) -> T.intercalate "," (renderPat <$> (p : ps))- renderPat (RepoPattern t) = t- renderPat (ExactRepo (SnapshotRepoName t)) = t---- | Wrapper to extract the list of 'GenericSnapshotRepo' in the--- format they're returned in-newtype GSRs = GSRs {unGSRs :: [GenericSnapshotRepo]}--instance FromJSON GSRs where- parseJSON = withObject "Collection of GenericSnapshotRepo" parse- where- parse = fmap GSRs . mapM (uncurry go) . X.toList- go rawName = withObject "GenericSnapshotRepo" $ \o ->- GenericSnapshotRepo (SnapshotRepoName $ toText rawName)- <$> o .: "type"- <*> o .: "settings"---- | Create or update a snapshot repo-updateSnapshotRepo ::- ( MonadBH m,- SnapshotRepo repo- ) =>- -- | Use 'defaultSnapshotRepoUpdateSettings' if unsure- SnapshotRepoUpdateSettings ->- repo ->- m (BHResponse Acknowledged)-updateSnapshotRepo SnapshotRepoUpdateSettings {..} repo =- put endpoint (encode body)- where- endpoint = ["_snapshot", snapshotRepoName gSnapshotRepoName] `withQueries` params- params- | repoUpdateVerify = []- | otherwise = [("verify", Just "false")]- body =- object- [ "type" .= gSnapshotRepoType,- "settings" .= gSnapshotRepoSettings- ]- GenericSnapshotRepo {..} = toGSnapshotRepo repo---- | Verify if a snapshot repo is working. __NOTE:__ this API did not--- make it into Elasticsearch until 1.4. If you use an older version,--- you will get an error here.-verifySnapshotRepo ::- ( MonadBH m,- MonadThrow m- ) =>- SnapshotRepoName ->- m (ParsedEsResponse SnapshotVerification)-verifySnapshotRepo (SnapshotRepoName n) =- parseEsResponse =<< post ["_snapshot", n, "_verify"] emptyBody--deleteSnapshotRepo :: MonadBH m => SnapshotRepoName -> m (BHResponse Acknowledged)-deleteSnapshotRepo (SnapshotRepoName n) =- delete ["_snapshot", n]---- | Create and start a snapshot-createSnapshot ::- (MonadBH m) =>- SnapshotRepoName ->- SnapshotName ->- SnapshotCreateSettings ->- m (BHResponse Acknowledged)-createSnapshot (SnapshotRepoName repoName) (SnapshotName snapName) SnapshotCreateSettings {..} =- put endpoint body- where- endpoint = ["_snapshot", repoName, snapName] `withQueries` params- params = [("wait_for_completion", Just (boolQP snapWaitForCompletion))]- body = encode $ object prs- prs =- catMaybes- [ ("indices" .=) . indexSelectionName <$> snapIndices,- Just ("ignore_unavailable" .= snapIgnoreUnavailable),- Just ("ignore_global_state" .= snapIncludeGlobalState),- Just ("partial" .= snapPartial)- ]--indexSelectionName :: IndexSelection -> Text-indexSelectionName AllIndexes = "_all"-indexSelectionName (IndexList (i :| is)) = T.intercalate "," (renderIndex <$> (i : is))- where- renderIndex (IndexName n) = n---- | Get info about known snapshots given a pattern and repo name.-getSnapshots ::- ( MonadBH m,- MonadThrow m- ) =>- SnapshotRepoName ->- SnapshotSelection ->- m (ParsedEsResponse [SnapshotInfo])-getSnapshots (SnapshotRepoName repoName) sel =- fmap (fmap unSIs) . parseEsResponse =<< get ["_snapshot", repoName, snapPath]- where- snapPath = case sel of- AllSnapshots -> "_all"- SnapshotList (s :| ss) -> T.intercalate "," (renderPath <$> (s : ss))- renderPath (SnapPattern t) = t- renderPath (ExactSnap (SnapshotName t)) = t--newtype SIs = SIs {unSIs :: [SnapshotInfo]}--instance FromJSON SIs where- parseJSON = withObject "Collection of SnapshotInfo" parse- where- parse o = SIs <$> o .: "snapshots"---- | Delete a snapshot. Cancels if it is running.-deleteSnapshot :: MonadBH m => SnapshotRepoName -> SnapshotName -> m (BHResponse Acknowledged)-deleteSnapshot (SnapshotRepoName repoName) (SnapshotName snapName) =- delete ["_snapshot", repoName, snapName]---- | Restore a snapshot to the cluster See--- <https://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-snapshots.html#_restore>--- for more details.-restoreSnapshot ::- MonadBH m =>- SnapshotRepoName ->- SnapshotName ->- -- | Start with 'defaultSnapshotRestoreSettings' and customize- -- from there for reasonable defaults.- SnapshotRestoreSettings ->- m (BHResponse Accepted)-restoreSnapshot (SnapshotRepoName repoName) (SnapshotName snapName) SnapshotRestoreSettings {..} =- post endpoint (encode body)- where- endpoint = ["_snapshot", repoName, snapName, "_restore"] `withQueries` params- params = [("wait_for_completion", Just (boolQP snapRestoreWaitForCompletion))]- body =- object $- catMaybes- [ ("indices" .=) . indexSelectionName <$> snapRestoreIndices,- Just ("ignore_unavailable" .= snapRestoreIgnoreUnavailable),- Just ("include_global_state" .= snapRestoreIncludeGlobalState),- ("rename_pattern" .=) <$> snapRestoreRenamePattern,- ("rename_replacement" .=) . renderTokens <$> snapRestoreRenameReplacement,- Just ("include_aliases" .= snapRestoreIncludeAliases),- ("index_settings" .=) <$> snapRestoreIndexSettingsOverrides,- ("ignore_index_settings" .=) <$> snapRestoreIgnoreIndexSettings- ]- renderTokens (t :| ts) = mconcat (renderToken <$> (t : ts))- renderToken (RRTLit t) = t- renderToken RRSubWholeMatch = "$0"- renderToken (RRSubGroup g) = T.pack (show (rrGroupRefNum g))--getNodesInfo ::- ( MonadBH m,- MonadThrow m- ) =>- NodeSelection ->- m (ParsedEsResponse NodesInfo)-getNodesInfo sel =- parseEsResponse =<< get ["_nodes", selectionSeg]- where- selectionSeg = case sel of- LocalNode -> "_local"- NodeList (l :| ls) -> T.intercalate "," (selToSeg <$> (l : ls))- AllNodes -> "_all"- selToSeg (NodeByName (NodeName n)) = n- selToSeg (NodeByFullNodeId (FullNodeId i)) = i- selToSeg (NodeByHost (Server s)) = s- selToSeg (NodeByAttribute (NodeAttrName a) v) = a <> ":" <> v--getNodesStats ::- ( MonadBH m,- MonadThrow m- ) =>- NodeSelection ->- m (ParsedEsResponse NodesStats)-getNodesStats sel =- parseEsResponse =<< get ["_nodes", selectionSeg, "stats"]- where- selectionSeg = case sel of- LocalNode -> "_local"- NodeList (l :| ls) -> T.intercalate "," (selToSeg <$> (l : ls))- AllNodes -> "_all"- selToSeg (NodeByName (NodeName n)) = n- selToSeg (NodeByFullNodeId (FullNodeId i)) = i- selToSeg (NodeByHost (Server s)) = s- selToSeg (NodeByAttribute (NodeAttrName a) v) = a <> ":" <> v---- | 'createIndex' will create an index given a 'Server', 'IndexSettings', and an 'IndexName'.------ >>> response <- runBH' $ createIndex defaultIndexSettings (IndexName "didimakeanindex")--- >>> isSuccess response--- True--- >>> runBH' $ indexExists (IndexName "didimakeanindex")--- True-createIndex :: MonadBH m => IndexSettings -> IndexName -> m (BHResponse Acknowledged)-createIndex indexSettings (IndexName indexName) =- put [indexName] $ encode indexSettings---- | Create an index, providing it with any number of settings. This--- is more expressive than 'createIndex' but makes is more verbose--- for the common case of configuring only the shard count and--- replica count.-createIndexWith ::- MonadBH m =>- [UpdatableIndexSetting] ->- -- | shard count- Int ->- IndexName ->- m (BHResponse Acknowledged)-createIndexWith updates shards (IndexName indexName) =- put [indexName] body- where- body =- encode $- object- [ "settings"- .= deepMerge- ( X.singleton "index.number_of_shards" (toJSON shards)- : [u | Object u <- toJSON <$> updates]- )- ]---- | 'flushIndex' will flush an index given a 'Server' and an 'IndexName'.-flushIndex :: MonadBH m => IndexName -> m (BHResponse ShardResult)-flushIndex (IndexName indexName) =- post [indexName, "_flush"] emptyBody---- | 'deleteIndex' will delete an index given a 'Server' and an 'IndexName'.------ >>> _ <- runBH' $ createIndex defaultIndexSettings (IndexName "didimakeanindex")--- >>> response <- runBH' $ deleteIndex (IndexName "didimakeanindex")--- >>> isSuccess response--- True--- >>> runBH' $ indexExists (IndexName "didimakeanindex")--- False-deleteIndex :: MonadBH m => IndexName -> m (BHResponse Acknowledged)-deleteIndex (IndexName indexName) =- delete [indexName]---- | 'updateIndexSettings' will apply a non-empty list of setting updates to an index------ >>> _ <- runBH' $ createIndex defaultIndexSettings (IndexName "unconfiguredindex")--- >>> response <- runBH' $ updateIndexSettings (BlocksWrite False :| []) (IndexName "unconfiguredindex")--- >>> isSuccess response--- True-updateIndexSettings ::- MonadBH m =>- NonEmpty UpdatableIndexSetting ->- IndexName ->- m (BHResponse Acknowledged)-updateIndexSettings updates (IndexName indexName) =- put [indexName, "_settings"] (encode body)- where- body = Object (deepMerge [u | Object u <- toJSON <$> toList updates])--getIndexSettings ::- (MonadBH m, MonadThrow m) =>- IndexName ->- m (ParsedEsResponse IndexSettingsSummary)-getIndexSettings (IndexName indexName) =- parseEsResponse =<< get [indexName, "_settings"]---- | 'forceMergeIndex'------ The force merge API allows to force merging of one or more indices through--- an API. The merge relates to the number of segments a Lucene index holds--- within each shard. The force merge operation allows to reduce the number of--- segments by merging them.------ This call will block until the merge is complete. If the http connection is--- lost, the request will continue in the background, and any new requests will--- block until the previous force merge is complete.---- For more information see--- <https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html#indices-forcemerge>.--- Nothing--- worthwhile comes back in the response body, so matching on the status--- should suffice.------ 'forceMergeIndex' with a maxNumSegments of 1 and onlyExpungeDeletes--- to True is the main way to release disk space back to the OS being--- held by deleted documents.------ >>> let ixn = IndexName "unoptimizedindex"--- >>> _ <- runBH' $ deleteIndex ixn >> createIndex defaultIndexSettings ixn--- >>> response <- runBH' $ forceMergeIndex (IndexList (ixn :| [])) (defaultIndexOptimizationSettings { maxNumSegments = Just 1, onlyExpungeDeletes = True })--- >>> isSuccess response--- True-forceMergeIndex :: MonadBH m => IndexSelection -> ForceMergeIndexSettings -> m (BHResponse ShardCount)-forceMergeIndex ixs ForceMergeIndexSettings {..} =- post endpoint emptyBody- where- endpoint = [indexName, "_forcemerge"] `withQueries` params- params =- catMaybes- [ ("max_num_segments",) . Just . showText <$> maxNumSegments,- Just ("only_expunge_deletes", Just (boolQP onlyExpungeDeletes)),- Just ("flush", Just (boolQP flushAfterOptimize))- ]- indexName = indexSelectionName ixs--deepMerge :: [Object] -> Object-deepMerge = LS.foldl' (X.unionWith merge) mempty- where- merge (Object a) (Object b) = Object (deepMerge [a, b])- merge _ b = b--doesExist :: MonadBH m => Endpoint -> m Bool-doesExist endpoint =- isSuccess <$> head endpoint---- | 'indexExists' enables you to check if an index exists. Returns 'Bool'--- in IO------ >>> exists <- runBH' $ indexExists testIndex-indexExists :: MonadBH m => IndexName -> m Bool-indexExists (IndexName indexName) =- doesExist [indexName]---- | 'refreshIndex' will force a refresh on an index. You must--- do this if you want to read what you wrote.------ >>> _ <- runBH' $ createIndex defaultIndexSettings testIndex--- >>> _ <- runBH' $ refreshIndex testIndex-refreshIndex :: MonadBH m => IndexName -> m (BHResponse ShardResult)-refreshIndex (IndexName indexName) =- post [indexName, "_refresh"] emptyBody---- | Block until the index becomes available for indexing--- documents. This is useful for integration tests in which--- indices are rapidly created and deleted.-waitForYellowIndex :: MonadBH m => IndexName -> m (BHResponse HealthStatus)-waitForYellowIndex (IndexName indexName) =- get endpoint- where- endpoint = ["_cluster", "health", indexName] `withQueries` params- params = [("wait_for_status", Just "yellow"), ("timeout", Just "10s")]--data HealthStatus = HealthStatus- { healthStatusClusterName :: Text,- healthStatusStatus :: Text,- healthStatusTimedOut :: Bool,- healthStatusNumberOfNodes :: Int,- healthStatusNumberOfDataNodes :: Int,- healthStatusActivePrimaryShards :: Int,- healthStatusActiveShards :: Int,- healthStatusRelocatingShards :: Int,- healthStatusInitializingShards :: Int,- healthStatusUnassignedShards :: Int,- healthStatusDelayedUnassignedShards :: Int,- healthStatusNumberOfPendingTasks :: Int,- healthStatusNumberOfInFlightFetch :: Int,- healthStatusTaskMaxWaitingInQueueMillis :: Int,- healthStatusActiveShardsPercentAsNumber :: Float- }- deriving stock (Eq, Show)--instance FromJSON HealthStatus where- parseJSON =- withObject "HealthStatus" $ \v ->- HealthStatus- <$> v .: "cluster_name"- <*> v .: "status"- <*> v .: "timed_out"- <*> v .: "number_of_nodes"- <*> v .: "number_of_data_nodes"- <*> v .: "active_primary_shards"- <*> v .: "active_shards"- <*> v .: "relocating_shards"- <*> v .: "initializing_shards"- <*> v .: "unassigned_shards"- <*> v .: "delayed_unassigned_shards"- <*> v .: "number_of_pending_tasks"- <*> v .: "number_of_in_flight_fetch"- <*> v .: "task_max_waiting_in_queue_millis"- <*> v .: "active_shards_percent_as_number"--openOrCloseIndexes :: MonadBH m => OpenCloseIndex -> IndexName -> m (BHResponse Acknowledged)-openOrCloseIndexes oci (IndexName indexName) =- post [indexName, stringifyOCIndex] emptyBody- where- stringifyOCIndex = case oci of- OpenIndex -> "_open"- CloseIndex -> "_close"---- | 'openIndex' opens an index given a 'Server' and an 'IndexName'. Explained in further detail at--- <http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html>------ >>> response <- runBH' $ openIndex testIndex-openIndex :: MonadBH m => IndexName -> m (BHResponse Acknowledged)-openIndex = openOrCloseIndexes OpenIndex---- | 'closeIndex' closes an index given a 'Server' and an 'IndexName'. Explained in further detail at--- <http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html>------ >>> response <- runBH' $ closeIndex testIndex-closeIndex :: MonadBH m => IndexName -> m (BHResponse Acknowledged)-closeIndex = openOrCloseIndexes CloseIndex---- | 'listIndices' returns a list of all index names on a given 'Server'-listIndices :: (MonadThrow m, MonadBH m) => m [IndexName]-listIndices =- parseEsResponseWith parser =<< get ["_cat/indices?format=json"]- where- parser :: [Value] -> Either String [IndexName]- parser =- mapM $ \val ->- case val of- Object obj ->- case X.lookup "index" obj of- (Just (String txt)) -> Right (IndexName txt)- v -> Left $ "indexVal in listIndices failed on non-string, was: " <> show v- v -> Left $ "One of the values parsed in listIndices wasn't an object, it was: " <> show v---- | 'catIndices' returns a list of all index names on a given 'Server' as well as their doc counts-catIndices :: (MonadThrow m, MonadBH m) => m [(IndexName, Int)]-catIndices =- parseEsResponseWith parser =<< get ["_cat/indices?format=json"]- where- parser :: [Value] -> Either String [(IndexName, Int)]- parser =- mapM $ \val ->- case val of- Object obj ->- case (X.lookup "index" obj, X.lookup "docs.count" obj) of- (Just (String txt), Just (String docs)) -> Right (IndexName txt, read (T.unpack docs))- v -> Left $ "indexVal in catIndices failed on non-string, was: " <> show v- v -> Left $ "One of the values parsed in catIndices wasn't an object, it was: " <> show v---- | 'updateIndexAliases' updates the server's index alias--- table. Operations are atomic. Explained in further detail at--- <https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>------ >>> let src = IndexName "a-real-index"--- >>> let aliasName = IndexName "an-alias"--- >>> let iAlias = IndexAlias src (IndexAliasName aliasName)--- >>> let aliasCreate = IndexAliasCreate Nothing Nothing--- >>> _ <- runBH' $ deleteIndex src--- >>> isSuccess <$> runBH' (createIndex defaultIndexSettings src)--- True--- >>> runBH' $ indexExists src--- True--- >>> isSuccess <$> runBH' (updateIndexAliases (AddAlias iAlias aliasCreate :| []))--- True--- >>> runBH' $ indexExists aliasName--- True-updateIndexAliases :: MonadBH m => NonEmpty IndexAliasAction -> m (BHResponse Acknowledged)-updateIndexAliases actions =- post ["_aliases"] (encode body)- where- body = object ["actions" .= toList actions]---- | Get all aliases configured on the server.-getIndexAliases ::- (MonadBH m, MonadThrow m) =>- m (ParsedEsResponse IndexAliasesSummary)-getIndexAliases =- parseEsResponse =<< get ["_aliases"]---- | Delete a single alias, removing it from all indices it--- is currently associated with.-deleteIndexAlias :: MonadBH m => IndexAliasName -> m (BHResponse Acknowledged)-deleteIndexAlias (IndexAliasName (IndexName name)) =- delete ["_all", "_alias", name]---- | 'putTemplate' creates a template given an 'IndexTemplate' and a 'TemplateName'.--- Explained in further detail at--- <https://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-templates.html>------ >>> let idxTpl = IndexTemplate [IndexPattern "tweet-*"] (Just (IndexSettings (ShardCount 1) (ReplicaCount 1))) [toJSON TweetMapping]--- >>> resp <- runBH' $ putTemplate idxTpl (TemplateName "tweet-tpl")-putTemplate :: MonadBH m => IndexTemplate -> TemplateName -> m (BHResponse Acknowledged)-putTemplate indexTemplate (TemplateName templateName) =- put ["_template", templateName] (encode indexTemplate)---- | 'templateExists' checks to see if a template exists.------ >>> exists <- runBH' $ templateExists (TemplateName "tweet-tpl")-templateExists :: MonadBH m => TemplateName -> m Bool-templateExists (TemplateName templateName) =- doesExist ["_template", templateName]---- | 'deleteTemplate' is an HTTP DELETE and deletes a template.------ >>> let idxTpl = IndexTemplate [IndexPattern "tweet-*"] (Just (IndexSettings (ShardCount 1) (ReplicaCount 1))) [toJSON TweetMapping]--- >>> _ <- runBH' $ putTemplate idxTpl (TemplateName "tweet-tpl")--- >>> resp <- runBH' $ deleteTemplate (TemplateName "tweet-tpl")-deleteTemplate :: MonadBH m => TemplateName -> m (BHResponse Acknowledged)-deleteTemplate (TemplateName templateName) =- delete ["_template", templateName]---- | 'putMapping' is an HTTP PUT and has upsert semantics. Mappings are schemas--- for documents in indexes.------ >>> _ <- runBH' $ createIndex defaultIndexSettings testIndex--- >>> resp <- runBH' $ putMapping testIndex TweetMapping--- >>> print resp--- Response {responseStatus = Status {statusCode = 200, statusMessage = "OK"}, responseVersion = HTTP/1.1, responseHeaders = [("content-type","application/json; charset=UTF-8"),("content-encoding","gzip"),("transfer-encoding","chunked")], responseBody = "{\"acknowledged\":true}", responseCookieJar = CJ {expose = []}, responseClose' = ResponseClose}-putMapping :: (MonadBH m, ToJSON a) => IndexName -> a -> m (BHResponse a)-putMapping (IndexName indexName) mapping =- -- "_mapping" above is originally transposed- -- erroneously. The correct API call is: "/INDEX/_mapping"- put [indexName, "_mapping"] (encode mapping)-{-# DEPRECATED putMapping "See <https://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html>" #-}--versionCtlParams :: IndexDocumentSettings -> [(Text, Maybe Text)]-versionCtlParams cfg =- case idsVersionControl cfg of- NoVersionControl -> []- InternalVersion v -> versionParams v "internal"- ExternalGT (ExternalDocVersion v) -> versionParams v "external_gt"- ExternalGTE (ExternalDocVersion v) -> versionParams v "external_gte"- ForceVersion (ExternalDocVersion v) -> versionParams v "force"- where- vt = showText . docVersionNumber- versionParams :: DocVersion -> Text -> [(Text, Maybe Text)]- versionParams v t =- [ ("version", Just $ vt v),- ("version_type", Just t)- ]---- | 'indexDocument' is the primary way to save a single document in--- Elasticsearch. The document itself is simply something we can--- convert into a JSON 'Value'. The 'DocId' will function as the--- primary key for the document. You are encouraged to generate--- your own id's and not rely on Elasticsearch's automatic id--- generation. Read more about it here:--- https://github.com/bitemyapp/bloodhound/issues/107------ >>> resp <- runBH' $ indexDocument testIndex defaultIndexDocumentSettings exampleTweet (DocId "1")--- >>> print resp--- Response {responseStatus = Status {statusCode = 200, statusMessage = "OK"}, responseVersion = HTTP/1.1, responseHeaders = [("content-type","application/json; charset=UTF-8"),("content-encoding","gzip"),("content-length","152")], responseBody = "{\"_index\":\"twitter\",\"_type\":\"_doc\",\"_id\":\"1\",\"_version\":2,\"result\":\"updated\",\"_shards\":{\"total\":1,\"successful\":1,\"failed\":0},\"_seq_no\":1,\"_primary_term\":1}", responseCookieJar = CJ {expose = []}, responseClose' = ResponseClose}-indexDocument ::- (ToJSON doc, MonadBH m) =>- IndexName ->- IndexDocumentSettings ->- doc ->- DocId ->- m (BHResponse IndexedDocument)-indexDocument (IndexName indexName) cfg document (DocId docId) =- put endpoint (encode body)- where- endpoint = [indexName, "_doc", docId] `withQueries` indexQueryString cfg (DocId docId)- body = encodeDocument cfg document--data IndexedDocument = IndexedDocument- { idxDocIndex :: Text,- idxDocType :: Text,- idxDocId :: Text,- idxDocVersion :: Int,- idxDocResult :: Text,- idxDocShards :: ShardResult,- idxDocSeqNo :: Int,- idxDocPrimaryTerm :: Int- }- deriving stock (Eq, Show)--instance FromJSON IndexedDocument where- parseJSON =- withObject "IndexedDocument" $ \v ->- IndexedDocument- <$> v .: "_index"- <*> v .: "_type"- <*> v .: "_id"- <*> v .: "_version"- <*> v .: "result"- <*> v .: "_shards"- <*> v .: "_seq_no"- <*> v .: "_primary_term"---- | 'updateDocument' provides a way to perform an partial update of a--- an already indexed document.-updateDocument ::- (ToJSON patch, MonadBH m) =>- IndexName ->- IndexDocumentSettings ->- patch ->- DocId ->- m (BHResponse IndexedDocument)-updateDocument (IndexName indexName) cfg patch (DocId docId) =- post endpoint (encode body)- where- endpoint = [indexName, "_update", docId] `withQueries` indexQueryString cfg (DocId docId)- body = object ["doc" .= encodeDocument cfg patch]--{- From ES docs:- Parent and child documents must be indexed on the same shard.- This means that the same routing value needs to be provided when getting, deleting, or updating a child document.-- Parent/Child support in Bloodhound requires MUCH more love.- To work it around for now (and to support the existing unit test) we route "parent" documents to their "_id"- (which is the default strategy for the ES), and route all child documents to their parens' "_id"-- However, it may not be flexible enough for some corner cases.-- Buld operations are completely unaware of "routing" and are probably broken in that matter.- Or perhaps they always were, because the old "_parent" would also have this requirement.--}-indexQueryString :: IndexDocumentSettings -> DocId -> [(Text, Maybe Text)]-indexQueryString cfg (DocId docId) =- versionCtlParams cfg <> routeParams- where- routeParams = case idsJoinRelation cfg of- Nothing -> []- Just (ParentDocument _ _) -> [("routing", Just docId)]- Just (ChildDocument _ _ (DocId pid)) -> [("routing", Just pid)]--encodeDocument :: ToJSON doc => IndexDocumentSettings -> doc -> Value-encodeDocument cfg document =- case idsJoinRelation cfg of- Nothing -> toJSON document- Just (ParentDocument (FieldName field) name) ->- mergeObjects (toJSON document) (object [fromText field .= name])- Just (ChildDocument (FieldName field) name parent) ->- mergeObjects (toJSON document) (object [fromText field .= object ["name" .= name, "parent" .= parent]])- where- mergeObjects (Object a) (Object b) = Object (a <> b)- mergeObjects _ _ = error "Impossible happened: both document body and join parameters must be objects"---- | 'deleteDocument' is the primary way to delete a single document.------ >>> _ <- runBH' $ deleteDocument testIndex (DocId "1")-deleteDocument :: MonadBH m => IndexName -> DocId -> m (BHResponse IndexedDocument)-deleteDocument (IndexName indexName) (DocId docId) = delete [indexName, "_doc", docId]---- | 'deleteByQuery' performs a deletion on every document that matches a query.------ >>> let query = TermQuery (Term "user" "bitemyapp") Nothing--- >>> _ <- runBH' $ deleteDocument testIndex query-deleteByQuery :: MonadBH m => IndexName -> Query -> m (BHResponse DeletedDocuments)-deleteByQuery (IndexName indexName) query =- post [indexName, "_delete_by_query"] (encode body)- where- body = object ["query" .= query]--data DeletedDocuments = DeletedDocuments- { delDocsTook :: Int,- delDocsTimedOut :: Bool,- delDocsTotal :: Int,- delDocsDeleted :: Int,- delDocsBatches :: Int,- delDocsVersionConflicts :: Int,- delDocsNoops :: Int,- delDocsRetries :: DeletedDocumentsRetries,- delDocsThrottledMillis :: Int,- delDocsRequestsPerSecond :: Float,- delDocsThrottledUntilMillis :: Int,- delDocsFailures :: [Value] -- TODO find examples- }- deriving stock (Eq, Show)--instance FromJSON DeletedDocuments where- parseJSON =- withObject "DeletedDocuments" $ \v ->- DeletedDocuments- <$> v .: "took"- <*> v .: "timed_out"- <*> v .: "total"- <*> v .: "deleted"- <*> v .: "batches"- <*> v .: "version_conflicts"- <*> v .: "noops"- <*> v .: "retries"- <*> v .: "throttled_millis"- <*> v .: "requests_per_second"- <*> v .: "throttled_until_millis"- <*> v .: "failures"--data DeletedDocumentsRetries = DeletedDocumentsRetries- { delDocsRetriesBulk :: Int,- delDocsRetriesSearch :: Int- }- deriving stock (Eq, Show)--instance FromJSON DeletedDocumentsRetries where- parseJSON =- withObject "DeletedDocumentsRetries" $ \v ->- DeletedDocumentsRetries- <$> v .: "bulk"- <*> v .: "search"---- | 'bulk' uses--- <http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html Elasticsearch's bulk API>--- to perform bulk operations. The 'BulkOperation' data type encodes the--- index\/update\/delete\/create operations. You pass a 'V.Vector' of 'BulkOperation's--- and a 'Server' to 'bulk' in order to send those operations up to your Elasticsearch--- server to be performed. I changed from [BulkOperation] to a Vector due to memory overhead.------ >>> let stream = V.fromList [BulkIndex testIndex (DocId "2") (toJSON (BulkTest "blah"))]--- >>> _ <- runBH' $ bulk stream--- >>> _ <- runBH' $ refreshIndex testIndex-bulk :: MonadBH m => V.Vector BulkOperation -> m (BHResponse a)-bulk =- post ["_bulk"] . encodeBulkOperations---- | 'encodeBulkOperations' is a convenience function for dumping a vector of 'BulkOperation'--- into an 'L.ByteString'------ >>> let bulkOps = V.fromList [BulkIndex testIndex (DocId "2") (toJSON (BulkTest "blah"))]--- >>> encodeBulkOperations bulkOps--- "\n{\"index\":{\"_id\":\"2\",\"_index\":\"twitter\"}}\n{\"name\":\"blah\"}\n"-encodeBulkOperations :: V.Vector BulkOperation -> L.ByteString-encodeBulkOperations stream = collapsed- where- blobs =- fmap encodeBulkOperation stream- mashedTaters =- mash (mempty :: Builder) blobs- collapsed =- toLazyByteString $ mappend mashedTaters (byteString "\n")- mash :: Builder -> V.Vector L.ByteString -> Builder- mash = V.foldl' (\b x -> b <> byteString "\n" <> lazyByteString x)--mkBulkStreamValue :: Text -> Text -> Text -> Value-mkBulkStreamValue operation indexName docId =- object- [ fromText operation- .= object- [ "_index" .= indexName,- "_id" .= docId- ]- ]--mkBulkStreamValueAuto :: Text -> Text -> Value-mkBulkStreamValueAuto operation indexName =- object- [ fromText operation- .= object ["_index" .= indexName]- ]--mkBulkStreamValueWithMeta :: [UpsertActionMetadata] -> Text -> Text -> Text -> Value-mkBulkStreamValueWithMeta meta operation indexName docId =- object- [ fromText operation- .= object- ( [ "_index" .= indexName,- "_id" .= docId- ]- <> (buildUpsertActionMetadata <$> meta)- )- ]---- | 'encodeBulkOperation' is a convenience function for dumping a single 'BulkOperation'--- into an 'L.ByteString'------ >>> let bulkOp = BulkIndex testIndex (DocId "2") (toJSON (BulkTest "blah"))--- >>> encodeBulkOperation bulkOp--- "{\"index\":{\"_id\":\"2\",\"_index\":\"twitter\"}}\n{\"name\":\"blah\"}"-encodeBulkOperation :: BulkOperation -> L.ByteString-encodeBulkOperation (BulkIndex (IndexName indexName) (DocId docId) value) = blob- where- metadata = mkBulkStreamValue "index" indexName docId- blob = encode metadata `mappend` "\n" `mappend` encode value-encodeBulkOperation (BulkIndexAuto (IndexName indexName) value) = blob- where- metadata = mkBulkStreamValueAuto "index" indexName- blob = encode metadata `mappend` "\n" `mappend` encode value-encodeBulkOperation (BulkIndexEncodingAuto (IndexName indexName) encoding) = toLazyByteString blob- where- metadata = toEncoding (mkBulkStreamValueAuto "index" indexName)- blob = fromEncoding metadata <> "\n" <> fromEncoding encoding-encodeBulkOperation (BulkCreate (IndexName indexName) (DocId docId) value) = blob- where- metadata = mkBulkStreamValue "create" indexName docId- blob = encode metadata `mappend` "\n" `mappend` encode value-encodeBulkOperation (BulkDelete (IndexName indexName) (DocId docId)) = blob- where- metadata = mkBulkStreamValue "delete" indexName docId- blob = encode metadata-encodeBulkOperation (BulkUpdate (IndexName indexName) (DocId docId) value) = blob- where- metadata = mkBulkStreamValue "update" indexName docId- doc = object ["doc" .= value]- blob = encode metadata `mappend` "\n" `mappend` encode doc-encodeBulkOperation- ( BulkUpsert- (IndexName indexName)- (DocId docId)- payload- actionMeta- ) = blob- where- metadata = mkBulkStreamValueWithMeta actionMeta "update" indexName docId- blob = encode metadata <> "\n" <> encode doc- doc = case payload of- UpsertDoc value -> object ["doc" .= value, "doc_as_upsert" .= True]- UpsertScript scriptedUpsert script value ->- let scup = if scriptedUpsert then ["scripted_upsert" .= True] else []- upsert = ["upsert" .= value]- in case (object (scup <> upsert), toJSON script) of- (Object obj, Object jscript) -> Object $ jscript <> obj- _ -> error "Impossible happened: serialising Script to Json should always be Object"-encodeBulkOperation (BulkCreateEncoding (IndexName indexName) (DocId docId) encoding) =- toLazyByteString blob- where- metadata = toEncoding (mkBulkStreamValue "create" indexName docId)- blob = fromEncoding metadata <> "\n" <> fromEncoding encoding---- | 'getDocument' is a straight-forward way to fetch a single document from--- Elasticsearch using a 'Server', 'IndexName', and a 'DocId'.--- The 'DocId' is the primary key for your Elasticsearch document.------ >>> yourDoc <- runBH' $ getDocument testIndex (DocId "1")-getDocument :: (FromJSON a, MonadBH m) => IndexName -> DocId -> m (BHResponse (EsResult a))-getDocument (IndexName indexName) (DocId docId) =- get [indexName, "_doc", docId]---- | 'documentExists' enables you to check if a document exists.-documentExists :: MonadBH m => IndexName -> DocId -> m Bool-documentExists (IndexName indexName) (DocId docId) =- doesExist [indexName, "_doc", docId]--dispatchSearch :: MonadBH m => Endpoint -> Search -> m (BHResponse (SearchResult a))-dispatchSearch endpoint search = post url' (encode search)- where- url' = appendSearchTypeParam endpoint (searchType search)- appendSearchTypeParam :: Endpoint -> SearchType -> Endpoint- appendSearchTypeParam originalUrl st = originalUrl `withQueries` params- where- stText = "search_type"- params- | st == SearchTypeDfsQueryThenFetch = [(stText, Just "dfs_query_then_fetch")]- -- used to catch 'SearchTypeQueryThenFetch', which is also the default- | otherwise = []---- | 'searchAll', given a 'Search', will perform that search against all indexes--- on an Elasticsearch server. Try to avoid doing this if it can be helped.------ >>> let query = TermQuery (Term "user" "bitemyapp") Nothing--- >>> let search = mkSearch (Just query) Nothing--- >>> response <- runBH' $ searchAll search-searchAll :: MonadBH m => Search -> m (BHResponse (SearchResult a))-searchAll = dispatchSearch ["_search"]---- | 'searchByIndex', given a 'Search' and an 'IndexName', will perform that search--- within an index on an Elasticsearch server.------ >>> let query = TermQuery (Term "user" "bitemyapp") Nothing--- >>> let search = mkSearch (Just query) Nothing--- >>> response <- runBH' $ searchByIndex testIndex search-searchByIndex :: MonadBH m => IndexName -> Search -> m (BHResponse (SearchResult a))-searchByIndex (IndexName indexName) = dispatchSearch [indexName, "_search"]---- | 'searchByIndices' is a variant of 'searchByIndex' that executes a--- 'Search' over many indices. This is much faster than using--- 'mapM' to 'searchByIndex' over a collection since it only--- causes a single HTTP request to be emitted.-searchByIndices :: MonadBH m => NonEmpty IndexName -> Search -> m (BHResponse (SearchResult a))-searchByIndices ixs = dispatchSearch [renderedIxs, "_search"]- where- renderedIxs = T.intercalate (T.singleton ',') (map (\(IndexName t) -> t) (toList ixs))--dispatchSearchTemplate ::- (FromJSON a, MonadBH m) =>- Endpoint ->- SearchTemplate ->- m (BHResponse (SearchResult a))-dispatchSearchTemplate endpoint search = post endpoint $ encode search---- | 'searchByIndexTemplate', given a 'SearchTemplate' and an 'IndexName', will perform that search--- within an index on an Elasticsearch server.------ >>> let query = SearchTemplateSource "{\"query\": { \"match\" : { \"{{my_field}}\" : \"{{my_value}}\" } }, \"size\" : \"{{my_size}}\"}"--- >>> let search = mkSearchTemplate (Right query) Nothing--- >>> response <- runBH' $ searchByIndexTemplate testIndex search-searchByIndexTemplate ::- (FromJSON a, MonadBH m) =>- IndexName ->- SearchTemplate ->- m (BHResponse (SearchResult a))-searchByIndexTemplate (IndexName indexName) = dispatchSearchTemplate [indexName, "_search", "template"]---- | 'searchByIndicesTemplate' is a variant of 'searchByIndexTemplate' that executes a--- 'SearchTemplate' over many indices. This is much faster than using--- 'mapM' to 'searchByIndexTemplate' over a collection since it only--- causes a single HTTP request to be emitted.-searchByIndicesTemplate ::- (FromJSON a, MonadBH m) =>- NonEmpty IndexName ->- SearchTemplate ->- m (BHResponse (SearchResult a))-searchByIndicesTemplate ixs = dispatchSearchTemplate [renderedIxs, "_search", "template"]- where- renderedIxs = T.intercalate (T.singleton ',') (map (\(IndexName t) -> t) (toList ixs))---- | 'storeSearchTemplate', saves a 'SearchTemplateSource' to be used later.-storeSearchTemplate :: MonadBH m => SearchTemplateId -> SearchTemplateSource -> m (BHResponse Acknowledged)-storeSearchTemplate (SearchTemplateId tid) ts =- post ["_scripts", tid] (encode body)- where- body = Object $ X.fromList ["script" .= Object ("lang" .= String "mustache" <> "source" .= ts)]---- | 'getSearchTemplate', get info of an stored 'SearchTemplateSource'.-getSearchTemplate :: MonadBH m => SearchTemplateId -> m (BHResponse GetTemplateScript)-getSearchTemplate (SearchTemplateId tid) = get ["_scripts", tid]---- | 'storeSearchTemplate',-deleteSearchTemplate :: MonadBH m => SearchTemplateId -> m (BHResponse Acknowledged)-deleteSearchTemplate (SearchTemplateId tid) = delete ["_scripts", tid]---- | For a given search, request a scroll for efficient streaming of--- search results. Note that the search is put into 'SearchTypeScan'--- mode and thus results will not be sorted. Combine this with--- 'advanceScroll' to efficiently stream through the full result set-getInitialScroll ::- (FromJSON a, MonadThrow m, MonadBH m) =>- IndexName ->- Search ->- m (ParsedEsResponse (SearchResult a))-getInitialScroll (IndexName indexName) search' =- parseEsResponse =<< dispatchSearch endpoint search- where- endpoint = [indexName, "_search"] `withQueries` [("scroll", Just "1m")]- sorting = Just [DefaultSortSpec $ mkSort (FieldName "_doc") Descending]- search = search' {sortBody = sorting}---- | For a given search, request a scroll for efficient streaming of--- search results. Combine this with 'advanceScroll' to efficiently--- stream through the full result set. Note that this search respects--- sorting and may be less efficient than 'getInitialScroll'.-getInitialSortedScroll ::- (FromJSON a, MonadThrow m, MonadBH m) =>- IndexName ->- Search ->- m (ParsedEsResponse (SearchResult a))-getInitialSortedScroll (IndexName indexName) search = do- parseEsResponse =<< dispatchSearch endpoint search- where- endpoint = [indexName, "_search"] `withQueries` [("scroll", Just "1m")]--scroll' ::- (FromJSON a, MonadBH m, MonadThrow m) =>- Maybe ScrollId ->- m ([Hit a], Maybe ScrollId)-scroll' Nothing = return ([], Nothing)-scroll' (Just sid) = do- res <- advanceScroll sid 60- case res of- Right SearchResult {..} -> return (hits searchHits, scrollId)- Left _ -> return ([], Nothing)---- | Use the given scroll to fetch the next page of documents. If there are no--- further pages, 'SearchResult.searchHits.hits' will be '[]'.-advanceScroll ::- ( FromJSON a,- MonadBH m,- MonadThrow m- ) =>- ScrollId ->- -- | How long should the snapshot of data be kept around? This timeout is updated every time 'advanceScroll' is used, so don't feel the need to set it to the entire duration of your search processing. Note that durations < 1s will be rounded up. Also note that 'NominalDiffTime' is an instance of Num so literals like 60 will be interpreted as seconds. 60s is a reasonable default.- NominalDiffTime ->- m (ParsedEsResponse (SearchResult a))-advanceScroll (ScrollId sid) scroll =- parseEsResponse =<< post ["_search", "scroll"] (encode scrollObject)- where- scrollTime = showText secs <> "s"- secs :: Integer- secs = round scroll-- scrollObject =- object- [ "scroll" .= scrollTime,- "scroll_id" .= sid- ]--scanAccumulator ::- (FromJSON a, MonadBH m, MonadThrow m) =>- [Hit a] ->- ([Hit a], Maybe ScrollId) ->- m ([Hit a], Maybe ScrollId)-scanAccumulator oldHits (newHits, Nothing) = return (oldHits ++ newHits, Nothing)-scanAccumulator oldHits ([], _) = return (oldHits, Nothing)-scanAccumulator oldHits (newHits, msid) = do- (newHits', msid') <- scroll' msid- scanAccumulator (oldHits ++ newHits) (newHits', msid')---- | 'scanSearch' uses the 'scroll' API of elastic,--- for a given 'IndexName'. Note that this will--- consume the entire search result set and will be doing O(n) list--- appends so this may not be suitable for large result sets. In that--- case, 'getInitialScroll' and 'advanceScroll' are good low level--- tools. You should be able to hook them up trivially to conduit,--- pipes, or your favorite streaming IO abstraction of choice. Note--- that ordering on the search would destroy performance and thus is--- ignored.-scanSearch ::- (FromJSON a, MonadBH m, MonadThrow m) =>- IndexName ->- Search ->- m [Hit a]-scanSearch indexName search = do- initialSearchResult <- getInitialScroll indexName search- let (hits', josh) = case initialSearchResult of- Right SearchResult {..} -> (hits searchHits, scrollId)- Left _ -> ([], Nothing)- (totalHits, _) <- scanAccumulator [] (hits', josh)- return totalHits--pitAccumulator ::- (FromJSON a, MonadBH m, MonadThrow m) => Search -> [Hit a] -> m [Hit a]-pitAccumulator search oldHits = do- resp <- searchAll search- parsed <- parseEsResponse resp- case parsed of- Left _ -> return []- Right searchResult -> case hits (searchHits searchResult) of- [] -> return oldHits- newHits -> case (hitSort $ last newHits, pitId searchResult) of- (Nothing, Nothing) ->- error "no point in time (PIT) ID or last sort value"- (Just _, Nothing) -> error "no point in time (PIT) ID"- (Nothing, _) -> return (oldHits <> newHits)- (Just lastSort, Just pitId') -> do- let newSearch =- search- { pointInTime = Just (PointInTime pitId' "1m"),- searchAfterKey = Just lastSort- }- pitAccumulator newSearch (oldHits <> newHits)---- | 'pitSearch' uses the point in time (PIT) API of elastic, for a given--- 'IndexName'. Requires Elasticsearch >=7.10. Note that this will consume the--- entire search result set and will be doing O(n) list appends so this may--- not be suitable for large result sets. In that case, the point in time API--- should be used directly with `openPointInTime` and `closePointInTime`.------ Note that 'pitSearch' utilizes the 'search_after' parameter under the hood,--- which requires a non-empty 'sortBody' field in the provided 'Search' value.--- Otherwise, 'pitSearch' will fail to return all matching documents.------ For more information see--- <https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html>.-pitSearch ::- (FromJSON a, MonadBH m, MonadThrow m, Show a) => IndexName -> Search -> m [Hit a]-pitSearch indexName search = do- openResp <- openPointInTime indexName- case openResp of- Left _ -> return []- Right OpenPointInTimeResponse {..} -> do- let searchPIT = search {pointInTime = Just (PointInTime oPitId "1m")}- hits <- pitAccumulator searchPIT []- closeResp <- closePointInTime (ClosePointInTime oPitId)- case closeResp of- Left _ -> return []- Right (ClosePointInTimeResponse False _) ->- error "failed to close point in time (PIT)"- Right (ClosePointInTimeResponse True _) -> return hits---- | 'mkSearch' is a helper function for defaulting additional fields of a 'Search'--- to Nothing in case you only care about your 'Query' and 'Filter'. Use record update--- syntax if you want to add things like aggregations or highlights while still using--- this helper function.------ >>> let query = TermQuery (Term "user" "bitemyapp") Nothing--- >>> mkSearch (Just query) Nothing--- Search {queryBody = Just (TermQuery (Term {termField = "user", termValue = "bitemyapp"}) Nothing), filterBody = Nothing, searchAfterKey = Nothing, sortBody = Nothing, aggBody = Nothing, highlight = Nothing, trackSortScores = False, from = From 0, size = Size 10, searchType = SearchTypeQueryThenFetch, fields = Nothing, source = Nothing}-mkSearch :: Maybe Query -> Maybe Filter -> Search-mkSearch query filter =- Search- { queryBody = query,- filterBody = filter,- sortBody = Nothing,- aggBody = Nothing,- highlight = Nothing,- trackSortScores = False,- from = From 0,- size = Size 10,- searchType = SearchTypeQueryThenFetch,- searchAfterKey = Nothing,- fields = Nothing,- scriptFields = Nothing,- source = Nothing,- suggestBody = Nothing,- pointInTime = Nothing- }---- | 'mkAggregateSearch' is a helper function that defaults everything in a 'Search' except for--- the 'Query' and the 'Aggregation'.------ >>> let terms = TermsAgg $ (mkTermsAggregation "user") { termCollectMode = Just BreadthFirst }--- >>> terms--- TermsAgg (TermsAggregation {term = Left "user", termInclude = Nothing, termExclude = Nothing, termOrder = Nothing, termMinDocCount = Nothing, termSize = Nothing, termShardSize = Nothing, termCollectMode = Just BreadthFirst, termExecutionHint = Nothing, termAggs = Nothing})--- >>> let myAggregation = mkAggregateSearch Nothing $ mkAggregations "users" terms-mkAggregateSearch :: Maybe Query -> Aggregations -> Search-mkAggregateSearch query mkSearchAggs =- Search- { queryBody = query,- filterBody = Nothing,- sortBody = Nothing,- aggBody = Just mkSearchAggs,- highlight = Nothing,- trackSortScores = False,- from = From 0,- size = Size 0,- searchType = SearchTypeQueryThenFetch,- searchAfterKey = Nothing,- fields = Nothing,- scriptFields = Nothing,- source = Nothing,- suggestBody = Nothing,- pointInTime = Nothing- }---- | 'mkHighlightSearch' is a helper function that defaults everything in a 'Search' except for--- the 'Query' and the 'Aggregation'.------ >>> let query = QueryMatchQuery $ mkMatchQuery (FieldName "_all") (QueryString "haskell")--- >>> let testHighlight = Highlights Nothing [FieldHighlight (FieldName "message") Nothing]--- >>> let search = mkHighlightSearch (Just query) testHighlight-mkHighlightSearch :: Maybe Query -> Highlights -> Search-mkHighlightSearch query searchHighlights =- Search- { queryBody = query,- filterBody = Nothing,- sortBody = Nothing,- aggBody = Nothing,- highlight = Just searchHighlights,- trackSortScores = False,- from = From 0,- size = Size 10,- searchType = SearchTypeDfsQueryThenFetch,- searchAfterKey = Nothing,- fields = Nothing,- scriptFields = Nothing,- source = Nothing,- suggestBody = Nothing,- pointInTime = Nothing- }---- | 'mkSearchTemplate' is a helper function for defaulting additional fields of a 'SearchTemplate'--- to Nothing. Use record update syntax if you want to add things.-mkSearchTemplate :: Either SearchTemplateId SearchTemplateSource -> TemplateQueryKeyValuePairs -> SearchTemplate-mkSearchTemplate id_ params = SearchTemplate id_ params Nothing Nothing---- | 'pageSearch' is a helper function that takes a search and assigns the from--- and size fields for the search. The from parameter defines the offset--- from the first result you want to fetch. The size parameter allows you to--- configure the maximum amount of hits to be returned.------ >>> let query = QueryMatchQuery $ mkMatchQuery (FieldName "_all") (QueryString "haskell")--- >>> let search = mkSearch (Just query) Nothing--- >>> search--- Search {queryBody = Just (QueryMatchQuery (MatchQuery {matchQueryField = FieldName "_all", matchQueryQueryString = QueryString "haskell", matchQueryOperator = Or, matchQueryZeroTerms = ZeroTermsNone, matchQueryCutoffFrequency = Nothing, matchQueryMatchType = Nothing, matchQueryAnalyzer = Nothing, matchQueryMaxExpansions = Nothing, matchQueryLenient = Nothing, matchQueryBoost = Nothing})), filterBody = Nothing, sortBody = Nothing, aggBody = Nothing, highlight = Nothing, trackSortScores = False, from = From 0, size = Size 10, searchType = SearchTypeQueryThenFetch, fields = Nothing, source = Nothing}--- >>> pageSearch (From 10) (Size 100) search--- Search {queryBody = Just (QueryMatchQuery (MatchQuery {matchQueryField = FieldName "_all", matchQueryQueryString = QueryString "haskell", matchQueryOperator = Or, matchQueryZeroTerms = ZeroTermsNone, matchQueryCutoffFrequency = Nothing, matchQueryMatchType = Nothing, matchQueryAnalyzer = Nothing, matchQueryMaxExpansions = Nothing, matchQueryLenient = Nothing, matchQueryBoost = Nothing})), filterBody = Nothing, sortBody = Nothing, aggBody = Nothing, highlight = Nothing, trackSortScores = False, from = From 10, size = Size 100, searchType = SearchTypeQueryThenFetch, fields = Nothing, source = Nothing}-pageSearch ::- -- | The result offset- From ->- -- | The number of results to return- Size ->- -- | The current seach- Search ->- -- | The paged search- Search-pageSearch resultOffset pageSize search = search {from = resultOffset, size = pageSize}--parseUrl' :: MonadThrow m => Text -> m Request-parseUrl' t = parseRequest (URI.escapeURIString URI.isAllowedInURI (T.unpack t))---- | This is a hook that can be set via the 'bhRequestHook' function--- that will authenticate all requests using an HTTP Basic--- Authentication header. Note that it is *strongly* recommended that--- this option only be used over an SSL connection.------ >> (mkBHEnv myServer myManager) { bhRequestHook = basicAuthHook (EsUsername "myuser") (EsPassword "mypass") }-basicAuthHook :: Monad m => EsUsername -> EsPassword -> Request -> m Request-basicAuthHook (EsUsername u) (EsPassword p) = return . applyBasicAuth u' p'- where- u' = T.encodeUtf8 u- p' = T.encodeUtf8 p--boolQP :: Bool -> Text-boolQP True = "true"-boolQP False = "false"--countByIndex :: (MonadBH m, MonadThrow m) => IndexName -> CountQuery -> m (ParsedEsResponse CountResponse)-countByIndex (IndexName indexName) q =- parseEsResponse =<< post [indexName, "_count"] (encode q)---- | 'openPointInTime' opens a point in time for an index given an 'IndexName'.--- Note that the point in time should be closed with 'closePointInTime' as soon--- as it is no longer needed.------ For more information see--- <https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html>.-openPointInTime ::- (MonadBH m, MonadThrow m) =>- IndexName ->- m (ParsedEsResponse OpenPointInTimeResponse)-openPointInTime (IndexName indexName) =- parseEsResponse =<< post [indexName, "_pit?keep_alive=1m"] emptyBody---- | 'closePointInTime' closes a point in time given a 'ClosePointInTime'.------ For more information see--- <https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html>.-closePointInTime ::- (MonadBH m, MonadThrow m) =>- ClosePointInTime ->- m (ParsedEsResponse ClosePointInTimeResponse)-closePointInTime q = do- parseEsResponse =<< deleteWithBody ["_pit"] (encode q)+module Database.Bloodhound.Client+ ( module Reexport,+ )+where++import Database.Bloodhound.Client.Cluster as Reexport+import Database.Bloodhound.ElasticSearch7.Client as Reexport
+ src/Database/Bloodhound/Client/Cluster.hs view
@@ -0,0 +1,133 @@+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE UndecidableInstances #-}++module Database.Bloodhound.Client.Cluster+ ( module ReexportCompat,+ BH (..),+ BHEnv (..),+ MonadBH (..),+ emptyBody,+ mkBHEnv,+ performBHRequest,+ runBH,+ tryPerformBHRequest,+ )+where++import Control.Monad.Catch+import Control.Monad.Except+import qualified Data.ByteString.Lazy.Char8 as L+import qualified Data.Text as T+import Database.Bloodhound.Internal.Client.BHRequest+import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Bulk as ReexportCompat+import Database.Bloodhound.Internal.Versions.Common.Types.Count as ReexportCompat+import Database.Bloodhound.Internal.Versions.Common.Types.Indices as ReexportCompat+import Database.Bloodhound.Internal.Versions.Common.Types.Nodes as ReexportCompat+import Database.Bloodhound.Internal.Versions.Common.Types.Snapshots as ReexportCompat+import Database.Bloodhound.Internal.Versions.Common.Types.Units as ReexportCompat+import Network.HTTP.Client+import qualified Network.URI as URI++-- | Common environment for Elasticsearch calls. Connections will be+-- pipelined according to the provided HTTP connection manager.+data BHEnv = BHEnv+ { bhServer :: Server,+ bhManager :: Manager,+ -- | Low-level hook that is run before every request is sent. Used to implement custom authentication strategies. Defaults to 'return' with 'mkBHEnv'.+ bhRequestHook :: Request -> IO Request+ }++-- | 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.+class (Functor m, Applicative m, MonadIO m, MonadCatch m) => MonadBH m where+ dispatch :: BHRequest contextualized body -> m (BHResponse contextualized body)+ tryEsError :: m a -> m (Either EsError a)+ throwEsError :: EsError -> m a++-- | 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 }+mkBHEnv :: Server -> Manager -> BHEnv+mkBHEnv s m = BHEnv s m return++newtype BH m a = BH+ { unBH :: ReaderT BHEnv (ExceptT EsError m) a+ }+ deriving newtype+ ( Functor,+ Applicative,+ Monad,+ MonadIO,+ MonadState s,+ MonadWriter w,+ Alternative,+ MonadPlus,+ MonadFix,+ MonadThrow,+ MonadCatch,+ MonadFail,+ MonadMask+ )++instance MonadTrans BH where+ lift = BH . lift . lift++instance (MonadReader r m) => MonadReader r (BH m) where+ ask = lift ask+ local f (BH (ReaderT m)) = BH $+ ReaderT $ \r ->+ local f (m r)++instance (Functor m, Applicative m, MonadIO m, MonadCatch m, MonadThrow m) => MonadBH (BH m) where+ dispatch request = BH $ do+ env <- ask @BHEnv+ let url = getEndpoint (bhServer env) (bhRequestEndpoint request)+ initReq <- liftIO $ parseUrl' url+ let reqHook = bhRequestHook env+ let reqBody = RequestBodyLBS $ fromMaybe emptyBody $ bhRequestBody request+ req <-+ liftIO $+ reqHook $+ setRequestIgnoreStatus $+ initReq+ { method = bhRequestMethod request,+ requestHeaders =+ -- "application/x-ndjson" for bulk+ ("Content-Type", "application/json") : requestHeaders initReq,+ requestBody = reqBody+ }+ -- req <- liftIO $ reqHook $ setRequestIgnoreStatus $ initReq { method = dMethod+ -- , requestBody = reqBody }+ let mgr = bhManager env+ BHResponse <$> liftIO (httpLbs req mgr)+ tryEsError = try+ throwEsError = throwM++tryPerformBHRequest ::+ (MonadBH m, MonadThrow m, ParseBHResponse contextualized) =>+ BHRequest contextualized a ->+ m (ParsedEsResponse a)+tryPerformBHRequest req = dispatch req >>= either throwM return . bhRequestParser req++performBHRequest ::+ (MonadBH m, MonadThrow m, ParseBHResponse contextualized) =>+ BHRequest contextualized a ->+ m a+performBHRequest req = tryPerformBHRequest req >>= either throwEsError return++emptyBody :: L.ByteString+emptyBody = L.pack ""++parseUrl' :: (MonadThrow m) => Text -> m Request+parseUrl' t = parseRequest (URI.escapeURIString URI.isAllowedInURI (T.unpack t))++runBH :: BHEnv -> BH m a -> m (Either EsError a)+runBH e f = runExceptT $ runReaderT (unBH f) e
+ src/Database/Bloodhound/Common/Client.hs view
@@ -0,0 +1,690 @@+{-# LANGUAGE OverloadedLists #-}+{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# OPTIONS_GHC -Wno-warnings-deprecations #-}++-- |+-- Module : Database.Bloodhound.Client+-- Copyright : (C) 2014, 2018 Chris Allen+-- License : BSD-style (see the file LICENSE)+-- Maintainer : Chris Allen <cma@bitemyapp.com>+-- Stability : provisional+-- Portability : GHC+--+-- Client side functions for talking to Elasticsearch servers.+module Database.Bloodhound.Common.Client+ ( -- * Bloodhound client functions++ -- | The examples in this module assume the following code has been run.+ -- The :{ and :} will only work in GHCi. You'll only need the data types+ -- and typeclass instances for the functions that make use of them.+ -- $setup+ withBH,++ -- ** Indices+ createIndex,+ createIndexWith,+ flushIndex,+ deleteIndex,+ updateIndexSettings,+ getIndexSettings,+ forceMergeIndex,+ indexExists,+ openIndex,+ closeIndex,+ listIndices,+ catIndices,+ waitForYellowIndex,+ Requests.HealthStatus (..),++ -- *** Index Aliases+ updateIndexAliases,+ getIndexAliases,+ deleteIndexAlias,++ -- *** Index Templates+ putTemplate,+ templateExists,+ deleteTemplate,++ -- ** Mapping+ putMapping,++ -- ** Documents+ indexDocument,+ updateDocument,+ updateByQuery,+ Requests.getDocument,+ documentExists,+ deleteDocument,+ deleteByQuery,+ Requests.IndexedDocument (..),+ Requests.DeletedDocuments (..),+ Requests.DeletedDocumentsRetries (..),++ -- ** Searching+ searchAll,+ searchByIndex,+ searchByIndices,+ searchByIndexTemplate,+ searchByIndicesTemplate,+ scanSearch,+ getInitialScroll,+ getInitialSortedScroll,+ advanceScroll,+ refreshIndex,+ Requests.mkSearch,+ Requests.mkAggregateSearch,+ Requests.mkHighlightSearch,+ Requests.mkSearchTemplate,+ bulk,+ Requests.pageSearch,+ Requests.mkShardCount,+ Requests.mkReplicaCount,+ getStatus,++ -- ** Templates+ storeSearchTemplate,+ getSearchTemplate,+ deleteSearchTemplate,++ -- ** Snapshot/Restore++ -- *** Snapshot Repos+ getSnapshotRepos,+ updateSnapshotRepo,+ verifySnapshotRepo,+ deleteSnapshotRepo,++ -- *** Snapshots+ createSnapshot,+ getSnapshots,+ deleteSnapshot,++ -- *** Restoring Snapshots+ restoreSnapshot,++ -- *** Reindex+ reindex,+ reindexAsync,++ -- *** Task+ getTask,++ -- ** Nodes+ getNodesInfo,+ getNodesStats,++ -- ** Request Utilities+ Requests.encodeBulkOperations,+ Requests.encodeBulkOperation,++ -- * Authentication+ basicAuthHook,++ -- * Count+ countByIndex,++ -- * Generic+ Acknowledged (..),+ Accepted (..),+ IgnoredBody (..),+ )+where++import Control.Monad+import Control.Monad.Catch+import Data.Aeson+import Data.List.NonEmpty (NonEmpty (..))+import qualified Data.Text.Encoding as T+import Data.Time.Clock+import qualified Data.Vector as V+import Database.Bloodhound.Client.Cluster+import qualified Database.Bloodhound.Common.Requests as Requests+import Database.Bloodhound.Common.Types+import Network.HTTP.Client hiding (Proxy)+import Prelude hiding (filter, head)++-- $setup+-- >>> :set -XOverloadedStrings+-- >>> :set -XDeriveGeneric+-- >>> import Database.Bloodhound+-- >>> import Network.HTTP.Client+-- >>> let testServer = (Server "http://localhost:9200")+-- >>> let runBH' = withBH defaultManagerSettings testServer+-- >>> let testIndex = IndexName "twitter"+-- >>> let defaultIndexSettings = IndexSettings (ShardCount 1) (ReplicaCount 0)+-- >>> data TweetMapping = TweetMapping deriving stock (Eq, Show)+-- >>> _ <- runBH' $ deleteIndex testIndex+-- >>> _ <- runBH' $ deleteIndex (IndexName "didimakeanindex")+-- >>> import GHC.Generics+-- >>> import Data.Time.Calendar (Day (..))+-- >>> import Data.Time.Clock (UTCTime (..), secondsToDiffTime)+-- >>> :{+-- instance ToJSON TweetMapping where+-- toJSON TweetMapping =+-- object ["properties" .=+-- object ["location" .=+-- object ["type" .= ("geo_point" :: Text)]]]+-- data Location = Location { lat :: Double+-- , lon :: Double } deriving stock (Eq, Generic, Show)+-- data Tweet = Tweet { user :: Text+-- , postDate :: UTCTime+-- , message :: Text+-- , age :: Int+-- , location :: Location } deriving stock (Eq, Generic, Show)+-- exampleTweet = Tweet { user = "bitemyapp"+-- , postDate = UTCTime+-- (ModifiedJulianDay 55000)+-- (secondsToDiffTime 10)+-- , message = "Use haskell!"+-- , age = 10000+-- , location = Location 40.12 (-71.34) }+-- instance ToJSON Tweet where+-- toJSON = genericToJSON defaultOptions+-- instance FromJSON Tweet where+-- parseJSON = genericParseJSON defaultOptions+-- instance ToJSON Location where+-- toJSON = genericToJSON defaultOptions+-- instance FromJSON Location where+-- parseJSON = genericParseJSON defaultOptions+-- data BulkTest = BulkTest { name :: Text } deriving stock (Eq, Generic, Show)+-- instance FromJSON BulkTest where+-- parseJSON = genericParseJSON defaultOptions+-- instance ToJSON BulkTest where+-- toJSON = genericToJSON defaultOptions+-- :}++-- | Convenience function that sets up a manager and BHEnv and runs+-- the given set of bloodhound operations. Connections will be+-- pipelined automatically in accordance with the given manager+-- settings in IO. If you've got your own monad transformer stack, you+-- should use 'runBH' directly.+withBH :: ManagerSettings -> Server -> BH IO a -> IO a+withBH ms s f = do+ mgr <- newManager ms+ let env = mkBHEnv s mgr+ runBH env f >>= either throwM return++-- | 'getStatus' fetches the 'Status' of a 'Server'+--+-- >>> serverStatus <- runBH' getStatus+-- >>> fmap tagline (serverStatus)+-- Just "You Know, for Search"+getStatus :: (MonadBH m) => m Status+getStatus = performBHRequest $ Requests.getStatus++-- | 'getSnapshotRepos' gets the definitions of a subset of the+-- defined snapshot repos.+getSnapshotRepos :: (MonadBH m) => SnapshotRepoSelection -> m [GenericSnapshotRepo]+getSnapshotRepos sel = performBHRequest $ Requests.getSnapshotRepos sel++-- | Create or update a snapshot repo+updateSnapshotRepo ::+ (MonadBH m) =>+ (SnapshotRepo repo) =>+ -- | Use 'defaultSnapshotRepoUpdateSettings' if unsure+ SnapshotRepoUpdateSettings ->+ repo ->+ m Acknowledged+updateSnapshotRepo settings repo = performBHRequest $ Requests.updateSnapshotRepo settings repo++-- | Verify if a snapshot repo is working. __NOTE:__ this API did not+-- make it into Elasticsearch until 1.4. If you use an older version,+-- you will get an error here.+verifySnapshotRepo :: (MonadBH m) => SnapshotRepoName -> m SnapshotVerification+verifySnapshotRepo repoName = performBHRequest $ Requests.verifySnapshotRepo repoName++deleteSnapshotRepo :: (MonadBH m) => SnapshotRepoName -> m Acknowledged+deleteSnapshotRepo repoName = performBHRequest $ Requests.deleteSnapshotRepo repoName++-- | Create and start a snapshot+createSnapshot ::+ (MonadBH m) =>+ SnapshotRepoName ->+ SnapshotName ->+ SnapshotCreateSettings ->+ m Acknowledged+createSnapshot repoName snapName settings = performBHRequest $ Requests.createSnapshot repoName snapName settings++-- | Get info about known snapshots given a pattern and repo name.+getSnapshots :: (MonadBH m) => SnapshotRepoName -> SnapshotSelection -> m [SnapshotInfo]+getSnapshots repoName sel = performBHRequest $ Requests.getSnapshots repoName sel++-- | Delete a snapshot. Cancels if it is running.+deleteSnapshot :: (MonadBH m) => SnapshotRepoName -> SnapshotName -> m Acknowledged+deleteSnapshot repoName snapName = performBHRequest $ Requests.deleteSnapshot repoName snapName++-- | Restore a snapshot to the cluster See+-- <https://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-snapshots.html#_restore>+-- for more details.+restoreSnapshot ::+ (MonadBH m) =>+ SnapshotRepoName ->+ SnapshotName ->+ -- | Start with 'defaultSnapshotRestoreSettings' and customize+ -- from there for reasonable defaults.+ SnapshotRestoreSettings ->+ m Accepted+restoreSnapshot repoName snapName settings = performBHRequest $ Requests.restoreSnapshot repoName snapName settings++getNodesInfo :: (MonadBH m) => NodeSelection -> m NodesInfo+getNodesInfo sel = performBHRequest $ Requests.getNodesInfo sel++getNodesStats :: (MonadBH m) => NodeSelection -> m NodesStats+getNodesStats sel = performBHRequest $ Requests.getNodesStats sel++-- | 'createIndex' will create an index given a 'Server', 'IndexSettings', and an 'IndexName'.+--+-- >>> response <- runBH' $ createIndex defaultIndexSettings (IndexName "didimakeanindex")+-- >>> isSuccess response+-- True+-- >>> runBH' $ indexExists (IndexName "didimakeanindex")+-- True+createIndex :: (MonadBH m) => IndexSettings -> IndexName -> m Acknowledged+createIndex indexSettings indexName = performBHRequest $ Requests.createIndex indexSettings indexName++-- | Create an index, providing it with any number of settings. This+-- is more expressive than 'createIndex' but makes is more verbose+-- for the common case of configuring only the shard count and+-- replica count.+createIndexWith ::+ (MonadBH m) =>+ [UpdatableIndexSetting] ->+ -- | shard count+ Int ->+ IndexName ->+ m Acknowledged+createIndexWith updates shards indexName = performBHRequest $ Requests.createIndexWith updates shards indexName++-- | 'flushIndex' will flush an index given a 'Server' and an 'IndexName'.+flushIndex :: (MonadBH m) => IndexName -> m ShardResult+flushIndex indexName = performBHRequest $ Requests.flushIndex indexName++-- | 'deleteIndex' will delete an index given a 'Server' and an 'IndexName'.+--+-- >>> _ <- runBH' $ createIndex defaultIndexSettings (IndexName "didimakeanindex")+-- >>> response <- runBH' $ deleteIndex (IndexName "didimakeanindex")+-- >>> isSuccess response+-- True+-- >>> runBH' $ indexExists (IndexName "didimakeanindex")+-- False+deleteIndex :: (MonadBH m) => IndexName -> m Acknowledged+deleteIndex indexName = performBHRequest $ Requests.deleteIndex indexName++-- | 'updateIndexSettings' will apply a non-empty list of setting updates to an index+--+-- >>> _ <- runBH' $ createIndex defaultIndexSettings (IndexName "unconfiguredindex")+-- >>> response <- runBH' $ updateIndexSettings (BlocksWrite False :| []) (IndexName "unconfiguredindex")+-- >>> isSuccess response+-- True+updateIndexSettings ::+ (MonadBH m) =>+ NonEmpty UpdatableIndexSetting ->+ IndexName ->+ m Acknowledged+updateIndexSettings updates indexName = performBHRequest $ Requests.updateIndexSettings updates indexName++getIndexSettings :: (MonadBH m) => IndexName -> m IndexSettingsSummary+getIndexSettings indexName = performBHRequest $ Requests.getIndexSettings indexName++-- | 'forceMergeIndex'+--+-- The force merge API allows to force merging of one or more indices through+-- an API. The merge relates to the number of segments a Lucene index holds+-- within each shard. The force merge operation allows to reduce the number of+-- segments by merging them.+--+-- This call will block until the merge is complete. If the http connection is+-- lost, the request will continue in the background, and any new requests will+-- block until the previous force merge is complete.++-- For more information see+-- <https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html#indices-forcemerge>.+-- Nothing+-- worthwhile comes back in the response body, so matching on the status+-- should suffice.+--+-- 'forceMergeIndex' with a maxNumSegments of 1 and onlyExpungeDeletes+-- to True is the main way to release disk space back to the OS being+-- held by deleted documents.+--+-- >>> let ixn = IndexName "unoptimizedindex"+-- >>> _ <- runBH' $ deleteIndex ixn >> createIndex defaultIndexSettings ixn+-- >>> response <- runBH' $ forceMergeIndex (IndexList (ixn :| [])) (defaultIndexOptimizationSettings { maxNumSegments = Just 1, onlyExpungeDeletes = True })+-- >>> isSuccess response+-- True+forceMergeIndex :: (MonadBH m) => IndexSelection -> ForceMergeIndexSettings -> m ShardsResult+forceMergeIndex ixs settings = performBHRequest $ Requests.forceMergeIndex ixs settings++-- | 'indexExists' enables you to check if an index exists. Returns 'Bool'+-- in IO+--+-- >>> exists <- runBH' $ indexExists testIndex+indexExists :: (MonadBH m) => IndexName -> m Bool+indexExists indexName = performBHRequest $ Requests.indexExists indexName++-- | 'refreshIndex' will force a refresh on an index. You must+-- do this if you want to read what you wrote.+--+-- >>> _ <- runBH' $ createIndex defaultIndexSettings testIndex+-- >>> _ <- runBH' $ refreshIndex testIndex+refreshIndex :: (MonadBH m) => IndexName -> m ShardResult+refreshIndex indexName = performBHRequest $ Requests.refreshIndex indexName++-- | Block until the index becomes available for indexing+-- documents. This is useful for integration tests in which+-- indices are rapidly created and deleted.+waitForYellowIndex :: (MonadBH m) => IndexName -> m Requests.HealthStatus+waitForYellowIndex indexName = performBHRequest $ Requests.waitForYellowIndex indexName++-- | 'openIndex' opens an index given a 'Server' and an 'IndexName'. Explained in further detail at+-- <http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html>+--+-- >>> response <- runBH' $ openIndex testIndex+openIndex :: (MonadBH m) => IndexName -> m Acknowledged+openIndex indexName = performBHRequest $ Requests.openIndex indexName++-- | 'closeIndex' closes an index given a 'Server' and an 'IndexName'. Explained in further detail at+-- <http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html>+--+-- >>> response <- runBH' $ closeIndex testIndex+closeIndex :: (MonadBH m) => IndexName -> m Acknowledged+closeIndex indexName = performBHRequest $ Requests.closeIndex indexName++-- | 'listIndices' returns a list of all index names on a given 'Server'+listIndices :: (MonadBH m) => m [IndexName]+listIndices = performBHRequest $ Requests.listIndices++-- | 'catIndices' returns a list of all index names on a given 'Server' as well as their doc counts+catIndices :: (MonadBH m) => m [(IndexName, Int)]+catIndices = performBHRequest $ Requests.catIndices++-- | 'updateIndexAliases' updates the server's index alias+-- table. Operations are atomic. Explained in further detail at+-- <https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>+--+-- >>> let src = IndexName "a-real-index"+-- >>> let aliasName = IndexName "an-alias"+-- >>> let iAlias = IndexAlias src (IndexAliasName aliasName)+-- >>> let aliasCreate = IndexAliasCreate Nothing Nothing+-- >>> _ <- runBH' $ deleteIndex src+-- >>> isSuccess <$> runBH' (createIndex defaultIndexSettings src)+-- True+-- >>> runBH' $ indexExists src+-- True+-- >>> isSuccess <$> runBH' (updateIndexAliases (AddAlias iAlias aliasCreate :| []))+-- True+-- >>> runBH' $ indexExists aliasName+-- True+updateIndexAliases :: (MonadBH m) => NonEmpty IndexAliasAction -> m Acknowledged+updateIndexAliases actions = performBHRequest $ Requests.updateIndexAliases actions++-- | Get all aliases configured on the server.+getIndexAliases :: (MonadBH m) => m IndexAliasesSummary+getIndexAliases = performBHRequest $ Requests.getIndexAliases++-- | Delete a single alias, removing it from all indices it+-- is currently associated with.+deleteIndexAlias :: (MonadBH m) => IndexAliasName -> m Acknowledged+deleteIndexAlias indexAliasName = performBHRequest $ Requests.deleteIndexAlias indexAliasName++-- | 'putTemplate' creates a template given an 'IndexTemplate' and a 'TemplateName'.+-- Explained in further detail at+-- <https://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-templates.html>+--+-- >>> let idxTpl = IndexTemplate [IndexPattern "tweet-*"] (Just (IndexSettings (ShardCount 1) (ReplicaCount 1))) [toJSON TweetMapping]+-- >>> resp <- runBH' $ putTemplate idxTpl (TemplateName "tweet-tpl")+putTemplate :: (MonadBH m) => IndexTemplate -> TemplateName -> m Acknowledged+putTemplate indexTemplate templateName = performBHRequest $ Requests.putTemplate indexTemplate templateName++-- | 'templateExists' checks to see if a template exists.+--+-- >>> exists <- runBH' $ templateExists (TemplateName "tweet-tpl")+templateExists :: (MonadBH m) => TemplateName -> m Bool+templateExists templateName = performBHRequest $ Requests.templateExists templateName++-- | 'deleteTemplate' is an HTTP DELETE and deletes a template.+--+-- >>> let idxTpl = IndexTemplate [IndexPattern "tweet-*"] (Just (IndexSettings (ShardCount 1) (ReplicaCount 1))) [toJSON TweetMapping]+-- >>> _ <- runBH' $ putTemplate idxTpl (TemplateName "tweet-tpl")+-- >>> resp <- runBH' $ deleteTemplate (TemplateName "tweet-tpl")+deleteTemplate :: (MonadBH m) => TemplateName -> m Acknowledged+deleteTemplate templateName = performBHRequest $ Requests.deleteTemplate templateName++-- | 'putMapping' is an HTTP PUT and has upsert semantics. Mappings are schemas+-- for documents in indexes.+--+-- >>> _ <- runBH' $ createIndex defaultIndexSettings testIndex+-- >>> resp <- runBH' $ putMapping testIndex TweetMapping+-- >>> print resp+-- Response {responseStatus = Status {statusCode = 200, statusMessage = "OK"}, responseVersion = HTTP/1.1, responseHeaders = [("content-type","application/json; charset=UTF-8"),("content-encoding","gzip"),("transfer-encoding","chunked")], responseBody = "{\"acknowledged\":true}", responseCookieJar = CJ {expose = []}, responseClose' = ResponseClose}+putMapping :: forall r a m. (MonadBH m, FromJSON r, ToJSON a) => IndexName -> a -> m r+putMapping indexName mapping = performBHRequest $ Requests.putMapping indexName mapping+{-# DEPRECATED putMapping "See <https://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html>" #-}++-- | 'indexDocument' is the primary way to save a single document in+-- Elasticsearch. The document itself is simply something we can+-- convert into a JSON 'Value'. The 'DocId' will function as the+-- primary key for the document. You are encouraged to generate+-- your own id's and not rely on Elasticsearch's automatic id+-- generation. Read more about it here:+-- https://github.com/bitemyapp/bloodhound/issues/107+--+-- >>> resp <- runBH' $ indexDocument testIndex defaultIndexDocumentSettings exampleTweet (DocId "1")+-- >>> print resp+-- Response {responseStatus = Status {statusCode = 200, statusMessage = "OK"}, responseVersion = HTTP/1.1, responseHeaders = [("content-type","application/json; charset=UTF-8"),("content-encoding","gzip"),("content-length","152")], responseBody = "{\"_index\":\"twitter\",\"_type\":\"_doc\",\"_id\":\"1\",\"_version\":2,\"result\":\"updated\",\"_shards\":{\"total\":1,\"successful\":1,\"failed\":0},\"_seq_no\":1,\"_primary_term\":1}", responseCookieJar = CJ {expose = []}, responseClose' = ResponseClose}+indexDocument ::+ forall doc m.+ (MonadBH m, ToJSON doc) =>+ IndexName ->+ IndexDocumentSettings ->+ doc ->+ DocId ->+ m Requests.IndexedDocument+indexDocument indexName cfg document docId = performBHRequest $ Requests.indexDocument indexName cfg document docId++-- | 'updateDocument' provides a way to perform an partial update of a+-- an already indexed document.+updateDocument ::+ forall patch m.+ (MonadBH m, ToJSON patch) =>+ IndexName ->+ IndexDocumentSettings ->+ patch ->+ DocId ->+ m Requests.IndexedDocument+updateDocument indexName cfg patch docId = performBHRequest $ Requests.updateDocument indexName cfg patch docId++updateByQuery :: (MonadBH m, FromJSON a) => IndexName -> Query -> Maybe Script -> m a+updateByQuery indexName q mScript = performBHRequest $ Requests.updateByQuery indexName q mScript++-- | 'deleteDocument' is the primary way to delete a single document.+--+-- >>> _ <- runBH' $ deleteDocument testIndex (DocId "1")+deleteDocument :: (MonadBH m) => IndexName -> DocId -> m Requests.IndexedDocument+deleteDocument indexName docId = performBHRequest $ Requests.deleteDocument indexName docId++-- | 'deleteByQuery' performs a deletion on every document that matches a query.+--+-- >>> let query = TermQuery (Term "user" "bitemyapp") Nothing+-- >>> _ <- runBH' $ deleteDocument testIndex query+deleteByQuery :: (MonadBH m) => IndexName -> Query -> m Requests.DeletedDocuments+deleteByQuery indexName query = performBHRequest $ Requests.deleteByQuery indexName query++-- | 'bulk' uses+-- <http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html Elasticsearch's bulk API>+-- to perform bulk operations. The 'BulkOperation' data type encodes the+-- index\/update\/delete\/create operations. You pass a 'V.Vector' of 'BulkOperation's+-- and a 'Server' to 'bulk' in order to send those operations up to your Elasticsearch+-- server to be performed. I changed from [BulkOperation] to a Vector due to memory overhead.+--+-- >>> let stream = V.fromList [BulkIndex testIndex (DocId "2") (toJSON (BulkTest "blah"))]+-- >>> _ <- runBH' $ bulk stream+-- >>> _ <- runBH' $ refreshIndex testIndex+bulk ::+ forall m.+ (MonadBH m) =>+ V.Vector BulkOperation ->+ m BulkResponse+bulk ops = performBHRequest $ Requests.bulk @StatusDependant ops++-- | 'documentExists' enables you to check if a document exists.+documentExists :: (MonadBH m) => IndexName -> DocId -> m Bool+documentExists indexName docId = performBHRequest $ Requests.documentExists indexName docId++-- | 'searchAll', given a 'Search', will perform that search against all indexes+-- on an Elasticsearch server. Try to avoid doing this if it can be helped.+--+-- >>> let query = TermQuery (Term "user" "bitemyapp") Nothing+-- >>> let search = mkSearch (Just query) Nothing+-- >>> response <- runBH' $ searchAll search+searchAll :: forall a m. (MonadBH m, FromJSON a) => Search -> m (SearchResult a)+searchAll search = performBHRequest $ Requests.searchAll search++-- | 'searchByIndex', given a 'Search' and an 'IndexName', will perform that search+-- within an index on an Elasticsearch server.+--+-- >>> let query = TermQuery (Term "user" "bitemyapp") Nothing+-- >>> let search = mkSearch (Just query) Nothing+-- >>> response <- runBH' $ searchByIndex testIndex search+searchByIndex :: forall a m. (MonadBH m, FromJSON a) => IndexName -> Search -> m (SearchResult a)+searchByIndex indexName search = performBHRequest $ Requests.searchByIndex indexName search++-- | 'searchByIndices' is a variant of 'searchByIndex' that executes a+-- 'Search' over many indices. This is much faster than using+-- 'mapM' to 'searchByIndex' over a collection since it only+-- causes a single HTTP request to be emitted.+searchByIndices :: forall a m. (MonadBH m, FromJSON a) => NonEmpty IndexName -> Search -> m (SearchResult a)+searchByIndices ixs search = performBHRequest $ Requests.searchByIndices ixs search++-- | 'searchByIndexTemplate', given a 'SearchTemplate' and an 'IndexName', will perform that search+-- within an index on an Elasticsearch server.+--+-- >>> let query = SearchTemplateSource "{\"query\": { \"match\" : { \"{{my_field}}\" : \"{{my_value}}\" } }, \"size\" : \"{{my_size}}\"}"+-- >>> let search = mkSearchTemplate (Right query) Nothing+-- >>> response <- runBH' $ searchByIndexTemplate testIndex search+searchByIndexTemplate ::+ forall a m.+ (MonadBH m, FromJSON a) =>+ IndexName ->+ SearchTemplate ->+ m (SearchResult a)+searchByIndexTemplate indexName search = performBHRequest $ Requests.searchByIndexTemplate indexName search++-- | 'searchByIndicesTemplate' is a variant of 'searchByIndexTemplate' that executes a+-- 'SearchTemplate' over many indices. This is much faster than using+-- 'mapM' to 'searchByIndexTemplate' over a collection since it only+-- causes a single HTTP request to be emitted.+searchByIndicesTemplate ::+ forall a m.+ (MonadBH m, FromJSON a) =>+ NonEmpty IndexName ->+ SearchTemplate ->+ m (SearchResult a)+searchByIndicesTemplate ixs search = performBHRequest $ Requests.searchByIndicesTemplate ixs search++-- | 'storeSearchTemplate', saves a 'SearchTemplateSource' to be used later.+storeSearchTemplate :: (MonadBH m) => SearchTemplateId -> SearchTemplateSource -> m Acknowledged+storeSearchTemplate tid ts = performBHRequest $ Requests.storeSearchTemplate tid ts++-- | 'getSearchTemplate', get info of an stored 'SearchTemplateSource'.+getSearchTemplate :: (MonadBH m) => SearchTemplateId -> m GetTemplateScript+getSearchTemplate tid = performBHRequest $ Requests.getSearchTemplate tid++-- | 'storeSearchTemplate',+deleteSearchTemplate :: (MonadBH m) => SearchTemplateId -> m Acknowledged+deleteSearchTemplate tid = performBHRequest $ Requests.deleteSearchTemplate tid++-- | For a given search, request a scroll for efficient streaming of+-- search results. Note that the search is put into 'SearchTypeScan'+-- mode and thus results will not be sorted. Combine this with+-- 'advanceScroll' to efficiently stream through the full result set+getInitialScroll ::+ forall a m.+ (MonadBH m, FromJSON a) =>+ IndexName ->+ Search ->+ m (ParsedEsResponse (SearchResult a))+getInitialScroll indexName search' = performBHRequest $ Requests.getInitialScroll indexName search'++-- | For a given search, request a scroll for efficient streaming of+-- search results. Combine this with 'advanceScroll' to efficiently+-- stream through the full result set. Note that this search respects+-- sorting and may be less efficient than 'getInitialScroll'.+getInitialSortedScroll ::+ forall a m.+ (MonadBH m, FromJSON a) =>+ IndexName ->+ Search ->+ m (SearchResult a)+getInitialSortedScroll indexName search = performBHRequest $ Requests.getInitialSortedScroll indexName search++-- | Use the given scroll to fetch the next page of documents. If there are no+-- further pages, 'SearchResult.searchHits.hits' will be '[]'.+advanceScroll ::+ forall a m.+ (MonadBH m, FromJSON a) =>+ ScrollId ->+ -- | How long should the snapshot of data be kept around? This timeout is updated every time 'advanceScroll' is used, so don't feel the need to set it to the entire duration of your search processing. Note that durations < 1s will be rounded up. Also note that 'NominalDiffTime' is an instance of Num so literals like 60 will be interpreted as seconds. 60s is a reasonable default.+ NominalDiffTime ->+ m (SearchResult a)+advanceScroll sid scroll = performBHRequest $ Requests.advanceScroll sid scroll++-- | 'scanSearch' uses the 'scroll' API of elastic,+-- for a given 'IndexName'. Note that this will+-- consume the entire search result set and will be doing O(n) list+-- appends so this may not be suitable for large result sets. In that+-- case, 'getInitialScroll' and 'advanceScroll' are good low level+-- tools. You should be able to hook them up trivially to conduit,+-- pipes, or your favorite streaming IO abstraction of choice. Note+-- that ordering on the search would destroy performance and thus is+-- ignored.+scanSearch :: forall a m. (FromJSON a, MonadBH m) => IndexName -> Search -> m [Hit a]+scanSearch indexName search = do+ initialSearchResult <- getInitialScroll indexName search+ let (hits', josh) = case initialSearchResult of+ Right SearchResult {..} -> (hits searchHits, scrollId)+ Left _ -> ([], Nothing)+ (totalHits, _) <- scanAccumulator [] (hits', josh)+ return totalHits+ where+ scanAccumulator :: [Hit a] -> ([Hit a], Maybe ScrollId) -> m ([Hit a], Maybe ScrollId)+ scanAccumulator oldHits (newHits, Nothing) = return (oldHits ++ newHits, Nothing)+ scanAccumulator oldHits ([], _) = return (oldHits, Nothing)+ scanAccumulator oldHits (newHits, msid) = do+ (newHits', msid') <- scroll' msid+ scanAccumulator (oldHits ++ newHits) (newHits', msid')++ scroll' :: Maybe ScrollId -> m ([Hit a], Maybe ScrollId)+ scroll' Nothing = return ([], Nothing)+ scroll' (Just sid) = do+ res <- tryPerformBHRequest $ Requests.advanceScroll sid 60+ case res of+ Right SearchResult {..} -> return (hits searchHits, scrollId)+ Left _ -> return ([], Nothing)++-- | This is a hook that can be set via the 'bhRequestHook' function+-- that will authenticate all requests using an HTTP Basic+-- Authentication header. Note that it is *strongly* recommended that+-- this option only be used over an SSL connection.+--+-- >> (mkBHEnv myServer myManager) { bhRequestHook = basicAuthHook (EsUsername "myuser") (EsPassword "mypass") }+basicAuthHook :: (Monad m) => EsUsername -> EsPassword -> Request -> m Request+basicAuthHook (EsUsername u) (EsPassword p) = return . applyBasicAuth u' p'+ where+ u' = T.encodeUtf8 u+ p' = T.encodeUtf8 p++countByIndex :: (MonadBH m) => IndexName -> CountQuery -> m CountResponse+countByIndex indexName q = performBHRequest $ Requests.countByIndex indexName q++reindex :: (MonadBH m) => ReindexRequest -> m ReindexResponse+reindex = performBHRequest . Requests.reindex++reindexAsync :: (MonadBH m) => ReindexRequest -> m TaskNodeId+reindexAsync = performBHRequest . Requests.reindexAsync++getTask :: (MonadBH m, FromJSON a) => TaskNodeId -> m (TaskResponse a)+getTask = performBHRequest . Requests.getTask
+ src/Database/Bloodhound/Common/Requests.hs view
@@ -0,0 +1,1320 @@+{-# LANGUAGE OverloadedLists #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TupleSections #-}++-- |+-- Module : Database.Bloodhound.Common.Requests+-- Copyright : (C) 2014, 2018 Chris Allen+-- License : BSD-style (see the file LICENSE)+-- Maintainer : Chris Allen <cma@bitemyapp.com>+-- Stability : provisional+-- Portability : GHC+--+-- Request to be run against Elasticsearch servers..+module Database.Bloodhound.Common.Requests+ ( -- * Bloodhound client functions++ -- ** Indices+ createIndex,+ createIndexWith,+ flushIndex,+ deleteIndex,+ updateIndexSettings,+ getIndexSettings,+ forceMergeIndex,+ indexExists,+ openIndex,+ closeIndex,+ listIndices,+ catIndices,+ waitForYellowIndex,+ HealthStatus (..),++ -- *** Index Aliases+ updateIndexAliases,+ getIndexAliases,+ deleteIndexAlias,++ -- *** Index Templates+ putTemplate,+ templateExists,+ deleteTemplate,++ -- ** Mapping+ putMapping,++ -- ** Documents+ indexDocument,+ updateDocument,+ updateByQuery,+ getDocument,+ documentExists,+ deleteDocument,+ deleteByQuery,+ IndexedDocument (..),+ DeletedDocuments (..),+ DeletedDocumentsRetries (..),++ -- ** Searching+ searchAll,+ searchByIndex,+ searchByIndices,+ searchByIndexTemplate,+ searchByIndicesTemplate,+ getInitialScroll,+ getInitialSortedScroll,+ advanceScroll,+ refreshIndex,+ mkSearch,+ mkAggregateSearch,+ mkHighlightSearch,+ mkSearchTemplate,+ bulk,+ pageSearch,+ mkShardCount,+ mkReplicaCount,+ getStatus,+ dispatchSearch,++ -- ** Templates+ storeSearchTemplate,+ getSearchTemplate,+ deleteSearchTemplate,++ -- ** Snapshot/Restore++ -- *** Snapshot Repos+ getSnapshotRepos,+ updateSnapshotRepo,+ verifySnapshotRepo,+ deleteSnapshotRepo,++ -- *** Snapshots+ createSnapshot,+ getSnapshots,+ deleteSnapshot,++ -- *** Restoring Snapshots+ restoreSnapshot,++ -- *** Reindex+ reindex,+ reindexAsync,++ -- *** Task+ getTask,++ -- ** Nodes+ getNodesInfo,+ getNodesStats,++ -- ** Request Utilities+ encodeBulkOperations,+ encodeBulkOperation,++ -- * BHResponse-handling tools+ isVersionConflict,+ isSuccess,+ isCreated,+ parseEsResponse,+ parseEsResponseWith,+ decodeResponse,+ eitherDecodeResponse,++ -- * Count+ countByIndex,++ -- * Generic+ Acknowledged (..),+ Accepted (..),+ IgnoredBody (..),++ -- * Performing Requests+ tryPerformBHRequest,+ performBHRequest,+ withBHResponse,+ withBHResponse_,+ withBHResponseParsedEsResponse,+ keepBHResponse,+ joinBHResponse,+ )+where++import Control.Applicative as A+import Control.Monad+import Data.Aeson+import Data.Aeson.Key+import qualified Data.Aeson.KeyMap as X+import Data.ByteString.Builder+import qualified Data.ByteString.Lazy.Char8 as L+import Data.Foldable (toList)+import qualified Data.List as LS (foldl')+import Data.List.NonEmpty (NonEmpty (..))+import Data.Maybe (catMaybes)+import Data.Monoid+import Data.Text (Text)+import qualified Data.Text as T+import Data.Time.Clock+import qualified Data.Vector as V+import Database.Bloodhound.Client.Cluster+import Database.Bloodhound.Common.Types+import Database.Bloodhound.Internal.Utils.Imports (showText)+import Database.Bloodhound.Internal.Utils.Requests+import Prelude hiding (filter, head)++-- | 'mkShardCount' is a straight-forward smart constructor for 'ShardCount'+-- which rejects 'Int' values below 1 and above 1000.+--+-- >>> mkShardCount 10+-- Just (ShardCount 10)+mkShardCount :: Int -> Maybe ShardCount+mkShardCount n+ | n < 1 = Nothing+ | n > 1000 = Nothing+ | otherwise = Just (ShardCount n)++-- | 'mkReplicaCount' is a straight-forward smart constructor for 'ReplicaCount'+-- which rejects 'Int' values below 0 and above 1000.+--+-- >>> mkReplicaCount 10+-- Just (ReplicaCount 10)+mkReplicaCount :: Int -> Maybe ReplicaCount+mkReplicaCount n+ | n < 0 = Nothing+ | n > 1000 = Nothing -- ...+ | otherwise = Just (ReplicaCount n)++-- | 'getStatus' fetches the 'Status' of a 'Server'+--+-- >>> serverStatus <- runBH' getStatus+-- >>> fmap tagline (serverStatus)+-- Just "You Know, for Search"+getStatus :: BHRequest StatusDependant Status+getStatus = get []++-- | 'getSnapshotRepos' gets the definitions of a subset of the+-- defined snapshot repos.+getSnapshotRepos :: SnapshotRepoSelection -> BHRequest StatusDependant [GenericSnapshotRepo]+getSnapshotRepos sel =+ unGSRs <$> get ["_snapshot", selectorSeg]+ where+ selectorSeg = case sel of+ AllSnapshotRepos -> "_all"+ SnapshotRepoList (p :| ps) -> T.intercalate "," (renderPat <$> (p : ps))+ renderPat (RepoPattern t) = t+ renderPat (ExactRepo (SnapshotRepoName t)) = t++-- | Wrapper to extract the list of 'GenericSnapshotRepo' in the+-- format they're returned in+newtype GSRs = GSRs {unGSRs :: [GenericSnapshotRepo]}++instance FromJSON GSRs where+ parseJSON = withObject "Collection of GenericSnapshotRepo" parse+ where+ parse = fmap GSRs . mapM (uncurry go) . X.toList+ go rawName = withObject "GenericSnapshotRepo" $ \o ->+ GenericSnapshotRepo (SnapshotRepoName $ toText rawName)+ <$> o+ .: "type"+ <*> o+ .: "settings"++-- | Create or update a snapshot repo+updateSnapshotRepo ::+ (SnapshotRepo repo) =>+ -- | Use 'defaultSnapshotRepoUpdateSettings' if unsure+ SnapshotRepoUpdateSettings ->+ repo ->+ BHRequest StatusIndependant Acknowledged+updateSnapshotRepo SnapshotRepoUpdateSettings {..} repo =+ put endpoint (encode body)+ where+ endpoint = ["_snapshot", snapshotRepoName gSnapshotRepoName] `withQueries` params+ params+ | repoUpdateVerify = []+ | otherwise = [("verify", Just "false")]+ body =+ object+ [ "type" .= gSnapshotRepoType,+ "settings" .= gSnapshotRepoSettings+ ]+ GenericSnapshotRepo {..} = toGSnapshotRepo repo++-- | Verify if a snapshot repo is working. __NOTE:__ this API did not+-- make it into Elasticsearch until 1.4. If you use an older version,+-- you will get an error here.+verifySnapshotRepo :: SnapshotRepoName -> BHRequest StatusDependant SnapshotVerification+verifySnapshotRepo (SnapshotRepoName n) =+ post ["_snapshot", n, "_verify"] emptyBody++deleteSnapshotRepo :: SnapshotRepoName -> BHRequest StatusIndependant Acknowledged+deleteSnapshotRepo (SnapshotRepoName n) =+ delete ["_snapshot", n]++-- | Create and start a snapshot+createSnapshot ::+ SnapshotRepoName ->+ SnapshotName ->+ SnapshotCreateSettings ->+ BHRequest StatusIndependant Acknowledged+createSnapshot (SnapshotRepoName repoName) (SnapshotName snapName) SnapshotCreateSettings {..} =+ put endpoint body+ where+ endpoint = ["_snapshot", repoName, snapName] `withQueries` params+ params = [("wait_for_completion", Just (boolQP snapWaitForCompletion))]+ body = encode $ object prs+ prs =+ catMaybes+ [ ("indices" .=) . indexSelectionName <$> snapIndices,+ Just ("ignore_unavailable" .= snapIgnoreUnavailable),+ Just ("ignore_global_state" .= snapIncludeGlobalState),+ Just ("partial" .= snapPartial)+ ]++indexSelectionName :: IndexSelection -> Text+indexSelectionName AllIndexes = "_all"+indexSelectionName (IndexList (i :| is)) = T.intercalate "," (unIndexName <$> (i : is))++-- | Get info about known snapshots given a pattern and repo name.+getSnapshots :: SnapshotRepoName -> SnapshotSelection -> BHRequest StatusDependant [SnapshotInfo]+getSnapshots (SnapshotRepoName repoName) sel =+ unSIs <$> get ["_snapshot", repoName, snapPath]+ where+ snapPath = case sel of+ AllSnapshots -> "_all"+ SnapshotList (s :| ss) -> T.intercalate "," (renderPath <$> (s : ss))+ renderPath (SnapPattern t) = t+ renderPath (ExactSnap (SnapshotName t)) = t++newtype SIs = SIs {unSIs :: [SnapshotInfo]}++instance FromJSON SIs where+ parseJSON = withObject "Collection of SnapshotInfo" parse+ where+ parse o = SIs <$> o .: "snapshots"++-- | Delete a snapshot. Cancels if it is running.+deleteSnapshot :: SnapshotRepoName -> SnapshotName -> BHRequest StatusIndependant Acknowledged+deleteSnapshot (SnapshotRepoName repoName) (SnapshotName snapName) =+ delete ["_snapshot", repoName, snapName]++-- | Restore a snapshot to the cluster See+-- <https://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-snapshots.html#_restore>+-- for more details.+restoreSnapshot ::+ SnapshotRepoName ->+ SnapshotName ->+ -- | Start with 'defaultSnapshotRestoreSettings' and customize+ -- from there for reasonable defaults.+ SnapshotRestoreSettings ->+ BHRequest StatusIndependant Accepted+restoreSnapshot (SnapshotRepoName repoName) (SnapshotName snapName) SnapshotRestoreSettings {..} =+ post endpoint (encode body)+ where+ endpoint = ["_snapshot", repoName, snapName, "_restore"] `withQueries` params+ params = [("wait_for_completion", Just (boolQP snapRestoreWaitForCompletion))]+ body =+ object $+ catMaybes+ [ ("indices" .=) . indexSelectionName <$> snapRestoreIndices,+ Just ("ignore_unavailable" .= snapRestoreIgnoreUnavailable),+ Just ("include_global_state" .= snapRestoreIncludeGlobalState),+ ("rename_pattern" .=) <$> snapRestoreRenamePattern,+ ("rename_replacement" .=) . renderTokens <$> snapRestoreRenameReplacement,+ Just ("include_aliases" .= snapRestoreIncludeAliases),+ ("index_settings" .=) <$> snapRestoreIndexSettingsOverrides,+ ("ignore_index_settings" .=) <$> snapRestoreIgnoreIndexSettings+ ]+ renderTokens (t :| ts) = mconcat (renderToken <$> (t : ts))+ renderToken (RRTLit t) = t+ renderToken RRSubWholeMatch = "$0"+ renderToken (RRSubGroup g) = T.pack (show (rrGroupRefNum g))++getNodesInfo :: NodeSelection -> BHRequest StatusDependant NodesInfo+getNodesInfo sel =+ get ["_nodes", selectionSeg]+ where+ selectionSeg = case sel of+ LocalNode -> "_local"+ NodeList (l :| ls) -> T.intercalate "," (selToSeg <$> (l : ls))+ AllNodes -> "_all"+ selToSeg (NodeByName (NodeName n)) = n+ selToSeg (NodeByFullNodeId (FullNodeId i)) = i+ selToSeg (NodeByHost (Server s)) = s+ selToSeg (NodeByAttribute (NodeAttrName a) v) = a <> ":" <> v++getNodesStats :: NodeSelection -> BHRequest StatusDependant NodesStats+getNodesStats sel =+ get ["_nodes", selectionSeg, "stats"]+ where+ selectionSeg = case sel of+ LocalNode -> "_local"+ NodeList (l :| ls) -> T.intercalate "," (selToSeg <$> (l : ls))+ AllNodes -> "_all"+ selToSeg (NodeByName (NodeName n)) = n+ selToSeg (NodeByFullNodeId (FullNodeId i)) = i+ selToSeg (NodeByHost (Server s)) = s+ selToSeg (NodeByAttribute (NodeAttrName a) v) = a <> ":" <> v++-- | 'createIndex' will create an index given a 'Server', 'IndexSettings', and an 'IndexName'.+--+-- >>> response <- runBH' $ createIndex defaultIndexSettings (IndexName "didimakeanindex")+-- >>> isSuccess response+-- True+-- >>> runBH' $ indexExists (IndexName "didimakeanindex")+-- True+createIndex :: IndexSettings -> IndexName -> BHRequest StatusDependant Acknowledged+createIndex indexSettings indexName =+ put [unIndexName indexName] $ encode indexSettings++-- | Create an index, providing it with any number of settings. This+-- is more expressive than 'createIndex' but makes is more verbose+-- for the common case of configuring only the shard count and+-- replica count.+createIndexWith ::+ [UpdatableIndexSetting] ->+ -- | shard count+ Int ->+ IndexName ->+ BHRequest StatusIndependant Acknowledged+createIndexWith updates shards indexName =+ put [unIndexName indexName] body+ where+ body =+ encode $+ object+ [ "settings"+ .= deepMerge+ ( X.singleton "index.number_of_shards" (toJSON shards)+ : [u | Object u <- toJSON <$> updates]+ )+ ]++-- | 'flushIndex' will flush an index given a 'Server' and an 'IndexName'.+flushIndex :: IndexName -> BHRequest StatusDependant ShardResult+flushIndex indexName =+ post [unIndexName indexName, "_flush"] emptyBody++-- | 'deleteIndex' will delete an index given a 'Server' and an 'IndexName'.+--+-- >>> _ <- runBH' $ createIndex defaultIndexSettings (IndexName "didimakeanindex")+-- >>> response <- runBH' $ deleteIndex (IndexName "didimakeanindex")+-- >>> isSuccess response+-- True+-- >>> runBH' $ indexExists (IndexName "didimakeanindex")+-- False+deleteIndex :: IndexName -> BHRequest StatusDependant Acknowledged+deleteIndex indexName =+ delete [unIndexName indexName]++-- | 'updateIndexSettings' will apply a non-empty list of setting updates to an index+--+-- >>> _ <- runBH' $ createIndex defaultIndexSettings (IndexName "unconfiguredindex")+-- >>> response <- runBH' $ updateIndexSettings (BlocksWrite False :| []) (IndexName "unconfiguredindex")+-- >>> isSuccess response+-- True+updateIndexSettings ::+ NonEmpty UpdatableIndexSetting ->+ IndexName ->+ BHRequest StatusIndependant Acknowledged+updateIndexSettings updates indexName =+ put [unIndexName indexName, "_settings"] (encode body)+ where+ body = Object (deepMerge [u | Object u <- toJSON <$> toList updates])++getIndexSettings :: IndexName -> BHRequest StatusDependant IndexSettingsSummary+getIndexSettings indexName =+ get [unIndexName indexName, "_settings"]++-- | 'forceMergeIndex'+--+-- The force merge API allows to force merging of one or more indices through+-- an API. The merge relates to the number of segments a Lucene index holds+-- within each shard. The force merge operation allows to reduce the number of+-- segments by merging them.+--+-- This call will block until the merge is complete. If the http connection is+-- lost, the request will continue in the background, and any new requests will+-- block until the previous force merge is complete.++-- For more information see+-- <https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html#indices-forcemerge>.+-- Nothing+-- worthwhile comes back in the response body, so matching on the status+-- should suffice.+--+-- 'forceMergeIndex' with a maxNumSegments of 1 and onlyExpungeDeletes+-- to True is the main way to release disk space back to the OS being+-- held by deleted documents.+--+-- >>> let ixn = IndexName "unoptimizedindex"+-- >>> _ <- runBH' $ deleteIndex ixn >> createIndex defaultIndexSettings ixn+-- >>> response <- runBH' $ forceMergeIndex (IndexList (ixn :| [])) (defaultIndexOptimizationSettings { maxNumSegments = Just 1, onlyExpungeDeletes = True })+-- >>> isSuccess response+-- True+forceMergeIndex :: IndexSelection -> ForceMergeIndexSettings -> BHRequest StatusDependant ShardsResult+forceMergeIndex ixs ForceMergeIndexSettings {..} =+ post endpoint emptyBody+ where+ endpoint = [indexName, "_forcemerge"] `withQueries` params+ params =+ catMaybes+ [ ("max_num_segments",) . Just . showText <$> maxNumSegments,+ Just ("only_expunge_deletes", Just (boolQP onlyExpungeDeletes)),+ Just ("flush", Just (boolQP flushAfterOptimize))+ ]+ indexName = indexSelectionName ixs++deepMerge :: [Object] -> Object+deepMerge = LS.foldl' (X.unionWith merge) mempty+ where+ merge (Object a) (Object b) = Object (deepMerge [a, b])+ merge _ b = b++doesExist :: Endpoint -> BHRequest StatusDependant Bool+doesExist =+ withBHResponse_ isSuccess . head' @StatusDependant @IgnoredBody++-- | 'indexExists' enables you to check if an index exists. Returns 'Bool'+-- in IO+--+-- >>> exists <- runBH' $ indexExists testIndex+indexExists :: IndexName -> BHRequest StatusDependant Bool+indexExists indexName =+ doesExist [unIndexName indexName]++-- | 'refreshIndex' will force a refresh on an index. You must+-- do this if you want to read what you wrote.+--+-- >>> _ <- runBH' $ createIndex defaultIndexSettings testIndex+-- >>> _ <- runBH' $ refreshIndex testIndex+refreshIndex :: IndexName -> BHRequest StatusDependant ShardResult+refreshIndex indexName =+ post [unIndexName indexName, "_refresh"] emptyBody++-- | Block until the index becomes available for indexing+-- documents. This is useful for integration tests in which+-- indices are rapidly created and deleted.+waitForYellowIndex :: IndexName -> BHRequest StatusIndependant HealthStatus+waitForYellowIndex indexName =+ get endpoint+ where+ endpoint = ["_cluster", "health", unIndexName indexName] `withQueries` params+ params = [("wait_for_status", Just "yellow"), ("timeout", Just "10s")]++data HealthStatus = HealthStatus+ { healthStatusClusterName :: Text,+ healthStatusStatus :: Text,+ healthStatusTimedOut :: Bool,+ healthStatusNumberOfNodes :: Int,+ healthStatusNumberOfDataNodes :: Int,+ healthStatusActivePrimaryShards :: Int,+ healthStatusActiveShards :: Int,+ healthStatusRelocatingShards :: Int,+ healthStatusInitializingShards :: Int,+ healthStatusUnassignedShards :: Int,+ healthStatusDelayedUnassignedShards :: Int,+ healthStatusNumberOfPendingTasks :: Int,+ healthStatusNumberOfInFlightFetch :: Int,+ healthStatusTaskMaxWaitingInQueueMillis :: Int,+ healthStatusActiveShardsPercentAsNumber :: Float+ }+ deriving stock (Eq, Show)++instance FromJSON HealthStatus where+ parseJSON =+ withObject "HealthStatus" $ \v ->+ HealthStatus+ <$> v+ .: "cluster_name"+ <*> v+ .: "status"+ <*> v+ .: "timed_out"+ <*> v+ .: "number_of_nodes"+ <*> v+ .: "number_of_data_nodes"+ <*> v+ .: "active_primary_shards"+ <*> v+ .: "active_shards"+ <*> v+ .: "relocating_shards"+ <*> v+ .: "initializing_shards"+ <*> v+ .: "unassigned_shards"+ <*> v+ .: "delayed_unassigned_shards"+ <*> v+ .: "number_of_pending_tasks"+ <*> v+ .: "number_of_in_flight_fetch"+ <*> v+ .: "task_max_waiting_in_queue_millis"+ <*> v+ .: "active_shards_percent_as_number"++openOrCloseIndexes :: OpenCloseIndex -> IndexName -> BHRequest StatusIndependant Acknowledged+openOrCloseIndexes oci indexName =+ post [unIndexName indexName, stringifyOCIndex] emptyBody+ where+ stringifyOCIndex = case oci of+ OpenIndex -> "_open"+ CloseIndex -> "_close"++-- | 'openIndex' opens an index given a 'Server' and an 'IndexName'. Explained in further detail at+-- <http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html>+--+-- >>> response <- runBH' $ openIndex testIndex+openIndex :: IndexName -> BHRequest StatusIndependant Acknowledged+openIndex = openOrCloseIndexes OpenIndex++-- | 'closeIndex' closes an index given a 'Server' and an 'IndexName'. Explained in further detail at+-- <http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html>+--+-- >>> response <- runBH' $ closeIndex testIndex+closeIndex :: IndexName -> BHRequest StatusIndependant Acknowledged+closeIndex = openOrCloseIndexes CloseIndex++-- | 'listIndices' returns a list of all index names on a given 'Server'+listIndices :: BHRequest StatusDependant [IndexName]+listIndices =+ map unListedIndexName <$> get ["_cat/indices?format=json"]++newtype ListedIndexName = ListedIndexName {unListedIndexName :: IndexName}+ deriving stock (Eq, Show)++instance FromJSON ListedIndexName where+ parseJSON =+ withObject "ListedIndexName" $ \o ->+ ListedIndexName <$> o .: "index"++-- | 'catIndices' returns a list of all index names on a given 'Server' as well as their doc counts+catIndices :: BHRequest StatusDependant [(IndexName, Int)]+catIndices =+ map unListedIndexNameWithCount <$> get ["_cat/indices?format=json"]++newtype ListedIndexNameWithCount = ListedIndexNameWithCount {unListedIndexNameWithCount :: (IndexName, Int)}+ deriving stock (Eq, Show)++instance FromJSON ListedIndexNameWithCount where+ parseJSON =+ withObject "ListedIndexNameWithCount" $ \o -> do+ xs <- (,) <$> o .: "index" <*> o .: "docs.count"+ return $ ListedIndexNameWithCount xs++-- | 'updateIndexAliases' updates the server's index alias+-- table. Operations are atomic. Explained in further detail at+-- <https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>+--+-- >>> let src = IndexName "a-real-index"+-- >>> let aliasName = IndexName "an-alias"+-- >>> let iAlias = IndexAlias src (IndexAliasName aliasName)+-- >>> let aliasCreate = IndexAliasCreate Nothing Nothing+-- >>> _ <- runBH' $ deleteIndex src+-- >>> isSuccess <$> runBH' (createIndex defaultIndexSettings src)+-- True+-- >>> runBH' $ indexExists src+-- True+-- >>> isSuccess <$> runBH' (updateIndexAliases (AddAlias iAlias aliasCreate :| []))+-- True+-- >>> runBH' $ indexExists aliasName+-- True+updateIndexAliases :: NonEmpty IndexAliasAction -> BHRequest StatusIndependant Acknowledged+updateIndexAliases actions =+ post ["_aliases"] (encode body)+ where+ body = object ["actions" .= toList actions]++-- | Get all aliases configured on the server.+getIndexAliases :: BHRequest StatusDependant IndexAliasesSummary+getIndexAliases =+ get ["_aliases"]++-- | Delete a single alias, removing it from all indices it+-- is currently associated with.+deleteIndexAlias :: IndexAliasName -> BHRequest StatusIndependant Acknowledged+deleteIndexAlias (IndexAliasName name) =+ delete ["_all", "_alias", unIndexName name]++-- | 'putTemplate' creates a template given an 'IndexTemplate' and a 'TemplateName'.+-- Explained in further detail at+-- <https://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-templates.html>+--+-- >>> let idxTpl = IndexTemplate [IndexPattern "tweet-*"] (Just (IndexSettings (ShardCount 1) (ReplicaCount 1))) [toJSON TweetMapping]+-- >>> resp <- runBH' $ putTemplate idxTpl (TemplateName "tweet-tpl")+putTemplate :: IndexTemplate -> TemplateName -> BHRequest StatusIndependant Acknowledged+putTemplate indexTemplate (TemplateName templateName) =+ put ["_template", templateName] (encode indexTemplate)++-- | 'templateExists' checks to see if a template exists.+--+-- >>> exists <- runBH' $ templateExists (TemplateName "tweet-tpl")+templateExists :: TemplateName -> BHRequest StatusDependant Bool+templateExists (TemplateName templateName) =+ doesExist ["_template", templateName]++-- | 'deleteTemplate' is an HTTP DELETE and deletes a template.+--+-- >>> let idxTpl = IndexTemplate [IndexPattern "tweet-*"] (Just (IndexSettings (ShardCount 1) (ReplicaCount 1))) [toJSON TweetMapping]+-- >>> _ <- runBH' $ putTemplate idxTpl (TemplateName "tweet-tpl")+-- >>> resp <- runBH' $ deleteTemplate (TemplateName "tweet-tpl")+deleteTemplate :: TemplateName -> BHRequest StatusIndependant Acknowledged+deleteTemplate (TemplateName templateName) =+ delete ["_template", templateName]++-- | 'putMapping' is an HTTP PUT and has upsert semantics. Mappings are schemas+-- for documents in indexes.+--+-- >>> _ <- runBH' $ createIndex defaultIndexSettings testIndex+-- >>> resp <- runBH' $ putMapping testIndex TweetMapping+-- >>> print resp+-- Response {responseStatus = Status {statusCode = 200, statusMessage = "OK"}, responseVersion = HTTP/1.1, responseHeaders = [("content-type","application/json; charset=UTF-8"),("content-encoding","gzip"),("transfer-encoding","chunked")], responseBody = "{\"acknowledged\":true}", responseCookieJar = CJ {expose = []}, responseClose' = ResponseClose}+putMapping :: (FromJSON r, ToJSON a) => IndexName -> a -> BHRequest StatusDependant r+putMapping indexName mapping =+ -- "_mapping" above is originally transposed+ -- erroneously. The correct API call is: "/INDEX/_mapping"+ put [unIndexName indexName, "_mapping"] (encode mapping)+{-# DEPRECATED putMapping "See <https://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html>" #-}++versionCtlParams :: IndexDocumentSettings -> [(Text, Maybe Text)]+versionCtlParams cfg =+ case idsVersionControl cfg of+ NoVersionControl -> []+ InternalVersion v -> versionParams v "internal"+ ExternalGT (ExternalDocVersion v) -> versionParams v "external_gt"+ ExternalGTE (ExternalDocVersion v) -> versionParams v "external_gte"+ ForceVersion (ExternalDocVersion v) -> versionParams v "force"+ where+ vt = showText . docVersionNumber+ versionParams :: DocVersion -> Text -> [(Text, Maybe Text)]+ versionParams v t =+ [ ("version", Just $ vt v),+ ("version_type", Just t)+ ]++-- | 'indexDocument' is the primary way to save a single document in+-- Elasticsearch. The document itself is simply something we can+-- convert into a JSON 'Value'. The 'DocId' will function as the+-- primary key for the document. You are encouraged to generate+-- your own id's and not rely on Elasticsearch's automatic id+-- generation. Read more about it here:+-- https://github.com/bitemyapp/bloodhound/issues/107+--+-- >>> resp <- runBH' $ indexDocument testIndex defaultIndexDocumentSettings exampleTweet (DocId "1")+-- >>> print resp+-- Response {responseStatus = Status {statusCode = 200, statusMessage = "OK"}, responseVersion = HTTP/1.1, responseHeaders = [("content-type","application/json; charset=UTF-8"),("content-encoding","gzip"),("content-length","152")], responseBody = "{\"_index\":\"twitter\",\"_type\":\"_doc\",\"_id\":\"1\",\"_version\":2,\"result\":\"updated\",\"_shards\":{\"total\":1,\"successful\":1,\"failed\":0},\"_seq_no\":1,\"_primary_term\":1}", responseCookieJar = CJ {expose = []}, responseClose' = ResponseClose}+indexDocument ::+ (ToJSON doc) =>+ IndexName ->+ IndexDocumentSettings ->+ doc ->+ DocId ->+ BHRequest StatusDependant IndexedDocument+indexDocument indexName cfg document (DocId docId) =+ put endpoint (encode body)+ where+ endpoint = [unIndexName indexName, "_doc", docId] `withQueries` indexQueryString cfg (DocId docId)+ body = encodeDocument cfg document++data IndexedDocument = IndexedDocument+ { idxDocIndex :: Text,+ idxDocType :: Maybe Text,+ idxDocId :: Text,+ idxDocVersion :: Int,+ idxDocResult :: Text,+ idxDocShards :: ShardResult,+ idxDocSeqNo :: Int,+ idxDocPrimaryTerm :: Int+ }+ deriving stock (Eq, Show)++{-# DEPRECATED idxDocType "deprecated since ElasticSearch 6.0" #-}++instance FromJSON IndexedDocument where+ parseJSON =+ withObject "IndexedDocument" $ \v ->+ IndexedDocument+ <$> v+ .: "_index"+ <*> v+ .:? "_type"+ <*> v+ .: "_id"+ <*> v+ .: "_version"+ <*> v+ .: "result"+ <*> v+ .: "_shards"+ <*> v+ .: "_seq_no"+ <*> v+ .: "_primary_term"++-- | 'updateDocument' provides a way to perform an partial update of a+-- an already indexed document.+updateDocument ::+ (ToJSON patch) =>+ IndexName ->+ IndexDocumentSettings ->+ patch ->+ DocId ->+ BHRequest StatusDependant IndexedDocument+updateDocument indexName cfg patch (DocId docId) =+ post endpoint (encode body)+ where+ endpoint = [unIndexName indexName, "_update", docId] `withQueries` indexQueryString cfg (DocId docId)+ body = object ["doc" .= encodeDocument cfg patch]++updateByQuery ::+ (FromJSON a) =>+ IndexName ->+ Query ->+ Maybe Script ->+ BHRequest StatusDependant a+updateByQuery indexName q mScript =+ post endpoint (encode body)+ where+ endpoint = [unIndexName indexName, "_update_by_query"]+ body = Object $ ("query" .= q) <> scriptObject+ scriptObject :: X.KeyMap Value+ scriptObject = case toJSON mScript of+ Null -> mempty+ Object o -> o+ x -> "script" .= x++{- From ES docs:+ Parent and child documents must be indexed on the same shard.+ This means that the same routing value needs to be provided when getting, deleting, or updating a child document.++ Parent/Child support in Bloodhound requires MUCH more love.+ To work it around for now (and to support the existing unit test) we route "parent" documents to their "_id"+ (which is the default strategy for the ES), and route all child documents to their parens' "_id"++ However, it may not be flexible enough for some corner cases.++ Buld operations are completely unaware of "routing" and are probably broken in that matter.+ Or perhaps they always were, because the old "_parent" would also have this requirement.+-}+indexQueryString :: IndexDocumentSettings -> DocId -> [(Text, Maybe Text)]+indexQueryString cfg (DocId docId) =+ versionCtlParams cfg <> routeParams+ where+ routeParams = case idsJoinRelation cfg of+ Nothing -> []+ Just (ParentDocument _ _) -> [("routing", Just docId)]+ Just (ChildDocument _ _ (DocId pid)) -> [("routing", Just pid)]++encodeDocument :: (ToJSON doc) => IndexDocumentSettings -> doc -> Value+encodeDocument cfg document =+ case idsJoinRelation cfg of+ Nothing -> toJSON document+ Just (ParentDocument (FieldName field) name) ->+ mergeObjects (toJSON document) (object [fromText field .= name])+ Just (ChildDocument (FieldName field) name parent) ->+ mergeObjects (toJSON document) (object [fromText field .= object ["name" .= name, "parent" .= parent]])+ where+ mergeObjects (Object a) (Object b) = Object (a <> b)+ mergeObjects _ _ = error "Impossible happened: both document body and join parameters must be objects"++-- | 'deleteDocument' is the primary way to delete a single document.+--+-- >>> _ <- runBH' $ deleteDocument testIndex (DocId "1")+deleteDocument :: IndexName -> DocId -> BHRequest StatusDependant IndexedDocument+deleteDocument indexName (DocId docId) =+ delete [unIndexName indexName, "_doc", docId]++-- | 'deleteByQuery' performs a deletion on every document that matches a query.+--+-- >>> let query = TermQuery (Term "user" "bitemyapp") Nothing+-- >>> _ <- runBH' $ deleteDocument testIndex query+deleteByQuery :: IndexName -> Query -> BHRequest StatusDependant DeletedDocuments+deleteByQuery indexName query =+ post [unIndexName indexName, "_delete_by_query"] (encode body)+ where+ body = object ["query" .= query]++data DeletedDocuments = DeletedDocuments+ { delDocsTook :: Int,+ delDocsTimedOut :: Bool,+ delDocsTotal :: Int,+ delDocsDeleted :: Int,+ delDocsBatches :: Int,+ delDocsVersionConflicts :: Int,+ delDocsNoops :: Int,+ delDocsRetries :: DeletedDocumentsRetries,+ delDocsThrottledMillis :: Int,+ delDocsRequestsPerSecond :: Float,+ delDocsThrottledUntilMillis :: Int,+ delDocsFailures :: [Value] -- TODO find examples+ }+ deriving stock (Eq, Show)++instance FromJSON DeletedDocuments where+ parseJSON =+ withObject "DeletedDocuments" $ \v ->+ DeletedDocuments+ <$> v+ .: "took"+ <*> v+ .: "timed_out"+ <*> v+ .: "total"+ <*> v+ .: "deleted"+ <*> v+ .: "batches"+ <*> v+ .: "version_conflicts"+ <*> v+ .: "noops"+ <*> v+ .: "retries"+ <*> v+ .: "throttled_millis"+ <*> v+ .: "requests_per_second"+ <*> v+ .: "throttled_until_millis"+ <*> v+ .: "failures"++data DeletedDocumentsRetries = DeletedDocumentsRetries+ { delDocsRetriesBulk :: Int,+ delDocsRetriesSearch :: Int+ }+ deriving stock (Eq, Show)++instance FromJSON DeletedDocumentsRetries where+ parseJSON =+ withObject "DeletedDocumentsRetries" $ \v ->+ DeletedDocumentsRetries+ <$> v+ .: "bulk"+ <*> v+ .: "search"++-- | 'bulk' uses+-- <http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html Elasticsearch's bulk API>+-- to perform bulk operations. The 'BulkOperation' data type encodes the+-- index\/update\/delete\/create operations. You pass a 'V.Vector' of 'BulkOperation's+-- and a 'Server' to 'bulk' in order to send those operations up to your Elasticsearch+-- server to be performed. I changed from [BulkOperation] to a Vector due to memory overhead.+--+-- >>> let stream = V.fromList [BulkIndex testIndex (DocId "2") (toJSON (BulkTest "blah"))]+-- >>> _ <- runBH' $ bulk stream+-- >>> _ <- runBH' $ refreshIndex testIndex+bulk ::+ (ParseBHResponse contextualized) =>+ V.Vector BulkOperation ->+ BHRequest contextualized BulkResponse+bulk =+ post ["_bulk"] . encodeBulkOperations++-- | 'encodeBulkOperations' is a convenience function for dumping a vector of 'BulkOperation'+-- into an 'L.ByteString'+--+-- >>> let bulkOps = V.fromList [BulkIndex testIndex (DocId "2") (toJSON (BulkTest "blah"))]+-- >>> encodeBulkOperations bulkOps+-- "\n{\"index\":{\"_id\":\"2\",\"_index\":\"twitter\"}}\n{\"name\":\"blah\"}\n"+encodeBulkOperations :: V.Vector BulkOperation -> L.ByteString+encodeBulkOperations stream = collapsed+ where+ blobs =+ fmap encodeBulkOperation stream+ mashedTaters =+ mash (mempty :: Builder) blobs+ collapsed =+ toLazyByteString $ mappend mashedTaters (byteString "\n")+ mash :: Builder -> V.Vector L.ByteString -> Builder+ mash = V.foldl' (\b x -> b <> byteString "\n" <> lazyByteString x)++mkBulkStreamValue :: Text -> IndexName -> Text -> Value+mkBulkStreamValue operation indexName docId =+ object+ [ fromText operation+ .= object+ [ "_index" .= indexName,+ "_id" .= docId+ ]+ ]++mkBulkStreamValueAuto :: Text -> IndexName -> Value+mkBulkStreamValueAuto operation indexName =+ object+ [ fromText operation+ .= object ["_index" .= indexName]+ ]++mkBulkStreamValueWithMeta :: [UpsertActionMetadata] -> Text -> IndexName -> Text -> Value+mkBulkStreamValueWithMeta meta operation indexName docId =+ object+ [ fromText operation+ .= object+ ( [ "_index" .= indexName,+ "_id" .= docId+ ]+ <> (buildUpsertActionMetadata <$> meta)+ )+ ]++-- | 'encodeBulkOperation' is a convenience function for dumping a single 'BulkOperation'+-- into an 'L.ByteString'+--+-- >>> let bulkOp = BulkIndex testIndex (DocId "2") (toJSON (BulkTest "blah"))+-- >>> encodeBulkOperation bulkOp+-- "{\"index\":{\"_id\":\"2\",\"_index\":\"twitter\"}}\n{\"name\":\"blah\"}"+encodeBulkOperation :: BulkOperation -> L.ByteString+encodeBulkOperation (BulkIndex indexName (DocId docId) value) = blob+ where+ metadata = mkBulkStreamValue "index" indexName docId+ blob = encode metadata `mappend` "\n" `mappend` encode value+encodeBulkOperation (BulkIndexAuto indexName value) = blob+ where+ metadata = mkBulkStreamValueAuto "index" indexName+ blob = encode metadata `mappend` "\n" `mappend` encode value+encodeBulkOperation (BulkIndexEncodingAuto indexName encoding) = toLazyByteString blob+ where+ metadata = toEncoding (mkBulkStreamValueAuto "index" indexName)+ blob = fromEncoding metadata <> "\n" <> fromEncoding encoding+encodeBulkOperation (BulkCreate indexName (DocId docId) value) = blob+ where+ metadata = mkBulkStreamValue "create" indexName docId+ blob = encode metadata `mappend` "\n" `mappend` encode value+encodeBulkOperation (BulkDelete indexName (DocId docId)) = blob+ where+ metadata = mkBulkStreamValue "delete" indexName docId+ blob = encode metadata+encodeBulkOperation (BulkUpdate indexName (DocId docId) value) = blob+ where+ metadata = mkBulkStreamValue "update" indexName docId+ doc = object ["doc" .= value]+ blob = encode metadata `mappend` "\n" `mappend` encode doc+encodeBulkOperation+ ( BulkUpsert+ indexName+ (DocId docId)+ payload+ actionMeta+ ) = blob+ where+ metadata = mkBulkStreamValueWithMeta actionMeta "update" indexName docId+ blob = encode metadata <> "\n" <> encode doc+ doc = case payload of+ UpsertDoc value -> object ["doc" .= value, "doc_as_upsert" .= True]+ UpsertScript scriptedUpsert script value ->+ let scup = if scriptedUpsert then ["scripted_upsert" .= True] else []+ upsert = ["upsert" .= value]+ in case (object (scup <> upsert), toJSON script) of+ (Object obj, Object jscript) -> Object $ jscript <> obj+ _ -> error "Impossible happened: serialising Script to Json should always be Object"+encodeBulkOperation (BulkCreateEncoding indexName (DocId docId) encoding) =+ toLazyByteString blob+ where+ metadata = toEncoding (mkBulkStreamValue "create" indexName docId)+ blob = fromEncoding metadata <> "\n" <> fromEncoding encoding++-- | 'getDocument' is a straight-forward way to fetch a single document from+-- Elasticsearch using a 'Server', 'IndexName', and a 'DocId'.+-- The 'DocId' is the primary key for your Elasticsearch document.+--+-- >>> yourDoc <- runBH' $ getDocument testIndex (DocId "1")+getDocument :: (FromJSON a) => IndexName -> DocId -> BHRequest StatusIndependant (EsResult a)+getDocument indexName (DocId docId) =+ get [unIndexName indexName, "_doc", docId]++-- | 'documentExists' enables you to check if a document exists.+documentExists :: IndexName -> DocId -> BHRequest StatusDependant Bool+documentExists indexName (DocId docId) =+ doesExist [unIndexName indexName, "_doc", docId]++dispatchSearch :: (FromJSON a) => Endpoint -> Search -> BHRequest StatusDependant (SearchResult a)+dispatchSearch endpoint search =+ post url' (encode search)+ where+ url' = appendSearchTypeParam endpoint (searchType search)+ appendSearchTypeParam :: Endpoint -> SearchType -> Endpoint+ appendSearchTypeParam originalUrl st = originalUrl `withQueries` params+ where+ stText = "search_type"+ params+ | st == SearchTypeDfsQueryThenFetch = [(stText, Just "dfs_query_then_fetch")]+ -- used to catch 'SearchTypeQueryThenFetch', which is also the default+ | otherwise = []++-- | 'searchAll', given a 'Search', will perform that search against all indexes+-- on an Elasticsearch server. Try to avoid doing this if it can be helped.+--+-- >>> let query = TermQuery (Term "user" "bitemyapp") Nothing+-- >>> let search = mkSearch (Just query) Nothing+-- >>> response <- runBH' $ searchAll search+searchAll :: (FromJSON a) => Search -> BHRequest StatusDependant (SearchResult a)+searchAll =+ dispatchSearch ["_search"]++-- | 'searchByIndex', given a 'Search' and an 'IndexName', will perform that search+-- within an index on an Elasticsearch server.+--+-- >>> let query = TermQuery (Term "user" "bitemyapp") Nothing+-- >>> let search = mkSearch (Just query) Nothing+-- >>> response <- runBH' $ searchByIndex testIndex search+searchByIndex :: (FromJSON a) => IndexName -> Search -> BHRequest StatusDependant (SearchResult a)+searchByIndex indexName =+ dispatchSearch [unIndexName indexName, "_search"]++-- | 'searchByIndices' is a variant of 'searchByIndex' that executes a+-- 'Search' over many indices. This is much faster than using+-- 'mapM' to 'searchByIndex' over a collection since it only+-- causes a single HTTP request to be emitted.+searchByIndices :: (FromJSON a) => NonEmpty IndexName -> Search -> BHRequest StatusDependant (SearchResult a)+searchByIndices ixs =+ dispatchSearch [renderedIxs, "_search"]+ where+ renderedIxs = T.intercalate (T.singleton ',') (map unIndexName (toList ixs))++dispatchSearchTemplate ::+ (FromJSON a) =>+ Endpoint ->+ SearchTemplate ->+ BHRequest StatusDependant (SearchResult a)+dispatchSearchTemplate endpoint search =+ post endpoint $ encode search++-- | 'searchByIndexTemplate', given a 'SearchTemplate' and an 'IndexName', will perform that search+-- within an index on an Elasticsearch server.+--+-- >>> let query = SearchTemplateSource "{\"query\": { \"match\" : { \"{{my_field}}\" : \"{{my_value}}\" } }, \"size\" : \"{{my_size}}\"}"+-- >>> let search = mkSearchTemplate (Right query) Nothing+-- >>> response <- runBH' $ searchByIndexTemplate testIndex search+searchByIndexTemplate ::+ (FromJSON a) =>+ IndexName ->+ SearchTemplate ->+ BHRequest StatusDependant (SearchResult a)+searchByIndexTemplate indexName =+ dispatchSearchTemplate [unIndexName indexName, "_search", "template"]++-- | 'searchByIndicesTemplate' is a variant of 'searchByIndexTemplate' that executes a+-- 'SearchTemplate' over many indices. This is much faster than using+-- 'mapM' to 'searchByIndexTemplate' over a collection since it only+-- causes a single HTTP request to be emitted.+searchByIndicesTemplate ::+ (FromJSON a) =>+ NonEmpty IndexName ->+ SearchTemplate ->+ BHRequest StatusDependant (SearchResult a)+searchByIndicesTemplate ixs =+ dispatchSearchTemplate [renderedIxs, "_search", "template"]+ where+ renderedIxs = T.intercalate (T.singleton ',') (map unIndexName (toList ixs))++-- | 'storeSearchTemplate', saves a 'SearchTemplateSource' to be used later.+storeSearchTemplate :: SearchTemplateId -> SearchTemplateSource -> BHRequest StatusDependant Acknowledged+storeSearchTemplate (SearchTemplateId tid) ts =+ post ["_scripts", tid] (encode body)+ where+ body = Object $ X.fromList ["script" .= Object ("lang" .= String "mustache" <> "source" .= ts)]++-- | 'getSearchTemplate', get info of an stored 'SearchTemplateSource'.+getSearchTemplate :: SearchTemplateId -> BHRequest StatusIndependant GetTemplateScript+getSearchTemplate (SearchTemplateId tid) =+ get ["_scripts", tid]++-- | 'storeSearchTemplate',+deleteSearchTemplate :: SearchTemplateId -> BHRequest StatusIndependant Acknowledged+deleteSearchTemplate (SearchTemplateId tid) =+ delete ["_scripts", tid]++-- | For a given search, request a scroll for efficient streaming of+-- search results. Note that the search is put into 'SearchTypeScan'+-- mode and thus results will not be sorted. Combine this with+-- 'advanceScroll' to efficiently stream through the full result set+getInitialScroll ::+ (FromJSON a) =>+ IndexName ->+ Search ->+ BHRequest StatusDependant (ParsedEsResponse (SearchResult a))+getInitialScroll indexName search' =+ withBHResponseParsedEsResponse $ dispatchSearch endpoint search+ where+ endpoint = [unIndexName indexName, "_search"] `withQueries` [("scroll", Just "1m")]+ sorting = Just [DefaultSortSpec $ mkSort (FieldName "_doc") Descending]+ search = search' {sortBody = sorting}++-- | For a given search, request a scroll for efficient streaming of+-- search results. Combine this with 'advanceScroll' to efficiently+-- stream through the full result set. Note that this search respects+-- sorting and may be less efficient than 'getInitialScroll'.+getInitialSortedScroll ::+ (FromJSON a) =>+ IndexName ->+ Search ->+ BHRequest StatusDependant (SearchResult a)+getInitialSortedScroll indexName search = do+ dispatchSearch endpoint search+ where+ endpoint = [unIndexName indexName, "_search"] `withQueries` [("scroll", Just "1m")]++-- | Use the given scroll to fetch the next page of documents. If there are no+-- further pages, 'SearchResult.searchHits.hits' will be '[]'.+advanceScroll ::+ (FromJSON a) =>+ ScrollId ->+ -- | How long should the snapshot of data be kept around? This timeout is updated every time 'advanceScroll' is used, so don't feel the need to set it to the entire duration of your search processing. Note that durations < 1s will be rounded up. Also note that 'NominalDiffTime' is an instance of Num so literals like 60 will be interpreted as seconds. 60s is a reasonable default.+ NominalDiffTime ->+ BHRequest StatusDependant (SearchResult a)+advanceScroll (ScrollId sid) scroll =+ post ["_search", "scroll"] (encode scrollObject)+ where+ scrollTime = showText secs <> "s"+ secs :: Integer+ secs = round scroll++ scrollObject =+ object+ [ "scroll" .= scrollTime,+ "scroll_id" .= sid+ ]++-- | 'mkSearch' is a helper function for defaulting additional fields of a 'Search'+-- to Nothing in case you only care about your 'Query' and 'Filter'. Use record update+-- syntax if you want to add things like aggregations or highlights while still using+-- this helper function.+--+-- >>> let query = TermQuery (Term "user" "bitemyapp") Nothing+-- >>> mkSearch (Just query) Nothing+-- Search {queryBody = Just (TermQuery (Term {termField = "user", termValue = "bitemyapp"}) Nothing), filterBody = Nothing, searchAfterKey = Nothing, sortBody = Nothing, aggBody = Nothing, highlight = Nothing, trackSortScores = False, from = From 0, size = Size 10, searchType = SearchTypeQueryThenFetch, fields = Nothing, source = Nothing}+mkSearch :: Maybe Query -> Maybe Filter -> Search+mkSearch query filter =+ Search+ { queryBody = query,+ filterBody = filter,+ sortBody = Nothing,+ aggBody = Nothing,+ highlight = Nothing,+ trackSortScores = False,+ from = From 0,+ size = Size 10,+ searchType = SearchTypeQueryThenFetch,+ searchAfterKey = Nothing,+ fields = Nothing,+ scriptFields = Nothing,+ source = Nothing,+ suggestBody = Nothing,+ pointInTime = Nothing+ }++-- | 'mkAggregateSearch' is a helper function that defaults everything in a 'Search' except for+-- the 'Query' and the 'Aggregation'.+--+-- >>> let terms = TermsAgg $ (mkTermsAggregation "user") { termCollectMode = Just BreadthFirst }+-- >>> terms+-- TermsAgg (TermsAggregation {term = Left "user", termInclude = Nothing, termExclude = Nothing, termOrder = Nothing, termMinDocCount = Nothing, termSize = Nothing, termShardSize = Nothing, termCollectMode = Just BreadthFirst, termExecutionHint = Nothing, termAggs = Nothing})+-- >>> let myAggregation = mkAggregateSearch Nothing $ mkAggregations "users" terms+mkAggregateSearch :: Maybe Query -> Aggregations -> Search+mkAggregateSearch query mkSearchAggs =+ Search+ { queryBody = query,+ filterBody = Nothing,+ sortBody = Nothing,+ aggBody = Just mkSearchAggs,+ highlight = Nothing,+ trackSortScores = False,+ from = From 0,+ size = Size 0,+ searchType = SearchTypeQueryThenFetch,+ searchAfterKey = Nothing,+ fields = Nothing,+ scriptFields = Nothing,+ source = Nothing,+ suggestBody = Nothing,+ pointInTime = Nothing+ }++-- | 'mkHighlightSearch' is a helper function that defaults everything in a 'Search' except for+-- the 'Query' and the 'Aggregation'.+--+-- >>> let query = QueryMatchQuery $ mkMatchQuery (FieldName "_all") (QueryString "haskell")+-- >>> let testHighlight = Highlights Nothing [FieldHighlight (FieldName "message") Nothing]+-- >>> let search = mkHighlightSearch (Just query) testHighlight+mkHighlightSearch :: Maybe Query -> Highlights -> Search+mkHighlightSearch query searchHighlights =+ Search+ { queryBody = query,+ filterBody = Nothing,+ sortBody = Nothing,+ aggBody = Nothing,+ highlight = Just searchHighlights,+ trackSortScores = False,+ from = From 0,+ size = Size 10,+ searchType = SearchTypeDfsQueryThenFetch,+ searchAfterKey = Nothing,+ fields = Nothing,+ scriptFields = Nothing,+ source = Nothing,+ suggestBody = Nothing,+ pointInTime = Nothing+ }++-- | 'mkSearchTemplate' is a helper function for defaulting additional fields of a 'SearchTemplate'+-- to Nothing. Use record update syntax if you want to add things.+mkSearchTemplate :: Either SearchTemplateId SearchTemplateSource -> TemplateQueryKeyValuePairs -> SearchTemplate+mkSearchTemplate id_ params = SearchTemplate id_ params Nothing Nothing++-- | 'pageSearch' is a helper function that takes a search and assigns the from+-- and size fields for the search. The from parameter defines the offset+-- from the first result you want to fetch. The size parameter allows you to+-- configure the maximum amount of hits to be returned.+--+-- >>> let query = QueryMatchQuery $ mkMatchQuery (FieldName "_all") (QueryString "haskell")+-- >>> let search = mkSearch (Just query) Nothing+-- >>> search+-- Search {queryBody = Just (QueryMatchQuery (MatchQuery {matchQueryField = FieldName "_all", matchQueryQueryString = QueryString "haskell", matchQueryOperator = Or, matchQueryZeroTerms = ZeroTermsNone, matchQueryCutoffFrequency = Nothing, matchQueryMatchType = Nothing, matchQueryAnalyzer = Nothing, matchQueryMaxExpansions = Nothing, matchQueryLenient = Nothing, matchQueryBoost = Nothing})), filterBody = Nothing, sortBody = Nothing, aggBody = Nothing, highlight = Nothing, trackSortScores = False, from = From 0, size = Size 10, searchType = SearchTypeQueryThenFetch, fields = Nothing, source = Nothing}+-- >>> pageSearch (From 10) (Size 100) search+-- Search {queryBody = Just (QueryMatchQuery (MatchQuery {matchQueryField = FieldName "_all", matchQueryQueryString = QueryString "haskell", matchQueryOperator = Or, matchQueryZeroTerms = ZeroTermsNone, matchQueryCutoffFrequency = Nothing, matchQueryMatchType = Nothing, matchQueryAnalyzer = Nothing, matchQueryMaxExpansions = Nothing, matchQueryLenient = Nothing, matchQueryBoost = Nothing})), filterBody = Nothing, sortBody = Nothing, aggBody = Nothing, highlight = Nothing, trackSortScores = False, from = From 10, size = Size 100, searchType = SearchTypeQueryThenFetch, fields = Nothing, source = Nothing}+pageSearch ::+ -- | The result offset+ From ->+ -- | The number of results to return+ Size ->+ -- | The current seach+ Search ->+ -- | The paged search+ Search+pageSearch resultOffset pageSize search = search {from = resultOffset, size = pageSize}++boolQP :: Bool -> Text+boolQP True = "true"+boolQP False = "false"++countByIndex :: IndexName -> CountQuery -> BHRequest StatusDependant CountResponse+countByIndex indexName q =+ post [unIndexName indexName, "_count"] (encode q)++reindex ::+ ReindexRequest ->+ BHRequest StatusDependant ReindexResponse+reindex req =+ post ["_reindex"] (encode req)++reindexAsync ::+ ReindexRequest ->+ BHRequest StatusDependant TaskNodeId+reindexAsync req =+ post endpoint (encode req)+ where+ endpoint = ["_reindex"] `withQueries` [("wait_for_completion", Just "false")]++getTask ::+ (FromJSON a) =>+ TaskNodeId ->+ BHRequest StatusDependant (TaskResponse a)+getTask (TaskNodeId task) =+ get ["_tasks", task]
− src/Database/Bloodhound/Common/Script.hs
@@ -1,248 +0,0 @@-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE OverloadedStrings #-}--module Database.Bloodhound.Common.Script where--import Bloodhound.Import-import Data.Aeson.KeyMap-import Database.Bloodhound.Internal.Newtypes-import GHC.Generics--newtype ScriptFields- = ScriptFields (KeyMap ScriptFieldValue)- deriving (Eq, Show)--type ScriptFieldValue = Value--data ScriptSource- = ScriptId Text- | ScriptInline Text- deriving (Eq, Show, Generic)--data Script = Script- { scriptLanguage :: Maybe ScriptLanguage,- scriptSource :: ScriptSource,- scriptParams :: Maybe ScriptParams- }- deriving (Eq, Show, Generic)--newtype ScriptLanguage- = ScriptLanguage Text- deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype ScriptParams- = ScriptParams (KeyMap ScriptParamValue)- deriving (Eq, Show)--type ScriptParamValue = Value--data BoostMode- = BoostModeMultiply- | BoostModeReplace- | BoostModeSum- | BoostModeAvg- | BoostModeMax- | BoostModeMin- deriving (Eq, Show, Generic)--data ScoreMode- = ScoreModeMultiply- | ScoreModeSum- | ScoreModeAvg- | ScoreModeFirst- | ScoreModeMax- | ScoreModeMin- deriving (Eq, Show, Generic)--data FunctionScoreFunction- = FunctionScoreFunctionScript Script- | FunctionScoreFunctionRandom Seed- | FunctionScoreFunctionFieldValueFactor FieldValueFactor- deriving (Eq, Show, Generic)--newtype Weight- = Weight Float- deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype Seed- = Seed Float- deriving (Eq, Show, Generic, FromJSON, ToJSON)--data FieldValueFactor = FieldValueFactor- { fieldValueFactorField :: FieldName,- fieldValueFactor :: Maybe Factor,- fieldValueFactorModifier :: Maybe FactorModifier,- fieldValueFactorMissing :: Maybe FactorMissingFieldValue- }- deriving (Eq, Show, Generic)--newtype Factor- = Factor Float- deriving (Eq, Show, Generic, FromJSON, ToJSON)--data FactorModifier- = FactorModifierNone- | FactorModifierLog- | FactorModifierLog1p- | FactorModifierLog2p- | FactorModifierLn- | FactorModifierLn1p- | FactorModifierLn2p- | FactorModifierSquare- | FactorModifierSqrt- | FactorModifierReciprocal- deriving (Eq, Show, Generic)--newtype FactorMissingFieldValue- = FactorMissingFieldValue Float- deriving (Eq, Show, Generic, FromJSON, ToJSON)--instance ToJSON BoostMode where- toJSON BoostModeMultiply = "multiply"- toJSON BoostModeReplace = "replace"- toJSON BoostModeSum = "sum"- toJSON BoostModeAvg = "avg"- toJSON BoostModeMax = "max"- toJSON BoostModeMin = "min"--instance FromJSON BoostMode where- parseJSON = withText "BoostMode" parse- where- parse "multiply" = pure BoostModeMultiply- parse "replace" = pure BoostModeReplace- parse "sum" = pure BoostModeSum- parse "avg" = pure BoostModeAvg- parse "max" = pure BoostModeMax- parse "min" = pure BoostModeMin- parse bm = fail ("Unexpected BoostMode: " <> show bm)--instance ToJSON ScoreMode where- toJSON ScoreModeMultiply = "multiply"- toJSON ScoreModeSum = "sum"- toJSON ScoreModeFirst = "first"- toJSON ScoreModeAvg = "avg"- toJSON ScoreModeMax = "max"- toJSON ScoreModeMin = "min"--instance FromJSON ScoreMode where- parseJSON = withText "ScoreMode" parse- where- parse "multiply" = pure ScoreModeMultiply- parse "sum" = pure ScoreModeSum- parse "first" = pure ScoreModeFirst- parse "avg" = pure ScoreModeAvg- parse "max" = pure ScoreModeMax- parse "min" = pure ScoreModeMin- parse sm = fail ("Unexpected ScoreMode: " <> show sm)--functionScoreFunctionPair :: FunctionScoreFunction -> (Key, Value)-functionScoreFunctionPair (FunctionScoreFunctionScript functionScoreScript) =- ("script_score", toJSON functionScoreScript)-functionScoreFunctionPair (FunctionScoreFunctionRandom seed) =- ("random_score", omitNulls ["seed" .= seed])-functionScoreFunctionPair (FunctionScoreFunctionFieldValueFactor fvf) =- ("field_value_factor", toJSON fvf)--parseFunctionScoreFunction :: Object -> Parser FunctionScoreFunction-parseFunctionScoreFunction o =- singleScript- `taggedWith` "script_score"- <|> singleRandom- `taggedWith` "random_score"- <|> singleFieldValueFactor- `taggedWith` "field_value_factor"- where- taggedWith parser k = parser =<< o .: k- singleScript = pure . FunctionScoreFunctionScript- singleRandom o' = FunctionScoreFunctionRandom <$> o' .: "seed"- singleFieldValueFactor = pure . FunctionScoreFunctionFieldValueFactor--instance ToJSON ScriptFields where- toJSON (ScriptFields x) = Object x--instance FromJSON ScriptFields where- parseJSON (Object o) = pure (ScriptFields o)- parseJSON _ = fail "error parsing ScriptFields"--instance ToJSON Script where- toJSON script =- object ["script" .= omitNulls (base script)]- where- base (Script lang (ScriptInline source) params) =- ["lang" .= lang, "source" .= source, "params" .= params]- base (Script lang (ScriptId id_) params) =- ["lang" .= lang, "id" .= id_, "params" .= params]--instance FromJSON Script where- parseJSON = withObject "Script" parse- where- parseSource o = do- inline <- o .:? "source"- id_ <- o .:? "id"- return $ case (inline, id_) of- (Just x, Nothing) -> ScriptInline x- (Nothing, Just x) -> ScriptId x- (Nothing, Nothing) -> error "Script has to be either stored or inlined"- (Just _, Just _) -> error "Script can't both be stored and inlined at the same time"- parse o =- o .: "script" >>= \o' ->- Script- <$> o' .:? "lang"- <*> parseSource o'- <*> o' .:? "params"--instance ToJSON ScriptParams where- toJSON (ScriptParams x) = Object x--instance FromJSON ScriptParams where- parseJSON (Object o) = pure (ScriptParams o)- parseJSON _ = fail "error parsing ScriptParams"--instance ToJSON FieldValueFactor where- toJSON (FieldValueFactor field factor modifier missing) =- omitNulls base- where- base =- [ "field" .= field,- "factor" .= factor,- "modifier" .= modifier,- "missing" .= missing- ]--instance FromJSON FieldValueFactor where- parseJSON = withObject "FieldValueFactor" parse- where- parse o =- FieldValueFactor- <$> o .: "field"- <*> o .:? "factor"- <*> o .:? "modifier"- <*> o .:? "missing"--instance ToJSON FactorModifier where- toJSON FactorModifierNone = "none"- toJSON FactorModifierLog = "log"- toJSON FactorModifierLog1p = "log1p"- toJSON FactorModifierLog2p = "log2p"- toJSON FactorModifierLn = "ln"- toJSON FactorModifierLn1p = "ln1p"- toJSON FactorModifierLn2p = "ln2p"- toJSON FactorModifierSquare = "square"- toJSON FactorModifierSqrt = "sqrt"- toJSON FactorModifierReciprocal = "reciprocal"--instance FromJSON FactorModifier where- parseJSON = withText "FactorModifier" parse- where- parse "none" = pure FactorModifierNone- parse "log" = pure FactorModifierLog- parse "log1p" = pure FactorModifierLog1p- parse "log2p" = pure FactorModifierLog2p- parse "ln" = pure FactorModifierLn- parse "ln1p" = pure FactorModifierLn1p- parse "ln2p" = pure FactorModifierLn2p- parse "square" = pure FactorModifierSquare- parse "sqrt" = pure FactorModifierSqrt- parse "reciprocal" = pure FactorModifierReciprocal- parse fm = fail ("Unexpected FactorModifier: " <> show fm)
+ src/Database/Bloodhound/Common/Types.hs view
@@ -0,0 +1,35 @@+-- |+-- Module : Database.Bloodhound.Commons.Types+-- Copyright : (C) 2014, 2018 Chris Allen+-- License : BSD-style (see the file LICENSE)+-- Maintainer : Chris Allen <cma@bitemyapp.com+-- Stability : provisional+-- Portability : GHC+--+-- 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 'Query's and 'Filter's. 'Filter's are more like+-- traditional database constraints and often have preferable performance+-- properties. 'Query's support human-written textual queries, such as fuzzy+-- queries.+module Database.Bloodhound.Common.Types (module Reexport) where++import Database.Bloodhound.Internal.Client.BHRequest as Reexport+import Database.Bloodhound.Internal.Client.Doc as Reexport+import Database.Bloodhound.Internal.Versions.Common.Types.Aggregation as Reexport+import Database.Bloodhound.Internal.Versions.Common.Types.Analysis as Reexport+import Database.Bloodhound.Internal.Versions.Common.Types.Bulk as Reexport+import Database.Bloodhound.Internal.Versions.Common.Types.Count as Reexport+import Database.Bloodhound.Internal.Versions.Common.Types.Highlight as Reexport+import Database.Bloodhound.Internal.Versions.Common.Types.Indices as Reexport+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes as Reexport+import Database.Bloodhound.Internal.Versions.Common.Types.Nodes as Reexport+import Database.Bloodhound.Internal.Versions.Common.Types.PointInTime as Reexport+import Database.Bloodhound.Internal.Versions.Common.Types.Query as Reexport+import Database.Bloodhound.Internal.Versions.Common.Types.Reindex as Reexport+import Database.Bloodhound.Internal.Versions.Common.Types.Search as Reexport+import Database.Bloodhound.Internal.Versions.Common.Types.Snapshots as Reexport+import Database.Bloodhound.Internal.Versions.Common.Types.Sort as Reexport+import Database.Bloodhound.Internal.Versions.Common.Types.Suggest as Reexport+import Database.Bloodhound.Internal.Versions.Common.Types.Task as Reexport+import Database.Bloodhound.Internal.Versions.Common.Types.Units as Reexport
+ src/Database/Bloodhound/ElasticSearch7/Client.hs view
@@ -0,0 +1,90 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE ScopedTypeVariables #-}++module Database.Bloodhound.ElasticSearch7.Client+ ( module Reexport,+ pitSearch,+ openPointInTime,+ closePointInTime,+ )+where++import Control.Monad+import Data.Aeson+import Data.Monoid+import Database.Bloodhound.Client.Cluster+import Database.Bloodhound.Common.Client as Reexport+import qualified Database.Bloodhound.ElasticSearch7.Requests as Requests+import Database.Bloodhound.ElasticSearch7.Types+import Prelude hiding (filter, head)++-- | 'pitSearch' uses the point in time (PIT) API of elastic, for a given+-- 'IndexName'. Requires Elasticsearch >=7.10. Note that this will consume the+-- entire search result set and will be doing O(n) list appends so this may+-- not be suitable for large result sets. In that case, the point in time API+-- should be used directly with `openPointInTime` and `closePointInTime`.+--+-- Note that 'pitSearch' utilizes the 'search_after' parameter under the hood,+-- which requires a non-empty 'sortBody' field in the provided 'Search' value.+-- Otherwise, 'pitSearch' will fail to return all matching documents.+--+-- For more information see+-- <https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html>.+pitSearch :: forall a m. (FromJSON a, MonadBH m) => IndexName -> Search -> m [Hit a]+pitSearch indexName search = do+ openResp <- openPointInTime indexName+ case openResp of+ Left e -> throwEsError e+ Right OpenPointInTimeResponse {..} -> do+ let searchPIT = search {pointInTime = Just (PointInTime oPitId "1m")}+ hits <- pitAccumulator searchPIT []+ closeResp <- closePointInTime (ClosePointInTime oPitId)+ case closeResp of+ Left _ -> return []+ Right (ClosePointInTimeResponse False _) ->+ error "failed to close point in time (PIT)"+ Right (ClosePointInTimeResponse True _) -> return hits+ where+ pitAccumulator :: Search -> [Hit a] -> m [Hit a]+ pitAccumulator search' oldHits = do+ resp <- tryPerformBHRequest $ Requests.searchAll search'+ case resp of+ Left _ -> return []+ Right searchResult -> case hits (searchHits searchResult) of+ [] -> return oldHits+ newHits -> case (hitSort $ last newHits, pitId searchResult) of+ (Nothing, Nothing) ->+ error "no point in time (PIT) ID or last sort value"+ (Just _, Nothing) -> error "no point in time (PIT) ID"+ (Nothing, _) -> return (oldHits <> newHits)+ (Just lastSort, Just pitId') -> do+ let newSearch =+ search'+ { pointInTime = Just (PointInTime pitId' "1m"),+ searchAfterKey = Just lastSort+ }+ pitAccumulator newSearch (oldHits <> newHits)++-- | 'openPointInTime' opens a point in time for an index given an 'IndexName'.+-- Note that the point in time should be closed with 'closePointInTime' as soon+-- as it is no longer needed.+--+-- For more information see+-- <https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html>.+openPointInTime ::+ (MonadBH m) =>+ IndexName ->+ m (ParsedEsResponse OpenPointInTimeResponse)+openPointInTime indexName = performBHRequest $ Requests.openPointInTime indexName++-- | 'closePointInTime' closes a point in time given a 'ClosePointInTime'.+--+-- For more information see+-- <https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html>.+closePointInTime ::+ (MonadBH m) =>+ ClosePointInTime ->+ m (ParsedEsResponse ClosePointInTimeResponse)+closePointInTime q = performBHRequest $ Requests.closePointInTime q
+ src/Database/Bloodhound/ElasticSearch7/Requests.hs view
@@ -0,0 +1,39 @@+{-# LANGUAGE OverloadedLists #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RankNTypes #-}++module Database.Bloodhound.ElasticSearch7.Requests+ ( module Reexport,+ openPointInTime,+ closePointInTime,+ )+where++import Data.Aeson+import Database.Bloodhound.Client.Cluster+import Database.Bloodhound.Common.Requests as Reexport+import Database.Bloodhound.ElasticSearch7.Types+import Database.Bloodhound.Internal.Utils.Requests+import Prelude hiding (filter, head)++-- | 'openPointInTime' opens a point in time for an index given an 'IndexName'.+-- Note that the point in time should be closed with 'closePointInTime' as soon+-- as it is no longer needed.+--+-- For more information see+-- <https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html>.+openPointInTime ::+ IndexName ->+ BHRequest StatusDependant (ParsedEsResponse OpenPointInTimeResponse)+openPointInTime indexName =+ withBHResponseParsedEsResponse $ post @StatusDependant [unIndexName indexName, "_pit?keep_alive=1m"] emptyBody++-- | 'closePointInTime' closes a point in time given a 'ClosePointInTime'.+--+-- For more information see+-- <https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html>.+closePointInTime ::+ ClosePointInTime ->+ BHRequest StatusDependant (ParsedEsResponse ClosePointInTimeResponse)+closePointInTime q = do+ withBHResponseParsedEsResponse $ deleteWithBody @StatusDependant ["_pit"] (encode q)
+ src/Database/Bloodhound/ElasticSearch7/Types.hs view
@@ -0,0 +1,7 @@+module Database.Bloodhound.ElasticSearch7.Types+ ( module Reexport,+ )+where++import Database.Bloodhound.Common.Types as Reexport+import Database.Bloodhound.Internal.Versions.ElasticSearch7.Types.PointInTime as Reexport
− src/Database/Bloodhound/Internal/Aggregation.hs
@@ -1,578 +0,0 @@-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}--module Database.Bloodhound.Internal.Aggregation where--import Bloodhound.Import-import qualified Data.Aeson as Aeson-import qualified Data.Aeson.KeyMap as X-import qualified Data.Map.Strict as M-import qualified Data.Text as T-import Database.Bloodhound.Internal.Client-import Database.Bloodhound.Internal.Highlight (HitHighlight)-import Database.Bloodhound.Internal.Newtypes-import Database.Bloodhound.Internal.Query-import Database.Bloodhound.Internal.Sort--type Aggregations = M.Map Key Aggregation--emptyAggregations :: Aggregations-emptyAggregations = M.empty--mkAggregations :: Key -> Aggregation -> Aggregations-mkAggregations name aggregation = M.insert name aggregation emptyAggregations--data Aggregation- = TermsAgg TermsAggregation- | CardinalityAgg CardinalityAggregation- | DateHistogramAgg DateHistogramAggregation- | ValueCountAgg ValueCountAggregation- | FilterAgg FilterAggregation- | DateRangeAgg DateRangeAggregation- | MissingAgg MissingAggregation- | TopHitsAgg TopHitsAggregation- | StatsAgg StatisticsAggregation- | SumAgg SumAggregation- deriving (Eq, Show)--instance ToJSON Aggregation where- toJSON (TermsAgg (TermsAggregation term include exclude order minDocCount size shardSize collectMode executionHint termAggs)) =- omitNulls- [ "terms"- .= omitNulls- [ toJSON' term,- "include" .= include,- "exclude" .= exclude,- "order" .= order,- "min_doc_count" .= minDocCount,- "size" .= size,- "shard_size" .= shardSize,- "collect_mode" .= collectMode,- "execution_hint" .= executionHint- ],- "aggs" .= termAggs- ]- where- toJSON' x = case x of Left y -> "field" .= y; Right y -> "script" .= y- toJSON (CardinalityAgg (CardinalityAggregation field precisionThreshold)) =- object- [ "cardinality"- .= omitNulls- [ "field" .= field,- "precisionThreshold" .= precisionThreshold- ]- ]- toJSON- ( DateHistogramAgg- ( DateHistogramAggregation- field- interval- format- preZone- postZone- preOffset- postOffset- dateHistoAggs- )- ) =- omitNulls- [ "date_histogram"- .= omitNulls- [ "field" .= field,- "interval" .= interval,- "format" .= format,- "pre_zone" .= preZone,- "post_zone" .= postZone,- "pre_offset" .= preOffset,- "post_offset" .= postOffset- ],- "aggs" .= dateHistoAggs- ]- toJSON (ValueCountAgg a) = object ["value_count" .= v]- where- v = case a of- (FieldValueCount (FieldName n)) ->- object ["field" .= n]- (ScriptValueCount s) ->- object ["script" .= s]- toJSON (FilterAgg (FilterAggregation filt ags)) =- omitNulls- [ "filter" .= filt,- "aggs" .= ags- ]- toJSON (DateRangeAgg a) =- object- [ "date_range" .= a- ]- toJSON (MissingAgg (MissingAggregation {..})) =- object ["missing" .= object ["field" .= maField]]- toJSON (TopHitsAgg (TopHitsAggregation mfrom msize msort)) =- omitNulls- [ "top_hits"- .= omitNulls- [ "size" .= msize,- "from" .= mfrom,- "sort" .= msort- ]- ]- toJSON (StatsAgg (StatisticsAggregation typ field)) =- object [stType .= omitNulls ["field" .= field]]- where- stType- | typ == Basic = "stats"- | otherwise = "extended_stats"- toJSON (SumAgg (SumAggregation (FieldName n))) =- omitNulls ["sum" .= omitNulls ["field" .= n]]--data TopHitsAggregation = TopHitsAggregation- { taFrom :: Maybe From,- taSize :: Maybe Size,- taSort :: Maybe Sort- }- deriving (Eq, Show)--data MissingAggregation = MissingAggregation- { maField :: Text- }- deriving (Eq, Show)--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- }- deriving (Eq, Show)--data CardinalityAggregation = CardinalityAggregation- { cardinalityField :: FieldName,- precisionThreshold :: Maybe Int- }- deriving (Eq, Show)--data DateHistogramAggregation = DateHistogramAggregation- { dateField :: FieldName,- dateInterval :: Interval,- dateFormat :: Maybe Text,- -- pre and post deprecated in 1.5- datePreZone :: Maybe Text,- datePostZone :: Maybe Text,- datePreOffset :: Maybe Text,- datePostOffset :: Maybe Text,- dateAggs :: Maybe Aggregations- }- deriving (Eq, Show)--data DateRangeAggregation = DateRangeAggregation- { draField :: FieldName,- draFormat :: Maybe Text,- draRanges :: NonEmpty DateRangeAggRange- }- deriving (Eq, Show)--instance ToJSON DateRangeAggregation where- toJSON DateRangeAggregation {..} =- omitNulls- [ "field" .= draField,- "format" .= draFormat,- "ranges" .= toList draRanges- ]--data DateRangeAggRange- = DateRangeFrom DateMathExpr- | DateRangeTo DateMathExpr- | DateRangeFromAndTo DateMathExpr DateMathExpr- deriving (Eq, Show)--instance ToJSON DateRangeAggRange where- toJSON (DateRangeFrom e) = object ["from" .= e]- toJSON (DateRangeTo e) = object ["to" .= e]- toJSON (DateRangeFromAndTo f t) = object ["from" .= f, "to" .= t]---- | See <https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-valuecount-aggregation.html> for more information.-data ValueCountAggregation- = FieldValueCount FieldName- | ScriptValueCount Script- deriving (Eq, Show)---- | 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.-data FilterAggregation = FilterAggregation- { faFilter :: Filter,- faAggs :: Maybe Aggregations- }- deriving (Eq, Show)--data StatisticsAggregation = StatisticsAggregation- { statsType :: StatsType,- statsField :: FieldName- }- deriving (Eq, Show)--data StatsType- = Basic- | Extended- deriving (Eq, Show)--newtype SumAggregation = SumAggregation {sumAggregationField :: FieldName}- deriving (Eq, Show)--mkTermsAggregation :: Text -> TermsAggregation-mkTermsAggregation t =- TermsAggregation- (Left t)- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing--mkTermsScriptAggregation :: Text -> TermsAggregation-mkTermsScriptAggregation t = TermsAggregation (Right t) Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing--mkDateHistogram :: FieldName -> Interval -> DateHistogramAggregation-mkDateHistogram t i = DateHistogramAggregation t i Nothing Nothing Nothing Nothing Nothing Nothing--mkCardinalityAggregation :: FieldName -> CardinalityAggregation-mkCardinalityAggregation t = CardinalityAggregation t Nothing--mkStatsAggregation :: FieldName -> StatisticsAggregation-mkStatsAggregation = StatisticsAggregation Basic--mkExtendedStatsAggregation :: FieldName -> StatisticsAggregation-mkExtendedStatsAggregation = StatisticsAggregation Extended--type AggregationResults = M.Map Key Value--class BucketAggregation a where- key :: a -> BucketValue- docCount :: a -> Int- aggs :: a -> Maybe AggregationResults--data Bucket a = Bucket- { buckets :: [a]- }- deriving (Read, Show)--instance (FromJSON a) => FromJSON (Bucket a) where- parseJSON (Object v) =- Bucket- <$> v .: "buckets"- parseJSON _ = mempty--data BucketValue- = TextValue Text- | ScientificValue Scientific- | BoolValue Bool- deriving (Read, Show)--instance FromJSON BucketValue where- parseJSON (String t) = return $ TextValue t- parseJSON (Number s) = return $ ScientificValue s- parseJSON (Bool b) = return $ BoolValue b- parseJSON _ = mempty--data TermInclusion- = TermInclusion Text- | TermPattern Text Text- deriving (Eq, Show)--instance ToJSON TermInclusion where- toJSON (TermInclusion x) = toJSON x- toJSON (TermPattern pattern flags) =- omitNulls- [ "pattern" .= pattern,- "flags" .= flags- ]--data TermOrder = TermOrder- { termSortField :: Text,- termSortOrder :: SortOrder- }- deriving (Eq, Show)--instance ToJSON TermOrder where- toJSON (TermOrder termSortField termSortOrder) =- object [fromText termSortField .= termSortOrder]--data CollectionMode- = BreadthFirst- | DepthFirst- deriving (Eq, Show)--instance ToJSON CollectionMode where- toJSON BreadthFirst = "breadth_first"- toJSON DepthFirst = "depth_first"--data ExecutionHint- = GlobalOrdinals- | Map- deriving (Eq, Show)--instance ToJSON ExecutionHint where- toJSON GlobalOrdinals = "global_ordinals"- toJSON Map = "map"---- | See <https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#date-math> for more information.-data DateMathExpr- = DateMathExpr DateMathAnchor [DateMathModifier]- deriving (Eq, Show)--instance ToJSON DateMathExpr where- toJSON (DateMathExpr a mods) = String (fmtA a <> mconcat (fmtMod <$> mods))- where- fmtA DMNow = "now"- fmtA (DMDate date) = (T.pack $ showGregorian date) <> "||"- fmtMod (AddTime n u) = "+" <> showText n <> fmtU u- fmtMod (SubtractTime n u) = "-" <> showText n <> fmtU u- fmtMod (RoundDownTo u) = "/" <> fmtU u- fmtU DMYear = "y"- fmtU DMMonth = "M"- fmtU DMWeek = "w"- fmtU DMDay = "d"- fmtU DMHour = "h"- fmtU DMMinute = "m"- fmtU DMSecond = "s"---- | Starting point for a date range. This along with the 'DateMathModifiers' gets you the date ES will start from.-data DateMathAnchor- = DMNow- | DMDate Day- deriving (Eq, Show)--data DateMathModifier- = AddTime Int DateMathUnit- | SubtractTime Int DateMathUnit- | RoundDownTo DateMathUnit- deriving (Eq, Show)--data DateMathUnit- = DMYear- | DMMonth- | DMWeek- | DMDay- | DMHour- | DMMinute- | DMSecond- deriving (Eq, Show)--data TermsResult = TermsResult- { termKey :: BucketValue,- termsDocCount :: Int,- termsAggs :: Maybe AggregationResults- }- deriving (Read, Show)--instance FromJSON TermsResult where- parseJSON (Object v) =- TermsResult- <$> v .: "key"- <*> v .: "doc_count"- <*> (pure $ getNamedSubAgg v ["key", "doc_count"])- parseJSON _ = mempty--instance BucketAggregation TermsResult where- key = termKey- docCount = termsDocCount- aggs = termsAggs--data DateHistogramResult = DateHistogramResult- { dateKey :: Int,- dateKeyStr :: Maybe Text,- dateDocCount :: Int,- dateHistogramAggs :: Maybe AggregationResults- }- deriving (Show)--instance FromJSON DateHistogramResult where- parseJSON (Object v) =- DateHistogramResult- <$> v .: "key"- <*> v .:? "key_as_string"- <*> v .: "doc_count"- <*> ( pure $- getNamedSubAgg- v- [ "key",- "doc_count",- "key_as_string"- ]- )- parseJSON _ = mempty--instance BucketAggregation DateHistogramResult where- key = TextValue . showText . dateKey- docCount = dateDocCount- aggs = dateHistogramAggs--data DateRangeResult = DateRangeResult- { dateRangeKey :: Text,- dateRangeFrom :: Maybe UTCTime,- dateRangeFromAsString :: Maybe Text,- dateRangeTo :: Maybe UTCTime,- dateRangeToAsString :: Maybe Text,- dateRangeDocCount :: Int,- dateRangeAggs :: Maybe AggregationResults- }- deriving (Eq, Show)--instance FromJSON DateRangeResult where- parseJSON = withObject "DateRangeResult" parse- where- parse v =- DateRangeResult- <$> v .: "key"- <*> (fmap posixMS <$> v .:? "from")- <*> v .:? "from_as_string"- <*> (fmap posixMS <$> v .:? "to")- <*> v .:? "to_as_string"- <*> v .: "doc_count"- <*> ( pure $- getNamedSubAgg- v- [ "key",- "from",- "from_as_string",- "to",- "to_as_string",- "doc_count"- ]- )--instance BucketAggregation DateRangeResult where- key = TextValue . dateRangeKey- docCount = dateRangeDocCount- aggs = dateRangeAggs--toTerms :: Key -> AggregationResults -> Maybe (Bucket TermsResult)-toTerms = toAggResult--toDateHistogram :: Key -> AggregationResults -> Maybe (Bucket DateHistogramResult)-toDateHistogram = toAggResult--toMissing :: Key -> AggregationResults -> Maybe MissingResult-toMissing = toAggResult--toTopHits :: (FromJSON a) => Key -> AggregationResults -> Maybe (TopHitResult a)-toTopHits = toAggResult--toAggResult :: (FromJSON a) => Key -> AggregationResults -> Maybe a-toAggResult t a = M.lookup t a >>= deserialize- where- deserialize = parseMaybe parseJSON---- Try to get an AggregationResults when we don't know the--- field name. We filter out the known keys to try to minimize the noise.-getNamedSubAgg :: Object -> [Key] -> Maybe AggregationResults-getNamedSubAgg o knownKeys = maggRes- where- unknownKeys = X.filterWithKey (\k _ -> k `notElem` knownKeys) o- maggRes- | X.null unknownKeys = Nothing- | otherwise = Just . M.fromList $ X.toList unknownKeys--data MissingResult = MissingResult- { missingDocCount :: Int- }- deriving (Show)--instance FromJSON MissingResult where- parseJSON = withObject "MissingResult" parse- where- parse v = MissingResult <$> v .: "doc_count"--data TopHitResult a = TopHitResult- { tarHits :: (SearchHits a)- }- deriving (Eq, Show)--instance (FromJSON a) => FromJSON (TopHitResult a) where- parseJSON (Object v) =- TopHitResult- <$> v .: "hits"- parseJSON _ = fail "Failure in FromJSON (TopHitResult a)"--data HitsTotalRelation = HTR_EQ | HTR_GTE deriving (Eq, Show)--instance FromJSON HitsTotalRelation where- parseJSON (String "eq") = pure HTR_EQ- parseJSON (String "gte") = pure HTR_GTE- parseJSON _ = empty--data HitsTotal = HitsTotal- { value :: Int,- relation :: HitsTotalRelation- }- deriving (Eq, Show)--instance FromJSON HitsTotal where- parseJSON (Object v) =- HitsTotal- <$> v .: "value"- <*> v .: "relation"- parseJSON _ = empty--instance Semigroup HitsTotal where- (HitsTotal ta HTR_EQ) <> (HitsTotal tb HTR_EQ) = HitsTotal (ta + tb) HTR_EQ- (HitsTotal ta HTR_GTE) <> (HitsTotal tb _) = HitsTotal (ta + tb) HTR_GTE- (HitsTotal ta _) <> (HitsTotal tb HTR_GTE) = HitsTotal (ta + tb) HTR_GTE--data SearchHits a = SearchHits- { hitsTotal :: HitsTotal,- maxScore :: Score,- hits :: [Hit a]- }- deriving (Eq, Show)--instance (FromJSON a) => FromJSON (SearchHits a) where- parseJSON (Object v) =- SearchHits- <$> v .: "total"- <*> v .: "max_score"- <*> v .: "hits"- parseJSON _ = empty--instance Semigroup (SearchHits a) where- (SearchHits ta ma ha) <> (SearchHits tb mb hb) =- SearchHits (ta <> tb) (max ma mb) (ha <> hb)--instance Monoid (SearchHits a) where- mempty = SearchHits (HitsTotal 0 HTR_EQ) Nothing mempty- mappend = (<>)--type SearchAfterKey = [Aeson.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 (X.KeyMap (TopHitResult Value))- }- deriving (Eq, Show)--instance (FromJSON a) => FromJSON (Hit a) where- parseJSON (Object v) =- Hit- <$> v .: "_index"- <*> v .: "_id"- <*> v .: "_score"- <*> v .:? "_source"- <*> v .:? "sort"- <*> v .:? "fields"- <*> v .:? "highlight"- <*> v .:? "inner_hits"- parseJSON _ = empty
− src/Database/Bloodhound/Internal/Analysis.hs
@@ -1,481 +0,0 @@-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE OverloadedStrings #-}--module Database.Bloodhound.Internal.Analysis where--import Bloodhound.Import-import qualified Data.Map.Strict as M-import qualified Data.Text as T-import Database.Bloodhound.Internal.Newtypes-import Database.Bloodhound.Internal.StringlyTyped-import GHC.Generics--data Analysis = Analysis- { analysisAnalyzer :: M.Map Text AnalyzerDefinition,- analysisTokenizer :: M.Map Text TokenizerDefinition,- analysisTokenFilter :: M.Map Text TokenFilterDefinition,- analysisCharFilter :: M.Map Text CharFilterDefinition- }- deriving (Eq, Show, Generic)--instance ToJSON Analysis where- toJSON (Analysis analyzer tokenizer tokenFilter charFilter) =- object- [ "analyzer" .= analyzer,- "tokenizer" .= tokenizer,- "filter" .= tokenFilter,- "char_filter" .= charFilter- ]--instance FromJSON Analysis where- parseJSON = withObject "Analysis" $ \m ->- Analysis- <$> m .: "analyzer"- <*> m .:? "tokenizer" .!= M.empty- <*> m .:? "filter" .!= M.empty- <*> m .:? "char_filter" .!= M.empty--newtype Tokenizer- = Tokenizer Text- deriving (Eq, Show, Generic, ToJSON, FromJSON)--data AnalyzerDefinition = AnalyzerDefinition- { analyzerDefinitionTokenizer :: Maybe Tokenizer,- analyzerDefinitionFilter :: [TokenFilter],- analyzerDefinitionCharFilter :: [CharFilter]- }- deriving (Eq, Show, Generic)--instance ToJSON AnalyzerDefinition where- toJSON (AnalyzerDefinition tokenizer tokenFilter charFilter) =- object $- catMaybes- [ fmap ("tokenizer" .=) tokenizer,- Just $ "filter" .= tokenFilter,- Just $ "char_filter" .= charFilter- ]--instance FromJSON AnalyzerDefinition where- parseJSON = withObject "AnalyzerDefinition" $ \m ->- AnalyzerDefinition- <$> m .:? "tokenizer"- <*> m .:? "filter" .!= []- <*> m .:? "char_filter" .!= []---- | Character filters are used to preprocess the stream of characters--- before it is passed to the tokenizer.-data CharFilterDefinition- = CharFilterDefinitionMapping (M.Map Text Text)- | CharFilterDefinitionPatternReplace- { charFilterDefinitionPatternReplacePattern :: Text,- charFilterDefinitionPatternReplaceReplacement :: Text,- charFilterDefinitionPatternReplaceFlags :: Maybe Text- }- deriving (Eq, Show)--instance ToJSON CharFilterDefinition where- toJSON (CharFilterDefinitionMapping ms) =- object- [ "type" .= ("mapping" :: Text),- "mappings" .= [a <> " => " <> b | (a, b) <- M.toList ms]- ]- toJSON (CharFilterDefinitionPatternReplace pat repl flags) =- object $- [ "type" .= ("pattern_replace" :: Text),- "pattern" .= pat,- "replacement" .= repl- ]- ++ maybe [] (\f -> ["flags" .= f]) flags--instance FromJSON CharFilterDefinition where- parseJSON = withObject "CharFilterDefinition" $ \m -> do- t <- m .: "type"- case (t :: Text) of- "mapping" -> CharFilterDefinitionMapping . M.fromList <$> ms- where- ms = m .: "mappings" >>= mapM parseMapping- parseMapping kv = case T.splitOn "=>" kv of- (k : vs) -> pure (T.strip k, T.strip $ T.concat vs)- _ -> fail "mapping is not of the format key => value"- "pattern_replace" ->- CharFilterDefinitionPatternReplace- <$> m .: "pattern"- <*> m .: "replacement"- <*> m .:? "flags"- _ -> fail ("unrecognized character filter type: " ++ T.unpack t)--data TokenizerDefinition- = TokenizerDefinitionNgram Ngram- | TokenizerDefinitionEdgeNgram Ngram- deriving (Eq, Show, Generic)--instance ToJSON TokenizerDefinition where- toJSON x =- case x of- TokenizerDefinitionNgram ngram ->- object (["type" .= ("ngram" :: Text)] <> ngramToObject ngram)- TokenizerDefinitionEdgeNgram ngram ->- object (["type" .= ("edge_ngram" :: Text)] <> ngramToObject ngram)- where- ngramToObject (Ngram minGram maxGram tokenChars) =- [ "min_gram" .= minGram,- "max_gram" .= maxGram,- "token_chars" .= tokenChars- ]--instance FromJSON TokenizerDefinition where- parseJSON = withObject "TokenizerDefinition" $ \m -> do- typ <- m .: "type" :: Parser Text- case typ of- "ngram" ->- TokenizerDefinitionNgram <$> parseNgram m- "edge_ngram" ->- TokenizerDefinitionEdgeNgram <$> parseNgram m- _ -> fail $ "invalid TokenizerDefinition type: " <> T.unpack typ- where- parseNgram m =- Ngram- <$> fmap unStringlyTypedInt (m .: "min_gram")- <*> fmap unStringlyTypedInt (m .: "max_gram")- <*> m .: "token_chars"--data Ngram = Ngram- { ngramMinGram :: Int,- ngramMaxGram :: Int,- ngramTokenChars :: [TokenChar]- }- deriving (Eq, Show, Generic)--data TokenChar- = TokenLetter- | TokenDigit- | TokenWhitespace- | TokenPunctuation- | TokenSymbol- deriving (Eq, Show, Generic)--instance ToJSON TokenChar where- toJSON t = String $ case t of- TokenLetter -> "letter"- TokenDigit -> "digit"- TokenWhitespace -> "whitespace"- TokenPunctuation -> "punctuation"- TokenSymbol -> "symbol"--instance FromJSON TokenChar where- parseJSON = withText "TokenChar" $ \t -> case t of- "letter" -> return TokenLetter- "digit" -> return TokenDigit- "whitespace" -> return TokenWhitespace- "punctuation" -> return TokenPunctuation- "symbol" -> return TokenSymbol- _ -> fail "invalid TokenChar"---- | Token filters are used to create custom analyzers.-data TokenFilterDefinition- = TokenFilterDefinitionLowercase (Maybe Language)- | TokenFilterDefinitionUppercase (Maybe Language)- | TokenFilterDefinitionApostrophe- | TokenFilterDefinitionReverse- | TokenFilterDefinitionSnowball Language- | TokenFilterDefinitionShingle Shingle- | TokenFilterDefinitionStemmer Language- | TokenFilterDefinitionStop (Either Language [StopWord])- | TokenFilterDefinitionEdgeNgram NgramFilter (Maybe EdgeNgramFilterSide)- | TokenFilterDefinitionNgram NgramFilter- | TokenFilterTruncate Int- deriving (Eq, Show, Generic)--instance ToJSON TokenFilterDefinition where- toJSON x = case x of- TokenFilterDefinitionLowercase mlang ->- object $- catMaybes- [ Just $ "type" .= ("lowercase" :: Text),- fmap (\lang -> "language" .= languageToText lang) mlang- ]- TokenFilterDefinitionUppercase mlang ->- object $- catMaybes- [ Just $ "type" .= ("uppercase" :: Text),- fmap (\lang -> "language" .= languageToText lang) mlang- ]- TokenFilterDefinitionApostrophe ->- object- [ "type" .= ("apostrophe" :: Text)- ]- TokenFilterDefinitionReverse ->- object- [ "type" .= ("reverse" :: Text)- ]- TokenFilterDefinitionSnowball lang ->- object- [ "type" .= ("snowball" :: Text),- "language" .= languageToText lang- ]- TokenFilterDefinitionShingle s ->- object- [ "type" .= ("shingle" :: Text),- "max_shingle_size" .= shingleMaxSize s,- "min_shingle_size" .= shingleMinSize s,- "output_unigrams" .= shingleOutputUnigrams s,- "output_unigrams_if_no_shingles" .= shingleOutputUnigramsIfNoShingles s,- "token_separator" .= shingleTokenSeparator s,- "filler_token" .= shingleFillerToken s- ]- TokenFilterDefinitionStemmer lang ->- object- [ "type" .= ("stemmer" :: Text),- "language" .= languageToText lang- ]- TokenFilterDefinitionStop stop ->- object- [ "type" .= ("stop" :: Text),- "stopwords" .= case stop of- Left lang -> String $ "_" <> languageToText lang <> "_"- Right stops -> toJSON stops- ]- TokenFilterDefinitionEdgeNgram ngram side ->- object- ( [ "type" .= ("edge_ngram" :: Text),- "side" .= side- ]- <> ngramFilterToPairs ngram- )- TokenFilterDefinitionNgram ngram ->- object- ( ["type" .= ("ngram" :: Text)]- <> ngramFilterToPairs ngram- )- TokenFilterTruncate n ->- object- [ "type" .= ("truncate" :: Text),- "length" .= n- ]--instance FromJSON TokenFilterDefinition where- parseJSON = withObject "TokenFilterDefinition" $ \m -> do- t <- m .: "type"- case (t :: Text) of- "reverse" -> return TokenFilterDefinitionReverse- "apostrophe" -> return TokenFilterDefinitionApostrophe- "lowercase" ->- TokenFilterDefinitionLowercase- <$> m .:? "language"- "uppercase" ->- TokenFilterDefinitionUppercase- <$> m .:? "language"- "snowball" ->- TokenFilterDefinitionSnowball- <$> m .: "language"- "shingle" ->- fmap TokenFilterDefinitionShingle $- Shingle- <$> (fmap . fmap) unStringlyTypedInt (m .:? "max_shingle_size") .!= 2- <*> (fmap . fmap) unStringlyTypedInt (m .:? "min_shingle_size") .!= 2- <*> (fmap . fmap) unStringlyTypedBool (m .:? "output_unigrams") .!= True- <*> (fmap . fmap) unStringlyTypedBool (m .:? "output_unigrams_if_no_shingles") .!= False- <*> m .:? "token_separator" .!= " "- <*> m .:? "filler_token" .!= "_"- "stemmer" ->- TokenFilterDefinitionStemmer- <$> m .: "language"- "stop" -> do- stop <- m .: "stopwords"- stop' <- case stop of- String lang ->- fmap Left- . parseJSON- . String- . T.drop 1- . T.dropEnd 1- $ lang- _ -> Right <$> parseJSON stop- return (TokenFilterDefinitionStop stop')- "edge_ngram" ->- TokenFilterDefinitionEdgeNgram- <$> ngramFilterFromJSONObject m- <*> m .: "side"- "ngram" -> TokenFilterDefinitionNgram <$> ngramFilterFromJSONObject m- "truncate" -> TokenFilterTruncate <$> m .:? "length" .!= 10- _ -> fail ("unrecognized token filter type: " ++ T.unpack t)--data NgramFilter = NgramFilter- { ngramFilterMinGram :: Int,- ngramFilterMaxGram :: Int- }- deriving (Eq, Show, Generic)--ngramFilterToPairs :: NgramFilter -> [Pair]-ngramFilterToPairs (NgramFilter minGram maxGram) =- ["min_gram" .= minGram, "max_gram" .= maxGram]--ngramFilterFromJSONObject :: Object -> Parser NgramFilter-ngramFilterFromJSONObject o =- NgramFilter- <$> o .: "min_gram" .!= 1- <*> o .: "max_gram" .!= 2--data EdgeNgramFilterSide- = EdgeNgramFilterSideFront- | EdgeNgramFilterSideBack- deriving (Eq, Show, Generic)--instance ToJSON EdgeNgramFilterSide where- toJSON EdgeNgramFilterSideFront = String "front"- toJSON EdgeNgramFilterSideBack = String "back"--instance FromJSON EdgeNgramFilterSide where- parseJSON = withText "EdgeNgramFilterSide" $ \t ->- case t of- "front" -> pure EdgeNgramFilterSideFront- "back" -> pure EdgeNgramFilterSideBack- _ -> fail $ "EdgeNgramFilterSide can only be 'front' or 'back', found: " <> T.unpack t---- | The set of languages that can be passed to various analyzers,--- filters, etc. in Elasticsearch. Most data types in this module--- that have a 'Language' field are actually only actually to--- handle a subset of these languages. Consult the official--- Elasticsearch documentation to see what is actually supported.-data Language- = Arabic- | Armenian- | Basque- | Bengali- | Brazilian- | Bulgarian- | Catalan- | Cjk- | Czech- | Danish- | Dutch- | English- | Finnish- | French- | Galician- | German- | German2- | Greek- | Hindi- | Hungarian- | Indonesian- | Irish- | Italian- | Kp- | Latvian- | Lithuanian- | Lovins- | Norwegian- | Persian- | Porter- | Portuguese- | Romanian- | Russian- | Sorani- | Spanish- | Swedish- | Thai- | Turkish- deriving (Eq, Show, Generic)--instance ToJSON Language where- toJSON = String . languageToText--instance FromJSON Language where- parseJSON = withText "Language" $ \t -> case languageFromText t of- Nothing -> fail "not a supported Elasticsearch language"- Just lang -> return lang--languageToText :: Language -> Text-languageToText x = case x of- Arabic -> "arabic"- Armenian -> "armenian"- Basque -> "basque"- Bengali -> "bengali"- Brazilian -> "brazilian"- Bulgarian -> "bulgarian"- Catalan -> "catalan"- Cjk -> "cjk"- Czech -> "czech"- Danish -> "danish"- Dutch -> "dutch"- English -> "english"- Finnish -> "finnish"- French -> "french"- Galician -> "galician"- German -> "german"- German2 -> "german2"- Greek -> "greek"- Hindi -> "hindi"- Hungarian -> "hungarian"- Indonesian -> "indonesian"- Irish -> "irish"- Italian -> "italian"- Kp -> "kp"- Latvian -> "latvian"- Lithuanian -> "lithuanian"- Lovins -> "lovins"- Norwegian -> "norwegian"- Persian -> "persian"- Porter -> "porter"- Portuguese -> "portuguese"- Romanian -> "romanian"- Russian -> "russian"- Sorani -> "sorani"- Spanish -> "spanish"- Swedish -> "swedish"- Thai -> "thai"- Turkish -> "turkish"--languageFromText :: Text -> Maybe Language-languageFromText x = case x of- "arabic" -> Just Arabic- "armenian" -> Just Armenian- "basque" -> Just Basque- "bengali" -> Just Bengali- "brazilian" -> Just Brazilian- "bulgarian" -> Just Bulgarian- "catalan" -> Just Catalan- "cjk" -> Just Cjk- "czech" -> Just Czech- "danish" -> Just Danish- "dutch" -> Just Dutch- "english" -> Just English- "finnish" -> Just Finnish- "french" -> Just French- "galician" -> Just Galician- "german" -> Just German- "german2" -> Just German2- "greek" -> Just Greek- "hindi" -> Just Hindi- "hungarian" -> Just Hungarian- "indonesian" -> Just Indonesian- "irish" -> Just Irish- "italian" -> Just Italian- "kp" -> Just Kp- "latvian" -> Just Latvian- "lithuanian" -> Just Lithuanian- "lovins" -> Just Lovins- "norwegian" -> Just Norwegian- "persian" -> Just Persian- "porter" -> Just Porter- "portuguese" -> Just Portuguese- "romanian" -> Just Romanian- "russian" -> Just Russian- "sorani" -> Just Sorani- "spanish" -> Just Spanish- "swedish" -> Just Swedish- "thai" -> Just Thai- "turkish" -> Just Turkish- _ -> Nothing--data Shingle = Shingle- { shingleMaxSize :: Int,- shingleMinSize :: Int,- shingleOutputUnigrams :: Bool,- shingleOutputUnigramsIfNoShingles :: Bool,- shingleTokenSeparator :: Text,- shingleFillerToken :: Text- }- deriving (Eq, Show, Generic)
− src/Database/Bloodhound/Internal/Client.hs
@@ -1,2486 +0,0 @@-{-# LANGUAGE CPP #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE MultiParamTypeClasses #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE UndecidableInstances #-}--module Database.Bloodhound.Internal.Client where--import Bloodhound.Import-import qualified Data.Aeson.KeyMap as X-import qualified Data.HashMap.Strict as HM-import Data.Map.Strict (Map)-import Data.Maybe (mapMaybe)-import qualified Data.SemVer as SemVer-import qualified Data.Text as T-import qualified Data.Traversable as DT-import qualified Data.Vector as V-import Database.Bloodhound.Internal.Analysis-import Database.Bloodhound.Internal.Client.BHRequest-import Database.Bloodhound.Internal.Client.Doc-import Database.Bloodhound.Internal.Newtypes-import Database.Bloodhound.Internal.Query-import Database.Bloodhound.Internal.StringlyTyped-import GHC.Generics-import Network.HTTP.Client-import Text.Read (Read (..))-import qualified Text.Read as TR---- | Common environment for Elasticsearch calls. Connections will be--- pipelined according to the provided HTTP connection manager.-data BHEnv = BHEnv- { bhServer :: Server,- bhManager :: Manager,- -- | Low-level hook that is run before every request is sent. Used to implement custom authentication strategies. Defaults to 'return' with 'mkBHEnv'.- bhRequestHook :: Request -> IO Request- }--instance (Functor m, Applicative m, MonadIO m) => MonadBH (ReaderT BHEnv m) where- getBHEnv = ask---- | 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.-class (Functor m, Applicative m, MonadIO m) => MonadBH m where- getBHEnv :: m BHEnv---- | 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 }-mkBHEnv :: Server -> Manager -> BHEnv-mkBHEnv s m = BHEnv s m return--newtype BH m a = BH- { unBH :: ReaderT BHEnv m a- }- deriving- ( Functor,- Applicative,- Monad,- MonadIO,- MonadState s,- MonadWriter w,- MonadError e,- Alternative,- MonadPlus,- MonadFix,- MonadThrow,- MonadCatch,- MonadFail,- MonadMask- )--instance MonadTrans BH where- lift = BH . lift--instance (MonadReader r m) => MonadReader r (BH m) where- ask = lift ask- local f (BH (ReaderT m)) = BH $- ReaderT $ \r ->- local f (m r)--instance (Functor m, Applicative m, MonadIO m) => MonadBH (BH m) where- getBHEnv = BH getBHEnv--runBH :: BHEnv -> BH m a -> m a-runBH e f = runReaderT (unBH f) e---- | 'Version' is embedded in 'Status'-data Version = Version- { number :: VersionNumber,- build_hash :: BuildHash,- build_date :: UTCTime,- build_snapshot :: Bool,- lucene_version :: VersionNumber- }- deriving (Eq, Show, Generic)---- | Traditional software versioning number-newtype VersionNumber = VersionNumber- {versionNumber :: SemVer.Version}- deriving (Eq, Ord, Show)---- | '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.elastic.co/guide/en/elasticsearch/reference/current/indices-status.html#indices-status>-data Status = Status- { name :: Text,- cluster_name :: Text,- cluster_uuid :: Text,- version :: Version,- tagline :: Text- }- deriving (Eq, Show)--instance FromJSON Status where- parseJSON (Object v) =- Status- <$> v .: "name"- <*> v .: "cluster_name"- <*> v .: "cluster_uuid"- <*> v .: "version"- <*> v .: "tagline"- parseJSON _ = empty---- | 'IndexSettings' is used to configure the shards and replicas when--- you create an Elasticsearch Index.------ <http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html>-data IndexSettings = IndexSettings- { indexShards :: ShardCount,- indexReplicas :: ReplicaCount,- indexMappingsLimits :: IndexMappingsLimits- }- deriving (Eq, Show, Generic)--instance ToJSON IndexSettings where- toJSON (IndexSettings s r l) =- object- [ "settings"- .= object- [ "index"- .= object ["number_of_shards" .= s, "number_of_replicas" .= r, "mapping" .= l]- ]- ]--instance FromJSON IndexSettings where- parseJSON = withObject "IndexSettings" parse- where- parse o = do- s <- o .: "settings"- i <- s .: "index"- IndexSettings- <$> i .: "number_of_shards"- <*> i .: "number_of_replicas"- <*> i .:? "mapping" .!= defaultIndexMappingsLimits---- | 'defaultIndexSettings' is an 'IndexSettings' with 3 shards and--- 2 replicas.-defaultIndexSettings :: IndexSettings-defaultIndexSettings = IndexSettings (ShardCount 3) (ReplicaCount 2) defaultIndexMappingsLimits---- defaultIndexSettings is exported by Database.Bloodhound as well--- no trailing slashes in servers, library handles building the path.---- | 'IndexMappingsLimits is used to configure index's limits.--- <https://www.elastic.co/guide/en/elasticsearch/reference/master/mapping-settings-limit.html>-data IndexMappingsLimits = IndexMappingsLimits- { indexMappingsLimitDepth :: Maybe Int,- indexMappingsLimitNestedFields :: Maybe Int,- indexMappingsLimitNestedObjects :: Maybe Int,- indexMappingsLimitFieldNameLength :: Maybe Int- }- deriving (Eq, Show, Generic)--instance ToJSON IndexMappingsLimits where- toJSON (IndexMappingsLimits d f o n) =- object $- mapMaybe- go- [ ("depth.limit", d),- ("nested_fields.limit", f),- ("nested_objects.limit", o),- ("field_name_length.limit", n)- ]- where- go (name, value) = (name .=) <$> value--instance FromJSON IndexMappingsLimits where- parseJSON = withObject "IndexMappingsLimits" $ \o ->- IndexMappingsLimits- <$> o .:?? "depth"- <*> o .:?? "nested_fields"- <*> o .:?? "nested_objects"- <*> o .:?? "field_name_length"- where- o .:?? name = optional $ do- f <- o .: name- f .: "limit"--defaultIndexMappingsLimits :: IndexMappingsLimits-defaultIndexMappingsLimits = IndexMappingsLimits Nothing Nothing Nothing Nothing---- | 'ForceMergeIndexSettings' is used to configure index optimization. See--- <https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html>--- for more info.-data ForceMergeIndexSettings = ForceMergeIndexSettings- { -- | 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.- maxNumSegments :: Maybe Int,- -- | 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.- onlyExpungeDeletes :: Bool,- -- | Should a flush be performed after the optimize.- flushAfterOptimize :: Bool- }- deriving (Eq, Show)---- | 'defaultForceMergeIndexSettings' implements the default settings that--- Elasticsearch uses for index optimization. 'maxNumSegments' is Nothing,--- 'onlyExpungeDeletes' is False, and flushAfterOptimize is True.-defaultForceMergeIndexSettings :: ForceMergeIndexSettings-defaultForceMergeIndexSettings = ForceMergeIndexSettings Nothing False True---- | 'UpdatableIndexSetting' are settings which may be updated after an index is created.------ <https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html>-data UpdatableIndexSetting- = -- | The number of replicas each shard has.- NumberOfReplicas ReplicaCount- | AutoExpandReplicas ReplicaBounds- | -- | Set to True to have the index read only. False to allow writes and metadata changes.- BlocksReadOnly Bool- | -- | Set to True to disable read operations against the index.- BlocksRead Bool- | -- | Set to True to disable write operations against the index.- BlocksWrite Bool- | -- | Set to True to disable metadata operations against the index.- BlocksMetaData Bool- | -- | The async refresh interval of a shard- RefreshInterval NominalDiffTime- | IndexConcurrency Int- | FailOnMergeFailure Bool- | -- | When to flush on operations.- TranslogFlushThresholdOps Int- | -- | When to flush based on translog (bytes) size.- TranslogFlushThresholdSize Bytes- | -- | When to flush based on a period of not flushing.- TranslogFlushThresholdPeriod NominalDiffTime- | -- | Disables flushing. Note, should be set for a short interval and then enabled.- TranslogDisableFlush Bool- | -- | The maximum size of filter cache (per segment in shard).- CacheFilterMaxSize (Maybe Bytes)- | -- | The expire after access time for filter cache.- CacheFilterExpire (Maybe NominalDiffTime)- | -- | The gateway snapshot interval (only applies to shared gateways).- GatewaySnapshotInterval NominalDiffTime- | -- | A node matching any rule will be allowed to host shards from the index.- RoutingAllocationInclude (NonEmpty NodeAttrFilter)- | -- | A node matching any rule will NOT be allowed to host shards from the index.- RoutingAllocationExclude (NonEmpty NodeAttrFilter)- | -- | Only nodes matching all rules will be allowed to host shards from the index.- RoutingAllocationRequire (NonEmpty NodeAttrFilter)- | -- | Enables shard allocation for a specific index.- RoutingAllocationEnable AllocationPolicy- | -- | Controls the total number of shards (replicas and primaries) allowed to be allocated on a single node.- RoutingAllocationShardsPerNode ShardCount- | -- | When using local gateway a particular shard is recovered only if there can be allocated quorum shards in the cluster.- RecoveryInitialShards InitialShardCount- | GCDeletes NominalDiffTime- | -- | Disables temporarily the purge of expired docs.- TTLDisablePurge Bool- | TranslogFSType FSType- | CompressionSetting Compression- | IndexCompoundFormat CompoundFormat- | IndexCompoundOnFlush Bool- | WarmerEnabled Bool- | MappingTotalFieldsLimit Int- | -- | Analysis is not a dynamic setting and can only be performed on a closed index.- AnalysisSetting Analysis- | -- | Sets a delay to the allocation of replica shards which become unassigned because a node has left, giving them chance to return. See <https://www.elastic.co/guide/en/elasticsearch/reference/5.6/delayed-allocation.html>- UnassignedNodeLeftDelayedTimeout NominalDiffTime- deriving (Eq, Show, Generic)--attrFilterJSON :: NonEmpty NodeAttrFilter -> Value-attrFilterJSON fs =- object- [ fromText n .= T.intercalate "," (toList vs)- | NodeAttrFilter (NodeAttrName n) vs <- toList fs- ]--parseAttrFilter :: Value -> Parser (NonEmpty NodeAttrFilter)-parseAttrFilter = withObject "NonEmpty NodeAttrFilter" parse- where- parse o = case X.toList o of- [] -> fail "Expected non-empty list of NodeAttrFilters"- x : xs -> DT.mapM (uncurry parse') (x :| xs)- parse' n = withText "Text" $ \t ->- case T.splitOn "," t of- fv : fvs -> return (NodeAttrFilter (NodeAttrName $ toText n) (fv :| fvs))- [] -> fail "Expected non-empty list of filter values"--instance ToJSON UpdatableIndexSetting where- toJSON (NumberOfReplicas x) = oPath ("index" :| ["number_of_replicas"]) x- toJSON (AutoExpandReplicas x) = oPath ("index" :| ["auto_expand_replicas"]) x- toJSON (RefreshInterval x) = oPath ("index" :| ["refresh_interval"]) (NominalDiffTimeJSON x)- toJSON (IndexConcurrency x) = oPath ("index" :| ["concurrency"]) x- toJSON (FailOnMergeFailure x) = oPath ("index" :| ["fail_on_merge_failure"]) x- toJSON (TranslogFlushThresholdOps x) = oPath ("index" :| ["translog", "flush_threshold_ops"]) x- toJSON (TranslogFlushThresholdSize x) = oPath ("index" :| ["translog", "flush_threshold_size"]) x- toJSON (TranslogFlushThresholdPeriod x) = oPath ("index" :| ["translog", "flush_threshold_period"]) (NominalDiffTimeJSON x)- toJSON (TranslogDisableFlush x) = oPath ("index" :| ["translog", "disable_flush"]) x- toJSON (CacheFilterMaxSize x) = oPath ("index" :| ["cache", "filter", "max_size"]) x- toJSON (CacheFilterExpire x) = oPath ("index" :| ["cache", "filter", "expire"]) (NominalDiffTimeJSON <$> x)- toJSON (GatewaySnapshotInterval x) = oPath ("index" :| ["gateway", "snapshot_interval"]) (NominalDiffTimeJSON x)- toJSON (RoutingAllocationInclude fs) = oPath ("index" :| ["routing", "allocation", "include"]) (attrFilterJSON fs)- toJSON (RoutingAllocationExclude fs) = oPath ("index" :| ["routing", "allocation", "exclude"]) (attrFilterJSON fs)- toJSON (RoutingAllocationRequire fs) = oPath ("index" :| ["routing", "allocation", "require"]) (attrFilterJSON fs)- toJSON (RoutingAllocationEnable x) = oPath ("index" :| ["routing", "allocation", "enable"]) x- toJSON (RoutingAllocationShardsPerNode x) = oPath ("index" :| ["routing", "allocation", "total_shards_per_node"]) x- toJSON (RecoveryInitialShards x) = oPath ("index" :| ["recovery", "initial_shards"]) x- toJSON (GCDeletes x) = oPath ("index" :| ["gc_deletes"]) (NominalDiffTimeJSON x)- toJSON (TTLDisablePurge x) = oPath ("index" :| ["ttl", "disable_purge"]) x- toJSON (TranslogFSType x) = oPath ("index" :| ["translog", "fs", "type"]) x- toJSON (CompressionSetting x) = oPath ("index" :| ["codec"]) x- toJSON (IndexCompoundFormat x) = oPath ("index" :| ["compound_format"]) x- toJSON (IndexCompoundOnFlush x) = oPath ("index" :| ["compound_on_flush"]) x- toJSON (WarmerEnabled x) = oPath ("index" :| ["warmer", "enabled"]) x- toJSON (BlocksReadOnly x) = oPath ("blocks" :| ["read_only"]) x- toJSON (BlocksRead x) = oPath ("blocks" :| ["read"]) x- toJSON (BlocksWrite x) = oPath ("blocks" :| ["write"]) x- toJSON (BlocksMetaData x) = oPath ("blocks" :| ["metadata"]) x- toJSON (MappingTotalFieldsLimit x) = oPath ("index" :| ["mapping", "total_fields", "limit"]) x- toJSON (AnalysisSetting x) = oPath ("index" :| ["analysis"]) x- toJSON (UnassignedNodeLeftDelayedTimeout x) = oPath ("index" :| ["unassigned", "node_left", "delayed_timeout"]) (NominalDiffTimeJSON x)--instance FromJSON UpdatableIndexSetting where- parseJSON = withObject "UpdatableIndexSetting" parse- where- parse o =- numberOfReplicas- `taggedAt` ["index", "number_of_replicas"]- <|> autoExpandReplicas- `taggedAt` ["index", "auto_expand_replicas"]- <|> refreshInterval- `taggedAt` ["index", "refresh_interval"]- <|> indexConcurrency- `taggedAt` ["index", "concurrency"]- <|> failOnMergeFailure- `taggedAt` ["index", "fail_on_merge_failure"]- <|> translogFlushThresholdOps- `taggedAt` ["index", "translog", "flush_threshold_ops"]- <|> translogFlushThresholdSize- `taggedAt` ["index", "translog", "flush_threshold_size"]- <|> translogFlushThresholdPeriod- `taggedAt` ["index", "translog", "flush_threshold_period"]- <|> translogDisableFlush- `taggedAt` ["index", "translog", "disable_flush"]- <|> cacheFilterMaxSize- `taggedAt` ["index", "cache", "filter", "max_size"]- <|> cacheFilterExpire- `taggedAt` ["index", "cache", "filter", "expire"]- <|> gatewaySnapshotInterval- `taggedAt` ["index", "gateway", "snapshot_interval"]- <|> routingAllocationInclude- `taggedAt` ["index", "routing", "allocation", "include"]- <|> routingAllocationExclude- `taggedAt` ["index", "routing", "allocation", "exclude"]- <|> routingAllocationRequire- `taggedAt` ["index", "routing", "allocation", "require"]- <|> routingAllocationEnable- `taggedAt` ["index", "routing", "allocation", "enable"]- <|> routingAllocationShardsPerNode- `taggedAt` ["index", "routing", "allocation", "total_shards_per_node"]- <|> recoveryInitialShards- `taggedAt` ["index", "recovery", "initial_shards"]- <|> gcDeletes- `taggedAt` ["index", "gc_deletes"]- <|> ttlDisablePurge- `taggedAt` ["index", "ttl", "disable_purge"]- <|> translogFSType- `taggedAt` ["index", "translog", "fs", "type"]- <|> compressionSetting- `taggedAt` ["index", "codec"]- <|> compoundFormat- `taggedAt` ["index", "compound_format"]- <|> compoundOnFlush- `taggedAt` ["index", "compound_on_flush"]- <|> warmerEnabled- `taggedAt` ["index", "warmer", "enabled"]- <|> blocksReadOnly- `taggedAt` ["blocks", "read_only"]- <|> blocksRead- `taggedAt` ["blocks", "read"]- <|> blocksWrite- `taggedAt` ["blocks", "write"]- <|> blocksMetaData- `taggedAt` ["blocks", "metadata"]- <|> mappingTotalFieldsLimit- `taggedAt` ["index", "mapping", "total_fields", "limit"]- <|> analysisSetting- `taggedAt` ["index", "analysis"]- <|> unassignedNodeLeftDelayedTimeout- `taggedAt` ["index", "unassigned", "node_left", "delayed_timeout"]- where- taggedAt f ks = taggedAt' f (Object o) ks- taggedAt' f v [] =- f =<< (parseJSON v <|> parseJSON (unStringlyTypeJSON v))- taggedAt' f v (k : ks) =- withObject- "Object"- ( \o -> do- v' <- o .: k- taggedAt' f v' ks- )- v- numberOfReplicas = pure . NumberOfReplicas- autoExpandReplicas = pure . AutoExpandReplicas- refreshInterval = pure . RefreshInterval . ndtJSON- indexConcurrency = pure . IndexConcurrency- failOnMergeFailure = pure . FailOnMergeFailure- translogFlushThresholdOps = pure . TranslogFlushThresholdOps- translogFlushThresholdSize = pure . TranslogFlushThresholdSize- translogFlushThresholdPeriod = pure . TranslogFlushThresholdPeriod . ndtJSON- translogDisableFlush = pure . TranslogDisableFlush- cacheFilterMaxSize = pure . CacheFilterMaxSize- cacheFilterExpire = pure . CacheFilterExpire . fmap ndtJSON- gatewaySnapshotInterval = pure . GatewaySnapshotInterval . ndtJSON- routingAllocationInclude = fmap RoutingAllocationInclude . parseAttrFilter- routingAllocationExclude = fmap RoutingAllocationExclude . parseAttrFilter- routingAllocationRequire = fmap RoutingAllocationRequire . parseAttrFilter- routingAllocationEnable = pure . RoutingAllocationEnable- routingAllocationShardsPerNode = pure . RoutingAllocationShardsPerNode- recoveryInitialShards = pure . RecoveryInitialShards- gcDeletes = pure . GCDeletes . ndtJSON- ttlDisablePurge = pure . TTLDisablePurge- translogFSType = pure . TranslogFSType- compressionSetting = pure . CompressionSetting- compoundFormat = pure . IndexCompoundFormat- compoundOnFlush = pure . IndexCompoundOnFlush- warmerEnabled = pure . WarmerEnabled- blocksReadOnly = pure . BlocksReadOnly- blocksRead = pure . BlocksRead- blocksWrite = pure . BlocksWrite- blocksMetaData = pure . BlocksMetaData- mappingTotalFieldsLimit = pure . MappingTotalFieldsLimit- analysisSetting = pure . AnalysisSetting- unassignedNodeLeftDelayedTimeout = pure . UnassignedNodeLeftDelayedTimeout . ndtJSON--data ReplicaBounds- = ReplicasBounded Int Int- | ReplicasLowerBounded Int- | ReplicasUnbounded- deriving (Eq, Show)--instance ToJSON ReplicaBounds where- toJSON (ReplicasBounded a b) = String (showText a <> "-" <> showText b)- toJSON (ReplicasLowerBounded a) = String (showText a <> "-all")- toJSON ReplicasUnbounded = Bool False--instance FromJSON ReplicaBounds where- parseJSON v =- withText "ReplicaBounds" parseText v- <|> withBool "ReplicaBounds" parseBool v- where- parseText t = case T.splitOn "-" t of- [a, "all"] -> ReplicasLowerBounded <$> parseReadText a- [a, b] ->- ReplicasBounded- <$> parseReadText a- <*> parseReadText b- _ -> fail ("Could not parse ReplicaBounds: " <> show t)- parseBool False = pure ReplicasUnbounded- parseBool _ = fail "ReplicasUnbounded cannot be represented with True"--data Compression- = -- | Compress with LZ4- CompressionDefault- | -- | Compress with DEFLATE. Elastic- -- <https://www.elastic.co/blog/elasticsearch-storage-the-true-story-2.0 blogs>- -- that this can reduce disk use by 15%-25%.- CompressionBest- deriving (Eq, Show, Generic)--instance ToJSON Compression where- toJSON x = case x of- CompressionDefault -> toJSON ("default" :: Text)- CompressionBest -> toJSON ("best_compression" :: Text)--instance FromJSON Compression where- parseJSON = withText "Compression" $ \t -> case t of- "default" -> return CompressionDefault- "best_compression" -> return CompressionBest- _ -> fail "invalid compression codec"---- | A measure of bytes used for various configurations. You may want--- to use smart constructors like 'gigabytes' for larger values.------ >>> gigabytes 9--- Bytes 9000000000------ >>> megabytes 9--- Bytes 9000000------ >>> kilobytes 9--- Bytes 9000-newtype Bytes- = Bytes Int- deriving (Eq, Show, Generic, Ord, ToJSON, FromJSON)--gigabytes :: Int -> Bytes-gigabytes n = megabytes (1000 * n)--megabytes :: Int -> Bytes-megabytes n = kilobytes (1000 * n)--kilobytes :: Int -> Bytes-kilobytes n = Bytes (1000 * n)--data FSType- = FSSimple- | FSBuffered- deriving (Eq, Show, Generic)--instance ToJSON FSType where- toJSON FSSimple = "simple"- toJSON FSBuffered = "buffered"--instance FromJSON FSType where- parseJSON = withText "FSType" parse- where- parse "simple" = pure FSSimple- parse "buffered" = pure FSBuffered- parse t = fail ("Invalid FSType: " <> show t)--data InitialShardCount- = QuorumShards- | QuorumMinus1Shards- | FullShards- | FullMinus1Shards- | ExplicitShards Int- deriving (Eq, Show, Generic)--instance FromJSON InitialShardCount where- parseJSON v =- withText "InitialShardCount" parseText v- <|> ExplicitShards <$> parseJSON v- where- parseText "quorum" = pure QuorumShards- parseText "quorum-1" = pure QuorumMinus1Shards- parseText "full" = pure FullShards- parseText "full-1" = pure FullMinus1Shards- parseText _ = mzero--instance ToJSON InitialShardCount where- toJSON QuorumShards = String "quorum"- toJSON QuorumMinus1Shards = String "quorum-1"- toJSON FullShards = String "full"- toJSON FullMinus1Shards = String "full-1"- toJSON (ExplicitShards x) = toJSON x--data NodeAttrFilter = NodeAttrFilter- { nodeAttrFilterName :: NodeAttrName,- nodeAttrFilterValues :: NonEmpty Text- }- deriving (Eq, Ord, Show)--newtype NodeAttrName = NodeAttrName Text deriving (Eq, Ord, Show)--data CompoundFormat- = CompoundFileFormat Bool- | -- | percentage between 0 and 1 where 0 is false, 1 is true- MergeSegmentVsTotalIndex Double- deriving (Eq, Show, Generic)--instance ToJSON CompoundFormat where- toJSON (CompoundFileFormat x) = Bool x- toJSON (MergeSegmentVsTotalIndex x) = toJSON x--instance FromJSON CompoundFormat where- parseJSON v =- CompoundFileFormat <$> parseJSON v- <|> MergeSegmentVsTotalIndex <$> parseJSON v--newtype NominalDiffTimeJSON = NominalDiffTimeJSON {ndtJSON :: NominalDiffTime}--instance ToJSON NominalDiffTimeJSON where- toJSON (NominalDiffTimeJSON t) = String (showText (round t :: Integer) <> "s")--instance FromJSON NominalDiffTimeJSON where- parseJSON = withText "NominalDiffTime" parse- where- parse t = case T.takeEnd 1 t of- "s" -> NominalDiffTimeJSON . fromInteger <$> parseReadText (T.dropEnd 1 t)- _ -> fail "Invalid or missing NominalDiffTime unit (expected s)"--data IndexSettingsSummary = IndexSettingsSummary- { sSummaryIndexName :: IndexName,- sSummaryFixedSettings :: IndexSettings,- sSummaryUpdateable :: [UpdatableIndexSetting]- }- deriving (Eq, Show)--parseSettings :: Object -> Parser [UpdatableIndexSetting]-parseSettings o = do- o' <- o .: "index"- -- slice the index object into singleton hashmaps and try to parse each- parses <- forM (HM.toList o') $ \(k, v) -> do- -- blocks are now nested into the "index" key, which is not how they're serialized- let atRoot = Object (X.singleton k v)- let atIndex = Object (X.singleton "index" atRoot)- optional (parseJSON atRoot <|> parseJSON atIndex)- return (catMaybes parses)--instance FromJSON IndexSettingsSummary where- parseJSON = withObject "IndexSettingsSummary" parse- where- parse o = case X.toList o of- [(ixn, v@(Object o'))] ->- IndexSettingsSummary (IndexName $ toText ixn)- <$> parseJSON v- <*> (fmap (filter (not . redundant)) . parseSettings =<< o' .: "settings")- _ -> fail "Expected single-key object with index name"- redundant (NumberOfReplicas _) = True- redundant _ = False---- | 'OpenCloseIndex' is a sum type for opening and closing indices.------ <http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html>-data OpenCloseIndex = OpenIndex | CloseIndex deriving (Eq, Show)--data FieldType- = GeoPointType- | GeoShapeType- | FloatType- | IntegerType- | LongType- | ShortType- | ByteType- deriving (Eq, Show)--newtype FieldDefinition = FieldDefinition- { fieldType :: FieldType- }- deriving (Eq, Show)---- | An 'IndexTemplate' defines a template that will automatically be--- applied to new indices created. The templates include both--- 'IndexSettings' and mappings, and a simple 'IndexPattern' that--- controls if the template will be applied to the index created.--- Specify mappings as follows: @[toJSON TweetMapping, ...]@------ https://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-templates.html-data IndexTemplate = IndexTemplate- { templatePatterns :: [IndexPattern],- templateSettings :: Maybe IndexSettings,- templateMappings :: Value- }--instance ToJSON IndexTemplate where- toJSON (IndexTemplate p s m) =- merge- ( object- [ "index_patterns" .= p,- "mappings" .= m- ]- )- (toJSON s)- where- merge (Object o1) (Object o2) = toJSON $ X.union o1 o2- merge o Null = o- merge _ _ = undefined--data MappingField = MappingField- { mappingFieldName :: FieldName,- fieldDefinition :: FieldDefinition- }- deriving (Eq, Show)---- | Support for type reification of 'Mapping's is currently incomplete, for--- now the mapping API verbiage expects a 'ToJSON'able blob.------ Indexes have mappings, mappings are schemas for the documents contained--- in the index. I'd recommend having only one mapping per index, always--- having a mapping, and keeping different kinds of documents separated--- if possible.-newtype Mapping = Mapping {mappingFields :: [MappingField]}- deriving (Eq, Show)--data UpsertActionMetadata- = UA_RetryOnConflict Int- | UA_Version Int- deriving (Eq, Show)--buildUpsertActionMetadata :: UpsertActionMetadata -> Pair-buildUpsertActionMetadata (UA_RetryOnConflict i) = "retry_on_conflict" .= i-buildUpsertActionMetadata (UA_Version i) = "_version" .= i--data UpsertPayload- = UpsertDoc Value- | UpsertScript Bool Script Value- deriving (Eq, Show)--data AllocationPolicy- = -- | Allows shard allocation for all shards.- AllocAll- | -- | Allows shard allocation only for primary shards.- AllocPrimaries- | -- | Allows shard allocation only for primary shards for new indices.- AllocNewPrimaries- | -- | No shard allocation is allowed- AllocNone- deriving (Eq, Show, Generic)--instance ToJSON AllocationPolicy where- toJSON AllocAll = String "all"- toJSON AllocPrimaries = String "primaries"- toJSON AllocNewPrimaries = String "new_primaries"- toJSON AllocNone = String "none"--instance FromJSON AllocationPolicy where- parseJSON = withText "AllocationPolicy" parse- where- parse "all" = pure AllocAll- parse "primaries" = pure AllocPrimaries- parse "new_primaries" = pure AllocNewPrimaries- parse "none" = pure AllocNone- parse t = fail ("Invlaid AllocationPolicy: " <> show t)---- | '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.--- Consult the <http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html#docs-bulk Bulk API documentation>--- for further explanation.--- Warning: Bulk operations suffixed with @Auto@ rely on Elasticsearch to--- generate the id. Often, people use auto-generated identifiers when--- Elasticsearch is the only place that their data is stored. Do not let--- Elasticsearch be the only place your data is stored. It does not guarantee--- durability, and it may silently discard data.--- This <https://github.com/elastic/elasticsearch/issues/10708 issue> is--- discussed further on github.-data BulkOperation- = -- | Create the document, replacing it if it already exists.- BulkIndex IndexName DocId Value- | -- | Create a document with an autogenerated id.- BulkIndexAuto IndexName Value- | -- | Create a document with an autogenerated id. Use fast JSON encoding.- BulkIndexEncodingAuto IndexName Encoding- | -- | Create a document, failing if it already exists.- BulkCreate IndexName DocId Value- | -- | Create a document, failing if it already exists. Use fast JSON encoding.- BulkCreateEncoding IndexName DocId Encoding- | -- | Delete the document- BulkDelete IndexName DocId- | -- | Update the document, merging the new value with the existing one.- BulkUpdate IndexName DocId Value- | -- | Update the document if it already exists, otherwise insert it.- BulkUpsert IndexName DocId UpsertPayload [UpsertActionMetadata]- deriving (Eq, Show)--data IndexAlias = IndexAlias- { srcIndex :: IndexName,- indexAlias :: IndexAliasName- }- deriving (Eq, Show)--data IndexAliasAction- = AddAlias IndexAlias IndexAliasCreate- | RemoveAlias IndexAlias- deriving (Eq, Show)--data IndexAliasCreate = IndexAliasCreate- { aliasCreateRouting :: Maybe AliasRouting,- aliasCreateFilter :: Maybe Filter- }- deriving (Eq, Show)--data AliasRouting- = AllAliasRouting RoutingValue- | GranularAliasRouting (Maybe SearchAliasRouting) (Maybe IndexAliasRouting)- deriving (Eq, Show)--newtype SearchAliasRouting- = SearchAliasRouting (NonEmpty RoutingValue)- deriving (Eq, Show, Generic)--instance ToJSON SearchAliasRouting where- toJSON (SearchAliasRouting rvs) = toJSON (T.intercalate "," (routingValue <$> toList rvs))--instance FromJSON SearchAliasRouting where- parseJSON = withText "SearchAliasRouting" parse- where- parse t = SearchAliasRouting <$> parseNEJSON (String <$> T.splitOn "," t)--newtype IndexAliasRouting- = IndexAliasRouting RoutingValue- deriving (Eq, Show, Generic, ToJSON, FromJSON)--newtype RoutingValue = RoutingValue {routingValue :: Text}- deriving (Eq, Show, ToJSON, FromJSON)--newtype IndexAliasesSummary = IndexAliasesSummary {indexAliasesSummary :: [IndexAliasSummary]}- deriving (Eq, Show)--instance FromJSON IndexAliasesSummary where- parseJSON = withObject "IndexAliasesSummary" parse- where- parse o = IndexAliasesSummary . mconcat <$> mapM (uncurry go) (X.toList o)- go ixn = withObject "index aliases" $ \ia -> do- aliases <- ia .:? "aliases" .!= mempty- forM (HM.toList aliases) $ \(aName, v) -> do- let indexAlias = IndexAlias (IndexName $ toText ixn) (IndexAliasName (IndexName $ toText aName))- IndexAliasSummary indexAlias <$> parseJSON v--instance ToJSON IndexAliasAction where- toJSON (AddAlias ia opts) = object ["add" .= (iaObj <> optsObj)]- where- Object iaObj = toJSON ia- Object optsObj = toJSON opts- toJSON (RemoveAlias ia) = object ["remove" .= iaObj]- where- Object iaObj = toJSON ia--instance ToJSON IndexAlias where- toJSON IndexAlias {..} =- object- [ "index" .= srcIndex,- "alias" .= indexAlias- ]--instance ToJSON IndexAliasCreate where- toJSON IndexAliasCreate {..} = Object (filterObj <> routingObj)- where- filterObj = maybe mempty (X.singleton "filter" . toJSON) aliasCreateFilter- Object routingObj = maybe (Object mempty) toJSON aliasCreateRouting--instance ToJSON AliasRouting where- toJSON (AllAliasRouting v) = object ["routing" .= v]- toJSON (GranularAliasRouting srch idx) = object (catMaybes prs)- where- prs =- [ ("search_routing" .=) <$> srch,- ("index_routing" .=) <$> idx- ]--instance FromJSON AliasRouting where- parseJSON = withObject "AliasRouting" parse- where- parse o = parseAll o <|> parseGranular o- parseAll o = AllAliasRouting <$> o .: "routing"- parseGranular o = do- sr <- o .:? "search_routing"- ir <- o .:? "index_routing"- if isNothing sr && isNothing ir- then fail "Both search_routing and index_routing can't be blank"- else return (GranularAliasRouting sr ir)--instance FromJSON IndexAliasCreate where- parseJSON v = withObject "IndexAliasCreate" parse v- where- parse o =- IndexAliasCreate- <$> optional (parseJSON v)- <*> o .:? "filter"---- | 'IndexAliasSummary' is a summary of an index alias configured for a server.-data IndexAliasSummary = IndexAliasSummary- { indexAliasSummaryAlias :: IndexAlias,- indexAliasSummaryCreate :: IndexAliasCreate- }- deriving (Eq, Show)--data JoinRelation- = ParentDocument FieldName RelationName- | ChildDocument FieldName RelationName DocId- deriving (Show, Eq)---- | '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 IndexDocumentSettings = IndexDocumentSettings- { idsVersionControl :: VersionControl,- idsJoinRelation :: Maybe JoinRelation- }- deriving (Eq, Show)---- | Reasonable default settings. Chooses no version control and no parent.-defaultIndexDocumentSettings :: IndexDocumentSettings-defaultIndexDocumentSettings = IndexDocumentSettings NoVersionControl Nothing---- | 'IndexSelection' is used for APIs which take a single index, a list of--- indexes, or the special @_all@ index.---- TODO: this does not fully support <https://www.elastic.co/guide/en/elasticsearch/reference/1.7/multi-index.html multi-index syntax>. It wouldn't be too hard to implement but you'd have to add the optional parameters (ignore_unavailable, allow_no_indices, expand_wildcards) to any APIs using it. Also would be a breaking API.-data IndexSelection- = IndexList (NonEmpty IndexName)- | AllIndexes- deriving (Eq, Show)---- | 'NodeSelection' is used for most cluster APIs. See <https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html#cluster-nodes here> for more details.-data NodeSelection- = -- | Whatever node receives this request- LocalNode- | NodeList (NonEmpty NodeSelector)- | AllNodes- deriving (Eq, Show)---- | An exact match or pattern to identify a node. Note that All of--- these options support wildcarding, so your node name, server, attr--- name can all contain * characters to be a fuzzy match.-data NodeSelector- = NodeByName NodeName- | NodeByFullNodeId FullNodeId- | -- | e.g. 10.0.0.1 or even 10.0.0.*- NodeByHost Server- | -- | NodeAttrName can be a pattern, e.g. rack*. The value can too.- NodeByAttribute NodeAttrName Text- deriving (Eq, Show)---- | 'TemplateName' is used to describe which template to query/create/delete-newtype TemplateName = TemplateName Text deriving (Eq, Show, Generic, ToJSON, FromJSON)---- | 'IndexPattern' represents a pattern which is matched against index names-newtype IndexPattern = IndexPattern Text deriving (Eq, Show, Generic, ToJSON, FromJSON)---- | Username type used for HTTP Basic authentication. See 'basicAuthHook'.-newtype EsUsername = EsUsername {esUsername :: Text} deriving (Read, Show, Eq)---- | Password type used for HTTP Basic authentication. See 'basicAuthHook'.-newtype EsPassword = EsPassword {esPassword :: Text} deriving (Read, Show, Eq)--data SnapshotRepoSelection- = SnapshotRepoList (NonEmpty SnapshotRepoPattern)- | AllSnapshotRepos- deriving (Eq, Show)---- | Either specifies an exact repo name or one with globs in it,--- e.g. @RepoPattern "foo*"@ __NOTE__: Patterns are not supported on ES < 1.7-data SnapshotRepoPattern- = ExactRepo SnapshotRepoName- | RepoPattern Text- deriving (Eq, Show)---- | The unique name of a snapshot repository.-newtype SnapshotRepoName = SnapshotRepoName {snapshotRepoName :: Text}- deriving (Eq, Ord, Show, Generic, ToJSON, FromJSON)---- | A generic representation of a snapshot repo. This is what gets--- sent to and parsed from the server. For repo types enabled by--- plugins that aren't exported by this library, consider making a--- custom type which implements 'SnapshotRepo'. If it is a common repo--- type, consider submitting a pull request to have it included in the--- library proper-data GenericSnapshotRepo = GenericSnapshotRepo- { gSnapshotRepoName :: SnapshotRepoName,- gSnapshotRepoType :: SnapshotRepoType,- gSnapshotRepoSettings :: GenericSnapshotRepoSettings- }- deriving (Eq, Show)--instance SnapshotRepo GenericSnapshotRepo where- toGSnapshotRepo = id- fromGSnapshotRepo = Right--newtype SnapshotRepoType = SnapshotRepoType {snapshotRepoType :: Text}- deriving (Eq, Ord, Show, ToJSON, FromJSON)---- | Opaque representation of snapshot repo settings. Instances of--- 'SnapshotRepo' will produce this.-newtype GenericSnapshotRepoSettings = GenericSnapshotRepoSettings {gSnapshotRepoSettingsObject :: Object}- deriving (Eq, Show, ToJSON)---- Regardless of whether you send strongly typed json, my version of--- ES sends back stringly typed json in the settings, e.g. booleans--- as strings, so we'll try to convert them.-instance FromJSON GenericSnapshotRepoSettings where- parseJSON = fmap (GenericSnapshotRepoSettings . fmap unStringlyTypeJSON) . parseJSON---- | The result of running 'verifySnapshotRepo'.-newtype SnapshotVerification = SnapshotVerification- { snapshotNodeVerifications :: [SnapshotNodeVerification]- }- deriving (Eq, Show)--instance FromJSON SnapshotVerification where- parseJSON = withObject "SnapshotVerification" parse- where- parse o = do- o2 <- o .: "nodes"- SnapshotVerification <$> mapM (uncurry parse') (HM.toList o2)- parse' rawFullId = withObject "SnapshotNodeVerification" $ \o ->- SnapshotNodeVerification (FullNodeId rawFullId) <$> o .: "name"---- | A node that has verified a snapshot-data SnapshotNodeVerification = SnapshotNodeVerification- { snvFullId :: FullNodeId,- snvNodeName :: NodeName- }- deriving (Eq, Show)---- | Unique, automatically-generated name assigned to nodes that are--- usually returned in node-oriented APIs.-newtype FullNodeId = FullNodeId {fullNodeId :: Text}- deriving (Eq, Ord, Show, FromJSON)---- | A human-readable node name that is supplied by the user in the--- node config or automatically generated by Elasticsearch.-newtype NodeName = NodeName {nodeName :: Text}- deriving (Eq, Ord, Show, FromJSON)--newtype ClusterName = ClusterName {clusterName :: Text}- deriving (Eq, Ord, Show, FromJSON)--data NodesInfo = NodesInfo- { nodesInfo :: [NodeInfo],- nodesClusterName :: ClusterName- }- deriving (Eq, Show)--data NodesStats = NodesStats- { nodesStats :: [NodeStats],- nodesStatsClusterName :: ClusterName- }- deriving (Eq, Show)--data NodeStats = NodeStats- { nodeStatsName :: NodeName,- nodeStatsFullId :: FullNodeId,- nodeStatsBreakersStats :: Maybe NodeBreakersStats,- nodeStatsHTTP :: NodeHTTPStats,- nodeStatsTransport :: NodeTransportStats,- nodeStatsFS :: NodeFSStats,- nodeStatsNetwork :: Maybe NodeNetworkStats,- nodeStatsThreadPool :: Map Text NodeThreadPoolStats,- nodeStatsJVM :: NodeJVMStats,- nodeStatsProcess :: NodeProcessStats,- nodeStatsOS :: NodeOSStats,- nodeStatsIndices :: NodeIndicesStats- }- deriving (Eq, Show)--data NodeBreakersStats = NodeBreakersStats- { nodeStatsParentBreaker :: NodeBreakerStats,- nodeStatsRequestBreaker :: NodeBreakerStats,- nodeStatsFieldDataBreaker :: NodeBreakerStats- }- deriving (Eq, Show)--data NodeBreakerStats = NodeBreakerStats- { nodeBreakersTripped :: Int,- nodeBreakersOverhead :: Double,- nodeBreakersEstSize :: Bytes,- nodeBreakersLimitSize :: Bytes- }- deriving (Eq, Show)--data NodeHTTPStats = NodeHTTPStats- { nodeHTTPTotalOpened :: Int,- nodeHTTPCurrentOpen :: Int- }- deriving (Eq, Show)--data NodeTransportStats = NodeTransportStats- { nodeTransportTXSize :: Bytes,- nodeTransportCount :: Int,- nodeTransportRXSize :: Bytes,- nodeTransportRXCount :: Int,- nodeTransportServerOpen :: Int- }- deriving (Eq, Show)--data NodeFSStats = NodeFSStats- { nodeFSDataPaths :: [NodeDataPathStats],- nodeFSTotal :: NodeFSTotalStats,- nodeFSTimestamp :: UTCTime- }- deriving (Eq, Show)--data NodeDataPathStats = NodeDataPathStats- { nodeDataPathDiskServiceTime :: Maybe Double,- nodeDataPathDiskQueue :: Maybe Double,- nodeDataPathIOSize :: Maybe Bytes,- nodeDataPathWriteSize :: Maybe Bytes,- nodeDataPathReadSize :: Maybe Bytes,- nodeDataPathIOOps :: Maybe Int,- nodeDataPathWrites :: Maybe Int,- nodeDataPathReads :: Maybe Int,- nodeDataPathAvailable :: Bytes,- nodeDataPathFree :: Bytes,- nodeDataPathTotal :: Bytes,- nodeDataPathType :: Maybe Text,- nodeDataPathDevice :: Maybe Text,- nodeDataPathMount :: Text,- nodeDataPathPath :: Text- }- deriving (Eq, Show)--data NodeFSTotalStats = NodeFSTotalStats- { nodeFSTotalDiskServiceTime :: Maybe Double,- nodeFSTotalDiskQueue :: Maybe Double,- nodeFSTotalIOSize :: Maybe Bytes,- nodeFSTotalWriteSize :: Maybe Bytes,- nodeFSTotalReadSize :: Maybe Bytes,- nodeFSTotalIOOps :: Maybe Int,- nodeFSTotalWrites :: Maybe Int,- nodeFSTotalReads :: Maybe Int,- nodeFSTotalAvailable :: Bytes,- nodeFSTotalFree :: Bytes,- nodeFSTotalTotal :: Bytes- }- deriving (Eq, Show)--data NodeNetworkStats = NodeNetworkStats- { nodeNetTCPOutRSTs :: Int,- nodeNetTCPInErrs :: Int,- nodeNetTCPAttemptFails :: Int,- nodeNetTCPEstabResets :: Int,- nodeNetTCPRetransSegs :: Int,- nodeNetTCPOutSegs :: Int,- nodeNetTCPInSegs :: Int,- nodeNetTCPCurrEstab :: Int,- nodeNetTCPPassiveOpens :: Int,- nodeNetTCPActiveOpens :: Int- }- deriving (Eq, Show)--data NodeThreadPoolStats = NodeThreadPoolStats- { nodeThreadPoolCompleted :: Int,- nodeThreadPoolLargest :: Int,- nodeThreadPoolRejected :: Int,- nodeThreadPoolActive :: Int,- nodeThreadPoolQueue :: Int,- nodeThreadPoolThreads :: Int- }- deriving (Eq, Show)--data NodeJVMStats = NodeJVMStats- { nodeJVMStatsMappedBufferPool :: JVMBufferPoolStats,- nodeJVMStatsDirectBufferPool :: JVMBufferPoolStats,- nodeJVMStatsGCOldCollector :: JVMGCStats,- nodeJVMStatsGCYoungCollector :: JVMGCStats,- nodeJVMStatsPeakThreadsCount :: Int,- nodeJVMStatsThreadsCount :: Int,- nodeJVMStatsOldPool :: JVMPoolStats,- nodeJVMStatsSurvivorPool :: JVMPoolStats,- nodeJVMStatsYoungPool :: JVMPoolStats,- nodeJVMStatsNonHeapCommitted :: Bytes,- nodeJVMStatsNonHeapUsed :: Bytes,- nodeJVMStatsHeapMax :: Bytes,- nodeJVMStatsHeapCommitted :: Bytes,- nodeJVMStatsHeapUsedPercent :: Int,- nodeJVMStatsHeapUsed :: Bytes,- nodeJVMStatsUptime :: NominalDiffTime,- nodeJVMStatsTimestamp :: UTCTime- }- deriving (Eq, Show)--data JVMBufferPoolStats = JVMBufferPoolStats- { jvmBufferPoolStatsTotalCapacity :: Bytes,- jvmBufferPoolStatsUsed :: Bytes,- jvmBufferPoolStatsCount :: Int- }- deriving (Eq, Show)--data JVMGCStats = JVMGCStats- { jvmGCStatsCollectionTime :: NominalDiffTime,- jvmGCStatsCollectionCount :: Int- }- deriving (Eq, Show)--data JVMPoolStats = JVMPoolStats- { jvmPoolStatsPeakMax :: Bytes,- jvmPoolStatsPeakUsed :: Bytes,- jvmPoolStatsMax :: Bytes,- jvmPoolStatsUsed :: Bytes- }- deriving (Eq, Show)--data NodeProcessStats = NodeProcessStats- { nodeProcessTimestamp :: UTCTime,- nodeProcessOpenFDs :: Int,- nodeProcessMaxFDs :: Int,- nodeProcessCPUPercent :: Int,- nodeProcessCPUTotal :: NominalDiffTime,- nodeProcessMemTotalVirtual :: Bytes- }- deriving (Eq, Show)--data NodeOSStats = NodeOSStats- { nodeOSTimestamp :: UTCTime,- nodeOSCPUPercent :: Int,- nodeOSLoad :: Maybe LoadAvgs,- nodeOSMemTotal :: Bytes,- nodeOSMemFree :: Bytes,- nodeOSMemFreePercent :: Int,- nodeOSMemUsed :: Bytes,- nodeOSMemUsedPercent :: Int,- nodeOSSwapTotal :: Bytes,- nodeOSSwapFree :: Bytes,- nodeOSSwapUsed :: Bytes- }- deriving (Eq, Show)--data LoadAvgs = LoadAvgs- { loadAvg1Min :: Double,- loadAvg5Min :: Double,- loadAvg15Min :: Double- }- deriving (Eq, Show)--data NodeIndicesStats = NodeIndicesStats- { nodeIndicesStatsRecoveryThrottleTime :: Maybe NominalDiffTime,- nodeIndicesStatsRecoveryCurrentAsTarget :: Maybe Int,- nodeIndicesStatsRecoveryCurrentAsSource :: Maybe Int,- nodeIndicesStatsQueryCacheMisses :: Maybe Int,- nodeIndicesStatsQueryCacheHits :: Maybe Int,- nodeIndicesStatsQueryCacheEvictions :: Maybe Int,- nodeIndicesStatsQueryCacheSize :: Maybe Bytes,- nodeIndicesStatsSuggestCurrent :: Maybe Int,- nodeIndicesStatsSuggestTime :: Maybe NominalDiffTime,- nodeIndicesStatsSuggestTotal :: Maybe Int,- nodeIndicesStatsTranslogSize :: Bytes,- nodeIndicesStatsTranslogOps :: Int,- nodeIndicesStatsSegFixedBitSetMemory :: Maybe Bytes,- nodeIndicesStatsSegVersionMapMemory :: Bytes,- nodeIndicesStatsSegIndexWriterMaxMemory :: Maybe Bytes,- nodeIndicesStatsSegIndexWriterMemory :: Bytes,- nodeIndicesStatsSegMemory :: Bytes,- nodeIndicesStatsSegCount :: Int,- nodeIndicesStatsCompletionSize :: Bytes,- nodeIndicesStatsPercolateQueries :: Maybe Int,- nodeIndicesStatsPercolateMemory :: Maybe Bytes,- nodeIndicesStatsPercolateCurrent :: Maybe Int,- nodeIndicesStatsPercolateTime :: Maybe NominalDiffTime,- nodeIndicesStatsPercolateTotal :: Maybe Int,- nodeIndicesStatsFieldDataEvictions :: Int,- nodeIndicesStatsFieldDataMemory :: Bytes,- nodeIndicesStatsWarmerTotalTime :: NominalDiffTime,- nodeIndicesStatsWarmerTotal :: Int,- nodeIndicesStatsWarmerCurrent :: Int,- nodeIndicesStatsFlushTotalTime :: NominalDiffTime,- nodeIndicesStatsFlushTotal :: Int,- nodeIndicesStatsRefreshTotalTime :: NominalDiffTime,- nodeIndicesStatsRefreshTotal :: Int,- nodeIndicesStatsMergesTotalSize :: Bytes,- nodeIndicesStatsMergesTotalDocs :: Int,- nodeIndicesStatsMergesTotalTime :: NominalDiffTime,- nodeIndicesStatsMergesTotal :: Int,- nodeIndicesStatsMergesCurrentSize :: Bytes,- nodeIndicesStatsMergesCurrentDocs :: Int,- nodeIndicesStatsMergesCurrent :: Int,- nodeIndicesStatsSearchFetchCurrent :: Int,- nodeIndicesStatsSearchFetchTime :: NominalDiffTime,- nodeIndicesStatsSearchFetchTotal :: Int,- nodeIndicesStatsSearchQueryCurrent :: Int,- nodeIndicesStatsSearchQueryTime :: NominalDiffTime,- nodeIndicesStatsSearchQueryTotal :: Int,- nodeIndicesStatsSearchOpenContexts :: Int,- nodeIndicesStatsGetCurrent :: Int,- nodeIndicesStatsGetMissingTime :: NominalDiffTime,- nodeIndicesStatsGetMissingTotal :: Int,- nodeIndicesStatsGetExistsTime :: NominalDiffTime,- nodeIndicesStatsGetExistsTotal :: Int,- nodeIndicesStatsGetTime :: NominalDiffTime,- nodeIndicesStatsGetTotal :: Int,- nodeIndicesStatsIndexingThrottleTime :: Maybe NominalDiffTime,- nodeIndicesStatsIndexingIsThrottled :: Maybe Bool,- nodeIndicesStatsIndexingNoopUpdateTotal :: Maybe Int,- nodeIndicesStatsIndexingDeleteCurrent :: Int,- nodeIndicesStatsIndexingDeleteTime :: NominalDiffTime,- nodeIndicesStatsIndexingDeleteTotal :: Int,- nodeIndicesStatsIndexingIndexCurrent :: Int,- nodeIndicesStatsIndexingIndexTime :: NominalDiffTime,- nodeIndicesStatsIndexingTotal :: Int,- nodeIndicesStatsStoreThrottleTime :: Maybe NominalDiffTime,- nodeIndicesStatsStoreSize :: Bytes,- nodeIndicesStatsDocsDeleted :: Int,- nodeIndicesStatsDocsCount :: Int- }- deriving (Eq, Show)---- | A quirky address format used throughout Elasticsearch. An example--- would be inet[/1.1.1.1:9200]. inet may be a placeholder for a--- <https://en.wikipedia.org/wiki/Fully_qualified_domain_name FQDN>.-newtype EsAddress = EsAddress {esAddress :: Text}- deriving (Eq, Ord, Show, FromJSON)---- | Typically a 7 character hex string.-newtype BuildHash = BuildHash {buildHash :: Text}- deriving (Eq, Ord, Show, Generic, FromJSON, ToJSON)--newtype PluginName = PluginName {pluginName :: Text}- deriving (Eq, Ord, Show, FromJSON)--data NodeInfo = NodeInfo- { nodeInfoHTTPAddress :: Maybe EsAddress,- nodeInfoBuild :: BuildHash,- nodeInfoESVersion :: VersionNumber,- nodeInfoIP :: Server,- nodeInfoHost :: Server,- nodeInfoTransportAddress :: EsAddress,- nodeInfoName :: NodeName,- nodeInfoFullId :: FullNodeId,- nodeInfoPlugins :: [NodePluginInfo],- nodeInfoHTTP :: NodeHTTPInfo,- nodeInfoTransport :: NodeTransportInfo,- nodeInfoNetwork :: Maybe NodeNetworkInfo,- nodeInfoThreadPool :: Map Text NodeThreadPoolInfo,- nodeInfoJVM :: NodeJVMInfo,- nodeInfoProcess :: NodeProcessInfo,- nodeInfoOS :: NodeOSInfo,- -- | The members of the settings objects are not consistent,- -- dependent on plugins, etc.- nodeInfoSettings :: Object- }- deriving (Eq, Show)--data NodePluginInfo = NodePluginInfo- { -- | Is this a site plugin?- nodePluginSite :: Maybe Bool,- -- | Is this plugin running on the JVM- nodePluginJVM :: Maybe Bool,- nodePluginDescription :: Text,- nodePluginVersion :: MaybeNA VersionNumber,- nodePluginName :: PluginName- }- deriving (Eq, Show)--data NodeHTTPInfo = NodeHTTPInfo- { nodeHTTPMaxContentLength :: Bytes,- nodeHTTPpublishAddress :: EsAddress,- nodeHTTPbound_address :: [EsAddress]- }- deriving (Eq, Show)--data NodeTransportInfo = NodeTransportInfo- { nodeTransportProfiles :: [BoundTransportAddress],- nodeTransportPublishAddress :: EsAddress,- nodeTransportBoundAddress :: [EsAddress]- }- deriving (Eq, Show)--data BoundTransportAddress = BoundTransportAddress- { publishAddress :: EsAddress,- boundAddress :: [EsAddress]- }- deriving (Eq, Show)--data NodeNetworkInfo = NodeNetworkInfo- { nodeNetworkPrimaryInterface :: NodeNetworkInterface,- nodeNetworkRefreshInterval :: NominalDiffTime- }- deriving (Eq, Show)--newtype MacAddress = MacAddress {macAddress :: Text}- deriving (Eq, Ord, Show, FromJSON)--newtype NetworkInterfaceName = NetworkInterfaceName {networkInterfaceName :: Text}- deriving (Eq, Ord, Show, FromJSON)--data NodeNetworkInterface = NodeNetworkInterface- { nodeNetIfaceMacAddress :: MacAddress,- nodeNetIfaceName :: NetworkInterfaceName,- nodeNetIfaceAddress :: Server- }- deriving (Eq, Show)--data ThreadPool = ThreadPool- { nodeThreadPoolName :: Text,- nodeThreadPoolInfo :: NodeThreadPoolInfo- }- deriving (Eq, Show)--data NodeThreadPoolInfo = NodeThreadPoolInfo- { nodeThreadPoolQueueSize :: ThreadPoolSize,- nodeThreadPoolKeepalive :: Maybe NominalDiffTime,- nodeThreadPoolMin :: Maybe Int,- nodeThreadPoolMax :: Maybe Int,- nodeThreadPoolType :: ThreadPoolType- }- deriving (Eq, Show)--data ThreadPoolSize- = ThreadPoolBounded Int- | ThreadPoolUnbounded- deriving (Eq, Show)--data ThreadPoolType- = ThreadPoolScaling- | ThreadPoolFixed- | ThreadPoolCached- | ThreadPoolFixedAutoQueueSize- deriving (Eq, Show)--data NodeJVMInfo = NodeJVMInfo- { nodeJVMInfoMemoryPools :: [JVMMemoryPool],- nodeJVMInfoMemoryPoolsGCCollectors :: [JVMGCCollector],- nodeJVMInfoMemoryInfo :: JVMMemoryInfo,- nodeJVMInfoStartTime :: UTCTime,- nodeJVMInfoVMVendor :: Text,- -- | JVM doesn't seme to follow normal version conventions- nodeJVMVMVersion :: VMVersion,- nodeJVMVMName :: Text,- nodeJVMVersion :: JVMVersion,- nodeJVMPID :: PID- }- deriving (Eq, Show)---- | We cannot parse JVM version numbers and we're not going to try.-newtype JVMVersion = JVMVersion {unJVMVersion :: Text}- deriving (Eq, Show)--instance FromJSON JVMVersion where- parseJSON = withText "JVMVersion" (pure . JVMVersion)--data JVMMemoryInfo = JVMMemoryInfo- { jvmMemoryInfoDirectMax :: Bytes,- jvmMemoryInfoNonHeapMax :: Bytes,- jvmMemoryInfoNonHeapInit :: Bytes,- jvmMemoryInfoHeapMax :: Bytes,- jvmMemoryInfoHeapInit :: Bytes- }- deriving (Eq, Show)---- VM version numbers don't appear to be SemVer--- so we're special casing this jawn.-newtype VMVersion = VMVersion {unVMVersion :: Text}- deriving (Eq, Show)--instance ToJSON VMVersion where- toJSON = toJSON . unVMVersion--instance FromJSON VMVersion where- parseJSON = withText "VMVersion" (pure . VMVersion)--newtype JVMMemoryPool = JVMMemoryPool- { jvmMemoryPool :: Text- }- deriving (Eq, Show, FromJSON)--newtype JVMGCCollector = JVMGCCollector- { jvmGCCollector :: Text- }- deriving (Eq, Show, FromJSON)--newtype PID = PID- { pid :: Int- }- deriving (Eq, Show, FromJSON)--data NodeOSInfo = NodeOSInfo- { nodeOSRefreshInterval :: NominalDiffTime,- nodeOSName :: Text,- nodeOSArch :: Text,- nodeOSVersion :: Text, -- semver breaks on "5.10.60.1-microsoft-standard-WSL2"- nodeOSAvailableProcessors :: Int,- nodeOSAllocatedProcessors :: Int- }- deriving (Eq, Show)--data CPUInfo = CPUInfo- { cpuCacheSize :: Bytes,- cpuCoresPerSocket :: Int,- cpuTotalSockets :: Int,- cpuTotalCores :: Int,- cpuMHZ :: Int,- cpuModel :: Text,- cpuVendor :: Text- }- deriving (Eq, Show)--data NodeProcessInfo = NodeProcessInfo- { -- | See <https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration.html>- nodeProcessMLockAll :: Bool,- nodeProcessMaxFileDescriptors :: Maybe Int,- nodeProcessId :: PID,- nodeProcessRefreshInterval :: NominalDiffTime- }- deriving (Eq, Show)--data ShardResult = ShardResult- { shardTotal :: Int,- shardsSuccessful :: Int,- shardsSkipped :: Int,- shardsFailed :: Int- }- deriving (Eq, Show)--instance FromJSON ShardResult where- parseJSON =- withObject "ShardResult" $ \v ->- ShardResult- <$> v .:? "total" .!= 0- <*> v .:? "successful" .!= 0- <*> v .:? "skipped" .!= 0- <*> v .:? "failed" .!= 0--data SnapshotState- = SnapshotInit- | SnapshotStarted- | SnapshotSuccess- | SnapshotFailed- | SnapshotAborted- | SnapshotMissing- | SnapshotWaiting- deriving (Eq, Show)--instance FromJSON SnapshotState where- parseJSON = withText "SnapshotState" parse- where- parse "INIT" = return SnapshotInit- parse "STARTED" = return SnapshotStarted- parse "SUCCESS" = return SnapshotSuccess- parse "FAILED" = return SnapshotFailed- parse "ABORTED" = return SnapshotAborted- parse "MISSING" = return SnapshotMissing- parse "WAITING" = return SnapshotWaiting- parse t = fail ("Invalid snapshot state " <> T.unpack t)--data SnapshotRestoreSettings = SnapshotRestoreSettings- { -- | Should the API call return immediately after initializing- -- the restore or wait until completed? Note that if this is- -- enabled, it could wait a long time, so you should adjust your- -- 'ManagerSettings' accordingly to set long timeouts or- -- explicitly handle timeouts.- snapRestoreWaitForCompletion :: Bool,- -- | Nothing will restore all indices in the snapshot. Just [] is- -- permissable and will essentially be a no-op restore.- snapRestoreIndices :: Maybe IndexSelection,- -- | If set to True, any indices that do not exist will be ignored- -- during snapshot rather than failing the restore.- snapRestoreIgnoreUnavailable :: Bool,- -- | If set to false, will ignore any global state in the snapshot- -- and will not restore it.- snapRestoreIncludeGlobalState :: Bool,- -- | A regex pattern for matching indices. Used with- -- 'snapRestoreRenameReplacement', the restore can reference the- -- matched index and create a new index name upon restore.- snapRestoreRenamePattern :: Maybe RestoreRenamePattern,- -- | Expression of how index renames should be constructed.- snapRestoreRenameReplacement :: Maybe (NonEmpty RestoreRenameToken),- -- | If some indices fail to restore, should the process proceed?- snapRestorePartial :: Bool,- -- | Should the restore also restore the aliases captured in the- -- snapshot.- snapRestoreIncludeAliases :: Bool,- -- | Settings to apply during the restore process. __NOTE:__ This- -- option is not supported in ES < 1.5 and should be set to- -- Nothing in that case.- snapRestoreIndexSettingsOverrides :: Maybe RestoreIndexSettings,- -- | This type could be more rich but it isn't clear which- -- settings are allowed to be ignored during restore, so we're- -- going with including this feature in a basic form rather than- -- omitting it. One example here would be- -- "index.refresh_interval". Any setting specified here will- -- revert back to the server default during the restore process.- snapRestoreIgnoreIndexSettings :: Maybe (NonEmpty Text)- }- deriving (Eq, Show)--newtype SnapshotRepoUpdateSettings = SnapshotRepoUpdateSettings- { -- | After creation/update, synchronously check that nodes can- -- write to this repo. Defaults to True. You may use False if you- -- need a faster response and plan on verifying manually later- -- with 'verifySnapshotRepo'.- repoUpdateVerify :: Bool- }- deriving (Eq, Show)---- | Reasonable defaults for repo creation/update------ * repoUpdateVerify True-defaultSnapshotRepoUpdateSettings :: SnapshotRepoUpdateSettings-defaultSnapshotRepoUpdateSettings = SnapshotRepoUpdateSettings True---- | A filesystem-based snapshot repo that ships with--- Elasticsearch. This is an instance of 'SnapshotRepo' so it can be--- used with 'updateSnapshotRepo'-data FsSnapshotRepo = FsSnapshotRepo- { fsrName :: SnapshotRepoName,- fsrLocation :: FilePath,- fsrCompressMetadata :: Bool,- -- | Size by which to split large files during snapshotting.- fsrChunkSize :: Maybe Bytes,- -- | Throttle node restore rate. If not supplied, defaults to 40mb/sec- fsrMaxRestoreBytesPerSec :: Maybe Bytes,- -- | Throttle node snapshot rate. If not supplied, defaults to 40mb/sec- fsrMaxSnapshotBytesPerSec :: Maybe Bytes- }- deriving (Eq, Show, Generic)--instance SnapshotRepo FsSnapshotRepo where- toGSnapshotRepo FsSnapshotRepo {..} =- GenericSnapshotRepo fsrName fsRepoType (GenericSnapshotRepoSettings settings)- where- Object settings =- object $- [ "location" .= fsrLocation,- "compress" .= fsrCompressMetadata- ]- ++ optionalPairs- optionalPairs =- catMaybes- [ ("chunk_size" .=) <$> fsrChunkSize,- ("max_restore_bytes_per_sec" .=) <$> fsrMaxRestoreBytesPerSec,- ("max_snapshot_bytes_per_sec" .=) <$> fsrMaxSnapshotBytesPerSec- ]- fromGSnapshotRepo GenericSnapshotRepo {..}- | gSnapshotRepoType == fsRepoType = do- let o = gSnapshotRepoSettingsObject gSnapshotRepoSettings- parseRepo $- FsSnapshotRepo gSnapshotRepoName- <$> o .: "location"- <*> o .:? "compress" .!= False- <*> o .:? "chunk_size"- <*> o .:? "max_restore_bytes_per_sec"- <*> o .:? "max_snapshot_bytes_per_sec"- | otherwise = Left (RepoTypeMismatch fsRepoType gSnapshotRepoType)--parseRepo :: Parser a -> Either SnapshotRepoConversionError a-parseRepo parser = case parseEither (const parser) () of- Left e -> Left (OtherRepoConversionError (T.pack e))- Right a -> Right a--fsRepoType :: SnapshotRepoType-fsRepoType = SnapshotRepoType "fs"---- | Law: fromGSnapshotRepo (toGSnapshotRepo r) == Right r-class SnapshotRepo r where- toGSnapshotRepo :: r -> GenericSnapshotRepo- fromGSnapshotRepo :: GenericSnapshotRepo -> Either SnapshotRepoConversionError r--data SnapshotRepoConversionError- = -- | Expected type and actual type- RepoTypeMismatch SnapshotRepoType SnapshotRepoType- | OtherRepoConversionError Text- deriving (Show, Eq)--instance Exception SnapshotRepoConversionError--data SnapshotCreateSettings = SnapshotCreateSettings- { -- | Should the API call return immediately after initializing- -- the snapshot or wait until completed? Note that if this is- -- enabled it could wait a long time, so you should adjust your- -- 'ManagerSettings' accordingly to set long timeouts or- -- explicitly handle timeouts.- snapWaitForCompletion :: Bool,- -- | Nothing will snapshot all indices. Just [] is permissable and- -- will essentially be a no-op snapshot.- snapIndices :: Maybe IndexSelection,- -- | If set to True, any matched indices that don't exist will be- -- ignored. Otherwise it will be an error and fail.- snapIgnoreUnavailable :: Bool,- snapIncludeGlobalState :: Bool,- -- | If some indices failed to snapshot (e.g. if not all primary- -- shards are available), should the process proceed?- snapPartial :: Bool- }- deriving (Eq, Show)---- | Reasonable defaults for snapshot creation------ * snapWaitForCompletion False--- * snapIndices Nothing--- * snapIgnoreUnavailable False--- * snapIncludeGlobalState True--- * snapPartial False-defaultSnapshotCreateSettings :: SnapshotCreateSettings-defaultSnapshotCreateSettings =- SnapshotCreateSettings- { snapWaitForCompletion = False,- snapIndices = Nothing,- snapIgnoreUnavailable = False,- snapIncludeGlobalState = True,- snapPartial = False- }--data SnapshotSelection- = SnapshotList (NonEmpty SnapshotPattern)- | AllSnapshots- deriving (Eq, Show)---- | Either specifies an exact snapshot name or one with globs in it,--- e.g. @SnapPattern "foo*"@ __NOTE__: Patterns are not supported on--- ES < 1.7-data SnapshotPattern- = ExactSnap SnapshotName- | SnapPattern Text- deriving (Eq, Show)---- | General information about the state of a snapshot. Has some--- redundancies with 'SnapshotStatus'-data SnapshotInfo = SnapshotInfo- { snapInfoShards :: ShardResult,- snapInfoFailures :: [SnapshotShardFailure],- snapInfoDuration :: NominalDiffTime,- snapInfoEndTime :: UTCTime,- snapInfoStartTime :: UTCTime,- snapInfoState :: SnapshotState,- snapInfoIndices :: [IndexName],- snapInfoName :: SnapshotName- }- deriving (Eq, Show)--instance FromJSON SnapshotInfo where- parseJSON = withObject "SnapshotInfo" parse- where- parse o =- SnapshotInfo- <$> o .: "shards"- <*> o .: "failures"- <*> (unMS <$> o .: "duration_in_millis")- <*> (posixMS <$> o .: "end_time_in_millis")- <*> (posixMS <$> o .: "start_time_in_millis")- <*> o .: "state"- <*> o .: "indices"- <*> o .: "snapshot"--data SnapshotShardFailure = SnapshotShardFailure- { snapShardFailureIndex :: IndexName,- snapShardFailureNodeId :: Maybe NodeName, -- I'm not 100% sure this isn't actually 'FullNodeId'- snapShardFailureReason :: Text,- snapShardFailureShardId :: ShardId- }- deriving (Eq, Show)--instance FromJSON SnapshotShardFailure where- parseJSON = withObject "SnapshotShardFailure" parse- where- parse o =- SnapshotShardFailure- <$> o .: "index"- <*> o .:? "node_id"- <*> o .: "reason"- <*> o .: "shard_id"---- | Regex-stype pattern, e.g. "index_(.+)" to match index names-newtype RestoreRenamePattern = RestoreRenamePattern {rrPattern :: Text}- deriving (Eq, Show, Ord, ToJSON)---- | A single token in a index renaming scheme for a restore. These--- are concatenated into a string before being sent to--- Elasticsearch. Check out these Java--- <https://docs.oracle.com/javase/7/docs/api/java/util/regex/Matcher.html docs> to find out more if you're into that sort of thing.-data RestoreRenameToken- = -- | Just a literal string of characters- RRTLit Text- | -- | Equivalent to $0. The entire matched pattern, not any subgroup- RRSubWholeMatch- | -- | A specific reference to a group number- RRSubGroup RRGroupRefNum- deriving (Eq, Show)---- | A group number for regex matching. Only values from 1-9 are--- supported. Construct with 'mkRRGroupRefNum'-newtype RRGroupRefNum = RRGroupRefNum {rrGroupRefNum :: Int}- deriving (Eq, Ord, Show)--instance Bounded RRGroupRefNum where- minBound = RRGroupRefNum 1- maxBound = RRGroupRefNum 9---- | Only allows valid group number references (1-9).-mkRRGroupRefNum :: Int -> Maybe RRGroupRefNum-mkRRGroupRefNum i- | i >= rrGroupRefNum minBound- && i <= rrGroupRefNum maxBound =- Just $ RRGroupRefNum i- | otherwise = Nothing---- | Reasonable defaults for snapshot restores------ * snapRestoreWaitForCompletion False--- * snapRestoreIndices Nothing--- * snapRestoreIgnoreUnavailable False--- * snapRestoreIncludeGlobalState True--- * snapRestoreRenamePattern Nothing--- * snapRestoreRenameReplacement Nothing--- * snapRestorePartial False--- * snapRestoreIncludeAliases True--- * snapRestoreIndexSettingsOverrides Nothing--- * snapRestoreIgnoreIndexSettings Nothing-defaultSnapshotRestoreSettings :: SnapshotRestoreSettings-defaultSnapshotRestoreSettings =- SnapshotRestoreSettings- { snapRestoreWaitForCompletion = False,- snapRestoreIndices = Nothing,- snapRestoreIgnoreUnavailable = False,- snapRestoreIncludeGlobalState = True,- snapRestoreRenamePattern = Nothing,- snapRestoreRenameReplacement = Nothing,- snapRestorePartial = False,- snapRestoreIncludeAliases = True,- snapRestoreIndexSettingsOverrides = Nothing,- snapRestoreIgnoreIndexSettings = Nothing- }---- | Index settings that can be overridden. The docs only mention you--- can update number of replicas, but there may be more. You--- definitely cannot override shard count.-newtype RestoreIndexSettings = RestoreIndexSettings- { restoreOverrideReplicas :: Maybe ReplicaCount- }- deriving (Eq, Show)--instance ToJSON RestoreIndexSettings where- toJSON RestoreIndexSettings {..} = object prs- where- prs = catMaybes [("index.number_of_replicas" .=) <$> restoreOverrideReplicas]--instance FromJSON NodesInfo where- parseJSON = withObject "NodesInfo" parse- where- parse o = do- nodes <- o .: "nodes"- infos <- forM (HM.toList nodes) $ \(fullNID, v) -> do- node <- parseJSON v- parseNodeInfo (FullNodeId fullNID) node- cn <- o .: "cluster_name"- return (NodesInfo infos cn)--instance FromJSON NodesStats where- parseJSON = withObject "NodesStats" parse- where- parse o = do- nodes <- o .: "nodes"- stats <- forM (HM.toList nodes) $ \(fullNID, v) -> do- node <- parseJSON v- parseNodeStats (FullNodeId fullNID) node- cn <- o .: "cluster_name"- return (NodesStats stats cn)--instance FromJSON NodeBreakerStats where- parseJSON = withObject "NodeBreakerStats" parse- where- parse o =- NodeBreakerStats- <$> o .: "tripped"- <*> o .: "overhead"- <*> o .: "estimated_size_in_bytes"- <*> o .: "limit_size_in_bytes"--instance FromJSON NodeHTTPStats where- parseJSON = withObject "NodeHTTPStats" parse- where- parse o =- NodeHTTPStats- <$> o .: "total_opened"- <*> o .: "current_open"--instance FromJSON NodeTransportStats where- parseJSON = withObject "NodeTransportStats" parse- where- parse o =- NodeTransportStats- <$> o .: "tx_size_in_bytes"- <*> o .: "tx_count"- <*> o .: "rx_size_in_bytes"- <*> o .: "rx_count"- <*> o .: "server_open"--instance FromJSON NodeFSStats where- parseJSON = withObject "NodeFSStats" parse- where- parse o =- NodeFSStats- <$> o .: "data"- <*> o .: "total"- <*> (posixMS <$> o .: "timestamp")--instance FromJSON NodeDataPathStats where- parseJSON = withObject "NodeDataPathStats" parse- where- parse o =- NodeDataPathStats- <$> (fmap unStringlyTypedDouble <$> o .:? "disk_service_time")- <*> (fmap unStringlyTypedDouble <$> o .:? "disk_queue")- <*> o .:? "disk_io_size_in_bytes"- <*> o .:? "disk_write_size_in_bytes"- <*> o .:? "disk_read_size_in_bytes"- <*> o .:? "disk_io_op"- <*> o .:? "disk_writes"- <*> o .:? "disk_reads"- <*> o .: "available_in_bytes"- <*> o .: "free_in_bytes"- <*> o .: "total_in_bytes"- <*> o .:? "type"- <*> o .:? "dev"- <*> o .: "mount"- <*> o .: "path"--instance FromJSON NodeFSTotalStats where- parseJSON = withObject "NodeFSTotalStats" parse- where- parse o =- NodeFSTotalStats- <$> (fmap unStringlyTypedDouble <$> o .:? "disk_service_time")- <*> (fmap unStringlyTypedDouble <$> o .:? "disk_queue")- <*> o .:? "disk_io_size_in_bytes"- <*> o .:? "disk_write_size_in_bytes"- <*> o .:? "disk_read_size_in_bytes"- <*> o .:? "disk_io_op"- <*> o .:? "disk_writes"- <*> o .:? "disk_reads"- <*> o .: "available_in_bytes"- <*> o .: "free_in_bytes"- <*> o .: "total_in_bytes"--instance FromJSON NodeNetworkStats where- parseJSON = withObject "NodeNetworkStats" parse- where- parse o = do- tcp <- o .: "tcp"- NodeNetworkStats- <$> tcp .: "out_rsts"- <*> tcp .: "in_errs"- <*> tcp .: "attempt_fails"- <*> tcp .: "estab_resets"- <*> tcp .: "retrans_segs"- <*> tcp .: "out_segs"- <*> tcp .: "in_segs"- <*> tcp .: "curr_estab"- <*> tcp .: "passive_opens"- <*> tcp .: "active_opens"--instance FromJSON NodeThreadPoolStats where- parseJSON = withObject "NodeThreadPoolStats" parse- where- parse o =- NodeThreadPoolStats- <$> o .: "completed"- <*> o .: "largest"- <*> o .: "rejected"- <*> o .: "active"- <*> o .: "queue"- <*> o .: "threads"--instance FromJSON NodeJVMStats where- parseJSON = withObject "NodeJVMStats" parse- where- parse o = do- bufferPools <- o .: "buffer_pools"- mapped <- bufferPools .: "mapped"- direct <- bufferPools .: "direct"- gc <- o .: "gc"- collectors <- gc .: "collectors"- oldC <- collectors .: "old"- youngC <- collectors .: "young"- threads <- o .: "threads"- mem <- o .: "mem"- pools <- mem .: "pools"- oldM <- pools .: "old"- survivorM <- pools .: "survivor"- youngM <- pools .: "young"- NodeJVMStats- <$> pure mapped- <*> pure direct- <*> pure oldC- <*> pure youngC- <*> threads .: "peak_count"- <*> threads .: "count"- <*> pure oldM- <*> pure survivorM- <*> pure youngM- <*> mem .: "non_heap_committed_in_bytes"- <*> mem .: "non_heap_used_in_bytes"- <*> mem .: "heap_max_in_bytes"- <*> mem .: "heap_committed_in_bytes"- <*> mem .: "heap_used_percent"- <*> mem .: "heap_used_in_bytes"- <*> (unMS <$> o .: "uptime_in_millis")- <*> (posixMS <$> o .: "timestamp")--instance FromJSON JVMBufferPoolStats where- parseJSON = withObject "JVMBufferPoolStats" parse- where- parse o =- JVMBufferPoolStats- <$> o .: "total_capacity_in_bytes"- <*> o .: "used_in_bytes"- <*> o .: "count"--instance FromJSON JVMGCStats where- parseJSON = withObject "JVMGCStats" parse- where- parse o =- JVMGCStats- <$> (unMS <$> o .: "collection_time_in_millis")- <*> o .: "collection_count"--instance FromJSON JVMPoolStats where- parseJSON = withObject "JVMPoolStats" parse- where- parse o =- JVMPoolStats- <$> o .: "peak_max_in_bytes"- <*> o .: "peak_used_in_bytes"- <*> o .: "max_in_bytes"- <*> o .: "used_in_bytes"--instance FromJSON NodeProcessStats where- parseJSON = withObject "NodeProcessStats" parse- where- parse o = do- mem <- o .: "mem"- cpu <- o .: "cpu"- NodeProcessStats- <$> (posixMS <$> o .: "timestamp")- <*> o .: "open_file_descriptors"- <*> o .: "max_file_descriptors"- <*> cpu .: "percent"- <*> (unMS <$> cpu .: "total_in_millis")- <*> mem .: "total_virtual_in_bytes"--instance FromJSON NodeOSStats where- parseJSON = withObject "NodeOSStats" parse- where- parse o = do- swap <- o .: "swap"- mem <- o .: "mem"- cpu <- o .: "cpu"- load <- o .:? "load_average"- NodeOSStats- <$> (posixMS <$> o .: "timestamp")- <*> cpu .: "percent"- <*> pure load- <*> mem .: "total_in_bytes"- <*> mem .: "free_in_bytes"- <*> mem .: "free_percent"- <*> mem .: "used_in_bytes"- <*> mem .: "used_percent"- <*> swap .: "total_in_bytes"- <*> swap .: "free_in_bytes"- <*> swap .: "used_in_bytes"--instance FromJSON LoadAvgs where- parseJSON = withArray "LoadAvgs" parse- where- parse v = case V.toList v of- [one, five, fifteen] ->- LoadAvgs- <$> parseJSON one- <*> parseJSON five- <*> parseJSON fifteen- _ -> fail "Expecting a triple of Doubles"--instance FromJSON NodeIndicesStats where- parseJSON = withObject "NodeIndicesStats" parse- where- parse o = do- let (.::) mv k = case mv of- Just v -> Just <$> v .: k- Nothing -> pure Nothing- mRecovery <- o .:? "recovery"- mQueryCache <- o .:? "query_cache"- mSuggest <- o .:? "suggest"- translog <- o .: "translog"- segments <- o .: "segments"- completion <- o .: "completion"- mPercolate <- o .:? "percolate"- fielddata <- o .: "fielddata"- warmer <- o .: "warmer"- flush <- o .: "flush"- refresh <- o .: "refresh"- merges <- o .: "merges"- search <- o .: "search"- getStats <- o .: "get"- indexing <- o .: "indexing"- store <- o .: "store"- docs <- o .: "docs"- NodeIndicesStats- <$> (fmap unMS <$> mRecovery .:: "throttle_time_in_millis")- <*> mRecovery- .:: "current_as_target"- <*> mRecovery- .:: "current_as_source"- <*> mQueryCache- .:: "miss_count"- <*> mQueryCache- .:: "hit_count"- <*> mQueryCache- .:: "evictions"- <*> mQueryCache- .:: "memory_size_in_bytes"- <*> mSuggest- .:: "current"- <*> (fmap unMS <$> mSuggest .:: "time_in_millis")- <*> mSuggest- .:: "total"- <*> translog- .: "size_in_bytes"- <*> translog- .: "operations"- <*> segments- .:? "fixed_bit_set_memory_in_bytes"- <*> segments- .: "version_map_memory_in_bytes"- <*> segments- .:? "index_writer_max_memory_in_bytes"- <*> segments- .: "index_writer_memory_in_bytes"- <*> segments- .: "memory_in_bytes"- <*> segments- .: "count"- <*> completion- .: "size_in_bytes"- <*> mPercolate- .:: "queries"- <*> mPercolate- .:: "memory_size_in_bytes"- <*> mPercolate- .:: "current"- <*> (fmap unMS <$> mPercolate .:: "time_in_millis")- <*> mPercolate- .:: "total"- <*> fielddata- .: "evictions"- <*> fielddata- .: "memory_size_in_bytes"- <*> (unMS <$> warmer .: "total_time_in_millis")- <*> warmer- .: "total"- <*> warmer- .: "current"- <*> (unMS <$> flush .: "total_time_in_millis")- <*> flush- .: "total"- <*> (unMS <$> refresh .: "total_time_in_millis")- <*> refresh- .: "total"- <*> merges- .: "total_size_in_bytes"- <*> merges- .: "total_docs"- <*> (unMS <$> merges .: "total_time_in_millis")- <*> merges- .: "total"- <*> merges- .: "current_size_in_bytes"- <*> merges- .: "current_docs"- <*> merges- .: "current"- <*> search- .: "fetch_current"- <*> (unMS <$> search .: "fetch_time_in_millis")- <*> search- .: "fetch_total"- <*> search- .: "query_current"- <*> (unMS <$> search .: "query_time_in_millis")- <*> search- .: "query_total"- <*> search- .: "open_contexts"- <*> getStats- .: "current"- <*> (unMS <$> getStats .: "missing_time_in_millis")- <*> getStats- .: "missing_total"- <*> (unMS <$> getStats .: "exists_time_in_millis")- <*> getStats- .: "exists_total"- <*> (unMS <$> getStats .: "time_in_millis")- <*> getStats- .: "total"- <*> (fmap unMS <$> indexing .:? "throttle_time_in_millis")- <*> indexing- .:? "is_throttled"- <*> indexing- .:? "noop_update_total"- <*> indexing- .: "delete_current"- <*> (unMS <$> indexing .: "delete_time_in_millis")- <*> indexing- .: "delete_total"- <*> indexing- .: "index_current"- <*> (unMS <$> indexing .: "index_time_in_millis")- <*> indexing- .: "index_total"- <*> (fmap unMS <$> store .:? "throttle_time_in_millis")- <*> store- .: "size_in_bytes"- <*> docs- .: "deleted"- <*> docs- .: "count"--instance FromJSON NodeBreakersStats where- parseJSON = withObject "NodeBreakersStats" parse- where- parse o =- NodeBreakersStats- <$> o .: "parent"- <*> o .: "request"- <*> o .: "fielddata"--parseNodeStats :: FullNodeId -> Object -> Parser NodeStats-parseNodeStats fnid o =- NodeStats- <$> o .: "name"- <*> pure fnid- <*> o .:? "breakers"- <*> o .: "http"- <*> o .: "transport"- <*> o .: "fs"- <*> o .:? "network"- <*> o .: "thread_pool"- <*> o .: "jvm"- <*> o .: "process"- <*> o .: "os"- <*> o .: "indices"--parseNodeInfo :: FullNodeId -> Object -> Parser NodeInfo-parseNodeInfo nid o =- NodeInfo- <$> o .:? "http_address"- <*> o .: "build_hash"- <*> o .: "version"- <*> o .: "ip"- <*> o .: "host"- <*> o .: "transport_address"- <*> o .: "name"- <*> pure nid- <*> o .: "plugins"- <*> o .: "http"- <*> o .: "transport"- <*> o .:? "network"- <*> o .: "thread_pool"- <*> o .: "jvm"- <*> o .: "process"- <*> o .: "os"- <*> o .: "settings"--instance FromJSON NodePluginInfo where- parseJSON = withObject "NodePluginInfo" parse- where- parse o =- NodePluginInfo- <$> o .:? "site"- <*> o .:? "jvm"- <*> o .: "description"- <*> o .: "version"- <*> o .: "name"--instance FromJSON NodeHTTPInfo where- parseJSON = withObject "NodeHTTPInfo" parse- where- parse o =- NodeHTTPInfo- <$> o .: "max_content_length_in_bytes"- <*> o .: "publish_address"- <*> o .: "bound_address"--instance FromJSON BoundTransportAddress where- parseJSON = withObject "BoundTransportAddress" parse- where- parse o =- BoundTransportAddress- <$> o .: "publish_address"- <*> o .: "bound_address"--instance FromJSON NodeOSInfo where- parseJSON = withObject "NodeOSInfo" parse- where- parse o =- NodeOSInfo- <$> (unMS <$> o .: "refresh_interval_in_millis")- <*> o .: "name"- <*> o .: "arch"- <*> o .: "version"- <*> o .: "available_processors"- <*> o .: "allocated_processors"--instance FromJSON CPUInfo where- parseJSON = withObject "CPUInfo" parse- where- parse o =- CPUInfo- <$> o .: "cache_size_in_bytes"- <*> o .: "cores_per_socket"- <*> o .: "total_sockets"- <*> o .: "total_cores"- <*> o .: "mhz"- <*> o .: "model"- <*> o .: "vendor"--instance FromJSON NodeProcessInfo where- parseJSON = withObject "NodeProcessInfo" parse- where- parse o =- NodeProcessInfo- <$> o .: "mlockall"- <*> o .:? "max_file_descriptors"- <*> o .: "id"- <*> (unMS <$> o .: "refresh_interval_in_millis")--instance FromJSON NodeJVMInfo where- parseJSON = withObject "NodeJVMInfo" parse- where- parse o =- NodeJVMInfo- <$> o .: "memory_pools"- <*> o .: "gc_collectors"- <*> o .: "mem"- <*> (posixMS <$> o .: "start_time_in_millis")- <*> o .: "vm_vendor"- <*> o .: "vm_version"- <*> o .: "vm_name"- <*> o .: "version"- <*> o .: "pid"--instance FromJSON JVMMemoryInfo where- parseJSON = withObject "JVMMemoryInfo" parse- where- parse o =- JVMMemoryInfo- <$> o .: "direct_max_in_bytes"- <*> o .: "non_heap_max_in_bytes"- <*> o .: "non_heap_init_in_bytes"- <*> o .: "heap_max_in_bytes"- <*> o .: "heap_init_in_bytes"--instance FromJSON NodeThreadPoolInfo where- parseJSON = withObject "NodeThreadPoolInfo" parse- where- parse o = do- ka <- maybe (return Nothing) (fmap Just . parseStringInterval) =<< o .:? "keep_alive"- NodeThreadPoolInfo- <$> (parseJSON . unStringlyTypeJSON =<< o .: "queue_size")- <*> pure ka- <*> o .:? "min"- <*> o .:? "max"- <*> o .: "type"--data TimeInterval- = Weeks- | Days- | Hours- | Minutes- | Seconds- deriving (Eq)--instance Show TimeInterval where- show Weeks = "w"- show Days = "d"- show Hours = "h"- show Minutes = "m"- show Seconds = "s"--instance Read TimeInterval where- readPrec = f =<< TR.get- where- f 'w' = return Weeks- f 'd' = return Days- f 'h' = return Hours- f 'm' = return Minutes- f 's' = return Seconds- f _ = fail "TimeInterval expected one of w, d, h, m, s"--data Interval- = Year- | Quarter- | Month- | Week- | Day- | Hour- | Minute- | Second- deriving (Eq, Show)--instance ToJSON Interval where- toJSON Year = "year"- toJSON Quarter = "quarter"- toJSON Month = "month"- toJSON Week = "week"- toJSON Day = "day"- toJSON Hour = "hour"- toJSON Minute = "minute"- toJSON Second = "second"--parseStringInterval :: (Monad m, MonadFail m) => String -> m NominalDiffTime-parseStringInterval s = case span isNumber s of- ("", _) -> fail "Invalid interval"- (nS, unitS) -> case (readMay nS, readMay unitS) of- (Just n, Just unit) -> return (fromInteger (n * unitNDT unit))- (Nothing, _) -> fail "Invalid interval number"- (_, Nothing) -> fail "Invalid interval unit"- where- unitNDT Seconds = 1- unitNDT Minutes = 60- unitNDT Hours = 60 * 60- unitNDT Days = 24 * 60 * 60- unitNDT Weeks = 7 * 24 * 60 * 60--instance FromJSON ThreadPoolSize where- parseJSON v = parseAsNumber v <|> parseAsString v- where- parseAsNumber = parseAsInt <=< parseJSON- parseAsInt (-1) = return ThreadPoolUnbounded- parseAsInt n- | n >= 0 = return (ThreadPoolBounded n)- | otherwise = fail "Thread pool size must be >= -1."- parseAsString = withText "ThreadPoolSize" $ \t ->- case first (readMay . T.unpack) (T.span isNumber t) of- (Just n, "k") -> return (ThreadPoolBounded (n * 1000))- (Just n, "") -> return (ThreadPoolBounded n)- _ -> fail ("Invalid thread pool size " <> T.unpack t)--instance FromJSON ThreadPoolType where- parseJSON = withText "ThreadPoolType" parse- where- parse "scaling" = return ThreadPoolScaling- parse "fixed" = return ThreadPoolFixed- parse "cached" = return ThreadPoolCached- parse "fixed_auto_queue_size" = return ThreadPoolFixedAutoQueueSize- parse e = fail ("Unexpected thread pool type" <> T.unpack e)--instance FromJSON NodeTransportInfo where- parseJSON = withObject "NodeTransportInfo" parse- where- parse o =- NodeTransportInfo- <$> (maybe (return mempty) parseProfiles =<< o .:? "profiles")- <*> o .: "publish_address"- <*> o .: "bound_address"- parseProfiles (Object o) | X.null o = return []- parseProfiles v@(Array _) = parseJSON v- parseProfiles Null = return []- parseProfiles _ = fail "Could not parse profiles"--instance FromJSON NodeNetworkInfo where- parseJSON = withObject "NodeNetworkInfo" parse- where- parse o =- NodeNetworkInfo- <$> o .: "primary_interface"- <*> (unMS <$> o .: "refresh_interval_in_millis")--instance FromJSON NodeNetworkInterface where- parseJSON = withObject "NodeNetworkInterface" parse- where- parse o =- NodeNetworkInterface- <$> o .: "mac_address"- <*> o .: "name"- <*> o .: "address"--instance ToJSON Version where- toJSON Version {..} =- object- [ "number" .= number,- "build_hash" .= build_hash,- "build_date" .= build_date,- "build_snapshot" .= build_snapshot,- "lucene_version" .= lucene_version- ]--instance FromJSON Version where- parseJSON = withObject "Version" parse- where- parse o =- Version- <$> o .: "number"- <*> o .: "build_hash"- <*> o .: "build_date"- <*> o .: "build_snapshot"- <*> o .: "lucene_version"--instance ToJSON VersionNumber where- toJSON = toJSON . SemVer.toText . versionNumber--instance FromJSON VersionNumber where- parseJSON = withText "VersionNumber" parse- where- parse t =- case SemVer.fromText t of- (Left err) -> fail err- (Right v) -> return (VersionNumber v)
src/Database/Bloodhound/Internal/Client/BHRequest.hs view
@@ -1,6 +1,8 @@-{-# LANGUAGE DerivingStrategies #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} -- |@@ -15,19 +17,27 @@ module Database.Bloodhound.Internal.Client.BHRequest ( -- * Request BHRequest (..),+ StatusIndependant,+ StatusDependant, mkFullRequest, mkSimpleRequest,+ ParsedEsResponse,+ ParseBHResponse (..), Server (..), Endpoint (..), mkEndpoint, withQueries, getEndpoint,+ withBHResponse,+ withBHResponse_,+ withBHResponseParsedEsResponse,+ keepBHResponse,+ joinBHResponse, -- * Response BHResponse (..), -- * Response interpretation- ParsedEsResponse, decodeResponse, eitherDecodeResponse, parseEsResponse,@@ -46,6 +56,7 @@ -- * Common results Acknowledged (..), Accepted (..),+ IgnoredBody (..), ) where @@ -60,6 +71,7 @@ import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Encoding as T+import Data.Typeable import Database.Bloodhound.Internal.Client.Doc import GHC.Exts import Network.HTTP.Client@@ -104,34 +116,130 @@ -- | 'Request' upon Elasticsearch's server. --+-- @parsingContext@ is a phantom type for the expected status-dependancy -- @responseBody@ is a phantom type for the expected result-data BHRequest responseBody = BHRequest+data BHRequest parsingContext responseBody = BHRequest { bhRequestMethod :: NHTM.Method, bhRequestEndpoint :: Endpoint,- bhRequestBody :: Maybe BL.ByteString+ bhRequestBody :: Maybe BL.ByteString,+ bhRequestParser :: BHResponse parsingContext responseBody -> Either EsProtocolException (ParsedEsResponse responseBody) }- deriving stock (Eq, Show) +instance Functor (BHRequest parsingContext) where+ fmap f req =+ req+ { bhRequestParser =+ \BHResponse {..} -> fmap (fmap f) $ bhRequestParser req $ BHResponse {..}+ }++-- | 'BHResponse' body-parsing does not depend on 'statusCode'+data StatusIndependant++-- | 'BHResponse' body-parsing may depend on 'statusCode'+data StatusDependant+ -- | 'BHRequest' with a body-mkFullRequest :: NHTM.Method -> Endpoint -> BL.ByteString -> BHRequest body+mkFullRequest :: (ParseBHResponse parsingContext, FromJSON responseBody) => NHTM.Method -> Endpoint -> BL.ByteString -> BHRequest parsingContext responseBody mkFullRequest method' endpoint body = BHRequest { bhRequestMethod = method', bhRequestEndpoint = endpoint,- bhRequestBody = Just body+ bhRequestBody = Just body,+ bhRequestParser = parseBHResponse } -- | 'BHRequest' without a body-mkSimpleRequest :: NHTM.Method -> Endpoint -> BHRequest body+mkSimpleRequest :: (ParseBHResponse parsingContext, FromJSON responseBody) => NHTM.Method -> Endpoint -> BHRequest parsingContext responseBody mkSimpleRequest method' endpoint = BHRequest { bhRequestMethod = method', bhRequestEndpoint = endpoint,- bhRequestBody = Nothing+ bhRequestBody = Nothing,+ bhRequestParser = parseBHResponse } +class ParseBHResponse parsingContext where+ parseBHResponse ::+ (FromJSON a) =>+ BHResponse parsingContext a ->+ Either EsProtocolException (ParsedEsResponse a)++instance ParseBHResponse StatusDependant where+ parseBHResponse = parseEsResponse++instance ParseBHResponse StatusIndependant where+ parseBHResponse r =+ return $+ case eitherDecodeResponse r of+ Right d -> Right d+ Left e ->+ Left $+ EsError+ { errorStatus = Just $ NHTS.statusCode (responseStatus $ getResponse r),+ errorMessage = "Unable to parse body: " <> T.pack e+ }++-- | Work with the full 'BHResponse'+withBHResponse ::+ forall a parsingContext b.+ (Either EsProtocolException (ParsedEsResponse a) -> BHResponse StatusDependant a -> b) ->+ BHRequest parsingContext a ->+ BHRequest StatusDependant b+withBHResponse f req =+ req+ { bhRequestParser = \resp ->+ liftResponse $ f (bhRequestParser req $ castResponse @_ @_ @parsingContext @a resp) $ castResponse @_ @_ @StatusDependant @a resp+ }+ where+ liftResponse :: b -> Either EsProtocolException (ParsedEsResponse b)+ liftResponse = return . return++-- | Internal only+castResponse :: BHResponse parsingContext0 responseBody0 -> BHResponse parsingContext1 responseBody1+castResponse BHResponse {..} = BHResponse {..}++-- | Work with the full 'BHResponse'+withBHResponse_ ::+ forall a parsingContext b.+ (BHResponse StatusDependant a -> b) ->+ BHRequest parsingContext a ->+ BHRequest StatusDependant b+withBHResponse_ f = withBHResponse $ const f++-- | Enable working with 'ParsedEsResponse'+withBHResponseParsedEsResponse ::+ forall a parsingContext.+ BHRequest parsingContext a ->+ BHRequest StatusDependant (ParsedEsResponse a)+withBHResponseParsedEsResponse req =+ req+ { bhRequestParser = \BHResponse {..} -> return <$> bhRequestParser req BHResponse {..}+ }++-- | Keep with the full 'BHResponse'+keepBHResponse ::+ forall a parsingContext.+ BHRequest parsingContext a ->+ BHRequest StatusDependant (BHResponse StatusDependant a, a)+keepBHResponse = joinBHResponse . withBHResponse (\parsed resp -> fmap (fmap ((,) resp)) parsed)++joinBHResponse ::+ forall a parsingContext.+ BHRequest parsingContext (Either EsProtocolException (ParsedEsResponse a)) ->+ BHRequest parsingContext a+joinBHResponse req =+ req+ { bhRequestParser = \resp ->+ case bhRequestParser req $ castResponse resp of+ Left e -> Left e+ Right (Right a) -> a+ Right (Left e) -> Right (Left e)+ }+ -- | Result of a 'BHRequest'-newtype BHResponse body = BHResponse {getResponse :: Network.HTTP.Client.Response BL.ByteString}+newtype BHResponse parsingContext body = BHResponse+ { getResponse :: Network.HTTP.Client.Response BL.ByteString+ } deriving stock (Show) -- | Result of a 'parseEsResponse'@@ -144,11 +252,9 @@ -- thrown. If you encounter this, please report the full body it -- reports along with your Elasticsearch version. parseEsResponse ::- ( MonadThrow m,- FromJSON body- ) =>- BHResponse body ->- m (ParsedEsResponse body)+ (FromJSON body) =>+ BHResponse parsingContext body ->+ Either EsProtocolException (ParsedEsResponse body) parseEsResponse response | isSuccess response = case eitherDecode body of Right a -> return (Right a)@@ -162,7 +268,7 @@ Right e -> return (Left e) -- Failed to parse the error message. Left err -> explode ("Original error was: " <> originalError <> " Error parse failure was: " <> err)- explode errorMsg = throwM $ EsProtocolException (T.pack errorMsg) body+ explode errorMsg = Left $ EsProtocolException (T.pack errorMsg) body -- | Parse 'BHResponse' with an arbitrary parser parseEsResponseWith ::@@ -170,7 +276,7 @@ FromJSON body ) => (body -> Either String parsed) ->- BHResponse body ->+ BHResponse parsingContext body -> m parsed parseEsResponseWith parser response = case eitherDecode body of@@ -185,56 +291,58 @@ -- | Helper around 'aeson' 'decode' decodeResponse ::- FromJSON a =>- BHResponse a ->+ (FromJSON a) =>+ BHResponse StatusIndependant a -> Maybe a decodeResponse = decode . responseBody . getResponse -- | Helper around 'aeson' 'eitherDecode' eitherDecodeResponse ::- FromJSON a =>- BHResponse a ->+ (FromJSON a) =>+ BHResponse StatusIndependant a -> Either String a eitherDecodeResponse = eitherDecode . responseBody . getResponse -- | Was there an optimistic concurrency control conflict when -- indexing a document?-isVersionConflict :: BHResponse a -> Bool+isVersionConflict :: BHResponse parsingContext a -> Bool isVersionConflict = statusCheck (== 409) -- | Check '2xx' status codes-isSuccess :: BHResponse a -> Bool+isSuccess :: BHResponse parsingContext a -> Bool isSuccess = statusCodeIs (200, 299) -- | Check '201' status code-isCreated :: BHResponse a -> Bool+isCreated :: BHResponse parsingContext a -> Bool isCreated = statusCheck (== 201) -- | Check status code-statusCheck :: (Int -> Bool) -> BHResponse a -> Bool+statusCheck :: (Int -> Bool) -> BHResponse parsingContext a -> Bool statusCheck prd = prd . NHTS.statusCode . responseStatus . getResponse -- | Check status code in range-statusCodeIs :: (Int, Int) -> BHResponse body -> Bool+statusCodeIs :: (Int, Int) -> BHResponse parsingContext body -> Bool statusCodeIs r resp = inRange r $ NHTS.statusCode (responseStatus $ getResponse resp) -- | 'EsResult' describes the standard wrapper JSON document that you see in--- successful Elasticsearch lookups or lookups that couldn't find the document.+-- successful Elasticsearch lookups or lookups that couldn't find the document. data EsResult a = EsResult { _index :: Text,- _type :: Text,+ _type :: Maybe Text, _id :: Text, foundResult :: Maybe (EsResultFound a) }- deriving (Eq, Show)+ deriving stock (Eq, Show) +{-# DEPRECATED _type "deprecated since ElasticSearch 6.0" #-}+ -- | 'EsResultFound' contains the document and its metadata inside of an--- 'EsResult' when the document was successfully found.+-- 'EsResult' when the document was successfully found. data EsResultFound a = EsResultFound { _version :: DocVersion, _source :: a }- deriving (Eq, Show)+ deriving stock (Eq, Show) instance (FromJSON a) => FromJSON (EsResult a) where parseJSON jsonVal@(Object v) = do@@ -244,32 +352,48 @@ then parseJSON jsonVal else return Nothing EsResult- <$> v .: "_index"- <*> v .: "_type"- <*> v .: "_id"+ <$> v+ .: "_index"+ <*> v+ .:? "_type"+ <*> v+ .: "_id" <*> pure fr parseJSON _ = empty instance (FromJSON a) => FromJSON (EsResultFound a) where parseJSON (Object v) = EsResultFound- <$> v .: "_version"- <*> v .: "_source"+ <$> v+ .: "_version"+ <*> v+ .: "_source" parseJSON _ = empty -- | '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.+-- problem. If you can't parse the expected response, its a good idea to+-- try parsing this. data EsError = EsError { errorStatus :: Maybe Int, errorMessage :: Text }- deriving (Eq, Show)+ deriving stock (Eq, Show, Typeable) +{-# DEPRECATED errorStatus "deprecated since ElasticSearch 6.0" #-}++instance Exception EsError++instance Semigroup EsError where+ _ <> x = x++instance Monoid EsError where+ mempty = EsError Nothing "Monoid value, shouldn't happen"+ instance FromJSON EsError where parseJSON (Object v) = EsError- <$> v .:? "status"+ <$> v+ .:? "status" <*> (v .: "error" <|> (v .: "error" >>= (.: "reason"))) parseJSON _ = empty @@ -284,7 +408,7 @@ { esProtoExMessage :: !Text, esProtoExResponse :: !BL.ByteString }- deriving (Eq, Show)+ deriving stock (Eq, Show) instance Exception EsProtocolException @@ -303,3 +427,9 @@ parseJSON = withObject "Accepted" $ fmap Accepted . (.: "accepted")++data IgnoredBody = IgnoredBody+ deriving stock (Eq, Show)++instance FromJSON IgnoredBody where+ parseJSON _ = return IgnoredBody
src/Database/Bloodhound/Internal/Client/Doc.hs view
@@ -1,6 +1,3 @@-{-# LANGUAGE DerivingStrategies #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}- module Database.Bloodhound.Internal.Client.Doc ( DocVersion (..), ExternalDocVersion (..),@@ -54,7 +51,7 @@ -- | 'ExternalDocVersion' is a convenience wrapper if your code uses its -- own version numbers instead of ones from ES. newtype ExternalDocVersion = ExternalDocVersion DocVersion- deriving (Eq, Show, Ord, Bounded, Enum, ToJSON)+ deriving newtype (Eq, Ord, Show, Bounded, Enum, ToJSON) -- | 'VersionControl' is specified when indexing documents as a -- optimistic concurrency control.@@ -88,4 +85,4 @@ -- typically used for correcting errors. Use with -- care, as this could result in data loss. ForceVersion ExternalDocVersion- deriving (Eq, Show, Ord)+ deriving stock (Eq, Show, Ord)
− src/Database/Bloodhound/Internal/Count.hs
@@ -1,46 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}--module Database.Bloodhound.Internal.Count (CountQuery (..), CountResponse (..), CountShards (..)) where--import Data.Aeson-import Database.Bloodhound.Internal.Query-import Numeric.Natural--newtype CountQuery = CountQuery {countQuery :: Query}- deriving (Eq, Show)--instance ToJSON CountQuery where- toJSON (CountQuery q) =- object ["query" .= q]--data CountResponse = CountResponse- { crCount :: Natural,- crShards :: CountShards- }- deriving (Eq, Show)--instance FromJSON CountResponse where- parseJSON =- withObject "CountResponse" $- \o ->- CountResponse- <$> o .: "count"- <*> o .: "_shards"--data CountShards = CountShards- { csTotal :: Int,- csSuccessful :: Int,- csSkipped :: Int,- csFailed :: Int- }- deriving (Eq, Show)--instance FromJSON CountShards where- parseJSON =- withObject "CountShards" $- \o ->- CountShards- <$> o .: "total"- <*> o .: "successful"- <*> o .: "skipped"- <*> o .: "failed"
− src/Database/Bloodhound/Internal/Highlight.hs
@@ -1,183 +0,0 @@-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE OverloadedStrings #-}--module Database.Bloodhound.Internal.Highlight where--import Bloodhound.Import-import qualified Data.Map.Strict as M-import Database.Bloodhound.Internal.Newtypes-import Database.Bloodhound.Internal.Query--type HitHighlight = M.Map Text [Text]--data Highlights = Highlights- { globalsettings :: Maybe HighlightSettings,- highlightFields :: [FieldHighlight]- }- deriving (Eq, Show)--instance ToJSON Highlights where- toJSON (Highlights global fields) =- omitNulls- ( ("fields" .= fields)- : highlightSettingsPairs global- )--data FieldHighlight- = FieldHighlight FieldName (Maybe HighlightSettings)- deriving (Eq, Show)--instance ToJSON FieldHighlight where- toJSON (FieldHighlight (FieldName fName) (Just fSettings)) =- object [fromText fName .= fSettings]- toJSON (FieldHighlight (FieldName fName) Nothing) =- object [fromText fName .= emptyObject]--data HighlightSettings- = Plain PlainHighlight- | Postings PostingsHighlight- | FastVector FastVectorHighlight- deriving (Eq, Show)--instance ToJSON HighlightSettings where- toJSON hs = omitNulls (highlightSettingsPairs (Just hs))--data PlainHighlight = PlainHighlight- { plainCommon :: Maybe CommonHighlight,- plainNonPost :: Maybe NonPostings- }- deriving (Eq, Show)---- This requires that index_options are set to 'offset' in the mapping.-data PostingsHighlight- = PostingsHighlight (Maybe CommonHighlight)- deriving (Eq, Show)---- This requires that term_vector is set to 'with_positions_offsets' in the mapping.-data FastVectorHighlight = FastVectorHighlight- { fvCommon :: Maybe CommonHighlight,- fvNonPostSettings :: Maybe NonPostings,- boundaryChars :: Maybe Text,- boundaryMaxScan :: Maybe Int,- fragmentOffset :: Maybe Int,- matchedFields :: [Text],- phraseLimit :: Maybe Int- }- deriving (Eq, Show)--data CommonHighlight = CommonHighlight- { order :: Maybe Text,- forceSource :: Maybe Bool,- tag :: Maybe HighlightTag,- encoder :: Maybe HighlightEncoder,- noMatchSize :: Maybe Int,- highlightQuery :: Maybe Query,- requireFieldMatch :: Maybe Bool- }- deriving (Eq, Show)---- Settings that are only applicable to FastVector and Plain highlighters.-data NonPostings = NonPostings- { fragmentSize :: Maybe Int,- numberOfFragments :: Maybe Int- }- deriving (Eq, Show)--data HighlightEncoder- = DefaultEncoder- | HTMLEncoder- deriving (Eq, Show)--instance ToJSON HighlightEncoder where- toJSON DefaultEncoder = String "default"- toJSON HTMLEncoder = String "html"---- NOTE: Should the tags use some kind of HTML type, rather than Text?-data HighlightTag- = TagSchema Text- | -- Only uses more than the first value in the lists if fvh- CustomTags ([Text], [Text])- deriving (Eq, Show)--highlightSettingsPairs :: Maybe HighlightSettings -> [Pair]-highlightSettingsPairs Nothing = []-highlightSettingsPairs (Just (Plain plh)) = plainHighPairs (Just plh)-highlightSettingsPairs (Just (Postings ph)) = postHighPairs (Just ph)-highlightSettingsPairs (Just (FastVector fvh)) = fastVectorHighPairs (Just fvh)--plainHighPairs :: Maybe PlainHighlight -> [Pair]-plainHighPairs Nothing = []-plainHighPairs (Just (PlainHighlight plCom plNonPost)) =- ["type" .= String "plain"]- ++ commonHighlightPairs plCom- ++ nonPostingsToPairs plNonPost--postHighPairs :: Maybe PostingsHighlight -> [Pair]-postHighPairs Nothing = []-postHighPairs (Just (PostingsHighlight pCom)) =- ("type" .= String "postings")- : commonHighlightPairs pCom--fastVectorHighPairs :: Maybe FastVectorHighlight -> [Pair]-fastVectorHighPairs Nothing = []-fastVectorHighPairs- ( Just- ( FastVectorHighlight- fvCom- fvNonPostSettings'- fvBoundChars- fvBoundMaxScan- fvFragOff- fvMatchedFields- fvPhraseLim- )- ) =- [ "type" .= String "fvh",- "boundary_chars" .= fvBoundChars,- "boundary_max_scan" .= fvBoundMaxScan,- "fragment_offset" .= fvFragOff,- "matched_fields" .= fvMatchedFields,- "phraseLimit" .= fvPhraseLim- ]- ++ commonHighlightPairs fvCom- ++ nonPostingsToPairs fvNonPostSettings'--commonHighlightPairs :: Maybe CommonHighlight -> [Pair]-commonHighlightPairs Nothing = []-commonHighlightPairs- ( Just- ( CommonHighlight- chScore- chForceSource- chTag- chEncoder- chNoMatchSize- chHighlightQuery- chRequireFieldMatch- )- ) =- [ "order" .= chScore,- "force_source" .= chForceSource,- "encoder" .= chEncoder,- "no_match_size" .= chNoMatchSize,- "highlight_query" .= chHighlightQuery,- "require_fieldMatch" .= chRequireFieldMatch- ]- ++ highlightTagToPairs chTag--nonPostingsToPairs :: Maybe NonPostings -> [Pair]-nonPostingsToPairs Nothing = []-nonPostingsToPairs (Just (NonPostings npFragSize npNumOfFrags)) =- [ "fragment_size" .= npFragSize,- "number_of_fragments" .= npNumOfFrags- ]--highlightTagToPairs :: Maybe HighlightTag -> [Pair]-highlightTagToPairs (Just (TagSchema _)) =- [ "scheme" .= String "default"- ]-highlightTagToPairs (Just (CustomTags (pre, post))) =- [ "pre_tags" .= pre,- "post_tags" .= post- ]-highlightTagToPairs Nothing = []
− src/Database/Bloodhound/Internal/Newtypes.hs
@@ -1,278 +0,0 @@-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE OverloadedStrings #-}--module Database.Bloodhound.Internal.Newtypes where--import Bloodhound.Import-import qualified Data.Map.Strict as M-import GHC.Generics--newtype From = From Int deriving (Eq, Show, ToJSON)--newtype Size = Size Int deriving (Eq, Show, Generic, ToJSON, FromJSON)---- Used with scripts-newtype HitFields- = HitFields (M.Map Text [Value])- deriving (Eq, Show)--instance FromJSON HitFields where- parseJSON x =- HitFields <$> parseJSON x---- Slight misnomer.-type Score = Maybe Double--newtype ShardId = ShardId {shardId :: Int}- deriving (Eq, Show, FromJSON)---- | '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.-newtype DocId- = DocId Text- deriving (Eq, Show, Generic, ToJSON, FromJSON)---- | 'FieldName' is used all over the place wherever a specific field within--- a document needs to be specified, usually in 'Query's or 'Filter's.-newtype FieldName- = FieldName Text- deriving (Eq, Read, Show, ToJSON, FromJSON)---- | 'RelationName' describes a relation role between parend and child Documents--- in a Join relarionship: https://www.elastic.co/guide/en/elasticsearch/reference/current/parent-join.html-newtype RelationName- = RelationName Text- deriving (Eq, Read, Show, Generic, ToJSON, FromJSON)---- | 'QueryString' is used to wrap query text bodies, be they human written or not.-newtype QueryString- = QueryString Text- deriving (Eq, Show, Generic, ToJSON, FromJSON)---- {-| 'Script' is often used in place of 'FieldName' to specify more--- complex ways of extracting a value from a document.--- -}--- newtype Script =--- Script { scriptText :: Text }--- deriving (Eq, Show)---- | 'CacheName' is used in 'RegexpFilter' for describing the--- 'CacheKey' keyed caching behavior.-newtype CacheName- = CacheName Text- deriving (Eq, Show, Generic, FromJSON, ToJSON)---- | 'CacheKey' is used in 'RegexpFilter' to key regex caching.-newtype CacheKey- = CacheKey Text- deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype Existence- = Existence Bool- deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype NullValue- = NullValue Bool- deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype CutoffFrequency- = CutoffFrequency Double- deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype Analyzer- = Analyzer Text- deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype MaxExpansions- = MaxExpansions Int- deriving (Eq, Generic, Show, FromJSON, ToJSON)---- | '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.-newtype Lenient- = Lenient Bool- deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype Tiebreaker- = Tiebreaker Double- deriving (Eq, Show, Generic, FromJSON, ToJSON)---- | '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.-newtype MinimumMatch- = MinimumMatch Int- deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype DisableCoord- = DisableCoord Bool- deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype IgnoreTermFrequency- = IgnoreTermFrequency Bool- deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype MinimumTermFrequency- = MinimumTermFrequency Int- deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype MaxQueryTerms- = MaxQueryTerms Int- deriving (Eq, Show, Generic, FromJSON, ToJSON)---- | 'PrefixLength' is the prefix length used in queries, defaults to 0.-newtype PrefixLength- = PrefixLength Int- deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype PercentMatch- = PercentMatch Double- deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype StopWord- = StopWord Text- deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype QueryPath- = QueryPath Text- deriving (Eq, Show, Generic, FromJSON, ToJSON)---- | 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 AllowLeadingWildcard- = AllowLeadingWildcard Bool- deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype LowercaseExpanded- = LowercaseExpanded Bool- deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype EnablePositionIncrements- = EnablePositionIncrements Bool- deriving (Eq, Show, Generic, FromJSON, ToJSON)---- | By default, wildcard terms in a query are not analyzed.--- Setting 'AnalyzeWildcard' to true enables best-effort analysis.-newtype AnalyzeWildcard = AnalyzeWildcard Bool deriving (Eq, Show, Generic, FromJSON, ToJSON)---- | 'GeneratePhraseQueries' defaults to false.-newtype GeneratePhraseQueries- = GeneratePhraseQueries Bool- deriving (Eq, Show, Generic, FromJSON, ToJSON)---- | 'Locale' is used for string conversions - defaults to ROOT.-newtype Locale = Locale Text deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype MaxWordLength = MaxWordLength Int deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype MinWordLength = MinWordLength Int deriving (Eq, Show, Generic, FromJSON, ToJSON)---- | 'PhraseSlop' sets the default slop for phrases, 0 means exact--- phrase matches. Default is 0.-newtype PhraseSlop = PhraseSlop Int deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype MinDocFrequency = MinDocFrequency Int deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype MaxDocFrequency = MaxDocFrequency Int deriving (Eq, Show, Generic, FromJSON, ToJSON)---- | Indicates whether the relevance score of a matching parent document is aggregated into its child documents.-newtype AggregateParentScore = AggregateParentScore Bool deriving (Eq, Show, Generic, FromJSON, ToJSON)---- | Indicates whether to ignore an unmapped parent_type and not return any documents instead of an error.-newtype IgnoreUnmapped = IgnoreUnmapped Bool deriving (Eq, Show, Generic, FromJSON, ToJSON)---- | Maximum number of child documents that match the query allowed for a returned parent document.--- If the parent document exceeds this limit, it is excluded from the search results.-newtype MinChildren = MinChildren Int deriving (Eq, Show, Generic, FromJSON, ToJSON)---- | Minimum number of child documents that match the query required to match the query for a returned parent document.--- If the parent document does not meet this limit, it is excluded from the search results.-newtype MaxChildren = MaxChildren Int deriving (Eq, Show, Generic, FromJSON, ToJSON)---- | Newtype wrapper to parse ES's concerning tendency to in some APIs return a floating point number of milliseconds since epoch ಠ_ಠ-newtype POSIXMS = POSIXMS {posixMS :: UTCTime}--instance FromJSON POSIXMS where- parseJSON = withScientific "POSIXMS" (return . parse)- where- parse n =- let n' = truncate n :: Integer- in POSIXMS (posixSecondsToUTCTime (fromInteger (n' `div` 1000)))--newtype Boost- = Boost Double- deriving (Eq, Show, Generic, ToJSON, FromJSON)--newtype BoostTerms- = BoostTerms Double- deriving (Eq, Show, Generic, ToJSON, FromJSON)---- | 'ReplicaCount' is part of 'IndexSettings'-newtype ReplicaCount- = ReplicaCount Int- deriving (Eq, Show, Generic, ToJSON)---- | 'ShardCount' is part of 'IndexSettings'-newtype ShardCount- = ShardCount Int- deriving (Eq, Show, Generic, ToJSON)---- This insanity is because ES *sometimes* returns Replica/Shard counts as strings-instance FromJSON ReplicaCount where- parseJSON v =- parseAsInt v- <|> parseAsString v- where- parseAsInt = fmap ReplicaCount . parseJSON- parseAsString = withText "ReplicaCount" (fmap ReplicaCount . parseReadText)--instance FromJSON ShardCount where- parseJSON v =- parseAsInt v- <|> parseAsString v- where- parseAsInt = fmap ShardCount . parseJSON- parseAsString = withText "ShardCount" (fmap ShardCount . parseReadText)---- | 'IndexName' is used to describe which index to query/create/delete-newtype IndexName- = IndexName Text- deriving (Eq, Show, Generic, ToJSON, FromJSON)--newtype IndexAliasName = IndexAliasName {indexAliasName :: IndexName}- deriving (Eq, Show, ToJSON)--newtype MaybeNA a = MaybeNA {unMaybeNA :: Maybe a}- deriving (Show, Eq)--instance FromJSON a => FromJSON (MaybeNA a) where- parseJSON (String "NA") = pure $ MaybeNA Nothing- parseJSON o = MaybeNA . Just <$> parseJSON o--newtype SnapshotName = SnapshotName {snapshotName :: Text}- deriving (Eq, Show, ToJSON, FromJSON)---- | Milliseconds-newtype MS = MS NominalDiffTime---- keeps the unexported constructor warnings at bay-unMS :: MS -> NominalDiffTime-unMS (MS t) = t--instance FromJSON MS where- parseJSON = withScientific "MS" (return . MS . parse)- where- parse n = fromInteger (truncate n * 1000)--newtype TokenFilter- = TokenFilter Text- deriving (Eq, Show, Generic, FromJSON, ToJSON)--newtype CharFilter- = CharFilter Text- deriving (Eq, Show, Generic, FromJSON, ToJSON)
− src/Database/Bloodhound/Internal/PointInTime.hs
@@ -1,69 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}--module Database.Bloodhound.Internal.PointInTime where--import Bloodhound.Import--data PointInTime = PointInTime- { pPitId :: Text,- keepAlive :: Text- }- deriving (Eq, Show)--instance ToJSON PointInTime where- toJSON PointInTime {..} =- object- [ "id" .= pPitId,- "keep_alive" .= keepAlive- ]--instance FromJSON PointInTime where- parseJSON (Object o) = PointInTime <$> o .: "id" <*> o .: "keep_alive"- parseJSON x = typeMismatch "PointInTime" x--data OpenPointInTimeResponse = OpenPointInTimeResponse- { oPitId :: Text- }- deriving (Eq, Show)--instance ToJSON OpenPointInTimeResponse where- toJSON OpenPointInTimeResponse {..} =- object ["id" .= oPitId]--instance FromJSON OpenPointInTimeResponse where- parseJSON (Object o) = OpenPointInTimeResponse <$> o .: "id"- parseJSON x = typeMismatch "OpenPointInTimeResponse" x--data ClosePointInTime = ClosePointInTime- { cPitId :: Text- }- deriving (Eq, Show)--instance ToJSON ClosePointInTime where- toJSON ClosePointInTime {..} =- object ["id" .= cPitId]--instance FromJSON ClosePointInTime where- parseJSON (Object o) = ClosePointInTime <$> o .: "id"- parseJSON x = typeMismatch "ClosePointInTime" x--data ClosePointInTimeResponse = ClosePointInTimeResponse- { succeeded :: Bool,- numFreed :: Int- }- deriving (Eq, Show)--instance ToJSON ClosePointInTimeResponse where- toJSON ClosePointInTimeResponse {..} =- object- [ "succeeded" .= succeeded,- "num_freed" .= numFreed- ]--instance FromJSON ClosePointInTimeResponse where- parseJSON (Object o) = do- succeeded' <- o .: "succeeded"- numFreed' <- o .: "num_freed"- return $ ClosePointInTimeResponse succeeded' numFreed'- parseJSON x = typeMismatch "ClosePointInTimeResponse" x
− src/Database/Bloodhound/Internal/Query.hs
@@ -1,2030 +0,0 @@-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}--module Database.Bloodhound.Internal.Query- ( module X,- module Database.Bloodhound.Internal.Query,- )-where--import Bloodhound.Import-import qualified Data.Aeson.KeyMap as X-import qualified Data.HashMap.Strict as HM-import qualified Data.Text as T-import Database.Bloodhound.Common.Script as X-import Database.Bloodhound.Internal.Newtypes-import GHC.Generics--data Query- = TermQuery Term (Maybe Boost)- | TermsQuery Key (NonEmpty Text)- | QueryMatchQuery MatchQuery- | QueryMultiMatchQuery MultiMatchQuery- | QueryBoolQuery BoolQuery- | QueryBoostingQuery BoostingQuery- | QueryCommonTermsQuery CommonTermsQuery- | ConstantScoreQuery Query Boost- | QueryFunctionScoreQuery FunctionScoreQuery- | QueryDisMaxQuery DisMaxQuery- | QueryFuzzyLikeThisQuery FuzzyLikeThisQuery- | QueryFuzzyLikeFieldQuery FuzzyLikeFieldQuery- | QueryFuzzyQuery FuzzyQuery- | QueryHasChildQuery HasChildQuery- | QueryHasParentQuery HasParentQuery- | IdsQuery [DocId]- | QueryIndicesQuery IndicesQuery- | MatchAllQuery (Maybe Boost)- | QueryMoreLikeThisQuery MoreLikeThisQuery- | QueryMoreLikeThisFieldQuery MoreLikeThisFieldQuery- | QueryNestedQuery NestedQuery- | QueryPrefixQuery PrefixQuery- | QueryQueryStringQuery QueryStringQuery- | QuerySimpleQueryStringQuery SimpleQueryStringQuery- | QueryRangeQuery RangeQuery- | QueryRegexpQuery RegexpQuery- | QueryExistsQuery FieldName- | QueryMatchNoneQuery- | QueryWildcardQuery WildcardQuery- deriving (Eq, Show, Generic)--instance ToJSON Query where- toJSON (TermQuery (Term termQueryField termQueryValue) boost) =- object- [ "term"- .= object [termQueryField .= object merged]- ]- where- base = ["value" .= termQueryValue]- boosted = maybe [] (return . ("boost" .=)) boost- merged = mappend base boosted- toJSON (TermsQuery fieldName terms) =- object ["terms" .= object conjoined]- where- conjoined = [fieldName .= terms]- toJSON (IdsQuery docIds) =- object ["ids" .= object conjoined]- where- conjoined = ["values" .= fmap toJSON docIds]- toJSON (QueryQueryStringQuery qQueryStringQuery) =- object ["query_string" .= qQueryStringQuery]- toJSON (QueryMatchQuery matchQuery) =- object ["match" .= matchQuery]- toJSON (QueryMultiMatchQuery multiMatchQuery) =- toJSON multiMatchQuery- toJSON (QueryBoolQuery boolQuery) =- object ["bool" .= boolQuery]- toJSON (QueryBoostingQuery boostingQuery) =- object ["boosting" .= boostingQuery]- toJSON (QueryCommonTermsQuery commonTermsQuery) =- object ["common" .= commonTermsQuery]- toJSON (ConstantScoreQuery query boost) =- object- [ "constant_score"- .= object- [ "filter" .= query,- "boost" .= boost- ]- ]- toJSON (QueryFunctionScoreQuery functionScoreQuery) =- object ["function_score" .= functionScoreQuery]- toJSON (QueryDisMaxQuery disMaxQuery) =- object ["dis_max" .= disMaxQuery]- toJSON (QueryFuzzyLikeThisQuery fuzzyQuery) =- object ["fuzzy_like_this" .= fuzzyQuery]- toJSON (QueryFuzzyLikeFieldQuery fuzzyFieldQuery) =- object ["fuzzy_like_this_field" .= fuzzyFieldQuery]- toJSON (QueryFuzzyQuery fuzzyQuery) =- object ["fuzzy" .= fuzzyQuery]- toJSON (QueryHasChildQuery childQuery) =- object ["has_child" .= childQuery]- toJSON (QueryHasParentQuery parentQuery) =- object ["has_parent" .= parentQuery]- toJSON (QueryIndicesQuery qIndicesQuery) =- object ["indices" .= qIndicesQuery]- toJSON (MatchAllQuery boost) =- object ["match_all" .= omitNulls ["boost" .= boost]]- toJSON (QueryMoreLikeThisQuery query) =- object ["more_like_this" .= query]- toJSON (QueryMoreLikeThisFieldQuery query) =- object ["more_like_this_field" .= query]- toJSON (QueryNestedQuery query) =- object ["nested" .= query]- toJSON (QueryPrefixQuery query) =- object ["prefix" .= query]- toJSON (QueryRangeQuery query) =- object ["range" .= query]- toJSON (QueryRegexpQuery query) =- object ["regexp" .= query]- toJSON (QuerySimpleQueryStringQuery query) =- object ["simple_query_string" .= query]- toJSON (QueryExistsQuery (FieldName fieldName)) =- object- [ "exists"- .= object- ["field" .= fieldName]- ]- toJSON QueryMatchNoneQuery =- object ["match_none" .= object []]- toJSON (QueryWildcardQuery query) =- object ["wildcard" .= query]--instance FromJSON Query where- parseJSON v = withObject "Query" parse v- where- parse o =- termQuery- `taggedWith` "term"- <|> termsQuery- `taggedWith` "terms"- <|> idsQuery- `taggedWith` "ids"- <|> queryQueryStringQuery- `taggedWith` "query_string"- <|> queryMatchQuery- `taggedWith` "match"- <|> queryMultiMatchQuery- <|> queryBoolQuery- `taggedWith` "bool"- <|> queryBoostingQuery- `taggedWith` "boosting"- <|> queryCommonTermsQuery- `taggedWith` "common"- <|> constantScoreQuery- `taggedWith` "constant_score"- <|> queryFunctionScoreQuery- `taggedWith` "function_score"- <|> queryDisMaxQuery- `taggedWith` "dis_max"- <|> queryFuzzyLikeThisQuery- `taggedWith` "fuzzy_like_this"- <|> queryFuzzyLikeFieldQuery- `taggedWith` "fuzzy_like_this_field"- <|> queryFuzzyQuery- `taggedWith` "fuzzy"- <|> queryHasChildQuery- `taggedWith` "has_child"- <|> queryHasParentQuery- `taggedWith` "has_parent"- <|> queryIndicesQuery- `taggedWith` "indices"- <|> matchAllQuery- `taggedWith` "match_all"- <|> queryMoreLikeThisQuery- `taggedWith` "more_like_this"- <|> queryMoreLikeThisFieldQuery- `taggedWith` "more_like_this_field"- <|> queryNestedQuery- `taggedWith` "nested"- <|> queryPrefixQuery- `taggedWith` "prefix"- <|> queryRangeQuery- `taggedWith` "range"- <|> queryRegexpQuery- `taggedWith` "regexp"- <|> querySimpleQueryStringQuery- `taggedWith` "simple_query_string"- <|> queryWildcardQuery- `taggedWith` "wildcard"- where- taggedWith parser k = parser =<< o .: k- termQuery = fieldTagged $ \(FieldName fn) o ->- TermQuery <$> (Term (fromText fn) <$> o .: "value") <*> o .:? "boost"- termsQuery o = case HM.toList o of- [(fn, vs)] -> do- vals <- parseJSON vs- case vals of- x : xs -> return (TermsQuery fn (x :| xs))- _ -> fail "Expected non empty list of values"- _ -> fail "Expected object with 1 field-named key"- idsQuery o = IdsQuery <$> o .: "values"- queryQueryStringQuery = pure . QueryQueryStringQuery- queryMatchQuery = pure . QueryMatchQuery- queryMultiMatchQuery = QueryMultiMatchQuery <$> parseJSON v- queryBoolQuery = pure . QueryBoolQuery- queryBoostingQuery = pure . QueryBoostingQuery- queryCommonTermsQuery = pure . QueryCommonTermsQuery- constantScoreQuery o = case X.lookup "filter" o of- Just x ->- ConstantScoreQuery- <$> parseJSON x- <*> o .: "boost"- _ -> fail "Does not appear to be a ConstantScoreQuery"- queryFunctionScoreQuery = pure . QueryFunctionScoreQuery- queryDisMaxQuery = pure . QueryDisMaxQuery- queryFuzzyLikeThisQuery = pure . QueryFuzzyLikeThisQuery- queryFuzzyLikeFieldQuery = pure . QueryFuzzyLikeFieldQuery- queryFuzzyQuery = pure . QueryFuzzyQuery- queryHasChildQuery = pure . QueryHasChildQuery- queryHasParentQuery = pure . QueryHasParentQuery- queryIndicesQuery = pure . QueryIndicesQuery- matchAllQuery o = MatchAllQuery <$> o .:? "boost"- queryMoreLikeThisQuery = pure . QueryMoreLikeThisQuery- queryMoreLikeThisFieldQuery = pure . QueryMoreLikeThisFieldQuery- queryNestedQuery = pure . QueryNestedQuery- queryPrefixQuery = pure . QueryPrefixQuery- queryRangeQuery = pure . QueryRangeQuery- queryRegexpQuery = pure . QueryRegexpQuery- querySimpleQueryStringQuery = pure . QuerySimpleQueryStringQuery- -- queryExistsQuery o = QueryExistsQuery <$> o .: "field"- queryWildcardQuery = pure . QueryWildcardQuery---- | As of Elastic 2.0, 'Filters' are just 'Queries' housed in a--- Bool Query, and flagged in a different context.-newtype Filter = Filter {unFilter :: Query}- deriving (Eq, Show)--instance ToJSON Filter where- toJSON = toJSON . unFilter--instance FromJSON Filter where- parseJSON v = Filter <$> parseJSON v--data RegexpQuery = RegexpQuery- { regexpQueryField :: FieldName,- regexpQuery :: Regexp,- regexpQueryFlags :: RegexpFlags,- regexpQueryBoost :: Maybe Boost- }- deriving (Eq, Show, Generic)--instance ToJSON RegexpQuery where- toJSON- ( RegexpQuery- (FieldName rqQueryField)- (Regexp regexpQueryQuery)- rqQueryFlags- rqQueryBoost- ) =- object [fromText rqQueryField .= omitNulls base]- where- base =- [ "value" .= regexpQueryQuery,- "flags" .= rqQueryFlags,- "boost" .= rqQueryBoost- ]--instance FromJSON RegexpQuery where- parseJSON = withObject "RegexpQuery" parse- where- parse = fieldTagged $ \fn o ->- RegexpQuery fn- <$> o .: "value"- <*> o .: "flags"- <*> o .:? "boost"--data WildcardQuery = WildcardQuery- { wildcardQueryField :: FieldName,- wildcardQuery :: Key,- wildcardQueryBoost :: Maybe Boost- }- deriving (Eq, Show, Generic)--instance ToJSON WildcardQuery where- toJSON- ( WildcardQuery- (FieldName wcQueryField)- (wcQueryQuery)- wcQueryBoost- ) =- object [fromText wcQueryField .= omitNulls base]- where- base =- [ "value" .= wcQueryQuery,- "boost" .= wcQueryBoost- ]--instance FromJSON WildcardQuery where- parseJSON = withObject "WildcardQuery" parse- where- parse = fieldTagged $ \fn o ->- WildcardQuery fn- <$> o .: "value"- <*> o .:? "boost"--data RangeQuery = RangeQuery- { rangeQueryField :: FieldName,- rangeQueryRange :: RangeValue,- rangeQueryBoost :: Boost- }- deriving (Eq, Show, Generic)--instance ToJSON RangeQuery where- toJSON (RangeQuery (FieldName fieldName) range boost) =- object [fromText fieldName .= object conjoined]- where- conjoined = ("boost" .= boost) : rangeValueToPair range--instance FromJSON RangeQuery where- parseJSON = withObject "RangeQuery" parse- where- parse = fieldTagged $ \fn o ->- RangeQuery fn- <$> parseJSON (Object o)- <*> o .: "boost"--mkRangeQuery :: FieldName -> RangeValue -> RangeQuery-mkRangeQuery f r = RangeQuery f r (Boost 1.0)--data SimpleQueryStringQuery = SimpleQueryStringQuery- { simpleQueryStringQuery :: QueryString,- simpleQueryStringField :: Maybe FieldOrFields,- simpleQueryStringOperator :: Maybe BooleanOperator,- simpleQueryStringAnalyzer :: Maybe Analyzer,- simpleQueryStringFlags :: Maybe (NonEmpty SimpleQueryFlag),- simpleQueryStringLowercaseExpanded :: Maybe LowercaseExpanded,- simpleQueryStringLocale :: Maybe Locale- }- deriving (Eq, Show, Generic)--instance ToJSON SimpleQueryStringQuery where- toJSON SimpleQueryStringQuery {..} =- omitNulls (base ++ maybeAdd)- where- base = ["query" .= simpleQueryStringQuery]- maybeAdd =- [ "fields" .= simpleQueryStringField,- "default_operator" .= simpleQueryStringOperator,- "analyzer" .= simpleQueryStringAnalyzer,- "flags" .= simpleQueryStringFlags,- "lowercase_expanded_terms" .= simpleQueryStringLowercaseExpanded,- "locale" .= simpleQueryStringLocale- ]--instance FromJSON SimpleQueryStringQuery where- parseJSON = withObject "SimpleQueryStringQuery" parse- where- parse o =- SimpleQueryStringQuery- <$> o .: "query"- <*> o .:? "fields"- <*> o .:? "default_operator"- <*> o .:? "analyzer"- <*> (parseFlags <$> o .:? "flags")- <*> o .:? "lowercase_expanded_terms"- <*> o .:? "locale"- parseFlags (Just (x : xs)) = Just (x :| xs)- parseFlags _ = Nothing--data SimpleQueryFlag- = SimpleQueryAll- | SimpleQueryNone- | SimpleQueryAnd- | SimpleQueryOr- | SimpleQueryPrefix- | SimpleQueryPhrase- | SimpleQueryPrecedence- | SimpleQueryEscape- | SimpleQueryWhitespace- | SimpleQueryFuzzy- | SimpleQueryNear- | SimpleQuerySlop- deriving (Eq, Show, Generic)--instance ToJSON SimpleQueryFlag where- toJSON SimpleQueryAll = "ALL"- toJSON SimpleQueryNone = "NONE"- toJSON SimpleQueryAnd = "AND"- toJSON SimpleQueryOr = "OR"- toJSON SimpleQueryPrefix = "PREFIX"- toJSON SimpleQueryPhrase = "PHRASE"- toJSON SimpleQueryPrecedence = "PRECEDENCE"- toJSON SimpleQueryEscape = "ESCAPE"- toJSON SimpleQueryWhitespace = "WHITESPACE"- toJSON SimpleQueryFuzzy = "FUZZY"- toJSON SimpleQueryNear = "NEAR"- toJSON SimpleQuerySlop = "SLOP"--instance FromJSON SimpleQueryFlag where- parseJSON = withText "SimpleQueryFlag" parse- where- parse "ALL" = pure SimpleQueryAll- parse "NONE" = pure SimpleQueryNone- parse "AND" = pure SimpleQueryAnd- parse "OR" = pure SimpleQueryOr- parse "PREFIX" = pure SimpleQueryPrefix- parse "PHRASE" = pure SimpleQueryPhrase- parse "PRECEDENCE" = pure SimpleQueryPrecedence- parse "ESCAPE" = pure SimpleQueryEscape- parse "WHITESPACE" = pure SimpleQueryWhitespace- parse "FUZZY" = pure SimpleQueryFuzzy- parse "NEAR" = pure SimpleQueryNear- parse "SLOP" = pure SimpleQuerySlop- parse f = fail ("Unexpected SimpleQueryFlag: " <> show f)---- use_dis_max and tie_breaker when fields are plural?-data QueryStringQuery = QueryStringQuery- { queryStringQuery :: QueryString,- queryStringDefaultField :: Maybe FieldName,- queryStringOperator :: Maybe BooleanOperator,- queryStringAnalyzer :: Maybe Analyzer,- queryStringAllowLeadingWildcard :: Maybe AllowLeadingWildcard,- queryStringLowercaseExpanded :: Maybe LowercaseExpanded,- queryStringEnablePositionIncrements :: Maybe EnablePositionIncrements,- queryStringFuzzyMaxExpansions :: Maybe MaxExpansions,- queryStringFuzziness :: Maybe Fuzziness,- queryStringFuzzyPrefixLength :: Maybe PrefixLength,- queryStringPhraseSlop :: Maybe PhraseSlop,- queryStringBoost :: Maybe Boost,- queryStringAnalyzeWildcard :: Maybe AnalyzeWildcard,- queryStringGeneratePhraseQueries :: Maybe GeneratePhraseQueries,- queryStringMinimumShouldMatch :: Maybe MinimumMatch,- queryStringLenient :: Maybe Lenient,- queryStringLocale :: Maybe Locale- }- deriving (Eq, Show, Generic)--instance ToJSON QueryStringQuery where- toJSON- ( QueryStringQuery- qsQueryString- qsDefaultField- qsOperator- qsAnalyzer- qsAllowWildcard- qsLowercaseExpanded- qsEnablePositionIncrements- qsFuzzyMaxExpansions- qsFuzziness- qsFuzzyPrefixLength- qsPhraseSlop- qsBoost- qsAnalyzeWildcard- qsGeneratePhraseQueries- qsMinimumShouldMatch- qsLenient- qsLocale- ) =- omitNulls base- where- base =- [ "query" .= qsQueryString,- "default_field" .= qsDefaultField,- "default_operator" .= qsOperator,- "analyzer" .= qsAnalyzer,- "allow_leading_wildcard" .= qsAllowWildcard,- "lowercase_expanded_terms" .= qsLowercaseExpanded,- "enable_position_increments" .= qsEnablePositionIncrements,- "fuzzy_max_expansions" .= qsFuzzyMaxExpansions,- "fuzziness" .= qsFuzziness,- "fuzzy_prefix_length" .= qsFuzzyPrefixLength,- "phrase_slop" .= qsPhraseSlop,- "boost" .= qsBoost,- "analyze_wildcard" .= qsAnalyzeWildcard,- "auto_generate_phrase_queries" .= qsGeneratePhraseQueries,- "minimum_should_match" .= qsMinimumShouldMatch,- "lenient" .= qsLenient,- "locale" .= qsLocale- ]--instance FromJSON QueryStringQuery where- parseJSON = withObject "QueryStringQuery" parse- where- parse o =- QueryStringQuery- <$> o .: "query"- <*> o .:? "default_field"- <*> o .:? "default_operator"- <*> o .:? "analyzer"- <*> o .:? "allow_leading_wildcard"- <*> o .:? "lowercase_expanded_terms"- <*> o .:? "enable_position_increments"- <*> o .:? "fuzzy_max_expansions"- <*> o .:? "fuzziness"- <*> o .:? "fuzzy_prefix_length"- <*> o .:? "phrase_slop"- <*> o .:? "boost"- <*> o .:? "analyze_wildcard"- <*> o .:? "auto_generate_phrase_queries"- <*> o .:? "minimum_should_match"- <*> o .:? "lenient"- <*> o .:? "locale"--mkQueryStringQuery :: QueryString -> QueryStringQuery-mkQueryStringQuery qs =- QueryStringQuery- qs- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing--data FieldOrFields- = FofField FieldName- | FofFields (NonEmpty FieldName)- deriving (Eq, Show, Generic)--instance ToJSON FieldOrFields where- toJSON (FofField fieldName) =- toJSON fieldName- toJSON (FofFields fieldNames) =- toJSON fieldNames--instance FromJSON FieldOrFields where- parseJSON v =- FofField <$> parseJSON v- <|> FofFields <$> (parseNEJSON =<< parseJSON v)--data PrefixQuery = PrefixQuery- { prefixQueryField :: FieldName,- prefixQueryPrefixValue :: Text,- prefixQueryBoost :: Maybe Boost- }- deriving (Eq, Show, Generic)--instance ToJSON PrefixQuery where- toJSON (PrefixQuery (FieldName fieldName) queryValue boost) =- object [fromText fieldName .= omitNulls base]- where- base =- [ "value" .= queryValue,- "boost" .= boost- ]--instance FromJSON PrefixQuery where- parseJSON = withObject "PrefixQuery" parse- where- parse = fieldTagged $ \fn o ->- PrefixQuery fn- <$> o .: "value"- <*> o .:? "boost"--data NestedQuery = NestedQuery- { nestedQueryPath :: QueryPath,- nestedQueryScoreType :: ScoreType,- nestedQuery :: Query,- nestedQueryInnerHits :: Maybe InnerHits- }- deriving (Eq, Show, Generic)--instance ToJSON NestedQuery where- toJSON (NestedQuery nqPath nqScoreType nqQuery nqInnerHits) =- omitNulls- [ "path" .= nqPath,- "score_mode" .= nqScoreType,- "query" .= nqQuery,- "inner_hits" .= nqInnerHits- ]--instance FromJSON NestedQuery where- parseJSON = withObject "NestedQuery" parse- where- parse o =- NestedQuery- <$> o .: "path"- <*> o .: "score_mode"- <*> o .: "query"- <*> o .:? "inner_hits"--data MoreLikeThisFieldQuery = MoreLikeThisFieldQuery- { moreLikeThisFieldText :: Text,- moreLikeThisFieldFields :: FieldName,- -- default 0.3 (30%)- moreLikeThisFieldPercentMatch :: Maybe PercentMatch,- moreLikeThisFieldMinimumTermFreq :: Maybe MinimumTermFrequency,- moreLikeThisFieldMaxQueryTerms :: Maybe MaxQueryTerms,- moreLikeThisFieldStopWords :: Maybe (NonEmpty StopWord),- moreLikeThisFieldMinDocFrequency :: Maybe MinDocFrequency,- moreLikeThisFieldMaxDocFrequency :: Maybe MaxDocFrequency,- moreLikeThisFieldMinWordLength :: Maybe MinWordLength,- moreLikeThisFieldMaxWordLength :: Maybe MaxWordLength,- moreLikeThisFieldBoostTerms :: Maybe BoostTerms,- moreLikeThisFieldBoost :: Maybe Boost,- moreLikeThisFieldAnalyzer :: Maybe Analyzer- }- deriving (Eq, Show, Generic)--instance ToJSON MoreLikeThisFieldQuery where- toJSON- ( MoreLikeThisFieldQuery- text- (FieldName fieldName)- percent- mtf- mqt- stopwords- mindf- maxdf- minwl- maxwl- boostTerms- boost- analyzer- ) =- object [fromText fieldName .= omitNulls base]- where- base =- [ "like_text" .= text,- "percent_terms_to_match" .= percent,- "min_term_freq" .= mtf,- "max_query_terms" .= mqt,- "stop_words" .= stopwords,- "min_doc_freq" .= mindf,- "max_doc_freq" .= maxdf,- "min_word_length" .= minwl,- "max_word_length" .= maxwl,- "boost_terms" .= boostTerms,- "boost" .= boost,- "analyzer" .= analyzer- ]--instance FromJSON MoreLikeThisFieldQuery where- parseJSON = withObject "MoreLikeThisFieldQuery" parse- where- parse = fieldTagged $ \fn o ->- MoreLikeThisFieldQuery- <$> o .: "like_text"- <*> pure fn- <*> o .:? "percent_terms_to_match"- <*> o .:? "min_term_freq"- <*> o .:? "max_query_terms"- -- <*> (optionalNE =<< o .:? "stop_words")- <*> o .:? "stop_words"- <*> o .:? "min_doc_freq"- <*> o .:? "max_doc_freq"- <*> o .:? "min_word_length"- <*> o .:? "max_word_length"- <*> o .:? "boost_terms"- <*> o .:? "boost"- <*> o .:? "analyzer"---- optionalNE = maybe (pure Nothing) (fmap Just . parseNEJSON)--data MoreLikeThisQuery = MoreLikeThisQuery- { moreLikeThisText :: Text,- moreLikeThisFields :: Maybe (NonEmpty FieldName),- -- default 0.3 (30%)- moreLikeThisPercentMatch :: Maybe PercentMatch,- moreLikeThisMinimumTermFreq :: Maybe MinimumTermFrequency,- moreLikeThisMaxQueryTerms :: Maybe MaxQueryTerms,- moreLikeThisStopWords :: Maybe (NonEmpty StopWord),- moreLikeThisMinDocFrequency :: Maybe MinDocFrequency,- moreLikeThisMaxDocFrequency :: Maybe MaxDocFrequency,- moreLikeThisMinWordLength :: Maybe MinWordLength,- moreLikeThisMaxWordLength :: Maybe MaxWordLength,- moreLikeThisBoostTerms :: Maybe BoostTerms,- moreLikeThisBoost :: Maybe Boost,- moreLikeThisAnalyzer :: Maybe Analyzer- }- deriving (Eq, Show, Generic)--instance ToJSON MoreLikeThisQuery where- toJSON- ( MoreLikeThisQuery- text- fields- percent- mtf- mqt- stopwords- mindf- maxdf- minwl- maxwl- boostTerms- boost- analyzer- ) =- omitNulls base- where- base =- [ "like_text" .= text,- "fields" .= fields,- "percent_terms_to_match" .= percent,- "min_term_freq" .= mtf,- "max_query_terms" .= mqt,- "stop_words" .= stopwords,- "min_doc_freq" .= mindf,- "max_doc_freq" .= maxdf,- "min_word_length" .= minwl,- "max_word_length" .= maxwl,- "boost_terms" .= boostTerms,- "boost" .= boost,- "analyzer" .= analyzer- ]--instance FromJSON MoreLikeThisQuery where- parseJSON = withObject "MoreLikeThisQuery" parse- where- parse o =- MoreLikeThisQuery- <$> o .: "like_text"- -- <*> (optionalNE =<< o .:? "fields")- <*> o .:? "fields"- <*> o .:? "percent_terms_to_match"- <*> o .:? "min_term_freq"- <*> o .:? "max_query_terms"- -- <*> (optionalNE =<< o .:? "stop_words")- <*> o .:? "stop_words"- <*> o .:? "min_doc_freq"- <*> o .:? "max_doc_freq"- <*> o .:? "min_word_length"- <*> o .:? "max_word_length"- <*> o .:? "boost_terms"- <*> o .:? "boost"- <*> o .:? "analyzer"---- optionalNE = maybe (pure Nothing) (fmap Just . parseNEJSON)--data IndicesQuery = IndicesQuery- { indicesQueryIndices :: [IndexName],- indicesQuery :: Query,- -- default "all"- indicesQueryNoMatch :: Maybe Query- }- deriving (Eq, Show, Generic)--instance ToJSON IndicesQuery where- toJSON (IndicesQuery indices query noMatch) =- omitNulls- [ "indices" .= indices,- "no_match_query" .= noMatch,- "query" .= query- ]--instance FromJSON IndicesQuery where- parseJSON = withObject "IndicesQuery" parse- where- parse o =- IndicesQuery- <$> o .:? "indices" .!= []- <*> o .: "query"- <*> o .:? "no_match_query"--data HasParentQuery = HasParentQuery- { hasParentQueryType :: RelationName,- hasParentQuery :: Query,- hasParentQueryScore :: Maybe AggregateParentScore,- hasParentIgnoreUnmapped :: Maybe IgnoreUnmapped- }- deriving (Eq, Show, Generic)--instance ToJSON HasParentQuery where- toJSON (HasParentQuery queryType query scoreType ignoreUnmapped) =- omitNulls- [ "parent_type" .= queryType,- "score" .= scoreType,- "query" .= query,- "ignore_unmapped" .= ignoreUnmapped- ]--instance FromJSON HasParentQuery where- parseJSON = withObject "HasParentQuery" parse- where- parse o =- HasParentQuery- <$> o .: "parent_type"- <*> o .: "query"- <*> o .:? "score"- <*> o .:? "ignore_unmapped"--data HasChildQuery = HasChildQuery- { hasChildQueryType :: RelationName,- hasChildQuery :: Query,- hasChildQueryScoreType :: Maybe ScoreType,- hasChildIgnoreUnmappped :: Maybe IgnoreUnmapped,- hasChildMinChildren :: Maybe MinChildren,- hasChildMaxChildren :: Maybe MaxChildren- }- deriving (Eq, Show, Generic)--instance ToJSON HasChildQuery where- toJSON (HasChildQuery queryType query scoreType ignoreUnmapped minChildren maxChildren) =- omitNulls- [ "query" .= query,- "score_mode" .= scoreType,- "type" .= queryType,- "min_children" .= minChildren,- "max_children" .= maxChildren,- "ignore_unmapped" .= ignoreUnmapped- ]--instance FromJSON HasChildQuery where- parseJSON = withObject "HasChildQuery" parse- where- parse o =- HasChildQuery- <$> o .: "type"- <*> o .: "query"- <*> o .:? "score_mode"- <*> o .:? "ignore_unmapped"- <*> o .:? "min_children"- <*> o .:? "max_children"--data ScoreType- = ScoreTypeMax- | ScoreTypeSum- | ScoreTypeAvg- | ScoreTypeNone- deriving (Eq, Show, Generic)--instance ToJSON ScoreType where- toJSON ScoreTypeMax = "max"- toJSON ScoreTypeAvg = "avg"- toJSON ScoreTypeSum = "sum"- toJSON ScoreTypeNone = "none"--instance FromJSON ScoreType where- parseJSON = withText "ScoreType" parse- where- parse "max" = pure ScoreTypeMax- parse "avg" = pure ScoreTypeAvg- parse "sum" = pure ScoreTypeSum- parse "none" = pure ScoreTypeNone- parse t = fail ("Unexpected ScoreType: " <> show t)--data FuzzyQuery = FuzzyQuery- { fuzzyQueryField :: FieldName,- fuzzyQueryValue :: Text,- fuzzyQueryPrefixLength :: PrefixLength,- fuzzyQueryMaxExpansions :: MaxExpansions,- fuzzyQueryFuzziness :: Fuzziness,- fuzzyQueryBoost :: Maybe Boost- }- deriving (Eq, Show, Generic)--instance ToJSON FuzzyQuery where- toJSON- ( FuzzyQuery- (FieldName fieldName)- queryText- prefixLength- maxEx- fuzziness- boost- ) =- object [fromText fieldName .= omitNulls base]- where- base =- [ "value" .= queryText,- "fuzziness" .= fuzziness,- "prefix_length" .= prefixLength,- "boost" .= boost,- "max_expansions" .= maxEx- ]--instance FromJSON FuzzyQuery where- parseJSON = withObject "FuzzyQuery" parse- where- parse = fieldTagged $ \fn o ->- FuzzyQuery fn- <$> o .: "value"- <*> o .: "prefix_length"- <*> o .: "max_expansions"- <*> o .: "fuzziness"- <*> o .:? "boost"--data FuzzyLikeFieldQuery = FuzzyLikeFieldQuery- { fuzzyLikeField :: FieldName,- -- anaphora is good for the soul.- fuzzyLikeFieldText :: Text,- fuzzyLikeFieldMaxQueryTerms :: MaxQueryTerms,- fuzzyLikeFieldIgnoreTermFrequency :: IgnoreTermFrequency,- fuzzyLikeFieldFuzziness :: Fuzziness,- fuzzyLikeFieldPrefixLength :: PrefixLength,- fuzzyLikeFieldBoost :: Boost,- fuzzyLikeFieldAnalyzer :: Maybe Analyzer- }- deriving (Eq, Show, Generic)--instance ToJSON FuzzyLikeFieldQuery where- toJSON- ( FuzzyLikeFieldQuery- (FieldName fieldName)- fieldText- maxTerms- ignoreFreq- fuzziness- prefixLength- boost- analyzer- ) =- object- [ fromText fieldName- .= omitNulls- [ "like_text" .= fieldText,- "max_query_terms" .= maxTerms,- "ignore_tf" .= ignoreFreq,- "fuzziness" .= fuzziness,- "prefix_length" .= prefixLength,- "analyzer" .= analyzer,- "boost" .= boost- ]- ]--instance FromJSON FuzzyLikeFieldQuery where- parseJSON = withObject "FuzzyLikeFieldQuery" parse- where- parse = fieldTagged $ \fn o ->- FuzzyLikeFieldQuery fn- <$> o .: "like_text"- <*> o .: "max_query_terms"- <*> o .: "ignore_tf"- <*> o .: "fuzziness"- <*> o .: "prefix_length"- <*> o .: "boost"- <*> o .:? "analyzer"--data FuzzyLikeThisQuery = FuzzyLikeThisQuery- { fuzzyLikeFields :: [FieldName],- fuzzyLikeText :: Text,- fuzzyLikeMaxQueryTerms :: MaxQueryTerms,- fuzzyLikeIgnoreTermFrequency :: IgnoreTermFrequency,- fuzzyLikeFuzziness :: Fuzziness,- fuzzyLikePrefixLength :: PrefixLength,- fuzzyLikeBoost :: Boost,- fuzzyLikeAnalyzer :: Maybe Analyzer- }- deriving (Eq, Show, Generic)--instance ToJSON FuzzyLikeThisQuery where- toJSON- ( FuzzyLikeThisQuery- fields- text- maxTerms- ignoreFreq- fuzziness- prefixLength- boost- analyzer- ) =- omitNulls base- where- base =- [ "fields" .= fields,- "like_text" .= text,- "max_query_terms" .= maxTerms,- "ignore_tf" .= ignoreFreq,- "fuzziness" .= fuzziness,- "prefix_length" .= prefixLength,- "analyzer" .= analyzer,- "boost" .= boost- ]--instance FromJSON FuzzyLikeThisQuery where- parseJSON = withObject "FuzzyLikeThisQuery" parse- where- parse o =- FuzzyLikeThisQuery- <$> o .:? "fields" .!= []- <*> o .: "like_text"- <*> o .: "max_query_terms"- <*> o .: "ignore_tf"- <*> o .: "fuzziness"- <*> o .: "prefix_length"- <*> o .: "boost"- <*> o .:? "analyzer"--data DisMaxQuery = DisMaxQuery- { disMaxQueries :: [Query],- -- default 0.0- disMaxTiebreaker :: Tiebreaker,- disMaxBoost :: Maybe Boost- }- deriving (Eq, Show, Generic)--instance ToJSON DisMaxQuery where- toJSON (DisMaxQuery queries tiebreaker boost) =- omitNulls base- where- base =- [ "queries" .= queries,- "boost" .= boost,- "tie_breaker" .= tiebreaker- ]--instance FromJSON DisMaxQuery where- parseJSON = withObject "DisMaxQuery" parse- where- parse o =- DisMaxQuery- <$> o .:? "queries" .!= []- <*> o .: "tie_breaker"- <*> o .:? "boost"--data MatchQuery = MatchQuery- { matchQueryField :: FieldName,- matchQueryQueryString :: QueryString,- matchQueryOperator :: BooleanOperator,- matchQueryZeroTerms :: ZeroTermsQuery,- matchQueryCutoffFrequency :: Maybe CutoffFrequency,- matchQueryMatchType :: Maybe MatchQueryType,- matchQueryAnalyzer :: Maybe Analyzer,- matchQueryMaxExpansions :: Maybe MaxExpansions,- matchQueryLenient :: Maybe Lenient,- matchQueryBoost :: Maybe Boost,- matchQueryMinimumShouldMatch :: Maybe Text,- matchQueryFuzziness :: Maybe Fuzziness- }- deriving (Eq, Show, Generic)--instance ToJSON MatchQuery where- toJSON- ( MatchQuery- (FieldName fieldName)- (QueryString mqQueryString)- booleanOperator- zeroTermsQuery- cutoffFrequency- matchQueryType- analyzer- maxExpansions- lenient- boost- minShouldMatch- mqFuzziness- ) =- object [fromText fieldName .= omitNulls base]- where- base =- [ "query" .= mqQueryString,- "operator" .= booleanOperator,- "zero_terms_query" .= zeroTermsQuery,- "cutoff_frequency" .= cutoffFrequency,- "type" .= matchQueryType,- "analyzer" .= analyzer,- "max_expansions" .= maxExpansions,- "lenient" .= lenient,- "boost" .= boost,- "minimum_should_match" .= minShouldMatch,- "fuzziness" .= mqFuzziness- ]--instance FromJSON MatchQuery where- parseJSON = withObject "MatchQuery" parse- where- parse = fieldTagged $ \fn o ->- MatchQuery fn- <$> o .: "query"- <*> o .: "operator"- <*> o .: "zero_terms_query"- <*> o .:? "cutoff_frequency"- <*> o .:? "type"- <*> o .:? "analyzer"- <*> o .:? "max_expansions"- <*> o .:? "lenient"- <*> o .:? "boost"- <*> o .:? "minimum_should_match"- <*> o .:? "fuzziness"---- | 'mkMatchQuery' is a convenience function that defaults the less common parameters,--- enabling you to provide only the 'FieldName' and 'QueryString' to make a 'MatchQuery'-mkMatchQuery :: FieldName -> QueryString -> MatchQuery-mkMatchQuery field query = MatchQuery field query Or ZeroTermsNone Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing--data MatchQueryType- = MatchPhrase- | MatchPhrasePrefix- deriving (Eq, Show, Generic)--instance ToJSON MatchQueryType where- toJSON MatchPhrase = "phrase"- toJSON MatchPhrasePrefix = "phrase_prefix"--instance FromJSON MatchQueryType where- parseJSON = withText "MatchQueryType" parse- where- parse "phrase" = pure MatchPhrase- parse "phrase_prefix" = pure MatchPhrasePrefix- parse t = fail ("Unexpected MatchQueryType: " <> show t)--data MultiMatchQuery = MultiMatchQuery- { multiMatchQueryFields :: [FieldName],- multiMatchQueryString :: QueryString,- multiMatchQueryOperator :: BooleanOperator,- multiMatchQueryZeroTerms :: ZeroTermsQuery,- multiMatchQueryTiebreaker :: Maybe Tiebreaker,- multiMatchQueryType :: Maybe MultiMatchQueryType,- multiMatchQueryCutoffFrequency :: Maybe CutoffFrequency,- multiMatchQueryAnalyzer :: Maybe Analyzer,- multiMatchQueryMaxExpansions :: Maybe MaxExpansions,- multiMatchQueryLenient :: Maybe Lenient- }- deriving (Eq, Show, Generic)--instance ToJSON MultiMatchQuery where- toJSON- ( MultiMatchQuery- fields- (QueryString query)- boolOp- ztQ- tb- mmqt- cf- analyzer- maxEx- lenient- ) =- object ["multi_match" .= omitNulls base]- where- base =- [ "fields" .= fmap toJSON fields,- "query" .= query,- "operator" .= boolOp,- "zero_terms_query" .= ztQ,- "tie_breaker" .= tb,- "type" .= mmqt,- "cutoff_frequency" .= cf,- "analyzer" .= analyzer,- "max_expansions" .= maxEx,- "lenient" .= lenient- ]--instance FromJSON MultiMatchQuery where- parseJSON = withObject "MultiMatchQuery" parse- where- parse raw = do- o <- raw .: "multi_match"- MultiMatchQuery- <$> o .:? "fields" .!= []- <*> o .: "query"- <*> o .: "operator"- <*> o .: "zero_terms_query"- <*> o .:? "tie_breaker"- <*> o .:? "type"- <*> o .:? "cutoff_frequency"- <*> o .:? "analyzer"- <*> o .:? "max_expansions"- <*> o .:? "lenient"---- | 'mkMultiMatchQuery' is a convenience function that defaults the less common parameters,--- enabling you to provide only the list of 'FieldName's and 'QueryString' to--- make a 'MultiMatchQuery'.-mkMultiMatchQuery :: [FieldName] -> QueryString -> MultiMatchQuery-mkMultiMatchQuery matchFields query =- MultiMatchQuery- matchFields- query- Or- ZeroTermsNone- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing--data MultiMatchQueryType- = MultiMatchBestFields- | MultiMatchMostFields- | MultiMatchCrossFields- | MultiMatchPhrase- | MultiMatchPhrasePrefix- deriving (Eq, Show, Generic)--instance ToJSON MultiMatchQueryType where- toJSON MultiMatchBestFields = "best_fields"- toJSON MultiMatchMostFields = "most_fields"- toJSON MultiMatchCrossFields = "cross_fields"- toJSON MultiMatchPhrase = "phrase"- toJSON MultiMatchPhrasePrefix = "phrase_prefix"--instance FromJSON MultiMatchQueryType where- parseJSON = withText "MultiMatchPhrasePrefix" parse- where- parse "best_fields" = pure MultiMatchBestFields- parse "most_fields" = pure MultiMatchMostFields- parse "cross_fields" = pure MultiMatchCrossFields- parse "phrase" = pure MultiMatchPhrase- parse "phrase_prefix" = pure MultiMatchPhrasePrefix- parse t = fail ("Unexpected MultiMatchPhrasePrefix: " <> show t)--data BoolQuery = BoolQuery- { boolQueryMustMatch :: [Query],- boolQueryFilter :: [Filter],- boolQueryMustNotMatch :: [Query],- boolQueryShouldMatch :: [Query],- boolQueryMinimumShouldMatch :: Maybe MinimumMatch,- boolQueryBoost :: Maybe Boost,- boolQueryDisableCoord :: Maybe DisableCoord- }- deriving (Eq, Show, Generic)--instance ToJSON BoolQuery where- toJSON (BoolQuery mustM filterM' notM shouldM bqMin boost disableCoord) =- omitNulls base- where- base =- [ "must" .= mustM,- "filter" .= filterM',- "must_not" .= notM,- "should" .= shouldM,- "minimum_should_match" .= bqMin,- "boost" .= boost,- "disable_coord" .= disableCoord- ]--instance FromJSON BoolQuery where- parseJSON = withObject "BoolQuery" parse- where- parse o =- BoolQuery- <$> o .:? "must" .!= []- <*> o .:? "filter" .!= []- <*> o .:? "must_not" .!= []- <*> o .:? "should" .!= []- <*> o .:? "minimum_should_match"- <*> o .:? "boost"- <*> o .:? "disable_coord"--mkBoolQuery :: [Query] -> [Filter] -> [Query] -> [Query] -> BoolQuery-mkBoolQuery must filt mustNot should =- BoolQuery must filt mustNot should Nothing Nothing Nothing--data BoostingQuery = BoostingQuery- { positiveQuery :: Query,- negativeQuery :: Query,- negativeBoost :: Boost- }- deriving (Eq, Show, Generic)--instance ToJSON BoostingQuery where- toJSON (BoostingQuery bqPositiveQuery bqNegativeQuery bqNegativeBoost) =- object- [ "positive" .= bqPositiveQuery,- "negative" .= bqNegativeQuery,- "negative_boost" .= bqNegativeBoost- ]--instance FromJSON BoostingQuery where- parseJSON = withObject "BoostingQuery" parse- where- parse o =- BoostingQuery- <$> o .: "positive"- <*> o .: "negative"- <*> o .: "negative_boost"--data CommonTermsQuery = CommonTermsQuery- { commonField :: FieldName,- commonQuery :: QueryString,- commonCutoffFrequency :: CutoffFrequency,- commonLowFreqOperator :: BooleanOperator,- commonHighFreqOperator :: BooleanOperator,- commonMinimumShouldMatch :: Maybe CommonMinimumMatch,- commonBoost :: Maybe Boost,- commonAnalyzer :: Maybe Analyzer,- commonDisableCoord :: Maybe DisableCoord- }- deriving (Eq, Show, Generic)--instance ToJSON CommonTermsQuery where- toJSON- ( CommonTermsQuery- (FieldName fieldName)- (QueryString query)- cf- lfo- hfo- msm- boost- analyzer- disableCoord- ) =- object [fromText fieldName .= omitNulls base]- where- base =- [ "query" .= query,- "cutoff_frequency" .= cf,- "low_freq_operator" .= lfo,- "minimum_should_match" .= msm,- "boost" .= boost,- "analyzer" .= analyzer,- "disable_coord" .= disableCoord,- "high_freq_operator" .= hfo- ]--instance FromJSON CommonTermsQuery where- parseJSON = withObject "CommonTermsQuery" parse- where- parse = fieldTagged $ \fn o ->- CommonTermsQuery fn- <$> o .: "query"- <*> o .: "cutoff_frequency"- <*> o .: "low_freq_operator"- <*> o .: "high_freq_operator"- <*> o .:? "minimum_should_match"- <*> o .:? "boost"- <*> o .:? "analyzer"- <*> o .:? "disable_coord"--data CommonMinimumMatch- = CommonMinimumMatchHighLow MinimumMatchHighLow- | CommonMinimumMatch MinimumMatch- deriving (Eq, Show, Generic)--instance ToJSON CommonMinimumMatch where- toJSON (CommonMinimumMatch mm) = toJSON mm- toJSON (CommonMinimumMatchHighLow (MinimumMatchHighLow lowF highF)) =- object- [ "low_freq" .= lowF,- "high_freq" .= highF- ]--instance FromJSON CommonMinimumMatch where- parseJSON v =- parseMinimum v- <|> parseMinimumHighLow v- where- parseMinimum = fmap CommonMinimumMatch . parseJSON- parseMinimumHighLow =- fmap CommonMinimumMatchHighLow- . withObject- "CommonMinimumMatchHighLow"- ( \o ->- MinimumMatchHighLow- <$> o .: "low_freq"- <*> o .: "high_freq"- )--data MinimumMatchHighLow = MinimumMatchHighLow- { lowFreq :: MinimumMatch,- highFreq :: MinimumMatch- }- deriving (Eq, Show, Generic)--data ZeroTermsQuery- = ZeroTermsNone- | ZeroTermsAll- deriving (Eq, Show, Generic)--instance ToJSON ZeroTermsQuery where- toJSON ZeroTermsNone = String "none"- toJSON ZeroTermsAll = String "all"--instance FromJSON ZeroTermsQuery where- parseJSON = withText "ZeroTermsQuery" parse- where- parse "none" = pure ZeroTermsNone- parse "all" = pure ZeroTermsAll- parse q = fail ("Unexpected ZeroTermsQuery: " <> show q)--data RangeExecution- = RangeExecutionIndex- | RangeExecutionFielddata- deriving (Eq, Show, Generic)---- index for smaller ranges, fielddata for longer ranges-instance ToJSON RangeExecution where- toJSON RangeExecutionIndex = "index"- toJSON RangeExecutionFielddata = "fielddata"--instance FromJSON RangeExecution where- parseJSON = withText "RangeExecution" parse- where- parse "index" = pure RangeExecutionIndex- parse "fielddata" = pure RangeExecutionFielddata- parse t = error ("Unrecognized RangeExecution " <> show t)--newtype Regexp = Regexp Text deriving (Eq, Show, Generic, FromJSON)--data RegexpFlags- = AllRegexpFlags- | NoRegexpFlags- | SomeRegexpFlags (NonEmpty RegexpFlag)- deriving (Eq, Show, Generic)--instance ToJSON RegexpFlags where- toJSON AllRegexpFlags = String "ALL"- toJSON NoRegexpFlags = String "NONE"- toJSON (SomeRegexpFlags (h :| fs)) = String $ T.intercalate "|" flagStrs- where- flagStrs = map flagStr . nub $ h : fs- flagStr AnyString = "ANYSTRING"- flagStr Automaton = "AUTOMATON"- flagStr Complement = "COMPLEMENT"- flagStr Empty = "EMPTY"- flagStr Intersection = "INTERSECTION"- flagStr Interval = "INTERVAL"--instance FromJSON RegexpFlags where- parseJSON = withText "RegexpFlags" parse- where- parse "ALL" = pure AllRegexpFlags- parse "NONE" = pure NoRegexpFlags- parse t = SomeRegexpFlags <$> parseNEJSON (String <$> T.splitOn "|" t)--data RegexpFlag- = AnyString- | Automaton- | Complement- | Empty- | Intersection- | Interval- deriving (Eq, Show, Generic)--instance FromJSON RegexpFlag where- parseJSON = withText "RegexpFlag" parse- where- parse "ANYSTRING" = pure AnyString- parse "AUTOMATON" = pure Automaton- parse "COMPLEMENT" = pure Complement- parse "EMPTY" = pure Empty- parse "INTERSECTION" = pure Intersection- parse "INTERVAL" = pure Interval- parse f = fail ("Unknown RegexpFlag: " <> show f)--newtype LessThan = LessThan Double deriving (Eq, Show, Generic)--newtype LessThanEq = LessThanEq Double deriving (Eq, Show, Generic)--newtype GreaterThan = GreaterThan Double deriving (Eq, Show, Generic)--newtype GreaterThanEq = GreaterThanEq Double deriving (Eq, Show, Generic)--newtype LessThanD = LessThanD UTCTime deriving (Eq, Show, Generic)--newtype LessThanEqD = LessThanEqD UTCTime deriving (Eq, Show, Generic)--newtype GreaterThanD = GreaterThanD UTCTime deriving (Eq, Show, Generic)--newtype GreaterThanEqD = GreaterThanEqD UTCTime deriving (Eq, Show, Generic)--data RangeValue- = RangeDateLte LessThanEqD- | RangeDateLt LessThanD- | RangeDateGte GreaterThanEqD- | RangeDateGt GreaterThanD- | RangeDateGtLt GreaterThanD LessThanD- | RangeDateGteLte GreaterThanEqD LessThanEqD- | RangeDateGteLt GreaterThanEqD LessThanD- | RangeDateGtLte GreaterThanD LessThanEqD- | RangeDoubleLte LessThanEq- | RangeDoubleLt LessThan- | RangeDoubleGte GreaterThanEq- | RangeDoubleGt GreaterThan- | RangeDoubleGtLt GreaterThan LessThan- | RangeDoubleGteLte GreaterThanEq LessThanEq- | RangeDoubleGteLt GreaterThanEq LessThan- | RangeDoubleGtLte GreaterThan LessThanEq- deriving (Eq, Show, Generic)--parseRangeValue ::- ( FromJSON t4,- FromJSON t3,- FromJSON t2,- FromJSON t1- ) =>- (t3 -> t5) ->- (t1 -> t6) ->- (t4 -> t7) ->- (t2 -> t8) ->- (t5 -> t6 -> b) ->- (t7 -> t6 -> b) ->- (t5 -> t8 -> b) ->- (t7 -> t8 -> b) ->- (t5 -> b) ->- (t6 -> b) ->- (t7 -> b) ->- (t8 -> b) ->- Parser b ->- Object ->- Parser b-parseRangeValue- mkGt- mkLt- mkGte- mkLte- fGtLt- fGteLt- fGtLte- fGteLte- fGt- fLt- fGte- fLte- nada- o = do- lt <- o .:? "lt"- lte <- o .:? "lte"- gt <- o .:? "gt"- gte <- o .:? "gte"- case (lt, lte, gt, gte) of- (Just a, _, Just b, _) ->- return (fGtLt (mkGt b) (mkLt a))- (Just a, _, _, Just b) ->- return (fGteLt (mkGte b) (mkLt a))- (_, Just a, Just b, _) ->- return (fGtLte (mkGt b) (mkLte a))- (_, Just a, _, Just b) ->- return (fGteLte (mkGte b) (mkLte a))- (_, _, Just a, _) ->- return (fGt (mkGt a))- (Just a, _, _, _) ->- return (fLt (mkLt a))- (_, _, _, Just a) ->- return (fGte (mkGte a))- (_, Just a, _, _) ->- return (fLte (mkLte a))- (Nothing, Nothing, Nothing, Nothing) ->- nada--instance FromJSON RangeValue where- parseJSON = withObject "RangeValue" parse- where- parse o =- parseDate o- <|> parseDouble o- parseDate o =- parseRangeValue- GreaterThanD- LessThanD- GreaterThanEqD- LessThanEqD- RangeDateGtLt- RangeDateGteLt- RangeDateGtLte- RangeDateGteLte- RangeDateGt- RangeDateLt- RangeDateGte- RangeDateLte- mzero- o- parseDouble o =- parseRangeValue- GreaterThan- LessThan- GreaterThanEq- LessThanEq- RangeDoubleGtLt- RangeDoubleGteLt- RangeDoubleGtLte- RangeDoubleGteLte- RangeDoubleGt- RangeDoubleLt- RangeDoubleGte- RangeDoubleLte- mzero- o--rangeValueToPair :: RangeValue -> [Pair]-rangeValueToPair rv = case rv of- RangeDateLte (LessThanEqD t) -> ["lte" .= t]- RangeDateGte (GreaterThanEqD t) -> ["gte" .= t]- RangeDateLt (LessThanD t) -> ["lt" .= t]- RangeDateGt (GreaterThanD t) -> ["gt" .= t]- RangeDateGteLte (GreaterThanEqD l) (LessThanEqD g) -> ["gte" .= l, "lte" .= g]- RangeDateGtLte (GreaterThanD l) (LessThanEqD g) -> ["gt" .= l, "lte" .= g]- RangeDateGteLt (GreaterThanEqD l) (LessThanD g) -> ["gte" .= l, "lt" .= g]- RangeDateGtLt (GreaterThanD l) (LessThanD g) -> ["gt" .= l, "lt" .= g]- RangeDoubleLte (LessThanEq t) -> ["lte" .= t]- RangeDoubleGte (GreaterThanEq t) -> ["gte" .= t]- RangeDoubleLt (LessThan t) -> ["lt" .= t]- RangeDoubleGt (GreaterThan t) -> ["gt" .= t]- RangeDoubleGteLte (GreaterThanEq l) (LessThanEq g) -> ["gte" .= l, "lte" .= g]- RangeDoubleGtLte (GreaterThan l) (LessThanEq g) -> ["gt" .= l, "lte" .= g]- RangeDoubleGteLt (GreaterThanEq l) (LessThan g) -> ["gte" .= l, "lt" .= g]- RangeDoubleGtLt (GreaterThan l) (LessThan g) -> ["gt" .= l, "lt" .= g]--data Term = Term- { termField :: Key,- termValue :: Text- }- deriving (Eq, Show, Generic)--instance ToJSON Term where- toJSON (Term field value) =- object- [ "term"- .= object- [field .= value]- ]--instance FromJSON Term where- parseJSON = withObject "Term" parse- where- parse o = do- termObj <- o .: "term"- case HM.toList termObj of- [(fn, v)] -> Term fn <$> parseJSON v- _ -> fail "Expected object with 1 field-named key"--data BoolMatch- = MustMatch Term Cache- | MustNotMatch Term Cache- | ShouldMatch [Term] Cache- deriving (Eq, Show, Generic)--instance ToJSON BoolMatch where- toJSON (MustMatch term cache) =- object- [ "must" .= term,- "_cache" .= cache- ]- toJSON (MustNotMatch term cache) =- object- [ "must_not" .= term,- "_cache" .= cache- ]- toJSON (ShouldMatch terms cache) =- object- [ "should" .= fmap toJSON terms,- "_cache" .= cache- ]--instance FromJSON BoolMatch where- parseJSON = withObject "BoolMatch" parse- where- parse o =- mustMatch- `taggedWith` "must"- <|> mustNotMatch- `taggedWith` "must_not"- <|> shouldMatch- `taggedWith` "should"- where- taggedWith parser k = parser =<< o .: k- mustMatch t = MustMatch t <$> o .:? "_cache" .!= defaultCache- mustNotMatch t = MustNotMatch t <$> o .:? "_cache" .!= defaultCache- shouldMatch t = ShouldMatch t <$> o .:? "_cache" .!= defaultCache---- "memory" or "indexed"-data GeoFilterType- = GeoFilterMemory- | GeoFilterIndexed- deriving (Eq, Show, Generic)--instance ToJSON GeoFilterType where- toJSON GeoFilterMemory = String "memory"- toJSON GeoFilterIndexed = String "indexed"--instance FromJSON GeoFilterType where- parseJSON = withText "GeoFilterType" parse- where- parse "memory" = pure GeoFilterMemory- parse "indexed" = pure GeoFilterIndexed- parse t = fail ("Unrecognized GeoFilterType: " <> show t)--data LatLon = LatLon- { lat :: Double,- lon :: Double- }- deriving (Eq, Show, Generic)--instance ToJSON LatLon where- toJSON (LatLon lLat lLon) =- object- [ "lat" .= lLat,- "lon" .= lLon- ]--instance FromJSON LatLon where- parseJSON = withObject "LatLon" parse- where- parse o =- LatLon- <$> o .: "lat"- <*> o .: "lon"--data GeoBoundingBox = GeoBoundingBox- { topLeft :: LatLon,- bottomRight :: LatLon- }- deriving (Eq, Show, Generic)--instance ToJSON GeoBoundingBox where- toJSON (GeoBoundingBox gbbTopLeft gbbBottomRight) =- object- [ "top_left" .= gbbTopLeft,- "bottom_right" .= gbbBottomRight- ]--instance FromJSON GeoBoundingBox where- parseJSON = withObject "GeoBoundingBox" parse- where- parse o =- GeoBoundingBox- <$> o .: "top_left"- <*> o .: "bottom_right"--data GeoBoundingBoxConstraint = GeoBoundingBoxConstraint- { geoBBField :: FieldName,- constraintBox :: GeoBoundingBox,- bbConstraintcache :: Cache,- geoType :: GeoFilterType- }- deriving (Eq, Show, Generic)--instance ToJSON GeoBoundingBoxConstraint where- toJSON- ( GeoBoundingBoxConstraint- (FieldName gbbcGeoBBField)- gbbcConstraintBox- cache- type'- ) =- object- [ fromText gbbcGeoBBField .= gbbcConstraintBox,- "_cache" .= cache,- "type" .= type'- ]--instance FromJSON GeoBoundingBoxConstraint where- parseJSON = withObject "GeoBoundingBoxConstraint" parse- where- parse o = case X.toList (deleteSeveral ["type", "_cache"] o) of- [(fn, v)] ->- GeoBoundingBoxConstraint (FieldName $ toText fn)- <$> parseJSON v- <*> o .:? "_cache" .!= defaultCache- <*> o .: "type"- _ -> fail "Could not find field name for GeoBoundingBoxConstraint"--data GeoPoint = GeoPoint- { geoField :: FieldName,- latLon :: LatLon- }- deriving (Eq, Show, Generic)--instance ToJSON GeoPoint where- toJSON (GeoPoint (FieldName geoPointField) geoPointLatLon) =- object [fromText geoPointField .= geoPointLatLon]--data DistanceUnit- = Miles- | Yards- | Feet- | Inches- | Kilometers- | Meters- | Centimeters- | Millimeters- | NauticalMiles- deriving (Eq, Show, Generic)--instance ToJSON DistanceUnit where- toJSON Miles = String "mi"- toJSON Yards = String "yd"- toJSON Feet = String "ft"- toJSON Inches = String "in"- toJSON Kilometers = String "km"- toJSON Meters = String "m"- toJSON Centimeters = String "cm"- toJSON Millimeters = String "mm"- toJSON NauticalMiles = String "nmi"--instance FromJSON DistanceUnit where- parseJSON = withText "DistanceUnit" parse- where- parse "mi" = pure Miles- parse "yd" = pure Yards- parse "ft" = pure Feet- parse "in" = pure Inches- parse "km" = pure Kilometers- parse "m" = pure Meters- parse "cm" = pure Centimeters- parse "mm" = pure Millimeters- parse "nmi" = pure NauticalMiles- parse u = fail ("Unrecognized DistanceUnit: " <> show u)--data DistanceType- = Arc- | SloppyArc -- doesn't exist <1.0- | Plane- deriving (Eq, Show, Generic)--instance ToJSON DistanceType where- toJSON Arc = String "arc"- toJSON SloppyArc = String "sloppy_arc"- toJSON Plane = String "plane"--instance FromJSON DistanceType where- parseJSON = withText "DistanceType" parse- where- parse "arc" = pure Arc- parse "sloppy_arc" = pure SloppyArc- parse "plane" = pure Plane- parse t = fail ("Unrecognized DistanceType: " <> show t)--data OptimizeBbox- = OptimizeGeoFilterType GeoFilterType- | NoOptimizeBbox- deriving (Eq, Show, Generic)--instance ToJSON OptimizeBbox where- toJSON NoOptimizeBbox = String "none"- toJSON (OptimizeGeoFilterType gft) = toJSON gft--instance FromJSON OptimizeBbox where- parseJSON v =- withText "NoOptimizeBbox" parseNoOptimize v- <|> parseOptimize v- where- parseNoOptimize "none" = pure NoOptimizeBbox- parseNoOptimize _ = mzero- parseOptimize = fmap OptimizeGeoFilterType . parseJSON--data Distance = Distance- { coefficient :: Double,- unit :: DistanceUnit- }- deriving (Eq, Show, Generic)--instance ToJSON Distance where- toJSON (Distance dCoefficient dUnit) =- String boltedTogether- where- coefText = showText dCoefficient- (String unitText) = toJSON dUnit- boltedTogether = mappend coefText unitText--instance FromJSON Distance where- parseJSON = withText "Distance" parse- where- parse t =- Distance- <$> parseCoeff nT- <*> parseJSON (String unitT)- where- (nT, unitT) = T.span validForNumber t- -- may be a better way to do this- validForNumber '-' = True- validForNumber '.' = True- validForNumber 'e' = True- validForNumber c = isNumber c- parseCoeff "" = fail "Empty string cannot be parsed as number"- parseCoeff s = return (read (T.unpack s))--data DistanceRange = DistanceRange- { distanceFrom :: Distance,- distanceTo :: Distance- }- deriving (Eq, Show, Generic)--type TemplateQueryValue = Text--newtype TemplateQueryKeyValuePairs- = TemplateQueryKeyValuePairs (X.KeyMap TemplateQueryValue)- deriving (Eq, Show)--instance ToJSON TemplateQueryKeyValuePairs where- toJSON (TemplateQueryKeyValuePairs x) = Object $ String <$> x--instance FromJSON TemplateQueryKeyValuePairs where- parseJSON (Object o) =- pure . TemplateQueryKeyValuePairs $ X.mapMaybe getValue o- where- getValue (String x) = Just x- getValue _ = Nothing- parseJSON _ =- fail "error parsing TemplateQueryKeyValuePairs"---- | 'BooleanOperator' is the usual And/Or operators with an ES compatible--- JSON encoding baked in. Used all over the place.-data BooleanOperator = And | Or deriving (Eq, Show, Generic)--instance ToJSON BooleanOperator where- toJSON And = String "and"- toJSON Or = String "or"--instance FromJSON BooleanOperator where- parseJSON = withText "BooleanOperator" parse- where- parse "and" = pure And- parse "or" = pure Or- parse o = fail ("Unexpected BooleanOperator: " <> show o)---- | 'Cache' is for telling ES whether it should cache a 'Filter' not.--- 'Query's cannot be cached.-type Cache = Bool -- caching on/off--defaultCache :: Cache-defaultCache = False--data FunctionScoreQuery = FunctionScoreQuery- { functionScoreQuery :: Maybe Query,- functionScoreBoost :: Maybe Boost,- functionScoreFunctions :: FunctionScoreFunctions,- functionScoreMaxBoost :: Maybe Boost,- functionScoreBoostMode :: Maybe BoostMode,- functionScoreMinScore :: Score,- functionScoreScoreMode :: Maybe ScoreMode- }- deriving (Eq, Show, Generic)--instance ToJSON FunctionScoreQuery where- toJSON (FunctionScoreQuery query boost fns maxBoost boostMode minScore scoreMode) =- omitNulls base- where- base =- functionScoreFunctionsPair fns- : [ "query" .= query,- "boost" .= boost,- "max_boost" .= maxBoost,- "boost_mode" .= boostMode,- "min_score" .= minScore,- "score_mode" .= scoreMode- ]--instance FromJSON FunctionScoreQuery where- parseJSON = withObject "FunctionScoreQuery" parse- where- parse o =- FunctionScoreQuery- <$> o .:? "query"- <*> o .:? "boost"- <*> ( singleFunction o- <|> multipleFunctions- `taggedWith` "functions"- )- <*> o .:? "max_boost"- <*> o .:? "boost_mode"- <*> o .:? "min_score"- <*> o .:? "score_mode"- where- taggedWith parser k = parser =<< o .: k- singleFunction = fmap FunctionScoreSingle . parseFunctionScoreFunction- multipleFunctions = pure . FunctionScoreMultiple--data FunctionScoreFunctions- = FunctionScoreSingle FunctionScoreFunction- | FunctionScoreMultiple (NonEmpty ComponentFunctionScoreFunction)- deriving (Eq, Show, Generic)--data ComponentFunctionScoreFunction = ComponentFunctionScoreFunction- { componentScoreFunctionFilter :: Maybe Filter,- componentScoreFunction :: FunctionScoreFunction,- componentScoreFunctionWeight :: Maybe Weight- }- deriving (Eq, Show, Generic)--instance ToJSON ComponentFunctionScoreFunction where- toJSON (ComponentFunctionScoreFunction filter' fn weight) =- omitNulls base- where- base =- functionScoreFunctionPair fn- : [ "filter" .= filter',- "weight" .= weight- ]--instance FromJSON ComponentFunctionScoreFunction where- parseJSON = withObject "ComponentFunctionScoreFunction" parse- where- parse o =- ComponentFunctionScoreFunction- <$> o .:? "filter"- <*> parseFunctionScoreFunction o- <*> o .:? "weight"--functionScoreFunctionsPair :: FunctionScoreFunctions -> (Key, Value)-functionScoreFunctionsPair (FunctionScoreSingle fn) =- functionScoreFunctionPair fn-functionScoreFunctionsPair (FunctionScoreMultiple componentFns) =- ("functions", toJSON componentFns)--fieldTagged :: (Monad m, MonadFail m) => (FieldName -> Object -> m a) -> Object -> m a-fieldTagged f o = case X.toList o of- [(k, Object o')] -> f (FieldName $ toText k) o'- _ -> fail "Expected object with 1 field-named key"---- | Fuzziness value as a number or 'AUTO'.--- See:--- https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#fuzziness-data Fuzziness = Fuzziness Double | FuzzinessAuto- deriving (Eq, Show, Generic)--instance ToJSON Fuzziness where- toJSON (Fuzziness n) = toJSON n- toJSON FuzzinessAuto = String "AUTO"--instance FromJSON Fuzziness where- parseJSON (String "AUTO") = return FuzzinessAuto- parseJSON v = Fuzziness <$> parseJSON v--data InnerHits = InnerHits- { innerHitsFrom :: Maybe Integer,- innerHitsSize :: Maybe Integer- }- deriving (Eq, Show, Generic)--instance ToJSON InnerHits where- toJSON (InnerHits ihFrom ihSize) =- omitNulls- [ "from" .= ihFrom,- "size" .= ihSize- ]--instance FromJSON InnerHits where- parseJSON = withObject "InnerHits" parse- where- parse o =- InnerHits- <$> o .:? "from"- <*> o .:? "size"
− src/Database/Bloodhound/Internal/Sort.hs
@@ -1,119 +0,0 @@-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}--module Database.Bloodhound.Internal.Sort where--import Bloodhound.Import-import Database.Bloodhound.Internal.Newtypes-import Database.Bloodhound.Internal.Query---- | 'SortMode' prescribes how to handle sorting array/multi-valued fields.------ http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#_sort_mode_option-data SortMode- = SortMin- | SortMax- | SortSum- | SortAvg- deriving (Eq, Show)--instance ToJSON SortMode where- toJSON SortMin = String "min"- toJSON SortMax = String "max"- toJSON SortSum = String "sum"- toJSON SortAvg = String "avg"---- | 'mkSort' defaults everything but the 'FieldName' and the 'SortOrder' so--- that you can concisely describe the usual kind of 'SortSpec's you want.-mkSort :: FieldName -> SortOrder -> DefaultSort-mkSort fieldName sOrder = DefaultSort fieldName sOrder Nothing Nothing Nothing Nothing---- | 'Sort' is a synonym for a list of 'SortSpec's. Sort behavior is order--- dependent with later sorts acting as tie-breakers for earlier sorts.-type Sort = [SortSpec]---- | 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.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#search-request-sort>-data SortSpec- = DefaultSortSpec DefaultSort- | GeoDistanceSortSpec SortOrder GeoPoint DistanceUnit- deriving (Eq, Show)--instance ToJSON SortSpec where- toJSON- ( DefaultSortSpec- ( DefaultSort- (FieldName dsSortFieldName)- dsSortOrder- dsIgnoreUnmapped- dsSortMode- dsMissingSort- dsNestedFilter- )- ) =- object [fromText dsSortFieldName .= omitNulls base]- where- base =- [ "order" .= dsSortOrder,- "unmapped_type" .= dsIgnoreUnmapped,- "mode" .= dsSortMode,- "missing" .= dsMissingSort,- "nested_filter" .= dsNestedFilter- ]- toJSON (GeoDistanceSortSpec gdsSortOrder (GeoPoint (FieldName field) gdsLatLon) units) =- object- [ "unit" .= units,- fromText field .= gdsLatLon,- "order" .= gdsSortOrder- ]---- | '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.------ The `ignoreUnmapped`, when `Just` field is used to set the elastic 'unmapped_type'------ <http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#search-request-sort>-data DefaultSort = DefaultSort- { sortFieldName :: FieldName,- sortOrder :: SortOrder,- -- default False- ignoreUnmapped :: Maybe Text,- sortMode :: Maybe SortMode,- missingSort :: Maybe Missing,- nestedFilter :: Maybe Filter- }- deriving (Eq, Show)---- | 'SortOrder' is 'Ascending' or 'Descending', as you might expect. These get--- encoded into "asc" or "desc" when turned into JSON.------ <http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#search-request-sort>-data SortOrder- = Ascending- | Descending- deriving (Eq, Show)--instance ToJSON SortOrder where- toJSON Ascending = String "asc"- toJSON Descending = String "desc"---- | '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.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#_missing_values>-data Missing- = LastMissing- | FirstMissing- | CustomMissing Text- deriving (Eq, Show)--instance ToJSON Missing where- toJSON LastMissing = String "_last"- toJSON FirstMissing = String "_first"- toJSON (CustomMissing txt) = String txt
− src/Database/Bloodhound/Internal/StringlyTyped.hs
@@ -1,49 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}--module Database.Bloodhound.Internal.StringlyTyped where--import Bloodhound.Import-import qualified Data.Text as T---- This whole module is a sin bucket to deal with Elasticsearch badness.-newtype StringlyTypedDouble = StringlyTypedDouble- {unStringlyTypedDouble :: Double}--instance FromJSON StringlyTypedDouble where- parseJSON =- fmap StringlyTypedDouble- . parseJSON- . unStringlyTypeJSON--newtype StringlyTypedInt = StringlyTypedInt- {unStringlyTypedInt :: Int}--instance FromJSON StringlyTypedInt where- parseJSON =- fmap StringlyTypedInt- . parseJSON- . unStringlyTypeJSON--newtype StringlyTypedBool = StringlyTypedBool {unStringlyTypedBool :: Bool}--instance FromJSON StringlyTypedBool where- parseJSON =- fmap StringlyTypedBool- . parseJSON- . unStringlyTypeJSON---- | For some reason in several settings APIs, all leaf values get returned--- as strings. This function attempts to recover from this for all--- non-recursive JSON types. If nothing can be done, the value is left alone.-unStringlyTypeJSON :: Value -> Value-unStringlyTypeJSON (String "true") =- Bool True-unStringlyTypeJSON (String "false") =- Bool False-unStringlyTypeJSON (String "null") =- Null-unStringlyTypeJSON v@(String t) =- case readMay (T.unpack t) of- Just n -> Number n- Nothing -> v-unStringlyTypeJSON v = v
− src/Database/Bloodhound/Internal/Suggest.hs
@@ -1,310 +0,0 @@-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}--module Database.Bloodhound.Internal.Suggest where--import Bloodhound.Import-import qualified Data.Aeson.KeyMap as X-import Database.Bloodhound.Internal.Newtypes-import Database.Bloodhound.Internal.Query (Query, TemplateQueryKeyValuePairs)-import GHC.Generics--data Suggest = Suggest- { suggestText :: Text,- suggestName :: Text,- suggestType :: SuggestType- }- deriving (Eq, Show, Generic)--instance ToJSON Suggest where- toJSON Suggest {..} =- object- [ "text" .= suggestText,- fromText suggestName .= suggestType- ]--instance FromJSON Suggest where- parseJSON (Object o) = do- suggestText' <- o .: "text"- let dropTextList =- X.toList $- X.filterWithKey (\x _ -> x /= "text") o- suggestName' <-- case dropTextList of- [(x, _)] -> return x- _ -> fail "error parsing Suggest field name"- suggestType' <- o .: suggestName'- return $ Suggest suggestText' (toText suggestName') suggestType'- parseJSON x = typeMismatch "Suggest" x--data SuggestType- = SuggestTypePhraseSuggester PhraseSuggester- deriving (Eq, Show, Generic)--instance ToJSON SuggestType where- toJSON (SuggestTypePhraseSuggester x) =- object ["phrase" .= x]--instance FromJSON SuggestType where- parseJSON = withObject "SuggestType" parse- where- parse o = phraseSuggester `taggedWith` "phrase"- where- taggedWith parser k = parser =<< o .: k- phraseSuggester = pure . SuggestTypePhraseSuggester--data PhraseSuggester = PhraseSuggester- { phraseSuggesterField :: FieldName,- phraseSuggesterGramSize :: Maybe Int,- phraseSuggesterRealWordErrorLikelihood :: Maybe Int,- phraseSuggesterConfidence :: Maybe Int,- phraseSuggesterMaxErrors :: Maybe Int,- phraseSuggesterSeparator :: Maybe Text,- phraseSuggesterSize :: Maybe Size,- phraseSuggesterAnalyzer :: Maybe Analyzer,- phraseSuggesterShardSize :: Maybe Int,- phraseSuggesterHighlight :: Maybe PhraseSuggesterHighlighter,- phraseSuggesterCollate :: Maybe PhraseSuggesterCollate,- phraseSuggesterCandidateGenerators :: [DirectGenerators]- }- deriving (Eq, Show, Generic)--instance ToJSON PhraseSuggester where- toJSON PhraseSuggester {..} =- omitNulls- [ "field" .= phraseSuggesterField,- "gram_size" .= phraseSuggesterGramSize,- "real_word_error_likelihood"- .= phraseSuggesterRealWordErrorLikelihood,- "confidence" .= phraseSuggesterConfidence,- "max_errors" .= phraseSuggesterMaxErrors,- "separator" .= phraseSuggesterSeparator,- "size" .= phraseSuggesterSize,- "analyzer" .= phraseSuggesterAnalyzer,- "shard_size" .= phraseSuggesterShardSize,- "highlight" .= phraseSuggesterHighlight,- "collate" .= phraseSuggesterCollate,- "direct_generator"- .= phraseSuggesterCandidateGenerators- ]--instance FromJSON PhraseSuggester where- parseJSON = withObject "PhraseSuggester" parse- where- parse o =- PhraseSuggester- <$> o .: "field"- <*> o .:? "gram_size"- <*> o .:? "real_word_error_likelihood"- <*> o .:? "confidence"- <*> o .:? "max_errors"- <*> o .:? "separator"- <*> o .:? "size"- <*> o .:? "analyzer"- <*> o .:? "shard_size"- <*> o .:? "highlight"- <*> o .:? "collate"- <*> o .:? "direct_generator" .!= []--mkPhraseSuggester :: FieldName -> PhraseSuggester-mkPhraseSuggester fName =- PhraseSuggester- fName- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing- []--data PhraseSuggesterHighlighter = PhraseSuggesterHighlighter- { phraseSuggesterHighlighterPreTag :: Text,- phraseSuggesterHighlighterPostTag :: Text- }- deriving (Eq, Show, Generic)--instance ToJSON PhraseSuggesterHighlighter where- toJSON PhraseSuggesterHighlighter {..} =- object- [ "pre_tag" .= phraseSuggesterHighlighterPreTag,- "post_tag" .= phraseSuggesterHighlighterPostTag- ]--instance FromJSON PhraseSuggesterHighlighter where- parseJSON = withObject "PhraseSuggesterHighlighter" parse- where- parse o =- PhraseSuggesterHighlighter- <$> o .: "pre_tag"- <*> o .: "post_tag"--data PhraseSuggesterCollate = PhraseSuggesterCollate- { phraseSuggesterCollateTemplateQuery :: Query,- phraseSuggesterCollateParams :: TemplateQueryKeyValuePairs,- phraseSuggesterCollatePrune :: Bool- }- deriving (Eq, Show, Generic)--instance ToJSON PhraseSuggesterCollate where- toJSON PhraseSuggesterCollate {..} =- object- [ "query"- .= object- [ "source" .= phraseSuggesterCollateTemplateQuery- ],- "params" .= phraseSuggesterCollateParams,- "prune" .= phraseSuggesterCollatePrune- ]--instance FromJSON PhraseSuggesterCollate where- parseJSON (Object o) = do- query' <- o .: "query"- inline' <- query' .: "source"- params' <- o .: "params"- prune' <- o .:? "prune" .!= False- return $ PhraseSuggesterCollate inline' params' prune'- parseJSON x = typeMismatch "PhraseSuggesterCollate" x--data SuggestOptions = SuggestOptions- { suggestOptionsText :: Text,- suggestOptionsScore :: Double,- suggestOptionsFreq :: Maybe Int,- suggestOptionsHighlighted :: Maybe Text- }- deriving (Eq, Read, Show)--instance FromJSON SuggestOptions where- parseJSON = withObject "SuggestOptions" parse- where- parse o =- SuggestOptions- <$> o .: "text"- <*> o .: "score"- <*> o .:? "freq"- <*> o .:? "highlighted"--data SuggestResponse = SuggestResponse- { suggestResponseText :: Text,- suggestResponseOffset :: Int,- suggestResponseLength :: Int,- suggestResponseOptions :: [SuggestOptions]- }- deriving (Eq, Read, Show)--instance FromJSON SuggestResponse where- parseJSON = withObject "SuggestResponse" parse- where- parse o =- SuggestResponse- <$> o .: "text"- <*> o .: "offset"- <*> o .: "length"- <*> o .: "options"--data NamedSuggestionResponse = NamedSuggestionResponse- { nsrName :: Text,- nsrResponses :: [SuggestResponse]- }- deriving (Eq, Read, Show)--instance FromJSON NamedSuggestionResponse where- parseJSON (Object o) = do- suggestionName' <- case X.toList o of- [(x, _)] -> return x- _ -> fail "error parsing NamedSuggestionResponse name"- suggestionResponses' <- o .: suggestionName'- return $ NamedSuggestionResponse (toText suggestionName') suggestionResponses'- parseJSON x = typeMismatch "NamedSuggestionResponse" x--data DirectGeneratorSuggestModeTypes- = DirectGeneratorSuggestModeMissing- | DirectGeneratorSuggestModePopular- | DirectGeneratorSuggestModeAlways- deriving (Eq, Show, Generic)--instance ToJSON DirectGeneratorSuggestModeTypes where- toJSON DirectGeneratorSuggestModeMissing = "missing"- toJSON DirectGeneratorSuggestModePopular = "popular"- toJSON DirectGeneratorSuggestModeAlways = "always"--instance FromJSON DirectGeneratorSuggestModeTypes where- parseJSON = withText "DirectGeneratorSuggestModeTypes" parse- where- parse "missing" =- pure DirectGeneratorSuggestModeMissing- parse "popular" =- pure DirectGeneratorSuggestModePopular- parse "always" =- pure DirectGeneratorSuggestModeAlways- parse f =- fail ("Unexpected DirectGeneratorSuggestModeTypes: " <> show f)--data DirectGenerators = DirectGenerators- { directGeneratorsField :: FieldName,- directGeneratorsSize :: Maybe Int,- directGeneratorSuggestMode :: DirectGeneratorSuggestModeTypes,- directGeneratorMaxEdits :: Maybe Double,- directGeneratorPrefixLength :: Maybe Int,- directGeneratorMinWordLength :: Maybe Int,- directGeneratorMaxInspections :: Maybe Int,- directGeneratorMinDocFreq :: Maybe Double,- directGeneratorMaxTermFreq :: Maybe Double,- directGeneratorPreFilter :: Maybe Text,- directGeneratorPostFilter :: Maybe Text- }- deriving (Eq, Show, Generic)--instance ToJSON DirectGenerators where- toJSON DirectGenerators {..} =- omitNulls- [ "field" .= directGeneratorsField,- "size" .= directGeneratorsSize,- "suggest_mode" .= directGeneratorSuggestMode,- "max_edits" .= directGeneratorMaxEdits,- "prefix_length" .= directGeneratorPrefixLength,- "min_word_length" .= directGeneratorMinWordLength,- "max_inspections" .= directGeneratorMaxInspections,- "min_doc_freq" .= directGeneratorMinDocFreq,- "max_term_freq" .= directGeneratorMaxTermFreq,- "pre_filter" .= directGeneratorPreFilter,- "post_filter" .= directGeneratorPostFilter- ]--instance FromJSON DirectGenerators where- parseJSON = withObject "DirectGenerators" parse- where- parse o =- DirectGenerators- <$> o .: "field"- <*> o .:? "size"- <*> o .: "suggest_mode"- <*> o .:? "max_edits"- <*> o .:? "prefix_length"- <*> o .:? "min_word_length"- <*> o .:? "max_inspections"- <*> o .:? "min_doc_freq"- <*> o .:? "max_term_freq"- <*> o .:? "pre_filter"- <*> o .:? "post_filter"--mkDirectGenerators :: FieldName -> DirectGenerators-mkDirectGenerators fn =- DirectGenerators- fn- Nothing- DirectGeneratorSuggestModeMissing- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing- Nothing
+ src/Database/Bloodhound/Internal/Utils/Imports.hs view
@@ -0,0 +1,122 @@+module Database.Bloodhound.Internal.Utils.Imports+ ( module X,+ LByteString,+ Method,+ omitNulls,+ parseNEJSON,+ parseReadText,+ readMay,+ showText,+ deleteSeveral,+ oPath,+ tshow,+ )+where++import Control.Applicative as X (Alternative (..), optional)+import Control.Exception as X (Exception)+import Control.Monad as X (MonadPlus (..), forM, (<=<))+import Control.Monad.Catch as X+ ( MonadCatch,+ MonadMask,+ MonadThrow,+ )+import Control.Monad.Except as X (MonadError)+import Control.Monad.Fix as X (MonadFix)+import Control.Monad.IO.Class as X (MonadIO (..))+import Control.Monad.Reader as X+ ( MonadReader (..),+ MonadTrans (..),+ ReaderT (..),+ )+import Control.Monad.State as X (MonadState)+import Control.Monad.Writer as X (MonadWriter)+import Data.Aeson as X+import Data.Aeson.Key as X+import qualified Data.Aeson.KeyMap as X+import Data.Aeson.Types as X+ ( Pair,+ Parser,+ emptyObject,+ parseEither,+ parseMaybe,+ typeMismatch,+ )+import Data.Bifunctor as X (first)+import qualified Data.ByteString.Lazy as BL+import Data.Char as X (isNumber)+import Data.Hashable as X (Hashable)+import Data.List as X (foldl', intercalate, nub)+import Data.List.NonEmpty as X (NonEmpty (..), toList)+import Data.Maybe as X+ ( catMaybes,+ fromMaybe,+ isNothing,+ maybeToList,+ )+import Data.Scientific as X (Scientific)+import Data.Semigroup as X (Semigroup (..))+import Data.Text as X (Text)+import qualified Data.Text as T+import Data.Time.Calendar as X (Day (..), showGregorian)+import Data.Time.Clock as X (NominalDiffTime, UTCTime)+import Data.Time.Clock.POSIX as X+import qualified Data.Traversable as DT+import qualified Data.Vector as V+import qualified Network.HTTP.Types.Method as NHTM+import Optics.Core as X+ ( Lens',+ lens,+ )++type LByteString = BL.ByteString++type Method = NHTM.Method++readMay :: (Read a) => String -> Maybe a+readMay s = case reads s of+ (a, "") : _ -> Just a+ _ -> Nothing++parseReadText :: (Read a) => Text -> Parser a+parseReadText = maybe mzero return . readMay . T.unpack++showText :: (Show a) => a -> Text+showText = T.pack . show++-- |+-- import qualified Data.Aeson.KeyMap as X+-- import qualified Data.Vector as V+-- import Data.Text+--+-- >>> omitNulls [ "test1" .= (toJSON ([] :: [Int])), "test2" .= (toJSON ("some value" :: Text)) ]+-- Object (X.fromList [("test2", String "some value")])+--+-- >>> omitNulls [ "test1" .= (toJSON ([1] :: [Int])), "test2" .= (toJSON ("some value" :: Text)) ]+-- Object ( X.fromList [ ("test1", Array (V.fromList [Number 1.0])), ("test2", String "some value") ] )+--+-- >>> omitNulls [ "test1" .= (toJSON Null), "test2" .= (toJSON ("some value" :: Text)) ]+-- Object (X.fromList [("test2", String "some value")])+--+-- >>> omitNulls [ "test1" .= (toJSON (1 :: Int)), "test2" .= (toJSON ("some value" :: Text)) ]+-- Object ( X.fromList [ ("test1", Number 1.0), ("test2", String "some value") ] )+omitNulls :: [(Key, Value)] -> Value+omitNulls = object . filter notNull+ where+ notNull (_, Null) = False+ notNull (_, Array a) = (not . V.null) a+ notNull _ = True++parseNEJSON :: (FromJSON a) => [Value] -> Parser (NonEmpty a)+parseNEJSON [] = fail "Expected non-empty list"+parseNEJSON (x : xs) = DT.mapM parseJSON (x :| xs)++deleteSeveral :: [Key] -> X.KeyMap v -> X.KeyMap v+deleteSeveral ks km = foldr X.delete km ks++oPath :: (ToJSON a) => NonEmpty Key -> a -> Value+oPath (k :| []) v = object [k .= v]+oPath (k :| (h : t)) v = object [k .= oPath (h :| t) v]++tshow :: (Show a) => a -> Text+tshow = T.pack . show
+ src/Database/Bloodhound/Internal/Utils/Requests.hs view
@@ -0,0 +1,46 @@+module Database.Bloodhound.Internal.Utils.Requests where++import Data.Aeson+import qualified Data.ByteString.Lazy.Char8 as L+import Database.Bloodhound.Internal.Client.BHRequest+import qualified Network.HTTP.Types.Method as NHTM+import Prelude hiding (filter, head)++delete ::+ (ParseBHResponse contextualized, FromJSON body) =>+ Endpoint ->+ BHRequest contextualized body+delete = mkSimpleRequest NHTM.methodDelete++deleteWithBody ::+ (ParseBHResponse contextualized, FromJSON body) =>+ Endpoint ->+ L.ByteString ->+ BHRequest contextualized body+deleteWithBody = mkFullRequest NHTM.methodDelete++get ::+ (ParseBHResponse contextualized, FromJSON body) =>+ Endpoint ->+ BHRequest contextualized body+get = mkSimpleRequest NHTM.methodGet++head' ::+ (ParseBHResponse contextualized, FromJSON body) =>+ Endpoint ->+ BHRequest contextualized body+head' = mkSimpleRequest NHTM.methodHead++put ::+ (ParseBHResponse contextualized, FromJSON body) =>+ Endpoint ->+ L.ByteString ->+ BHRequest contextualized body+put = mkFullRequest NHTM.methodPut++post ::+ (ParseBHResponse contextualized, FromJSON body) =>+ Endpoint ->+ L.ByteString ->+ BHRequest contextualized body+post = mkFullRequest NHTM.methodPost
+ src/Database/Bloodhound/Internal/Utils/StringlyTyped.hs view
@@ -0,0 +1,49 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.Internal.Utils.StringlyTyped where++import qualified Data.Text as T+import Database.Bloodhound.Internal.Utils.Imports++-- This whole module is a sin bucket to deal with Elasticsearch badness.+newtype StringlyTypedDouble = StringlyTypedDouble+ {unStringlyTypedDouble :: Double}++instance FromJSON StringlyTypedDouble where+ parseJSON =+ fmap StringlyTypedDouble+ . parseJSON+ . unStringlyTypeJSON++newtype StringlyTypedInt = StringlyTypedInt+ {unStringlyTypedInt :: Int}++instance FromJSON StringlyTypedInt where+ parseJSON =+ fmap StringlyTypedInt+ . parseJSON+ . unStringlyTypeJSON++newtype StringlyTypedBool = StringlyTypedBool {unStringlyTypedBool :: Bool}++instance FromJSON StringlyTypedBool where+ parseJSON =+ fmap StringlyTypedBool+ . parseJSON+ . unStringlyTypeJSON++-- | For some reason in several settings APIs, all leaf values get returned+-- as strings. This function attempts to recover from this for all+-- non-recursive JSON types. If nothing can be done, the value is left alone.+unStringlyTypeJSON :: Value -> Value+unStringlyTypeJSON (String "true") =+ Bool True+unStringlyTypeJSON (String "false") =+ Bool False+unStringlyTypeJSON (String "null") =+ Null+unStringlyTypeJSON v@(String t) =+ case readMay (T.unpack t) of+ Just n -> Number n+ Nothing -> v+unStringlyTypeJSON v = v
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Aggregation.hs view
@@ -0,0 +1,760 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Aggregation where++import qualified Data.Aeson as Aeson+import qualified Data.Aeson.KeyMap as X+import qualified Data.Map.Strict as M+import qualified Data.Text as T+import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Highlight (HitHighlight)+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.Internal.Versions.Common.Types.Query+import Database.Bloodhound.Internal.Versions.Common.Types.Sort+import Database.Bloodhound.Internal.Versions.Common.Types.Units++type Aggregations = M.Map Key Aggregation++emptyAggregations :: Aggregations+emptyAggregations = M.empty++mkAggregations :: Key -> Aggregation -> Aggregations+mkAggregations name aggregation = M.insert name aggregation emptyAggregations++data Aggregation+ = TermsAgg TermsAggregation+ | CardinalityAgg CardinalityAggregation+ | DateHistogramAgg DateHistogramAggregation+ | ValueCountAgg ValueCountAggregation+ | FilterAgg FilterAggregation+ | DateRangeAgg DateRangeAggregation+ | MissingAgg MissingAggregation+ | TopHitsAgg TopHitsAggregation+ | StatsAgg StatisticsAggregation+ | SumAgg SumAggregation+ deriving stock (Eq, Show)++instance ToJSON Aggregation where+ toJSON (TermsAgg (TermsAggregation term include exclude order minDocCount size shardSize collectMode executionHint termAggs)) =+ omitNulls+ [ "terms"+ .= omitNulls+ [ toJSON' term,+ "include" .= include,+ "exclude" .= exclude,+ "order" .= order,+ "min_doc_count" .= minDocCount,+ "size" .= size,+ "shard_size" .= shardSize,+ "collect_mode" .= collectMode,+ "execution_hint" .= executionHint+ ],+ "aggs" .= termAggs+ ]+ where+ toJSON' x = case x of Left y -> "field" .= y; Right y -> "script" .= y+ toJSON (CardinalityAgg (CardinalityAggregation field precisionThreshold)) =+ object+ [ "cardinality"+ .= omitNulls+ [ "field" .= field,+ "precisionThreshold" .= precisionThreshold+ ]+ ]+ toJSON+ ( DateHistogramAgg+ ( DateHistogramAggregation+ field+ interval+ format+ preZone+ postZone+ preOffset+ postOffset+ dateHistoAggs+ )+ ) =+ omitNulls+ [ "date_histogram"+ .= omitNulls+ [ "field" .= field,+ "interval" .= interval,+ "format" .= format,+ "pre_zone" .= preZone,+ "post_zone" .= postZone,+ "pre_offset" .= preOffset,+ "post_offset" .= postOffset+ ],+ "aggs" .= dateHistoAggs+ ]+ toJSON (ValueCountAgg a) = object ["value_count" .= v]+ where+ v = case a of+ (FieldValueCount (FieldName n)) ->+ object ["field" .= n]+ (ScriptValueCount s) ->+ object ["script" .= s]+ toJSON (FilterAgg (FilterAggregation filt ags)) =+ omitNulls+ [ "filter" .= filt,+ "aggs" .= ags+ ]+ toJSON (DateRangeAgg a) =+ object+ [ "date_range" .= a+ ]+ toJSON (MissingAgg (MissingAggregation {..})) =+ object ["missing" .= object ["field" .= maField]]+ toJSON (TopHitsAgg (TopHitsAggregation mfrom msize msort)) =+ omitNulls+ [ "top_hits"+ .= omitNulls+ [ "size" .= msize,+ "from" .= mfrom,+ "sort" .= msort+ ]+ ]+ toJSON (StatsAgg (StatisticsAggregation typ field)) =+ object [stType .= omitNulls ["field" .= field]]+ where+ stType+ | typ == Basic = "stats"+ | otherwise = "extended_stats"+ toJSON (SumAgg (SumAggregation (FieldName n))) =+ omitNulls ["sum" .= omitNulls ["field" .= n]]++data TopHitsAggregation = TopHitsAggregation+ { taFrom :: Maybe From,+ taSize :: Maybe Size,+ taSort :: Maybe Sort+ }+ deriving stock (Eq, Show)++taFromLens :: Lens' TopHitsAggregation (Maybe From)+taFromLens = lens taFrom (\x y -> x {taFrom = y})++taSizeLens :: Lens' TopHitsAggregation (Maybe Size)+taSizeLens = lens taSize (\x y -> x {taSize = y})++taSortLens :: Lens' TopHitsAggregation (Maybe Sort)+taSortLens = lens taSort (\x y -> x {taSort = y})++data MissingAggregation = MissingAggregation+ { maField :: Text+ }+ deriving stock (Eq, Show)++maFieldLens :: Lens' MissingAggregation Text+maFieldLens = lens maField (\x y -> x {maField = y})++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+ }+ deriving stock (Eq, Show)++termLens :: Lens' TermsAggregation (Either Text Text)+termLens = lens term (\x y -> x {term = y})++termIncludeLens :: Lens' TermsAggregation (Maybe TermInclusion)+termIncludeLens = lens termInclude (\x y -> x {termInclude = y})++termExcludeLens :: Lens' TermsAggregation (Maybe TermInclusion)+termExcludeLens = lens termExclude (\x y -> x {termExclude = y})++termOrderLens :: Lens' TermsAggregation (Maybe TermOrder)+termOrderLens = lens termOrder (\x y -> x {termOrder = y})++termMinDocCountLens :: Lens' TermsAggregation (Maybe Int)+termMinDocCountLens = lens termMinDocCount (\x y -> x {termMinDocCount = y})++termSizeLens :: Lens' TermsAggregation (Maybe Int)+termSizeLens = lens termSize (\x y -> x {termSize = y})++termShardSizeLens :: Lens' TermsAggregation (Maybe Int)+termShardSizeLens = lens termShardSize (\x y -> x {termShardSize = y})++termCollectModeLens :: Lens' TermsAggregation (Maybe CollectionMode)+termCollectModeLens = lens termCollectMode (\x y -> x {termCollectMode = y})++termExecutionHintLens :: Lens' TermsAggregation (Maybe ExecutionHint)+termExecutionHintLens = lens termExecutionHint (\x y -> x {termExecutionHint = y})++termAggsLens :: Lens' TermsAggregation (Maybe Aggregations)+termAggsLens = lens termAggs (\x y -> x {termAggs = y})++data CardinalityAggregation = CardinalityAggregation+ { cardinalityField :: FieldName,+ precisionThreshold :: Maybe Int+ }+ deriving stock (Eq, Show)++cardinalityFieldLens :: Lens' CardinalityAggregation FieldName+cardinalityFieldLens = lens cardinalityField (\x y -> x {cardinalityField = y})++precisionThresholdLens :: Lens' CardinalityAggregation (Maybe Int)+precisionThresholdLens = lens precisionThreshold (\x y -> x {precisionThreshold = y})++data DateHistogramAggregation = DateHistogramAggregation+ { dateField :: FieldName,+ dateInterval :: Interval,+ dateFormat :: Maybe Text,+ -- pre and post deprecated in 1.5+ datePreZone :: Maybe Text,+ datePostZone :: Maybe Text,+ datePreOffset :: Maybe Text,+ datePostOffset :: Maybe Text,+ dateAggs :: Maybe Aggregations+ }+ deriving stock (Eq, Show)++dateFieldLens :: Lens' DateHistogramAggregation FieldName+dateFieldLens = lens dateField (\x y -> x {dateField = y})++dateIntervalLens :: Lens' DateHistogramAggregation Interval+dateIntervalLens = lens dateInterval (\x y -> x {dateInterval = y})++dateFormatLens :: Lens' DateHistogramAggregation (Maybe Text)+dateFormatLens = lens dateFormat (\x y -> x {dateFormat = y})++datePreZoneLens :: Lens' DateHistogramAggregation (Maybe Text)+datePreZoneLens = lens datePreZone (\x y -> x {datePreZone = y})++datePostZoneLens :: Lens' DateHistogramAggregation (Maybe Text)+datePostZoneLens = lens datePostZone (\x y -> x {datePostZone = y})++datePreOffsetLens :: Lens' DateHistogramAggregation (Maybe Text)+datePreOffsetLens = lens datePreOffset (\x y -> x {datePreOffset = y})++datePostOffsetLens :: Lens' DateHistogramAggregation (Maybe Text)+datePostOffsetLens = lens datePostOffset (\x y -> x {datePostOffset = y})++dateAggsLens :: Lens' DateHistogramAggregation (Maybe Aggregations)+dateAggsLens = lens dateAggs (\x y -> x {dateAggs = y})++data DateRangeAggregation = DateRangeAggregation+ { draField :: FieldName,+ draFormat :: Maybe Text,+ draRanges :: NonEmpty DateRangeAggRange+ }+ deriving stock (Eq, Show)++instance ToJSON DateRangeAggregation where+ toJSON DateRangeAggregation {..} =+ omitNulls+ [ "field" .= draField,+ "format" .= draFormat,+ "ranges" .= toList draRanges+ ]++draFieldLens :: Lens' DateRangeAggregation FieldName+draFieldLens = lens draField (\x y -> x {draField = y})++draFormatLens :: Lens' DateRangeAggregation (Maybe Text)+draFormatLens = lens draFormat (\x y -> x {draFormat = y})++draRangesLens :: Lens' DateRangeAggregation (NonEmpty DateRangeAggRange)+draRangesLens = lens draRanges (\x y -> x {draRanges = y})++data DateRangeAggRange+ = DateRangeFrom DateMathExpr+ | DateRangeTo DateMathExpr+ | DateRangeFromAndTo DateMathExpr DateMathExpr+ deriving stock (Eq, Show)++instance ToJSON DateRangeAggRange where+ toJSON (DateRangeFrom e) = object ["from" .= e]+ toJSON (DateRangeTo e) = object ["to" .= e]+ toJSON (DateRangeFromAndTo f t) = object ["from" .= f, "to" .= t]++-- | See <https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-valuecount-aggregation.html> for more information.+data ValueCountAggregation+ = FieldValueCount FieldName+ | ScriptValueCount Script+ deriving stock (Eq, Show)++-- | 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.+data FilterAggregation = FilterAggregation+ { faFilter :: Filter,+ faAggs :: Maybe Aggregations+ }+ deriving stock (Eq, Show)++faFilterLens :: Lens' FilterAggregation Filter+faFilterLens = lens faFilter (\x y -> x {faFilter = y})++faAggsLens :: Lens' FilterAggregation (Maybe Aggregations)+faAggsLens = lens faAggs (\x y -> x {faAggs = y})++data StatisticsAggregation = StatisticsAggregation+ { statsType :: StatsType,+ statsField :: FieldName+ }+ deriving stock (Eq, Show)++statsTypeLens :: Lens' StatisticsAggregation StatsType+statsTypeLens = lens statsType (\x y -> x {statsType = y})++statsFieldLens :: Lens' StatisticsAggregation FieldName+statsFieldLens = lens statsField (\x y -> x {statsField = y})++data StatsType+ = Basic+ | Extended+ deriving stock (Eq, Show)++newtype SumAggregation = SumAggregation {sumAggregationField :: FieldName}+ deriving stock (Eq, Show)++mkTermsAggregation :: Text -> TermsAggregation+mkTermsAggregation t =+ TermsAggregation+ (Left t)+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing++mkTermsScriptAggregation :: Text -> TermsAggregation+mkTermsScriptAggregation t = TermsAggregation (Right t) Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing++mkDateHistogram :: FieldName -> Interval -> DateHistogramAggregation+mkDateHistogram t i = DateHistogramAggregation t i Nothing Nothing Nothing Nothing Nothing Nothing++mkCardinalityAggregation :: FieldName -> CardinalityAggregation+mkCardinalityAggregation t = CardinalityAggregation t Nothing++mkStatsAggregation :: FieldName -> StatisticsAggregation+mkStatsAggregation = StatisticsAggregation Basic++mkExtendedStatsAggregation :: FieldName -> StatisticsAggregation+mkExtendedStatsAggregation = StatisticsAggregation Extended++type AggregationResults = M.Map Key Value++class BucketAggregation a where+ key :: a -> BucketValue+ docCount :: a -> Int+ aggs :: a -> Maybe AggregationResults++data Bucket a = Bucket+ { buckets :: [a]+ }+ deriving (Read, Show)++instance (FromJSON a) => FromJSON (Bucket a) where+ parseJSON (Object v) =+ Bucket+ <$> v .: "buckets"+ parseJSON _ = mempty++bucketsLens :: Lens' (Bucket a) [a]+bucketsLens = lens buckets (\x y -> x {buckets = y})++data BucketValue+ = TextValue Text+ | ScientificValue Scientific+ | BoolValue Bool+ deriving (Read, Show)++instance FromJSON BucketValue where+ parseJSON (String t) = return $ TextValue t+ parseJSON (Number s) = return $ ScientificValue s+ parseJSON (Bool b) = return $ BoolValue b+ parseJSON _ = mempty++data TermInclusion+ = TermInclusion Text+ | TermPattern Text Text+ deriving stock (Eq, Show)++instance ToJSON TermInclusion where+ toJSON (TermInclusion x) = toJSON x+ toJSON (TermPattern pattern flags) =+ omitNulls+ [ "pattern" .= pattern,+ "flags" .= flags+ ]++data TermOrder = TermOrder+ { termSortField :: Text,+ termSortOrder :: SortOrder+ }+ deriving stock (Eq, Show)++instance ToJSON TermOrder where+ toJSON (TermOrder termSortField termSortOrder) =+ object [fromText termSortField .= termSortOrder]++termSortFieldLens :: Lens' TermOrder Text+termSortFieldLens = lens termSortField (\x y -> x {termSortField = y})++termSortOrderLens :: Lens' TermOrder SortOrder+termSortOrderLens = lens termSortOrder (\x y -> x {termSortOrder = y})++data CollectionMode+ = BreadthFirst+ | DepthFirst+ deriving stock (Eq, Show)++instance ToJSON CollectionMode where+ toJSON BreadthFirst = "breadth_first"+ toJSON DepthFirst = "depth_first"++data ExecutionHint+ = GlobalOrdinals+ | Map+ deriving stock (Eq, Show)++instance ToJSON ExecutionHint where+ toJSON GlobalOrdinals = "global_ordinals"+ toJSON Map = "map"++-- | See <https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#date-math> for more information.+data DateMathExpr+ = DateMathExpr DateMathAnchor [DateMathModifier]+ deriving stock (Eq, Show)++instance ToJSON DateMathExpr where+ toJSON (DateMathExpr a mods) = String (fmtA a <> mconcat (fmtMod <$> mods))+ where+ fmtA DMNow = "now"+ fmtA (DMDate date) = (T.pack $ showGregorian date) <> "||"+ fmtMod (AddTime n u) = "+" <> showText n <> fmtU u+ fmtMod (SubtractTime n u) = "-" <> showText n <> fmtU u+ fmtMod (RoundDownTo u) = "/" <> fmtU u+ fmtU DMYear = "y"+ fmtU DMMonth = "M"+ fmtU DMWeek = "w"+ fmtU DMDay = "d"+ fmtU DMHour = "h"+ fmtU DMMinute = "m"+ fmtU DMSecond = "s"++-- | Starting point for a date range. This along with the 'DateMathModifiers' gets you the date ES will start from.+data DateMathAnchor+ = DMNow+ | DMDate Day+ deriving stock (Eq, Show)++data DateMathModifier+ = AddTime Int DateMathUnit+ | SubtractTime Int DateMathUnit+ | RoundDownTo DateMathUnit+ deriving stock (Eq, Show)++data DateMathUnit+ = DMYear+ | DMMonth+ | DMWeek+ | DMDay+ | DMHour+ | DMMinute+ | DMSecond+ deriving stock (Eq, Show)++data TermsResult = TermsResult+ { termKey :: BucketValue,+ termsDocCount :: Int,+ termsAggs :: Maybe AggregationResults+ }+ deriving (Read, Show)++instance FromJSON TermsResult where+ parseJSON (Object v) =+ TermsResult+ <$> v .: "key"+ <*> v .: "doc_count"+ <*> (pure $ getNamedSubAgg v ["key", "doc_count"])+ parseJSON _ = mempty++instance BucketAggregation TermsResult where+ key = termKey+ docCount = termsDocCount+ aggs = termsAggs++termKeyLens :: Lens' TermsResult BucketValue+termKeyLens = lens termKey (\x y -> x {termKey = y})++termsDocCountLens :: Lens' TermsResult Int+termsDocCountLens = lens termsDocCount (\x y -> x {termsDocCount = y})++termsAggsLens :: Lens' TermsResult (Maybe AggregationResults)+termsAggsLens = lens termsAggs (\x y -> x {termsAggs = y})++data DateHistogramResult = DateHistogramResult+ { dateKey :: Int,+ dateKeyStr :: Maybe Text,+ dateDocCount :: Int,+ dateHistogramAggs :: Maybe AggregationResults+ }+ deriving (Show)++instance FromJSON DateHistogramResult where+ parseJSON (Object v) =+ DateHistogramResult+ <$> v .: "key"+ <*> v .:? "key_as_string"+ <*> v .: "doc_count"+ <*> ( pure $+ getNamedSubAgg+ v+ [ "key",+ "doc_count",+ "key_as_string"+ ]+ )+ parseJSON _ = mempty++instance BucketAggregation DateHistogramResult where+ key = TextValue . showText . dateKey+ docCount = dateDocCount+ aggs = dateHistogramAggs++dateKeyLens :: Lens' DateHistogramResult Int+dateKeyLens = lens dateKey (\x y -> x {dateKey = y})++dateKeyStrLens :: Lens' DateHistogramResult (Maybe Text)+dateKeyStrLens = lens dateKeyStr (\x y -> x {dateKeyStr = y})++dateDocCountLens :: Lens' DateHistogramResult Int+dateDocCountLens = lens dateDocCount (\x y -> x {dateDocCount = y})++dateHistogramAggsLens :: Lens' DateHistogramResult (Maybe AggregationResults)+dateHistogramAggsLens = lens dateHistogramAggs (\x y -> x {dateHistogramAggs = y})++data DateRangeResult = DateRangeResult+ { dateRangeKey :: Text,+ dateRangeFrom :: Maybe UTCTime,+ dateRangeFromAsString :: Maybe Text,+ dateRangeTo :: Maybe UTCTime,+ dateRangeToAsString :: Maybe Text,+ dateRangeDocCount :: Int,+ dateRangeAggs :: Maybe AggregationResults+ }+ deriving stock (Eq, Show)++instance FromJSON DateRangeResult where+ parseJSON = withObject "DateRangeResult" parse+ where+ parse v =+ DateRangeResult+ <$> v .: "key"+ <*> (fmap posixMS <$> v .:? "from")+ <*> v .:? "from_as_string"+ <*> (fmap posixMS <$> v .:? "to")+ <*> v .:? "to_as_string"+ <*> v .: "doc_count"+ <*> ( pure $+ getNamedSubAgg+ v+ [ "key",+ "from",+ "from_as_string",+ "to",+ "to_as_string",+ "doc_count"+ ]+ )++instance BucketAggregation DateRangeResult where+ key = TextValue . dateRangeKey+ docCount = dateRangeDocCount+ aggs = dateRangeAggs++dateRangeKeyLens :: Lens' DateRangeResult Text+dateRangeKeyLens = lens dateRangeKey (\x y -> x {dateRangeKey = y})++dateRangeFromLens :: Lens' DateRangeResult (Maybe UTCTime)+dateRangeFromLens = lens dateRangeFrom (\x y -> x {dateRangeFrom = y})++dateRangeFromAsStringLens :: Lens' DateRangeResult (Maybe Text)+dateRangeFromAsStringLens = lens dateRangeFromAsString (\x y -> x {dateRangeFromAsString = y})++dateRangeToLens :: Lens' DateRangeResult (Maybe UTCTime)+dateRangeToLens = lens dateRangeTo (\x y -> x {dateRangeTo = y})++dateRangeToAsStringLens :: Lens' DateRangeResult (Maybe Text)+dateRangeToAsStringLens = lens dateRangeToAsString (\x y -> x {dateRangeToAsString = y})++dateRangeDocCountLens :: Lens' DateRangeResult Int+dateRangeDocCountLens = lens dateRangeDocCount (\x y -> x {dateRangeDocCount = y})++dateRangeAggsLens :: Lens' DateRangeResult (Maybe AggregationResults)+dateRangeAggsLens = lens dateRangeAggs (\x y -> x {dateRangeAggs = y})++toTerms :: Key -> AggregationResults -> Maybe (Bucket TermsResult)+toTerms = toAggResult++toDateHistogram :: Key -> AggregationResults -> Maybe (Bucket DateHistogramResult)+toDateHistogram = toAggResult++toMissing :: Key -> AggregationResults -> Maybe MissingResult+toMissing = toAggResult++toTopHits :: (FromJSON a) => Key -> AggregationResults -> Maybe (TopHitResult a)+toTopHits = toAggResult++toAggResult :: (FromJSON a) => Key -> AggregationResults -> Maybe a+toAggResult t a = M.lookup t a >>= deserialize+ where+ deserialize = parseMaybe parseJSON++-- Try to get an AggregationResults when we don't know the+-- field name. We filter out the known keys to try to minimize the noise.+getNamedSubAgg :: Object -> [Key] -> Maybe AggregationResults+getNamedSubAgg o knownKeys = maggRes+ where+ unknownKeys = X.filterWithKey (\k _ -> k `notElem` knownKeys) o+ maggRes+ | X.null unknownKeys = Nothing+ | otherwise = Just . M.fromList $ X.toList unknownKeys++data MissingResult = MissingResult+ { missingDocCount :: Int+ }+ deriving (Show)++instance FromJSON MissingResult where+ parseJSON = withObject "MissingResult" parse+ where+ parse v = MissingResult <$> v .: "doc_count"++data TopHitResult a = TopHitResult+ { tarHits :: (SearchHits a)+ }+ deriving stock (Eq, Show)++instance (FromJSON a) => FromJSON (TopHitResult a) where+ parseJSON (Object v) =+ TopHitResult+ <$> v .: "hits"+ parseJSON _ = fail "Failure in FromJSON (TopHitResult a)"++data HitsTotalRelation = HTR_EQ | HTR_GTE deriving stock (Eq, Show)++instance FromJSON HitsTotalRelation where+ parseJSON (String "eq") = pure HTR_EQ+ parseJSON (String "gte") = pure HTR_GTE+ parseJSON _ = empty++data HitsTotal = HitsTotal+ { value :: Int,+ relation :: HitsTotalRelation+ }+ deriving stock (Eq, Show)++instance FromJSON HitsTotal where+ parseJSON (Object v) =+ HitsTotal+ <$> v .: "value"+ <*> v .: "relation"+ parseJSON _ = empty++instance Semigroup HitsTotal where+ (HitsTotal ta HTR_EQ) <> (HitsTotal tb HTR_EQ) = HitsTotal (ta + tb) HTR_EQ+ (HitsTotal ta HTR_GTE) <> (HitsTotal tb _) = HitsTotal (ta + tb) HTR_GTE+ (HitsTotal ta _) <> (HitsTotal tb HTR_GTE) = HitsTotal (ta + tb) HTR_GTE++hitsTotalValueLens :: Lens' HitsTotal Int+hitsTotalValueLens = lens value (\x y -> x {value = y})++hitsTotalRelationLens :: Lens' HitsTotal HitsTotalRelation+hitsTotalRelationLens = lens relation (\x y -> x {relation = y})++data SearchHits a = SearchHits+ { hitsTotal :: HitsTotal,+ maxScore :: Score,+ hits :: [Hit a]+ }+ deriving stock (Eq, Show)++instance (FromJSON a) => FromJSON (SearchHits a) where+ parseJSON (Object v) =+ SearchHits+ <$> v .: "total"+ <*> v .: "max_score"+ <*> v .: "hits"+ parseJSON _ = empty++instance Semigroup (SearchHits a) where+ (SearchHits ta ma ha) <> (SearchHits tb mb hb) =+ SearchHits (ta <> tb) (max ma mb) (ha <> hb)++instance Monoid (SearchHits a) where+ mempty = SearchHits (HitsTotal 0 HTR_EQ) Nothing mempty+ mappend = (<>)++searchHitsHitsTotalLens :: Lens' (SearchHits a) HitsTotal+searchHitsHitsTotalLens = lens hitsTotal (\x y -> x {hitsTotal = y})++searchHitsMaxScoreLens :: Lens' (SearchHits a) Score+searchHitsMaxScoreLens = lens maxScore (\x y -> x {maxScore = y})++searchHitsHitsLens :: Lens' (SearchHits a) [Hit a]+searchHitsHitsLens = lens hits (\x y -> x {hits = y})++type SearchAfterKey = [Aeson.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 (X.KeyMap (TopHitResult Value))+ }+ deriving stock (Eq, Show)++instance (FromJSON a) => FromJSON (Hit a) where+ parseJSON (Object v) =+ Hit+ <$> v .: "_index"+ <*> v .: "_id"+ <*> v .: "_score"+ <*> v .:? "_source"+ <*> v .:? "sort"+ <*> v .:? "fields"+ <*> v .:? "highlight"+ <*> v .:? "inner_hits"+ parseJSON _ = empty++hitIndexLens :: Lens' (Hit a) IndexName+hitIndexLens = lens hitIndex (\x y -> x {hitIndex = y})++hitDocIdLens :: Lens' (Hit a) DocId+hitDocIdLens = lens hitDocId (\x y -> x {hitDocId = y})++hitScoreLens :: Lens' (Hit a) Score+hitScoreLens = lens hitScore (\x y -> x {hitScore = y})++hitSourceLens :: Lens' (Hit a) (Maybe a)+hitSourceLens = lens hitSource (\x y -> x {hitSource = y})++hitSortLens :: Lens' (Hit a) (Maybe SearchAfterKey)+hitSortLens = lens hitSort (\x y -> x {hitSort = y})++hitFieldsLens :: Lens' (Hit a) (Maybe HitFields)+hitFieldsLens = lens hitFields (\x y -> x {hitFields = y})++hitHighlightLens :: Lens' (Hit a) (Maybe HitHighlight)+hitHighlightLens = lens hitHighlight (\x y -> x {hitHighlight = y})++hitInnerHitsLens :: Lens' (Hit a) (Maybe (X.KeyMap (TopHitResult Value)))+hitInnerHitsLens = lens hitInnerHits (\x y -> x {hitInnerHits = y})
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Analysis.hs view
@@ -0,0 +1,536 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Analysis where++import qualified Data.Map.Strict as M+import qualified Data.Text as T+import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Utils.StringlyTyped+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import GHC.Generics++data Analysis = Analysis+ { analysisAnalyzer :: M.Map Text AnalyzerDefinition,+ analysisTokenizer :: M.Map Text TokenizerDefinition,+ analysisTokenFilter :: M.Map Text TokenFilterDefinition,+ analysisCharFilter :: M.Map Text CharFilterDefinition+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON Analysis where+ toJSON (Analysis analyzer tokenizer tokenFilter charFilter) =+ object+ [ "analyzer" .= analyzer,+ "tokenizer" .= tokenizer,+ "filter" .= tokenFilter,+ "char_filter" .= charFilter+ ]++instance FromJSON Analysis where+ parseJSON = withObject "Analysis" $ \m ->+ Analysis+ <$> m+ .: "analyzer"+ <*> m+ .:? "tokenizer"+ .!= M.empty+ <*> m+ .:? "filter"+ .!= M.empty+ <*> m+ .:? "char_filter"+ .!= M.empty++analysisAnalyzerLens :: Lens' Analysis (M.Map Text AnalyzerDefinition)+analysisAnalyzerLens = lens analysisAnalyzer (\x y -> x {analysisAnalyzer = y})++analysisTokenizerLens :: Lens' Analysis (M.Map Text TokenizerDefinition)+analysisTokenizerLens = lens analysisTokenizer (\x y -> x {analysisTokenizer = y})++analysisTokenFilterLens :: Lens' Analysis (M.Map Text TokenFilterDefinition)+analysisTokenFilterLens = lens analysisTokenFilter (\x y -> x {analysisTokenFilter = y})++analysisCharFilterLens :: Lens' Analysis (M.Map Text CharFilterDefinition)+analysisCharFilterLens = lens analysisCharFilter (\x y -> x {analysisCharFilter = y})++newtype Tokenizer+ = Tokenizer Text+ deriving newtype (Eq, Show, ToJSON, FromJSON)++data AnalyzerDefinition = AnalyzerDefinition+ { analyzerDefinitionTokenizer :: Maybe Tokenizer,+ analyzerDefinitionFilter :: [TokenFilter],+ analyzerDefinitionCharFilter :: [CharFilter]+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON AnalyzerDefinition where+ toJSON (AnalyzerDefinition tokenizer tokenFilter charFilter) =+ object $+ catMaybes+ [ fmap ("tokenizer" .=) tokenizer,+ Just $ "filter" .= tokenFilter,+ Just $ "char_filter" .= charFilter+ ]++instance FromJSON AnalyzerDefinition where+ parseJSON = withObject "AnalyzerDefinition" $ \m ->+ AnalyzerDefinition+ <$> m .:? "tokenizer"+ <*> m .:? "filter" .!= []+ <*> m .:? "char_filter" .!= []++analyzerDefinitionTokenizerLens :: Lens' AnalyzerDefinition (Maybe Tokenizer)+analyzerDefinitionTokenizerLens = lens analyzerDefinitionTokenizer (\x y -> x {analyzerDefinitionTokenizer = y})++analyzerDefinitionFilterLens :: Lens' AnalyzerDefinition [TokenFilter]+analyzerDefinitionFilterLens = lens analyzerDefinitionFilter (\x y -> x {analyzerDefinitionFilter = y})++analyzerDefinitionCharFilterLens :: Lens' AnalyzerDefinition [CharFilter]+analyzerDefinitionCharFilterLens = lens analyzerDefinitionCharFilter (\x y -> x {analyzerDefinitionCharFilter = y})++-- | Character filters are used to preprocess the stream of characters+-- before it is passed to the tokenizer.+data CharFilterDefinition+ = CharFilterDefinitionMapping (M.Map Text Text)+ | CharFilterDefinitionPatternReplace+ { charFilterDefinitionPatternReplacePattern :: Text,+ charFilterDefinitionPatternReplaceReplacement :: Text,+ charFilterDefinitionPatternReplaceFlags :: Maybe Text+ }+ deriving stock (Eq, Show)++instance ToJSON CharFilterDefinition where+ toJSON (CharFilterDefinitionMapping ms) =+ object+ [ "type" .= ("mapping" :: Text),+ "mappings" .= [a <> " => " <> b | (a, b) <- M.toList ms]+ ]+ toJSON (CharFilterDefinitionPatternReplace pat repl flags) =+ object $+ [ "type" .= ("pattern_replace" :: Text),+ "pattern" .= pat,+ "replacement" .= repl+ ]+ ++ maybe [] (\f -> ["flags" .= f]) flags++instance FromJSON CharFilterDefinition where+ parseJSON = withObject "CharFilterDefinition" $ \m -> do+ t <- m .: "type"+ case (t :: Text) of+ "mapping" -> CharFilterDefinitionMapping . M.fromList <$> ms+ where+ ms = m .: "mappings" >>= mapM parseMapping+ parseMapping kv = case T.splitOn "=>" kv of+ (k : vs) -> pure (T.strip k, T.strip $ T.concat vs)+ _ -> fail "mapping is not of the format key => value"+ "pattern_replace" ->+ CharFilterDefinitionPatternReplace+ <$> m+ .: "pattern"+ <*> m+ .: "replacement"+ <*> m+ .:? "flags"+ _ -> fail ("unrecognized character filter type: " ++ T.unpack t)++data TokenizerDefinition+ = TokenizerDefinitionNgram Ngram+ | TokenizerDefinitionEdgeNgram Ngram+ deriving stock (Eq, Show, Generic)++instance ToJSON TokenizerDefinition where+ toJSON x =+ case x of+ TokenizerDefinitionNgram ngram ->+ object (["type" .= ("ngram" :: Text)] <> ngramToObject ngram)+ TokenizerDefinitionEdgeNgram ngram ->+ object (["type" .= ("edge_ngram" :: Text)] <> ngramToObject ngram)+ where+ ngramToObject (Ngram minGram maxGram tokenChars) =+ [ "min_gram" .= minGram,+ "max_gram" .= maxGram,+ "token_chars" .= tokenChars+ ]++instance FromJSON TokenizerDefinition where+ parseJSON = withObject "TokenizerDefinition" $ \m -> do+ typ <- m .: "type" :: Parser Text+ case typ of+ "ngram" ->+ TokenizerDefinitionNgram <$> parseNgram m+ "edge_ngram" ->+ TokenizerDefinitionEdgeNgram <$> parseNgram m+ _ -> fail $ "invalid TokenizerDefinition type: " <> T.unpack typ+ where+ parseNgram m =+ Ngram+ <$> fmap unStringlyTypedInt (m .: "min_gram")+ <*> fmap unStringlyTypedInt (m .: "max_gram")+ <*> m+ .: "token_chars"++data Ngram = Ngram+ { ngramMinGram :: Int,+ ngramMaxGram :: Int,+ ngramTokenChars :: [TokenChar]+ }+ deriving stock (Eq, Show, Generic)++data TokenChar+ = TokenLetter+ | TokenDigit+ | TokenWhitespace+ | TokenPunctuation+ | TokenSymbol+ deriving stock (Eq, Show, Generic)++instance ToJSON TokenChar where+ toJSON t = String $ case t of+ TokenLetter -> "letter"+ TokenDigit -> "digit"+ TokenWhitespace -> "whitespace"+ TokenPunctuation -> "punctuation"+ TokenSymbol -> "symbol"++instance FromJSON TokenChar where+ parseJSON = withText "TokenChar" $ \t -> case t of+ "letter" -> return TokenLetter+ "digit" -> return TokenDigit+ "whitespace" -> return TokenWhitespace+ "punctuation" -> return TokenPunctuation+ "symbol" -> return TokenSymbol+ _ -> fail "invalid TokenChar"++-- | Token filters are used to create custom analyzers.+data TokenFilterDefinition+ = TokenFilterDefinitionLowercase (Maybe Language)+ | TokenFilterDefinitionUppercase (Maybe Language)+ | TokenFilterDefinitionApostrophe+ | TokenFilterDefinitionReverse+ | TokenFilterDefinitionSnowball Language+ | TokenFilterDefinitionShingle Shingle+ | TokenFilterDefinitionStemmer Language+ | TokenFilterDefinitionStop (Either Language [StopWord])+ | TokenFilterDefinitionEdgeNgram NgramFilter (Maybe EdgeNgramFilterSide)+ | TokenFilterDefinitionNgram NgramFilter+ | TokenFilterTruncate Int+ deriving stock (Eq, Show, Generic)++instance ToJSON TokenFilterDefinition where+ toJSON x = case x of+ TokenFilterDefinitionLowercase mlang ->+ object $+ catMaybes+ [ Just $ "type" .= ("lowercase" :: Text),+ fmap (\lang -> "language" .= languageToText lang) mlang+ ]+ TokenFilterDefinitionUppercase mlang ->+ object $+ catMaybes+ [ Just $ "type" .= ("uppercase" :: Text),+ fmap (\lang -> "language" .= languageToText lang) mlang+ ]+ TokenFilterDefinitionApostrophe ->+ object+ [ "type" .= ("apostrophe" :: Text)+ ]+ TokenFilterDefinitionReverse ->+ object+ [ "type" .= ("reverse" :: Text)+ ]+ TokenFilterDefinitionSnowball lang ->+ object+ [ "type" .= ("snowball" :: Text),+ "language" .= languageToText lang+ ]+ TokenFilterDefinitionShingle s ->+ object+ [ "type" .= ("shingle" :: Text),+ "max_shingle_size" .= shingleMaxSize s,+ "min_shingle_size" .= shingleMinSize s,+ "output_unigrams" .= shingleOutputUnigrams s,+ "output_unigrams_if_no_shingles" .= shingleOutputUnigramsIfNoShingles s,+ "token_separator" .= shingleTokenSeparator s,+ "filler_token" .= shingleFillerToken s+ ]+ TokenFilterDefinitionStemmer lang ->+ object+ [ "type" .= ("stemmer" :: Text),+ "language" .= languageToText lang+ ]+ TokenFilterDefinitionStop stop ->+ object+ [ "type" .= ("stop" :: Text),+ "stopwords" .= case stop of+ Left lang -> String $ "_" <> languageToText lang <> "_"+ Right stops -> toJSON stops+ ]+ TokenFilterDefinitionEdgeNgram ngram side ->+ object+ ( [ "type" .= ("edge_ngram" :: Text),+ "side" .= side+ ]+ <> ngramFilterToPairs ngram+ )+ TokenFilterDefinitionNgram ngram ->+ object+ ( ["type" .= ("ngram" :: Text)]+ <> ngramFilterToPairs ngram+ )+ TokenFilterTruncate n ->+ object+ [ "type" .= ("truncate" :: Text),+ "length" .= n+ ]++instance FromJSON TokenFilterDefinition where+ parseJSON = withObject "TokenFilterDefinition" $ \m -> do+ t <- m .: "type"+ case (t :: Text) of+ "reverse" -> return TokenFilterDefinitionReverse+ "apostrophe" -> return TokenFilterDefinitionApostrophe+ "lowercase" ->+ TokenFilterDefinitionLowercase+ <$> m .:? "language"+ "uppercase" ->+ TokenFilterDefinitionUppercase+ <$> m .:? "language"+ "snowball" ->+ TokenFilterDefinitionSnowball+ <$> m+ .: "language"+ "shingle" ->+ fmap TokenFilterDefinitionShingle $+ Shingle+ <$> (fmap . fmap) unStringlyTypedInt (m .:? "max_shingle_size") .!= 2+ <*> (fmap . fmap) unStringlyTypedInt (m .:? "min_shingle_size") .!= 2+ <*> (fmap . fmap) unStringlyTypedBool (m .:? "output_unigrams") .!= True+ <*> (fmap . fmap) unStringlyTypedBool (m .:? "output_unigrams_if_no_shingles") .!= False+ <*> m .:? "token_separator" .!= " "+ <*> m .:? "filler_token" .!= "_"+ "stemmer" ->+ TokenFilterDefinitionStemmer+ <$> m+ .: "language"+ "stop" -> do+ stop <- m .: "stopwords"+ stop' <- case stop of+ String lang ->+ fmap Left+ . parseJSON+ . String+ . T.drop 1+ . T.dropEnd 1+ $ lang+ _ -> Right <$> parseJSON stop+ return (TokenFilterDefinitionStop stop')+ "edge_ngram" ->+ TokenFilterDefinitionEdgeNgram+ <$> ngramFilterFromJSONObject m+ <*> m+ .: "side"+ "ngram" -> TokenFilterDefinitionNgram <$> ngramFilterFromJSONObject m+ "truncate" -> TokenFilterTruncate <$> m .:? "length" .!= 10+ _ -> fail ("unrecognized token filter type: " ++ T.unpack t)++data NgramFilter = NgramFilter+ { ngramFilterMinGram :: Int,+ ngramFilterMaxGram :: Int+ }+ deriving stock (Eq, Show, Generic)++ngramFilterToPairs :: NgramFilter -> [Pair]+ngramFilterToPairs (NgramFilter minGram maxGram) =+ ["min_gram" .= minGram, "max_gram" .= maxGram]++ngramFilterFromJSONObject :: Object -> Parser NgramFilter+ngramFilterFromJSONObject o =+ NgramFilter+ <$> o+ .: "min_gram"+ .!= 1+ <*> o+ .: "max_gram"+ .!= 2++data EdgeNgramFilterSide+ = EdgeNgramFilterSideFront+ | EdgeNgramFilterSideBack+ deriving stock (Eq, Show, Generic)++instance ToJSON EdgeNgramFilterSide where+ toJSON EdgeNgramFilterSideFront = String "front"+ toJSON EdgeNgramFilterSideBack = String "back"++instance FromJSON EdgeNgramFilterSide where+ parseJSON = withText "EdgeNgramFilterSide" $ \t ->+ case t of+ "front" -> pure EdgeNgramFilterSideFront+ "back" -> pure EdgeNgramFilterSideBack+ _ -> fail $ "EdgeNgramFilterSide can only be 'front' or 'back', found: " <> T.unpack t++-- | The set of languages that can be passed to various analyzers,+-- filters, etc. in Elasticsearch. Most data types in this module+-- that have a 'Language' field are actually only actually to+-- handle a subset of these languages. Consult the official+-- Elasticsearch documentation to see what is actually supported.+data Language+ = Arabic+ | Armenian+ | Basque+ | Bengali+ | Brazilian+ | Bulgarian+ | Catalan+ | Cjk+ | Czech+ | Danish+ | Dutch+ | English+ | Finnish+ | French+ | Galician+ | German+ | German2+ | Greek+ | Hindi+ | Hungarian+ | Indonesian+ | Irish+ | Italian+ | Kp+ | Latvian+ | Lithuanian+ | Lovins+ | Norwegian+ | Persian+ | Porter+ | Portuguese+ | Romanian+ | Russian+ | Sorani+ | Spanish+ | Swedish+ | Thai+ | Turkish+ deriving stock (Eq, Show, Generic)++instance ToJSON Language where+ toJSON = String . languageToText++instance FromJSON Language where+ parseJSON = withText "Language" $ \t -> case languageFromText t of+ Nothing -> fail "not a supported Elasticsearch language"+ Just lang -> return lang++languageToText :: Language -> Text+languageToText x = case x of+ Arabic -> "arabic"+ Armenian -> "armenian"+ Basque -> "basque"+ Bengali -> "bengali"+ Brazilian -> "brazilian"+ Bulgarian -> "bulgarian"+ Catalan -> "catalan"+ Cjk -> "cjk"+ Czech -> "czech"+ Danish -> "danish"+ Dutch -> "dutch"+ English -> "english"+ Finnish -> "finnish"+ French -> "french"+ Galician -> "galician"+ German -> "german"+ German2 -> "german2"+ Greek -> "greek"+ Hindi -> "hindi"+ Hungarian -> "hungarian"+ Indonesian -> "indonesian"+ Irish -> "irish"+ Italian -> "italian"+ Kp -> "kp"+ Latvian -> "latvian"+ Lithuanian -> "lithuanian"+ Lovins -> "lovins"+ Norwegian -> "norwegian"+ Persian -> "persian"+ Porter -> "porter"+ Portuguese -> "portuguese"+ Romanian -> "romanian"+ Russian -> "russian"+ Sorani -> "sorani"+ Spanish -> "spanish"+ Swedish -> "swedish"+ Thai -> "thai"+ Turkish -> "turkish"++languageFromText :: Text -> Maybe Language+languageFromText x = case x of+ "arabic" -> Just Arabic+ "armenian" -> Just Armenian+ "basque" -> Just Basque+ "bengali" -> Just Bengali+ "brazilian" -> Just Brazilian+ "bulgarian" -> Just Bulgarian+ "catalan" -> Just Catalan+ "cjk" -> Just Cjk+ "czech" -> Just Czech+ "danish" -> Just Danish+ "dutch" -> Just Dutch+ "english" -> Just English+ "finnish" -> Just Finnish+ "french" -> Just French+ "galician" -> Just Galician+ "german" -> Just German+ "german2" -> Just German2+ "greek" -> Just Greek+ "hindi" -> Just Hindi+ "hungarian" -> Just Hungarian+ "indonesian" -> Just Indonesian+ "irish" -> Just Irish+ "italian" -> Just Italian+ "kp" -> Just Kp+ "latvian" -> Just Latvian+ "lithuanian" -> Just Lithuanian+ "lovins" -> Just Lovins+ "norwegian" -> Just Norwegian+ "persian" -> Just Persian+ "porter" -> Just Porter+ "portuguese" -> Just Portuguese+ "romanian" -> Just Romanian+ "russian" -> Just Russian+ "sorani" -> Just Sorani+ "spanish" -> Just Spanish+ "swedish" -> Just Swedish+ "thai" -> Just Thai+ "turkish" -> Just Turkish+ _ -> Nothing++data Shingle = Shingle+ { shingleMaxSize :: Int,+ shingleMinSize :: Int,+ shingleOutputUnigrams :: Bool,+ shingleOutputUnigramsIfNoShingles :: Bool,+ shingleTokenSeparator :: Text,+ shingleFillerToken :: Text+ }+ deriving stock (Eq, Show, Generic)++shingleMaxSizeLens :: Lens' Shingle Int+shingleMaxSizeLens = lens shingleMaxSize (\x y -> x {shingleMaxSize = y})++shingleMinSizeLens :: Lens' Shingle Int+shingleMinSizeLens = lens shingleMinSize (\x y -> x {shingleMinSize = y})++shingleOutputUnigramsLens :: Lens' Shingle Bool+shingleOutputUnigramsLens = lens shingleOutputUnigrams (\x y -> x {shingleOutputUnigrams = y})++shingleOutputUnigramsIfNoShinglesLens :: Lens' Shingle Bool+shingleOutputUnigramsIfNoShinglesLens = lens shingleOutputUnigramsIfNoShingles (\x y -> x {shingleOutputUnigramsIfNoShingles = y})++shingleTokenSeparatorLens :: Lens' Shingle Text+shingleTokenSeparatorLens = lens shingleTokenSeparator (\x y -> x {shingleTokenSeparator = y})++shingleFillerTokenLens :: Lens' Shingle Text+shingleFillerTokenLens = lens shingleFillerToken (\x y -> x {shingleFillerToken = y})
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Bulk.hs view
@@ -0,0 +1,186 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Bulk+ ( -- * Request+ BulkOperation (..),+ UpsertActionMetadata (..),+ UpsertPayload (..),+ buildUpsertActionMetadata,++ -- * Response+ BulkResponse (..),+ BulkActionItem (..),+ BulkItem (..),+ BulkAction (..),+ BulkError (..),++ -- * Optics+ bulkTookLens,+ bulkErrorsLens,+ bulkActionItemsLens,+ baiActionLens,+ baiItemLens,+ biIndexLens,+ biIdLens,+ biStatusLens,+ biErrorLens,+ beTypeLens,+ beReasonLens,+ )+where++import qualified Data.Aeson as A+import qualified Data.Aeson.Key as A+import qualified Data.Aeson.Types as A+import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.Internal.Versions.Common.Types.Query++data UpsertActionMetadata+ = UA_RetryOnConflict Int+ | UA_Version Int+ deriving stock (Eq, Show)++buildUpsertActionMetadata :: UpsertActionMetadata -> Pair+buildUpsertActionMetadata (UA_RetryOnConflict i) = "retry_on_conflict" .= i+buildUpsertActionMetadata (UA_Version i) = "_version" .= i++data UpsertPayload+ = UpsertDoc Value+ | UpsertScript Bool Script Value+ deriving stock (Eq, Show)++-- | '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.+-- Consult the <http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html#docs-bulk Bulk API documentation>+-- for further explanation.+-- Warning: Bulk operations suffixed with @Auto@ rely on Elasticsearch to+-- generate the id. Often, people use auto-generated identifiers when+-- Elasticsearch is the only place that their data is stored. Do not let+-- Elasticsearch be the only place your data is stored. It does not guarantee+-- durability, and it may silently discard data.+-- This <https://github.com/elastic/elasticsearch/issues/10708 issue> is+-- discussed further on github.+data BulkOperation+ = -- | Create the document, replacing it if it already exists.+ BulkIndex IndexName DocId Value+ | -- | Create a document with an autogenerated id.+ BulkIndexAuto IndexName Value+ | -- | Create a document with an autogenerated id. Use fast JSON encoding.+ BulkIndexEncodingAuto IndexName Encoding+ | -- | Create a document, failing if it already exists.+ BulkCreate IndexName DocId Value+ | -- | Create a document, failing if it already exists. Use fast JSON encoding.+ BulkCreateEncoding IndexName DocId Encoding+ | -- | Delete the document+ BulkDelete IndexName DocId+ | -- | Update the document, merging the new value with the existing one.+ BulkUpdate IndexName DocId Value+ | -- | Update the document if it already exists, otherwise insert it.+ BulkUpsert IndexName DocId UpsertPayload [UpsertActionMetadata]+ deriving stock (Eq, Show)++data BulkResponse = BulkResponse+ { bulkTook :: Int,+ bulkErrors :: Bool,+ bulkActionItems :: [BulkActionItem]+ }+ deriving stock (Eq, Show)++bulkTookLens :: Lens' BulkResponse Int+bulkTookLens = lens bulkTook (\x y -> x {bulkTook = y})++bulkErrorsLens :: Lens' BulkResponse Bool+bulkErrorsLens = lens bulkErrors (\x y -> x {bulkErrors = y})++bulkActionItemsLens :: Lens' BulkResponse [BulkActionItem]+bulkActionItemsLens = lens bulkActionItems (\x y -> x {bulkActionItems = y})++data BulkActionItem = BulkActionItem+ { baiAction :: BulkAction,+ baiItem :: BulkItem+ }+ deriving stock (Eq, Show)++baiActionLens :: Lens' BulkActionItem BulkAction+baiActionLens = lens baiAction (\x y -> x {baiAction = y})++baiItemLens :: Lens' BulkActionItem BulkItem+baiItemLens = lens baiItem (\x y -> x {baiItem = y})++data BulkItem = BulkItem+ { biIndex :: Text,+ biId :: Text,+ biStatus :: Maybe Int,+ biError :: Maybe BulkError+ }+ deriving stock (Eq, Show)++biIndexLens :: Lens' BulkItem Text+biIndexLens = lens biIndex (\x y -> x {biIndex = y})++biIdLens :: Lens' BulkItem Text+biIdLens = lens biId (\x y -> x {biId = y})++biStatusLens :: Lens' BulkItem (Maybe Int)+biStatusLens = lens biStatus (\x y -> x {biStatus = y})++biErrorLens :: Lens' BulkItem (Maybe BulkError)+biErrorLens = lens biError (\x y -> x {biError = y})++data BulkAction = Index | Create | Delete | Update+ deriving stock (Eq, Show)++data BulkError = BulkError+ { beType :: Text,+ beReason :: Text+ }+ deriving stock (Eq, Show)++beTypeLens :: Lens' BulkError Text+beTypeLens = lens beType (\x y -> x {beType = y})++beReasonLens :: Lens' BulkError Text+beReasonLens = lens beReason (\x y -> x {beReason = y})++instance FromJSON BulkResponse where+ parseJSON = withObject "BulkResponse" $ \o ->+ BulkResponse <$> o .: "took" <*> o .: "errors" <*> o .: "items"++instance FromJSON BulkActionItem where+ parseJSON j =+ parseItem Index j+ <|> parseItem Create j+ <|> parseItem Delete j+ <|> parseItem Update j+ where+ -- \| The object has a single key: value pair, where the key encodes+ -- the action.+ parseItem :: BulkAction -> A.Value -> A.Parser BulkActionItem+ parseItem action = withObject "BulkActionItem" $ \o -> do+ v <- o .: A.fromText actionText+ pure $! BulkActionItem {baiAction = action, baiItem = v}+ where+ actionText :: Text+ actionText = case action of+ Index -> "index"+ Create -> "create"+ Delete -> "delete"+ Update -> "update"++instance FromJSON BulkItem where+ parseJSON = withObject "BulkItem" $ \o ->+ BulkItem+ <$> o+ .: "_index"+ <*> o+ .: "_id"+ <*> o+ .:? "status" -- allegedly present but ES example shows a case where it is missing.. so..+ <*> o+ .:? "error"++instance FromJSON BulkError where+ parseJSON = withObject "BulkError" $+ \o -> BulkError <$> o .: "type" <*> o .: "reason"
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Count.hs view
@@ -0,0 +1,77 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Count+ ( CountQuery (..),+ CountResponse (..),+ CountShards (..),++ -- * Optics+ crCountLens,+ crShardsLens,+ csTotalLens,+ csSuccessfulLens,+ csFailedLens,+ )+where++import Data.Aeson+import Database.Bloodhound.Internal.Versions.Common.Types.Query+import Numeric.Natural+import Optics.Lens++newtype CountQuery = CountQuery {countQuery :: Query}+ deriving stock (Eq, Show)++instance ToJSON CountQuery where+ toJSON (CountQuery q) =+ object ["query" .= q]++data CountResponse = CountResponse+ { crCount :: Natural,+ crShards :: CountShards+ }+ deriving stock (Eq, Show)++instance FromJSON CountResponse where+ parseJSON =+ withObject "CountResponse" $+ \o ->+ CountResponse+ <$> o+ .: "count"+ <*> o+ .: "_shards"++crCountLens :: Lens' CountResponse Natural+crCountLens = lens crCount (\x y -> x {crCount = y})++crShardsLens :: Lens' CountResponse CountShards+crShardsLens = lens crShards (\x y -> x {crShards = y})++data CountShards = CountShards+ { csTotal :: Int,+ csSuccessful :: Int,+ csFailed :: Int+ }+ deriving stock (Eq, Show)++instance FromJSON CountShards where+ parseJSON =+ withObject "CountShards" $+ \o ->+ CountShards+ <$> o+ .: "total"+ <*> o+ .: "successful"+ <*> o+ .: "failed"++csTotalLens :: Lens' CountShards Int+csTotalLens = lens csTotal (\x y -> x {csTotal = y})++csSuccessfulLens :: Lens' CountShards Int+csSuccessfulLens = lens csSuccessful (\x y -> x {csSuccessful = y})++csFailedLens :: Lens' CountShards Int+csFailedLens = lens csFailed (\x y -> x {csFailed = y})
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Highlight.hs view
@@ -0,0 +1,182 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Highlight where++import qualified Data.Map.Strict as M+import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.Internal.Versions.Common.Types.Query++type HitHighlight = M.Map Text [Text]++data Highlights = Highlights+ { globalsettings :: Maybe HighlightSettings,+ highlightFields :: [FieldHighlight]+ }+ deriving stock (Eq, Show)++instance ToJSON Highlights where+ toJSON (Highlights global fields) =+ omitNulls+ ( ("fields" .= fields)+ : highlightSettingsPairs global+ )++data FieldHighlight+ = FieldHighlight FieldName (Maybe HighlightSettings)+ deriving stock (Eq, Show)++instance ToJSON FieldHighlight where+ toJSON (FieldHighlight (FieldName fName) (Just fSettings)) =+ object [fromText fName .= fSettings]+ toJSON (FieldHighlight (FieldName fName) Nothing) =+ object [fromText fName .= emptyObject]++data HighlightSettings+ = Plain PlainHighlight+ | Postings PostingsHighlight+ | FastVector FastVectorHighlight+ deriving stock (Eq, Show)++instance ToJSON HighlightSettings where+ toJSON hs = omitNulls (highlightSettingsPairs (Just hs))++data PlainHighlight = PlainHighlight+ { plainCommon :: Maybe CommonHighlight,+ plainNonPost :: Maybe NonPostings+ }+ deriving stock (Eq, Show)++-- This requires that index_options are set to 'offset' in the mapping.+data PostingsHighlight+ = PostingsHighlight (Maybe CommonHighlight)+ deriving stock (Eq, Show)++-- This requires that term_vector is set to 'with_positions_offsets' in the mapping.+data FastVectorHighlight = FastVectorHighlight+ { fvCommon :: Maybe CommonHighlight,+ fvNonPostSettings :: Maybe NonPostings,+ boundaryChars :: Maybe Text,+ boundaryMaxScan :: Maybe Int,+ fragmentOffset :: Maybe Int,+ matchedFields :: [Text],+ phraseLimit :: Maybe Int+ }+ deriving stock (Eq, Show)++data CommonHighlight = CommonHighlight+ { order :: Maybe Text,+ forceSource :: Maybe Bool,+ tag :: Maybe HighlightTag,+ encoder :: Maybe HighlightEncoder,+ noMatchSize :: Maybe Int,+ highlightQuery :: Maybe Query,+ requireFieldMatch :: Maybe Bool+ }+ deriving stock (Eq, Show)++-- Settings that are only applicable to FastVector and Plain highlighters.+data NonPostings = NonPostings+ { fragmentSize :: Maybe Int,+ numberOfFragments :: Maybe Int+ }+ deriving stock (Eq, Show)++data HighlightEncoder+ = DefaultEncoder+ | HTMLEncoder+ deriving stock (Eq, Show)++instance ToJSON HighlightEncoder where+ toJSON DefaultEncoder = String "default"+ toJSON HTMLEncoder = String "html"++-- NOTE: Should the tags use some kind of HTML type, rather than Text?+data HighlightTag+ = TagSchema Text+ | -- Only uses more than the first value in the lists if fvh+ CustomTags ([Text], [Text])+ deriving stock (Eq, Show)++highlightSettingsPairs :: Maybe HighlightSettings -> [Pair]+highlightSettingsPairs Nothing = []+highlightSettingsPairs (Just (Plain plh)) = plainHighPairs (Just plh)+highlightSettingsPairs (Just (Postings ph)) = postHighPairs (Just ph)+highlightSettingsPairs (Just (FastVector fvh)) = fastVectorHighPairs (Just fvh)++plainHighPairs :: Maybe PlainHighlight -> [Pair]+plainHighPairs Nothing = []+plainHighPairs (Just (PlainHighlight plCom plNonPost)) =+ ["type" .= String "plain"]+ ++ commonHighlightPairs plCom+ ++ nonPostingsToPairs plNonPost++postHighPairs :: Maybe PostingsHighlight -> [Pair]+postHighPairs Nothing = []+postHighPairs (Just (PostingsHighlight pCom)) =+ ("type" .= String "postings")+ : commonHighlightPairs pCom++fastVectorHighPairs :: Maybe FastVectorHighlight -> [Pair]+fastVectorHighPairs Nothing = []+fastVectorHighPairs+ ( Just+ ( FastVectorHighlight+ fvCom+ fvNonPostSettings'+ fvBoundChars+ fvBoundMaxScan+ fvFragOff+ fvMatchedFields+ fvPhraseLim+ )+ ) =+ [ "type" .= String "fvh",+ "boundary_chars" .= fvBoundChars,+ "boundary_max_scan" .= fvBoundMaxScan,+ "fragment_offset" .= fvFragOff,+ "matched_fields" .= fvMatchedFields,+ "phraseLimit" .= fvPhraseLim+ ]+ ++ commonHighlightPairs fvCom+ ++ nonPostingsToPairs fvNonPostSettings'++commonHighlightPairs :: Maybe CommonHighlight -> [Pair]+commonHighlightPairs Nothing = []+commonHighlightPairs+ ( Just+ ( CommonHighlight+ chScore+ chForceSource+ chTag+ chEncoder+ chNoMatchSize+ chHighlightQuery+ chRequireFieldMatch+ )+ ) =+ [ "order" .= chScore,+ "force_source" .= chForceSource,+ "encoder" .= chEncoder,+ "no_match_size" .= chNoMatchSize,+ "highlight_query" .= chHighlightQuery,+ "require_fieldMatch" .= chRequireFieldMatch+ ]+ ++ highlightTagToPairs chTag++nonPostingsToPairs :: Maybe NonPostings -> [Pair]+nonPostingsToPairs Nothing = []+nonPostingsToPairs (Just (NonPostings npFragSize npNumOfFrags)) =+ [ "fragment_size" .= npFragSize,+ "number_of_fragments" .= npNumOfFrags+ ]++highlightTagToPairs :: Maybe HighlightTag -> [Pair]+highlightTagToPairs (Just (TagSchema _)) =+ [ "scheme" .= String "default"+ ]+highlightTagToPairs (Just (CustomTags (pre, post))) =+ [ "pre_tags" .= pre,+ "post_tags" .= post+ ]+highlightTagToPairs Nothing = []
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Indices.hs view
@@ -0,0 +1,913 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Indices+ ( AliasRouting (..),+ AllocationPolicy (..),+ CompoundFormat (..),+ Compression (..),+ FSType (..),+ FieldDefinition (..),+ FieldType (..),+ ForceMergeIndexSettings (..),+ IndexAlias (..),+ IndexAliasAction (..),+ IndexAliasCreate (..),+ IndexAliasRouting (..),+ IndexAliasSummary (..),+ IndexAliasesSummary (..),+ IndexDocumentSettings (..),+ IndexMappingsLimits (..),+ IndexPattern (..),+ IndexSelection (..),+ IndexSettings (..),+ IndexSettingsSummary (..),+ IndexTemplate (..),+ JoinRelation (..),+ Mapping (..),+ MappingField (..),+ NominalDiffTimeJSON (..),+ OpenCloseIndex (..),+ ReplicaBounds (..),+ RoutingValue (..),+ SearchAliasRouting (..),+ Status (..),+ TemplateName (..),+ UpdatableIndexSetting (..),+ defaultForceMergeIndexSettings,+ defaultIndexDocumentSettings,+ defaultIndexMappingsLimits,+ defaultIndexSettings,++ -- * Optics+ nameLens,+ clusterNameLens,+ clusterUuidLens,+ versionLens,+ taglineLens,+ indexShardsLens,+ indexReplicasLens,+ indexMappingsLimitsLens,+ indexMappingsLimitDepthLens,+ indexMappingsLimitNestedFieldsLens,+ indexMappingsLimitNestedObjectsLens,+ indexMappingsLimitFieldNameLengthLens,+ maxNumSegmentsLens,+ onlyExpungeDeletesLens,+ flushAfterOptimizeLens,+ sSummaryIndexNameLens,+ sSummaryFixedSettingsLens,+ sSummaryUpdateableLens,+ fieldTypeLens,+ templatePatternsLens,+ templateSettingsLens,+ templateMappingsLens,+ mappingFieldNameLens,+ fieldDefinitionLens,+ mappingFieldsLens,+ srcIndexLens,+ indexAliasLens,+ aliasCreateRoutingLens,+ aliasCreateFilterLens,+ routingValueLens,+ indexAliasesSummaryLens,+ indexAliasSummaryAliasLens,+ indexAliasSummaryCreateLens,+ idsVersionControlLens,+ idsJoinRelationLens,+ )+where++import Control.Monad.Except+import qualified Data.Aeson.KeyMap as X+import qualified Data.HashMap.Strict as HM+import Data.Maybe (mapMaybe)+import qualified Data.Text as T+import qualified Data.Traversable as DT+import Database.Bloodhound.Internal.Client.Doc+import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Utils.StringlyTyped+import Database.Bloodhound.Internal.Versions.Common.Types.Analysis+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.Internal.Versions.Common.Types.Nodes+import Database.Bloodhound.Internal.Versions.Common.Types.Query+import Database.Bloodhound.Internal.Versions.Common.Types.Units+import GHC.Generics++-- | '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.elastic.co/guide/en/elasticsearch/reference/current/indices-status.html#indices-status>+data Status = Status+ { name :: Text,+ cluster_name :: Text,+ cluster_uuid :: Text,+ version :: Version,+ tagline :: Text+ }+ deriving stock (Eq, Show)++instance FromJSON Status where+ parseJSON (Object v) =+ Status+ <$> v+ .: "name"+ <*> v+ .: "cluster_name"+ <*> v+ .: "cluster_uuid"+ <*> v+ .: "version"+ <*> v+ .: "tagline"+ parseJSON _ = empty++nameLens :: Lens' Status Text+nameLens = lens name (\x y -> x {name = y})++clusterNameLens :: Lens' Status Text+clusterNameLens = lens cluster_name (\x y -> x {cluster_name = y})++clusterUuidLens :: Lens' Status Text+clusterUuidLens = lens cluster_uuid (\x y -> x {cluster_uuid = y})++versionLens :: Lens' Status Version+versionLens = lens version (\x y -> x {version = y})++taglineLens :: Lens' Status Text+taglineLens = lens tagline (\x y -> x {tagline = y})++-- | 'IndexSettings' is used to configure the shards and replicas when+-- you create an Elasticsearch Index.+--+-- <http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html>+data IndexSettings = IndexSettings+ { indexShards :: ShardCount,+ indexReplicas :: ReplicaCount,+ indexMappingsLimits :: IndexMappingsLimits+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON IndexSettings where+ toJSON (IndexSettings s r l) =+ object+ [ "settings"+ .= object+ [ "index"+ .= object ["number_of_shards" .= s, "number_of_replicas" .= r, "mapping" .= l]+ ]+ ]++instance FromJSON IndexSettings where+ parseJSON = withObject "IndexSettings" parse+ where+ parse o = do+ s <- o .: "settings"+ i <- s .: "index"+ IndexSettings+ <$> i+ .: "number_of_shards"+ <*> i+ .: "number_of_replicas"+ <*> i+ .:? "mapping"+ .!= defaultIndexMappingsLimits++indexShardsLens :: Lens' IndexSettings ShardCount+indexShardsLens = lens indexShards (\x y -> x {indexShards = y})++indexReplicasLens :: Lens' IndexSettings ReplicaCount+indexReplicasLens = lens indexReplicas (\x y -> x {indexReplicas = y})++indexMappingsLimitsLens :: Lens' IndexSettings IndexMappingsLimits+indexMappingsLimitsLens = lens indexMappingsLimits (\x y -> x {indexMappingsLimits = y})++-- | 'defaultIndexSettings' is an 'IndexSettings' with 3 shards and+-- 2 replicas.+defaultIndexSettings :: IndexSettings+defaultIndexSettings = IndexSettings (ShardCount 3) (ReplicaCount 2) defaultIndexMappingsLimits++-- defaultIndexSettings is exported by Database.Bloodhound as well+-- no trailing slashes in servers, library handles building the path.++-- | 'IndexMappingsLimits is used to configure index's limits.+-- <https://www.elastic.co/guide/en/elasticsearch/reference/master/mapping-settings-limit.html>+data IndexMappingsLimits = IndexMappingsLimits+ { indexMappingsLimitDepth :: Maybe Int,+ indexMappingsLimitNestedFields :: Maybe Int,+ indexMappingsLimitNestedObjects :: Maybe Int,+ indexMappingsLimitFieldNameLength :: Maybe Int+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON IndexMappingsLimits where+ toJSON (IndexMappingsLimits d f o n) =+ object $+ mapMaybe+ go+ [ ("depth.limit", d),+ ("nested_fields.limit", f),+ ("nested_objects.limit", o),+ ("field_name_length.limit", n)+ ]+ where+ go (name, value) = (name .=) <$> value++instance FromJSON IndexMappingsLimits where+ parseJSON = withObject "IndexMappingsLimits" $ \o ->+ IndexMappingsLimits+ <$> o .:?? "depth"+ <*> o .:?? "nested_fields"+ <*> o .:?? "nested_objects"+ <*> o .:?? "field_name_length"+ where+ o .:?? name = optional $ do+ f <- o .: name+ f .: "limit"++indexMappingsLimitDepthLens :: Lens' IndexMappingsLimits (Maybe Int)+indexMappingsLimitDepthLens = lens indexMappingsLimitDepth (\x y -> x {indexMappingsLimitDepth = y})++indexMappingsLimitNestedFieldsLens :: Lens' IndexMappingsLimits (Maybe Int)+indexMappingsLimitNestedFieldsLens = lens indexMappingsLimitNestedFields (\x y -> x {indexMappingsLimitNestedFields = y})++indexMappingsLimitNestedObjectsLens :: Lens' IndexMappingsLimits (Maybe Int)+indexMappingsLimitNestedObjectsLens = lens indexMappingsLimitNestedObjects (\x y -> x {indexMappingsLimitNestedObjects = y})++indexMappingsLimitFieldNameLengthLens :: Lens' IndexMappingsLimits (Maybe Int)+indexMappingsLimitFieldNameLengthLens = lens indexMappingsLimitFieldNameLength (\x y -> x {indexMappingsLimitFieldNameLength = y})++defaultIndexMappingsLimits :: IndexMappingsLimits+defaultIndexMappingsLimits = IndexMappingsLimits Nothing Nothing Nothing Nothing++-- | 'ForceMergeIndexSettings' is used to configure index optimization. See+-- <https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html>+-- for more info.+data ForceMergeIndexSettings = ForceMergeIndexSettings+ { -- | 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.+ maxNumSegments :: Maybe Int,+ -- | 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.+ onlyExpungeDeletes :: Bool,+ -- | Should a flush be performed after the optimize.+ flushAfterOptimize :: Bool+ }+ deriving stock (Eq, Show)++maxNumSegmentsLens :: Lens' ForceMergeIndexSettings (Maybe Int)+maxNumSegmentsLens = lens maxNumSegments (\x y -> x {maxNumSegments = y})++onlyExpungeDeletesLens :: Lens' ForceMergeIndexSettings Bool+onlyExpungeDeletesLens = lens onlyExpungeDeletes (\x y -> x {onlyExpungeDeletes = y})++flushAfterOptimizeLens :: Lens' ForceMergeIndexSettings Bool+flushAfterOptimizeLens = lens flushAfterOptimize (\x y -> x {flushAfterOptimize = y})++-- | 'defaultForceMergeIndexSettings' implements the default settings that+-- Elasticsearch uses for index optimization. 'maxNumSegments' is Nothing,+-- 'onlyExpungeDeletes' is False, and flushAfterOptimize is True.+defaultForceMergeIndexSettings :: ForceMergeIndexSettings+defaultForceMergeIndexSettings = ForceMergeIndexSettings Nothing False True++-- | 'UpdatableIndexSetting' are settings which may be updated after an index is created.+--+-- <https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html>+data UpdatableIndexSetting+ = -- | The number of replicas each shard has.+ NumberOfReplicas ReplicaCount+ | AutoExpandReplicas ReplicaBounds+ | -- | Set to True to have the index read only. False to allow writes and metadata changes.+ BlocksReadOnly Bool+ | -- | Set to True to disable read operations against the index.+ BlocksRead Bool+ | -- | Set to True to disable write operations against the index.+ BlocksWrite Bool+ | -- | Set to True to disable metadata operations against the index.+ BlocksMetaData Bool+ | -- | The async refresh interval of a shard+ RefreshInterval NominalDiffTime+ | IndexConcurrency Int+ | FailOnMergeFailure Bool+ | -- | When to flush on operations.+ TranslogFlushThresholdOps Int+ | -- | When to flush based on translog (bytes) size.+ TranslogFlushThresholdSize Bytes+ | -- | When to flush based on a period of not flushing.+ TranslogFlushThresholdPeriod NominalDiffTime+ | -- | Disables flushing. Note, should be set for a short interval and then enabled.+ TranslogDisableFlush Bool+ | -- | The maximum size of filter cache (per segment in shard).+ CacheFilterMaxSize (Maybe Bytes)+ | -- | The expire after access time for filter cache.+ CacheFilterExpire (Maybe NominalDiffTime)+ | -- | The gateway snapshot interval (only applies to shared gateways).+ GatewaySnapshotInterval NominalDiffTime+ | -- | A node matching any rule will be allowed to host shards from the index.+ RoutingAllocationInclude (NonEmpty NodeAttrFilter)+ | -- | A node matching any rule will NOT be allowed to host shards from the index.+ RoutingAllocationExclude (NonEmpty NodeAttrFilter)+ | -- | Only nodes matching all rules will be allowed to host shards from the index.+ RoutingAllocationRequire (NonEmpty NodeAttrFilter)+ | -- | Enables shard allocation for a specific index.+ RoutingAllocationEnable AllocationPolicy+ | -- | Controls the total number of shards (replicas and primaries) allowed to be allocated on a single node.+ RoutingAllocationShardsPerNode ShardCount+ | -- | When using local gateway a particular shard is recovered only if there can be allocated quorum shards in the cluster.+ RecoveryInitialShards InitialShardCount+ | GCDeletes NominalDiffTime+ | -- | Disables temporarily the purge of expired docs.+ TTLDisablePurge Bool+ | TranslogFSType FSType+ | CompressionSetting Compression+ | IndexCompoundFormat CompoundFormat+ | IndexCompoundOnFlush Bool+ | WarmerEnabled Bool+ | MappingTotalFieldsLimit Int+ | -- | Analysis is not a dynamic setting and can only be performed on a closed index.+ AnalysisSetting Analysis+ | -- | Sets a delay to the allocation of replica shards which become unassigned because a node has left, giving them chance to return. See <https://www.elastic.co/guide/en/elasticsearch/reference/5.6/delayed-allocation.html>+ UnassignedNodeLeftDelayedTimeout NominalDiffTime+ deriving stock (Eq, Show, Generic)++attrFilterJSON :: NonEmpty NodeAttrFilter -> Value+attrFilterJSON fs =+ object+ [ fromText n .= T.intercalate "," (toList vs)+ | NodeAttrFilter (NodeAttrName n) vs <- toList fs+ ]++parseAttrFilter :: Value -> Parser (NonEmpty NodeAttrFilter)+parseAttrFilter = withObject "NonEmpty NodeAttrFilter" parse+ where+ parse o = case X.toList o of+ [] -> fail "Expected non-empty list of NodeAttrFilters"+ x : xs -> DT.mapM (uncurry parse') (x :| xs)+ parse' n = withText "Text" $ \t ->+ case T.splitOn "," t of+ fv : fvs -> return (NodeAttrFilter (NodeAttrName $ toText n) (fv :| fvs))+ [] -> fail "Expected non-empty list of filter values"++instance ToJSON UpdatableIndexSetting where+ toJSON (NumberOfReplicas x) = oPath ("index" :| ["number_of_replicas"]) x+ toJSON (AutoExpandReplicas x) = oPath ("index" :| ["auto_expand_replicas"]) x+ toJSON (RefreshInterval x) = oPath ("index" :| ["refresh_interval"]) (NominalDiffTimeJSON x)+ toJSON (IndexConcurrency x) = oPath ("index" :| ["concurrency"]) x+ toJSON (FailOnMergeFailure x) = oPath ("index" :| ["fail_on_merge_failure"]) x+ toJSON (TranslogFlushThresholdOps x) = oPath ("index" :| ["translog", "flush_threshold_ops"]) x+ toJSON (TranslogFlushThresholdSize x) = oPath ("index" :| ["translog", "flush_threshold_size"]) x+ toJSON (TranslogFlushThresholdPeriod x) = oPath ("index" :| ["translog", "flush_threshold_period"]) (NominalDiffTimeJSON x)+ toJSON (TranslogDisableFlush x) = oPath ("index" :| ["translog", "disable_flush"]) x+ toJSON (CacheFilterMaxSize x) = oPath ("index" :| ["cache", "filter", "max_size"]) x+ toJSON (CacheFilterExpire x) = oPath ("index" :| ["cache", "filter", "expire"]) (NominalDiffTimeJSON <$> x)+ toJSON (GatewaySnapshotInterval x) = oPath ("index" :| ["gateway", "snapshot_interval"]) (NominalDiffTimeJSON x)+ toJSON (RoutingAllocationInclude fs) = oPath ("index" :| ["routing", "allocation", "include"]) (attrFilterJSON fs)+ toJSON (RoutingAllocationExclude fs) = oPath ("index" :| ["routing", "allocation", "exclude"]) (attrFilterJSON fs)+ toJSON (RoutingAllocationRequire fs) = oPath ("index" :| ["routing", "allocation", "require"]) (attrFilterJSON fs)+ toJSON (RoutingAllocationEnable x) = oPath ("index" :| ["routing", "allocation", "enable"]) x+ toJSON (RoutingAllocationShardsPerNode x) = oPath ("index" :| ["routing", "allocation", "total_shards_per_node"]) x+ toJSON (RecoveryInitialShards x) = oPath ("index" :| ["recovery", "initial_shards"]) x+ toJSON (GCDeletes x) = oPath ("index" :| ["gc_deletes"]) (NominalDiffTimeJSON x)+ toJSON (TTLDisablePurge x) = oPath ("index" :| ["ttl", "disable_purge"]) x+ toJSON (TranslogFSType x) = oPath ("index" :| ["translog", "fs", "type"]) x+ toJSON (CompressionSetting x) = oPath ("index" :| ["codec"]) x+ toJSON (IndexCompoundFormat x) = oPath ("index" :| ["compound_format"]) x+ toJSON (IndexCompoundOnFlush x) = oPath ("index" :| ["compound_on_flush"]) x+ toJSON (WarmerEnabled x) = oPath ("index" :| ["warmer", "enabled"]) x+ toJSON (BlocksReadOnly x) = oPath ("blocks" :| ["read_only"]) x+ toJSON (BlocksRead x) = oPath ("blocks" :| ["read"]) x+ toJSON (BlocksWrite x) = oPath ("blocks" :| ["write"]) x+ toJSON (BlocksMetaData x) = oPath ("blocks" :| ["metadata"]) x+ toJSON (MappingTotalFieldsLimit x) = oPath ("index" :| ["mapping", "total_fields", "limit"]) x+ toJSON (AnalysisSetting x) = oPath ("index" :| ["analysis"]) x+ toJSON (UnassignedNodeLeftDelayedTimeout x) = oPath ("index" :| ["unassigned", "node_left", "delayed_timeout"]) (NominalDiffTimeJSON x)++instance FromJSON UpdatableIndexSetting where+ parseJSON = withObject "UpdatableIndexSetting" parse+ where+ parse o =+ numberOfReplicas+ `taggedAt` ["index", "number_of_replicas"]+ <|> autoExpandReplicas+ `taggedAt` ["index", "auto_expand_replicas"]+ <|> refreshInterval+ `taggedAt` ["index", "refresh_interval"]+ <|> indexConcurrency+ `taggedAt` ["index", "concurrency"]+ <|> failOnMergeFailure+ `taggedAt` ["index", "fail_on_merge_failure"]+ <|> translogFlushThresholdOps+ `taggedAt` ["index", "translog", "flush_threshold_ops"]+ <|> translogFlushThresholdSize+ `taggedAt` ["index", "translog", "flush_threshold_size"]+ <|> translogFlushThresholdPeriod+ `taggedAt` ["index", "translog", "flush_threshold_period"]+ <|> translogDisableFlush+ `taggedAt` ["index", "translog", "disable_flush"]+ <|> cacheFilterMaxSize+ `taggedAt` ["index", "cache", "filter", "max_size"]+ <|> cacheFilterExpire+ `taggedAt` ["index", "cache", "filter", "expire"]+ <|> gatewaySnapshotInterval+ `taggedAt` ["index", "gateway", "snapshot_interval"]+ <|> routingAllocationInclude+ `taggedAt` ["index", "routing", "allocation", "include"]+ <|> routingAllocationExclude+ `taggedAt` ["index", "routing", "allocation", "exclude"]+ <|> routingAllocationRequire+ `taggedAt` ["index", "routing", "allocation", "require"]+ <|> routingAllocationEnable+ `taggedAt` ["index", "routing", "allocation", "enable"]+ <|> routingAllocationShardsPerNode+ `taggedAt` ["index", "routing", "allocation", "total_shards_per_node"]+ <|> recoveryInitialShards+ `taggedAt` ["index", "recovery", "initial_shards"]+ <|> gcDeletes+ `taggedAt` ["index", "gc_deletes"]+ <|> ttlDisablePurge+ `taggedAt` ["index", "ttl", "disable_purge"]+ <|> translogFSType+ `taggedAt` ["index", "translog", "fs", "type"]+ <|> compressionSetting+ `taggedAt` ["index", "codec"]+ <|> compoundFormat+ `taggedAt` ["index", "compound_format"]+ <|> compoundOnFlush+ `taggedAt` ["index", "compound_on_flush"]+ <|> warmerEnabled+ `taggedAt` ["index", "warmer", "enabled"]+ <|> blocksReadOnly+ `taggedAt` ["blocks", "read_only"]+ <|> blocksRead+ `taggedAt` ["blocks", "read"]+ <|> blocksWrite+ `taggedAt` ["blocks", "write"]+ <|> blocksMetaData+ `taggedAt` ["blocks", "metadata"]+ <|> mappingTotalFieldsLimit+ `taggedAt` ["index", "mapping", "total_fields", "limit"]+ <|> analysisSetting+ `taggedAt` ["index", "analysis"]+ <|> unassignedNodeLeftDelayedTimeout+ `taggedAt` ["index", "unassigned", "node_left", "delayed_timeout"]+ where+ taggedAt :: (FromJSON a) => (a -> Parser b) -> [Key] -> Parser b+ taggedAt f ks = taggedAt' f (Object o) ks+ taggedAt' f v [] =+ f =<< (parseJSON v <|> parseJSON (unStringlyTypeJSON v))+ taggedAt' f v (k : ks) =+ withObject+ "Object"+ ( \o -> do+ v' <- o .: k+ taggedAt' f v' ks+ )+ v+ numberOfReplicas = pure . NumberOfReplicas+ autoExpandReplicas = pure . AutoExpandReplicas+ refreshInterval = pure . RefreshInterval . ndtJSON+ indexConcurrency = pure . IndexConcurrency+ failOnMergeFailure = pure . FailOnMergeFailure+ translogFlushThresholdOps = pure . TranslogFlushThresholdOps+ translogFlushThresholdSize = pure . TranslogFlushThresholdSize+ translogFlushThresholdPeriod = pure . TranslogFlushThresholdPeriod . ndtJSON+ translogDisableFlush = pure . TranslogDisableFlush+ cacheFilterMaxSize = pure . CacheFilterMaxSize+ cacheFilterExpire = pure . CacheFilterExpire . fmap ndtJSON+ gatewaySnapshotInterval = pure . GatewaySnapshotInterval . ndtJSON+ routingAllocationInclude = fmap RoutingAllocationInclude . parseAttrFilter+ routingAllocationExclude = fmap RoutingAllocationExclude . parseAttrFilter+ routingAllocationRequire = fmap RoutingAllocationRequire . parseAttrFilter+ routingAllocationEnable = pure . RoutingAllocationEnable+ routingAllocationShardsPerNode = pure . RoutingAllocationShardsPerNode+ recoveryInitialShards = pure . RecoveryInitialShards+ gcDeletes = pure . GCDeletes . ndtJSON+ ttlDisablePurge = pure . TTLDisablePurge+ translogFSType = pure . TranslogFSType+ compressionSetting = pure . CompressionSetting+ compoundFormat = pure . IndexCompoundFormat+ compoundOnFlush = pure . IndexCompoundOnFlush+ warmerEnabled = pure . WarmerEnabled+ blocksReadOnly = pure . BlocksReadOnly+ blocksRead = pure . BlocksRead+ blocksWrite = pure . BlocksWrite+ blocksMetaData = pure . BlocksMetaData+ mappingTotalFieldsLimit = pure . MappingTotalFieldsLimit+ analysisSetting = pure . AnalysisSetting+ unassignedNodeLeftDelayedTimeout = pure . UnassignedNodeLeftDelayedTimeout . ndtJSON++data ReplicaBounds+ = ReplicasBounded Int Int+ | ReplicasLowerBounded Int+ | ReplicasUnbounded+ deriving stock (Eq, Show)++instance ToJSON ReplicaBounds where+ toJSON (ReplicasBounded a b) = String (showText a <> "-" <> showText b)+ toJSON (ReplicasLowerBounded a) = String (showText a <> "-all")+ toJSON ReplicasUnbounded = Bool False++instance FromJSON ReplicaBounds where+ parseJSON v =+ withText "ReplicaBounds" parseText v+ <|> withBool "ReplicaBounds" parseBool v+ where+ parseText t = case T.splitOn "-" t of+ [a, "all"] -> ReplicasLowerBounded <$> parseReadText a+ [a, b] ->+ ReplicasBounded+ <$> parseReadText a+ <*> parseReadText b+ _ -> fail ("Could not parse ReplicaBounds: " <> show t)+ parseBool False = pure ReplicasUnbounded+ parseBool _ = fail "ReplicasUnbounded cannot be represented with True"++data Compression+ = -- | Compress with LZ4+ CompressionDefault+ | -- | Compress with DEFLATE. Elastic+ -- <https://www.elastic.co/blog/elasticsearch-storage-the-true-story-2.0 blogs>+ -- that this can reduce disk use by 15%-25%.+ CompressionBest+ deriving stock (Eq, Show, Generic)++instance ToJSON Compression where+ toJSON x = case x of+ CompressionDefault -> toJSON ("default" :: Text)+ CompressionBest -> toJSON ("best_compression" :: Text)++instance FromJSON Compression where+ parseJSON = withText "Compression" $ \t -> case t of+ "default" -> return CompressionDefault+ "best_compression" -> return CompressionBest+ _ -> fail "invalid compression codec"++data FSType+ = FSSimple+ | FSBuffered+ deriving stock (Eq, Show, Generic)++instance ToJSON FSType where+ toJSON FSSimple = "simple"+ toJSON FSBuffered = "buffered"++instance FromJSON FSType where+ parseJSON = withText "FSType" parse+ where+ parse "simple" = pure FSSimple+ parse "buffered" = pure FSBuffered+ parse t = fail ("Invalid FSType: " <> show t)++data CompoundFormat+ = CompoundFileFormat Bool+ | -- | percentage between 0 and 1 where 0 is false, 1 is true+ MergeSegmentVsTotalIndex Double+ deriving stock (Eq, Show, Generic)++instance ToJSON CompoundFormat where+ toJSON (CompoundFileFormat x) = Bool x+ toJSON (MergeSegmentVsTotalIndex x) = toJSON x++instance FromJSON CompoundFormat where+ parseJSON v =+ CompoundFileFormat <$> parseJSON v+ <|> MergeSegmentVsTotalIndex <$> parseJSON v++newtype NominalDiffTimeJSON = NominalDiffTimeJSON {ndtJSON :: NominalDiffTime}++instance ToJSON NominalDiffTimeJSON where+ toJSON (NominalDiffTimeJSON t) = String (showText (round t :: Integer) <> "s")++instance FromJSON NominalDiffTimeJSON where+ parseJSON = withText "NominalDiffTime" parse+ where+ parse t = case T.takeEnd 1 t of+ "s" -> NominalDiffTimeJSON . fromInteger <$> parseReadText (T.dropEnd 1 t)+ _ -> fail "Invalid or missing NominalDiffTime unit (expected s)"++data IndexSettingsSummary = IndexSettingsSummary+ { sSummaryIndexName :: IndexName,+ sSummaryFixedSettings :: IndexSettings,+ sSummaryUpdateable :: [UpdatableIndexSetting]+ }+ deriving stock (Eq, Show)++sSummaryIndexNameLens :: Lens' IndexSettingsSummary IndexName+sSummaryIndexNameLens = lens sSummaryIndexName (\x y -> x {sSummaryIndexName = y})++sSummaryFixedSettingsLens :: Lens' IndexSettingsSummary IndexSettings+sSummaryFixedSettingsLens = lens sSummaryFixedSettings (\x y -> x {sSummaryFixedSettings = y})++sSummaryUpdateableLens :: Lens' IndexSettingsSummary [UpdatableIndexSetting]+sSummaryUpdateableLens = lens sSummaryUpdateable (\x y -> x {sSummaryUpdateable = y})++parseSettings :: Object -> Parser [UpdatableIndexSetting]+parseSettings o = do+ o' <- o .: "index"+ -- slice the index object into singleton hashmaps and try to parse each+ parses <- forM (HM.toList o') $ \(k, v) -> do+ -- blocks are now nested into the "index" key, which is not how they're serialized+ let atRoot = Object (X.singleton k v)+ let atIndex = Object (X.singleton "index" atRoot)+ optional (parseJSON atRoot <|> parseJSON atIndex)+ return (catMaybes parses)++instance FromJSON IndexSettingsSummary where+ parseJSON = withObject "IndexSettingsSummary" parse+ where+ parse o = case X.toList o of+ [(ixn, v@(Object o'))] ->+ IndexSettingsSummary+ <$> parseJSON (toJSON ixn)+ <*> parseJSON v+ <*> (fmap (filter (not . redundant)) . parseSettings =<< o' .: "settings")+ _ -> fail "Expected single-key object with index name"+ redundant (NumberOfReplicas _) = True+ redundant _ = False++-- | 'OpenCloseIndex' is a sum type for opening and closing indices.+--+-- <http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html>+data OpenCloseIndex = OpenIndex | CloseIndex deriving stock (Eq, Show)++data FieldType+ = GeoPointType+ | GeoShapeType+ | FloatType+ | IntegerType+ | LongType+ | ShortType+ | ByteType+ deriving stock (Eq, Show)++newtype FieldDefinition = FieldDefinition+ { fieldType :: FieldType+ }+ deriving stock (Eq, Show)++fieldTypeLens :: Lens' FieldDefinition FieldType+fieldTypeLens = lens fieldType (\x y -> x {fieldType = y})++-- | An 'IndexTemplate' defines a template that will automatically be+-- applied to new indices created. The templates include both+-- 'IndexSettings' and mappings, and a simple 'IndexPattern' that+-- controls if the template will be applied to the index created.+-- Specify mappings as follows: @[toJSON TweetMapping, ...]@+--+-- https://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-templates.html+data IndexTemplate = IndexTemplate+ { templatePatterns :: [IndexPattern],+ templateSettings :: Maybe IndexSettings,+ templateMappings :: Value+ }++instance ToJSON IndexTemplate where+ toJSON (IndexTemplate p s m) =+ merge+ ( object+ [ "index_patterns" .= p,+ "mappings" .= m+ ]+ )+ (toJSON s)+ where+ merge (Object o1) (Object o2) = toJSON $ X.union o1 o2+ merge o Null = o+ merge _ _ = undefined++templatePatternsLens :: Lens' IndexTemplate [IndexPattern]+templatePatternsLens = lens templatePatterns (\x y -> x {templatePatterns = y})++templateSettingsLens :: Lens' IndexTemplate (Maybe IndexSettings)+templateSettingsLens = lens templateSettings (\x y -> x {templateSettings = y})++templateMappingsLens :: Lens' IndexTemplate Value+templateMappingsLens = lens templateMappings (\x y -> x {templateMappings = y})++data MappingField = MappingField+ { mappingFieldName :: FieldName,+ fieldDefinition :: FieldDefinition+ }+ deriving stock (Eq, Show)++mappingFieldNameLens :: Lens' MappingField FieldName+mappingFieldNameLens = lens mappingFieldName (\x y -> x {mappingFieldName = y})++fieldDefinitionLens :: Lens' MappingField FieldDefinition+fieldDefinitionLens = lens fieldDefinition (\x y -> x {fieldDefinition = y})++-- | Support for type reification of 'Mapping's is currently incomplete, for+-- now the mapping API verbiage expects a 'ToJSON'able blob.+--+-- Indexes have mappings, mappings are schemas for the documents contained+-- in the index. I'd recommend having only one mapping per index, always+-- having a mapping, and keeping different kinds of documents separated+-- if possible.+newtype Mapping = Mapping {mappingFields :: [MappingField]}+ deriving stock (Eq, Show)++mappingFieldsLens :: Lens' Mapping [MappingField]+mappingFieldsLens = lens mappingFields (\x y -> x {mappingFields = y})++data AllocationPolicy+ = -- | Allows shard allocation for all shards.+ AllocAll+ | -- | Allows shard allocation only for primary shards.+ AllocPrimaries+ | -- | Allows shard allocation only for primary shards for new indices.+ AllocNewPrimaries+ | -- | No shard allocation is allowed+ AllocNone+ deriving stock (Eq, Show, Generic)++instance ToJSON AllocationPolicy where+ toJSON AllocAll = String "all"+ toJSON AllocPrimaries = String "primaries"+ toJSON AllocNewPrimaries = String "new_primaries"+ toJSON AllocNone = String "none"++instance FromJSON AllocationPolicy where+ parseJSON = withText "AllocationPolicy" parse+ where+ parse "all" = pure AllocAll+ parse "primaries" = pure AllocPrimaries+ parse "new_primaries" = pure AllocNewPrimaries+ parse "none" = pure AllocNone+ parse t = fail ("Invlaid AllocationPolicy: " <> show t)++data IndexAlias = IndexAlias+ { srcIndex :: IndexName,+ indexAlias :: IndexAliasName+ }+ deriving stock (Eq, Show)++srcIndexLens :: Lens' IndexAlias IndexName+srcIndexLens = lens srcIndex (\x y -> x {srcIndex = y})++indexAliasLens :: Lens' IndexAlias IndexAliasName+indexAliasLens = lens indexAlias (\x y -> x {indexAlias = y})++data IndexAliasAction+ = AddAlias IndexAlias IndexAliasCreate+ | RemoveAlias IndexAlias+ deriving stock (Eq, Show)++data IndexAliasCreate = IndexAliasCreate+ { aliasCreateRouting :: Maybe AliasRouting,+ aliasCreateFilter :: Maybe Filter+ }+ deriving stock (Eq, Show)++aliasCreateRoutingLens :: Lens' IndexAliasCreate (Maybe AliasRouting)+aliasCreateRoutingLens = lens aliasCreateRouting (\x y -> x {aliasCreateRouting = y})++aliasCreateFilterLens :: Lens' IndexAliasCreate (Maybe Filter)+aliasCreateFilterLens = lens aliasCreateFilter (\x y -> x {aliasCreateFilter = y})++data AliasRouting+ = AllAliasRouting RoutingValue+ | GranularAliasRouting (Maybe SearchAliasRouting) (Maybe IndexAliasRouting)+ deriving stock (Eq, Show)++newtype SearchAliasRouting+ = SearchAliasRouting (NonEmpty RoutingValue)+ deriving stock (Eq, Show, Generic)++instance ToJSON SearchAliasRouting where+ toJSON (SearchAliasRouting rvs) = toJSON (T.intercalate "," (routingValue <$> toList rvs))++instance FromJSON SearchAliasRouting where+ parseJSON = withText "SearchAliasRouting" parse+ where+ parse t = SearchAliasRouting <$> parseNEJSON (String <$> T.splitOn "," t)++newtype IndexAliasRouting+ = IndexAliasRouting RoutingValue+ deriving newtype (Eq, Show, ToJSON, FromJSON)++newtype RoutingValue = RoutingValue {routingValue :: Text}+ deriving newtype (Eq, Show, ToJSON, FromJSON)++routingValueLens :: Lens' RoutingValue Text+routingValueLens = lens routingValue (\x y -> x {routingValue = y})++newtype IndexAliasesSummary = IndexAliasesSummary {indexAliasesSummary :: [IndexAliasSummary]}+ deriving stock (Eq, Show)++instance FromJSON IndexAliasesSummary where+ parseJSON = withObject "IndexAliasesSummary" parse+ where+ parse o = IndexAliasesSummary . mconcat <$> mapM (uncurry go) (X.toList o)+ go ixn = withObject "index aliases" $ \ia -> do+ indexName <- parseJSON $ toJSON ixn+ aliases <- ia .:? "aliases" .!= mempty+ forM (HM.toList aliases) $ \(aName, v) -> do+ let indexAlias = IndexAlias indexName (IndexAliasName aName)+ IndexAliasSummary indexAlias <$> parseJSON v++indexAliasesSummaryLens :: Lens' IndexAliasesSummary [IndexAliasSummary]+indexAliasesSummaryLens = lens indexAliasesSummary (\x y -> x {indexAliasesSummary = y})++instance ToJSON IndexAliasAction where+ toJSON (AddAlias ia opts) = object ["add" .= (jsonObject ia <> jsonObject opts)]+ toJSON (RemoveAlias ia) = object ["remove" .= jsonObject ia]++instance ToJSON IndexAlias where+ toJSON IndexAlias {..} =+ object+ [ "index" .= srcIndex,+ "alias" .= indexAlias+ ]++instance ToJSON IndexAliasCreate where+ toJSON IndexAliasCreate {..} = Object (filterObj <> routingObj)+ where+ filterObj = maybe mempty (X.singleton "filter" . toJSON) aliasCreateFilter+ routingObj = jsonObject $ maybe (Object mempty) toJSON aliasCreateRouting++instance ToJSON AliasRouting where+ toJSON (AllAliasRouting v) = object ["routing" .= v]+ toJSON (GranularAliasRouting srch idx) = object (catMaybes prs)+ where+ prs =+ [ ("search_routing" .=) <$> srch,+ ("index_routing" .=) <$> idx+ ]++instance FromJSON AliasRouting where+ parseJSON = withObject "AliasRouting" parse+ where+ parse o = parseAll o <|> parseGranular o+ parseAll o = AllAliasRouting <$> o .: "routing"+ parseGranular o = do+ sr <- o .:? "search_routing"+ ir <- o .:? "index_routing"+ if isNothing sr && isNothing ir+ then fail "Both search_routing and index_routing can't be blank"+ else return (GranularAliasRouting sr ir)++instance FromJSON IndexAliasCreate where+ parseJSON v = withObject "IndexAliasCreate" parse v+ where+ parse o =+ IndexAliasCreate+ <$> optional (parseJSON v)+ <*> o .:? "filter"++-- | 'IndexAliasSummary' is a summary of an index alias configured for a server.+data IndexAliasSummary = IndexAliasSummary+ { indexAliasSummaryAlias :: IndexAlias,+ indexAliasSummaryCreate :: IndexAliasCreate+ }+ deriving stock (Eq, Show)++indexAliasSummaryAliasLens :: Lens' IndexAliasSummary IndexAlias+indexAliasSummaryAliasLens = lens indexAliasSummaryAlias (\x y -> x {indexAliasSummaryAlias = y})++indexAliasSummaryCreateLens :: Lens' IndexAliasSummary IndexAliasCreate+indexAliasSummaryCreateLens = lens indexAliasSummaryCreate (\x y -> x {indexAliasSummaryCreate = y})++data JoinRelation+ = ParentDocument FieldName RelationName+ | ChildDocument FieldName RelationName DocId+ deriving stock (Eq, Show)++-- | '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 IndexDocumentSettings = IndexDocumentSettings+ { idsVersionControl :: VersionControl,+ idsJoinRelation :: Maybe JoinRelation+ }+ deriving stock (Eq, Show)++idsVersionControlLens :: Lens' IndexDocumentSettings VersionControl+idsVersionControlLens = lens idsVersionControl (\x y -> x {idsVersionControl = y})++idsJoinRelationLens :: Lens' IndexDocumentSettings (Maybe JoinRelation)+idsJoinRelationLens = lens idsJoinRelation (\x y -> x {idsJoinRelation = y})++-- | Reasonable default settings. Chooses no version control and no parent.+defaultIndexDocumentSettings :: IndexDocumentSettings+defaultIndexDocumentSettings = IndexDocumentSettings NoVersionControl Nothing++-- | 'IndexSelection' is used for APIs which take a single index, a list of+-- indexes, or the special @_all@ index.++-- TODO: this does not fully support <https://www.elastic.co/guide/en/elasticsearch/reference/1.7/multi-index.html multi-index syntax>. It wouldn't be too hard to implement but you'd have to add the optional parameters (ignore_unavailable, allow_no_indices, expand_wildcards) to any APIs using it. Also would be a breaking API.+data IndexSelection+ = IndexList (NonEmpty IndexName)+ | AllIndexes+ deriving stock (Eq, Show)++-- | 'TemplateName' is used to describe which template to query/create/delete+newtype TemplateName = TemplateName Text deriving newtype (Eq, Show, ToJSON, FromJSON)++-- | 'IndexPattern' represents a pattern which is matched against index names+newtype IndexPattern = IndexPattern Text deriving newtype (Eq, Show, ToJSON, FromJSON)++-- * Utils++jsonObject :: (ToJSON a) => a -> Object+jsonObject x =+ case toJSON x of+ Object o -> o+ e -> error $ "Expected Object, but got " <> show e
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Newtypes.hs view
@@ -0,0 +1,409 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TemplateHaskellQuotes #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+ ( From (..),+ Size (..),+ HitFields (..),+ Score,+ ShardId (..),+ DocId (..),+ FieldName (..),+ RelationName (..),+ QueryString (..),+ CacheName (..),+ CacheKey (..),+ Existence (..),+ NullValue (..),+ CutoffFrequency (..),+ Analyzer (..),+ MaxExpansions (..),+ Lenient (..),+ Tiebreaker (..),+ MinimumMatch (..),+ DisableCoord (..),+ IgnoreTermFrequency (..),+ MinimumTermFrequency (..),+ MaxQueryTerms (..),+ PrefixLength (..),+ PercentMatch (..),+ StopWord (..),+ QueryPath (..),+ AllowLeadingWildcard (..),+ LowercaseExpanded (..),+ EnablePositionIncrements (..),+ AnalyzeWildcard (..),+ GeneratePhraseQueries (..),+ Locale (..),+ MaxWordLength (..),+ MinWordLength (..),+ PhraseSlop (..),+ MinDocFrequency (..),+ MaxDocFrequency (..),+ AggregateParentScore (..),+ IgnoreUnmapped (..),+ MinChildren (..),+ MaxChildren (..),+ POSIXMS (..),+ Boost (..),+ BoostTerms (..),+ ReplicaCount (..),+ ShardCount (..),+ IndexName,+ unIndexName,+ mkIndexName,+ qqIndexName,+ IndexAliasName (..),+ MaybeNA (..),+ SnapshotName (..),+ MS (..),+ unMS,+ TokenFilter (..),+ CharFilter (..),+ )+where++import Control.Exception (throwIO)+import qualified Data.ByteString as BS+import Data.Char (isLetter, isLower)+import qualified Data.Map.Strict as M+import qualified Data.Text as T+import qualified Data.Text.Encoding as T+import Database.Bloodhound.Internal.Utils.Imports+import GHC.Generics+import Language.Haskell.TH+import Language.Haskell.TH.Quote++newtype From = From Int deriving newtype (Eq, Show, ToJSON)++newtype Size = Size Int deriving newtype (Eq, Show, ToJSON, FromJSON)++-- Used with scripts+newtype HitFields+ = HitFields (M.Map Text [Value])+ deriving newtype (Eq, Show)++instance FromJSON HitFields where+ parseJSON x =+ HitFields <$> parseJSON x++-- Slight misnomer.+type Score = Maybe Double++newtype ShardId = ShardId {shardId :: Int}+ deriving newtype (Eq, Show, FromJSON)++-- | '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.+newtype DocId+ = DocId Text+ deriving newtype (Eq, Show, ToJSON, FromJSON)++-- | 'FieldName' is used all over the place wherever a specific field within+-- a document needs to be specified, usually in 'Query's or 'Filter's.+newtype FieldName+ = FieldName Text+ deriving newtype (Eq, Read, Show, ToJSON, FromJSON)++-- | 'RelationName' describes a relation role between parend and child Documents+-- in a Join relarionship: https://www.elastic.co/guide/en/elasticsearch/reference/current/parent-join.html+newtype RelationName+ = RelationName Text+ deriving newtype (Eq, Read, Show, ToJSON, FromJSON)++-- | 'QueryString' is used to wrap query text bodies, be they human written or not.+newtype QueryString+ = QueryString Text+ deriving newtype (Eq, Show, ToJSON, FromJSON)++-- {-| 'Script' is often used in place of 'FieldName' to specify more+-- complex ways of extracting a value from a document.+-- -}+-- newtype Script =+-- Script { scriptText :: Text }+-- deriving newtype (Eq, Show)++-- | 'CacheName' is used in 'RegexpFilter' for describing the+-- 'CacheKey' keyed caching behavior.+newtype CacheName+ = CacheName Text+ deriving newtype (Eq, Show, FromJSON, ToJSON)++-- | 'CacheKey' is used in 'RegexpFilter' to key regex caching.+newtype CacheKey+ = CacheKey Text+ deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype Existence+ = Existence Bool+ deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype NullValue+ = NullValue Bool+ deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype CutoffFrequency+ = CutoffFrequency Double+ deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype Analyzer+ = Analyzer Text+ deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype MaxExpansions+ = MaxExpansions Int+ deriving newtype (Eq, Show, FromJSON, ToJSON)++-- | '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.+newtype Lenient+ = Lenient Bool+ deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype Tiebreaker+ = Tiebreaker Double+ deriving newtype (Eq, Show, FromJSON, ToJSON)++-- | '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.+newtype MinimumMatch+ = MinimumMatch Int+ deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype DisableCoord+ = DisableCoord Bool+ deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype IgnoreTermFrequency+ = IgnoreTermFrequency Bool+ deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype MinimumTermFrequency+ = MinimumTermFrequency Int+ deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype MaxQueryTerms+ = MaxQueryTerms Int+ deriving newtype (Eq, Show, FromJSON, ToJSON)++-- | 'PrefixLength' is the prefix length used in queries, defaults to 0.+newtype PrefixLength+ = PrefixLength Int+ deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype PercentMatch+ = PercentMatch Double+ deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype StopWord+ = StopWord Text+ deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype QueryPath+ = QueryPath Text+ deriving newtype (Eq, Show, FromJSON, ToJSON)++-- | 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 AllowLeadingWildcard+ = AllowLeadingWildcard Bool+ deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype LowercaseExpanded+ = LowercaseExpanded Bool+ deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype EnablePositionIncrements+ = EnablePositionIncrements Bool+ deriving newtype (Eq, Show, FromJSON, ToJSON)++-- | By default, wildcard terms in a query are not analyzed.+-- Setting 'AnalyzeWildcard' to true enables best-effort analysis.+newtype AnalyzeWildcard = AnalyzeWildcard Bool deriving newtype (Eq, Show, FromJSON, ToJSON)++-- | 'GeneratePhraseQueries' defaults to false.+newtype GeneratePhraseQueries+ = GeneratePhraseQueries Bool+ deriving newtype (Eq, Show, FromJSON, ToJSON)++-- | 'Locale' is used for string conversions - defaults to ROOT.+newtype Locale = Locale Text deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype MaxWordLength = MaxWordLength Int deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype MinWordLength = MinWordLength Int deriving newtype (Eq, Show, FromJSON, ToJSON)++-- | 'PhraseSlop' sets the default slop for phrases, 0 means exact+-- phrase matches. Default is 0.+newtype PhraseSlop = PhraseSlop Int deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype MinDocFrequency = MinDocFrequency Int deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype MaxDocFrequency = MaxDocFrequency Int deriving newtype (Eq, Show, FromJSON, ToJSON)++-- | Indicates whether the relevance score of a matching parent document is aggregated into its child documents.+newtype AggregateParentScore = AggregateParentScore Bool deriving newtype (Eq, Show, FromJSON, ToJSON)++-- | Indicates whether to ignore an unmapped parent_type and not return any documents instead of an error.+newtype IgnoreUnmapped = IgnoreUnmapped Bool deriving newtype (Eq, Show, FromJSON, ToJSON)++-- | Maximum number of child documents that match the query allowed for a returned parent document.+-- If the parent document exceeds this limit, it is excluded from the search results.+newtype MinChildren = MinChildren Int deriving newtype (Eq, Show, FromJSON, ToJSON)++-- | Minimum number of child documents that match the query required to match the query for a returned parent document.+-- If the parent document does not meet this limit, it is excluded from the search results.+newtype MaxChildren = MaxChildren Int deriving newtype (Eq, Show, FromJSON, ToJSON)++-- | Newtype wrapper to parse ES's concerning tendency to in some APIs return a floating point number of milliseconds since epoch ಠ_ಠ+newtype POSIXMS = POSIXMS {posixMS :: UTCTime}++instance FromJSON POSIXMS where+ parseJSON = withScientific "POSIXMS" (return . parse)+ where+ parse n =+ let n' = truncate n :: Integer+ in POSIXMS (posixSecondsToUTCTime (fromInteger (n' `div` 1000)))++newtype Boost+ = Boost Double+ deriving newtype (Eq, Show, ToJSON, FromJSON)++newtype BoostTerms+ = BoostTerms Double+ deriving newtype (Eq, Show, ToJSON, FromJSON)++-- | 'ReplicaCount' is part of 'IndexSettings'+newtype ReplicaCount+ = ReplicaCount Int+ deriving newtype (Eq, Show, ToJSON)++-- | 'ShardCount' is part of 'IndexSettings'+newtype ShardCount+ = ShardCount Int+ deriving newtype (Eq, Show, ToJSON)++-- This insanity is because ES *sometimes* returns Replica/Shard counts as strings+instance FromJSON ReplicaCount where+ parseJSON v =+ parseAsInt v+ <|> parseAsString v+ where+ parseAsInt = fmap ReplicaCount . parseJSON+ parseAsString = withText "ReplicaCount" (fmap ReplicaCount . parseReadText)++instance FromJSON ShardCount where+ parseJSON v =+ parseAsInt v+ <|> parseAsString v+ where+ parseAsInt = fmap ShardCount . parseJSON+ parseAsString = withText "ShardCount" (fmap ShardCount . parseReadText)++-- | 'IndexName' is used to describe which index to query/create/delete+newtype IndexName+ = IndexName Text+ deriving stock (Eq, Ord, Show, Generic)+ deriving newtype (Hashable, Semigroup, ToJSON, ToJSONKey, FromJSONKey)++instance FromJSON IndexName where+ parseJSON x =+ parseJSON x >>= either (fail . T.unpack) return . mkIndexNameSystem++unIndexName :: IndexName -> Text+unIndexName (IndexName x) = x++mkIndexName :: Text -> Either Text IndexName+mkIndexName name = do+ let check explanation p = if p then Right () else Left explanation+ check "Is empty" $ not $ T.null name+ check "Is longer than 255 bytes" $ BS.length (T.encodeUtf8 name) < 256+ check "Contains uppercase letter(s)" $ T.all (\x -> not (isLetter x) || isLower x) name+ check "Includes [\\/*?\"<>| ,#:]" $ T.all (flip @_ @String notElem "\\/*?\"<>| ,#:") name+ check "Is (.|..)" $ notElem name [".", ".."]+ check "Starts with [-_+.]" $ maybe False (flip @_ @String notElem "-_+." . fst) $ T.uncons name+ return $ IndexName name++mkIndexNameSystem :: Text -> Either Text IndexName+mkIndexNameSystem name = do+ let check explanation p = if p then Right () else Left explanation+ check "Is empty" $ not $ T.null name+ check "Is longer than 255 bytes" $ BS.length (T.encodeUtf8 name) < 256+ check "Contains uppercase letter(s)" $ T.all (\x -> not (isLetter x) || isLower x) name+ check "Includes [\\/*?\"<>| ,#:]" $ T.all (flip @_ @String notElem "\\/*?\"<>| ,#:") name+ check "Starts with [-_+]" $ maybe False (flip @_ @String notElem "-_+" . fst) $ T.uncons name+ return $ IndexName name++qqIndexName :: QuasiQuoter+qqIndexName =+ QuasiQuoter+ { quoteExp = \str -> do+ loc <- location+ IndexName n <- runIO $ parseIO mkIndexName loc str+ pure $ AppE (ConE 'IndexName) (LitE (StringL $ T.unpack n)),+ quotePat = undefined,+ quoteType = undefined,+ quoteDec = undefined+ }+ where+ parseIO :: (Text -> Either Text a) -> Loc -> String -> IO a+ parseIO p loc str =+ case p $ T.pack str of+ Left err ->+ throwIO $+ userError $+ mconcat+ [ "'",+ str,+ "'",+ " is not a valid IndexName ",+ "(",+ T.unpack err,+ ")",+ " at ",+ loc_filename loc,+ ":",+ show (loc_start loc),+ "-",+ show (loc_start loc)+ ]+ Right a ->+ return a++newtype IndexAliasName = IndexAliasName {indexAliasName :: IndexName}+ deriving newtype (Eq, Show, ToJSON)++newtype MaybeNA a = MaybeNA {unMaybeNA :: Maybe a}+ deriving newtype (Eq, Show, Functor, Applicative, Monad)++instance (FromJSON a) => FromJSON (MaybeNA a) where+ parseJSON (String "NA") = pure $ MaybeNA Nothing+ parseJSON o = MaybeNA . Just <$> parseJSON o++newtype SnapshotName = SnapshotName {snapshotName :: Text}+ deriving newtype (Eq, Show, ToJSON, FromJSON)++-- | Milliseconds+newtype MS = MS NominalDiffTime++-- keeps the unexported constructor warnings at bay+unMS :: MS -> NominalDiffTime+unMS (MS t) = t++instance FromJSON MS where+ parseJSON = withScientific "MS" (return . MS . parse)+ where+ parse n = fromInteger (truncate n * 1000)++newtype TokenFilter+ = TokenFilter Text+ deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype CharFilter+ = CharFilter Text+ deriving newtype (Eq, Show, FromJSON, ToJSON)
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Nodes.hs view
@@ -0,0 +1,1545 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Nodes+ ( BoundTransportAddress (..),+ BuildHash (..),+ CPUInfo (..),+ ClusterName (..),+ EsAddress (..),+ EsPassword (..),+ EsUsername (..),+ FullNodeId (..),+ InitialShardCount (..),+ JVMBufferPoolStats (..),+ JVMGCCollector (..),+ JVMGCStats (..),+ JVMMemoryInfo (..),+ JVMMemoryPool (..),+ JVMPoolStats (..),+ JVMVersion (..),+ LoadAvgs (..),+ MacAddress (..),+ NetworkInterfaceName (..),+ NodeAttrFilter (..),+ NodeAttrName (..),+ NodeBreakerStats (..),+ NodeBreakersStats (..),+ NodeDataPathStats (..),+ NodeFSStats (..),+ NodeFSTotalStats (..),+ NodeHTTPInfo (..),+ NodeHTTPStats (..),+ NodeIndicesStats (..),+ NodeInfo (..),+ NodeJVMInfo (..),+ NodeJVMStats (..),+ NodeName (..),+ NodeNetworkInfo (..),+ NodeNetworkInterface (..),+ NodeNetworkStats (..),+ NodeOSInfo (..),+ NodeOSStats (..),+ NodePluginInfo (..),+ NodeProcessInfo (..),+ NodeProcessStats (..),+ NodeSelection (..),+ NodeSelector (..),+ NodeStats (..),+ NodeThreadPoolInfo (..),+ NodeThreadPoolStats (..),+ NodeTransportInfo (..),+ NodeTransportStats (..),+ NodesInfo (..),+ NodesStats (..),+ PID (..),+ PluginName (..),+ ShardResult (..),+ ShardsResult (..),+ ThreadPool (..),+ ThreadPoolSize (..),+ ThreadPoolType (..),+ Version (..),+ VersionNumber (..),++ -- * Optics+ nodeOSRefreshIntervalLens,+ nodeOSNameLens,+ nodeOSArchLens,+ nodeOSVersionLens,+ nodeOSAvailableProcessorsLens,+ nodeOSAllocatedProcessorsLens,+ cpuCacheSizeLens,+ cpuCoresPerSocketLens,+ cpuTotalSocketsLens,+ cpuTotalCoresLens,+ cpuMHZLens,+ cpuModelLens,+ cpuVendorLens,+ nodeProcessMLockAllLens,+ nodeProcessMaxFileDescriptorsLens,+ nodeProcessIdLens,+ nodeProcessRefreshIntervalLens,+ srShardsLens,+ shardTotalLens,+ shardsSuccessfulLens,+ shardsSkippedLens,+ shardsFailedLens,+ versionNumberLens,+ versionBuildHashLens,+ versionBuildDateLens,+ versionBuildSnapshotLens,+ versionLuceneVersionLens,+ )+where++import Control.Monad.Except+import qualified Data.Aeson.KeyMap as X+import qualified Data.HashMap.Strict as HM+import Data.Map.Strict (Map)+import qualified Data.Text as T+import qualified Data.Vector as V+import qualified Data.Versions as Versions+import Database.Bloodhound.Internal.Client.BHRequest+import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Utils.StringlyTyped+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.Internal.Versions.Common.Types.Units+import GHC.Generics++data NodeAttrFilter = NodeAttrFilter+ { nodeAttrFilterName :: NodeAttrName,+ nodeAttrFilterValues :: NonEmpty Text+ }+ deriving stock (Eq, Ord, Show)++newtype NodeAttrName = NodeAttrName Text deriving stock (Eq, Ord, Show)++-- | 'NodeSelection' is used for most cluster APIs. See <https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html#cluster-nodes here> for more details.+data NodeSelection+ = -- | Whatever node receives this request+ LocalNode+ | NodeList (NonEmpty NodeSelector)+ | AllNodes+ deriving stock (Eq, Show)++-- | An exact match or pattern to identify a node. Note that All of+-- these options support wildcarding, so your node name, server, attr+-- name can all contain * characters to be a fuzzy match.+data NodeSelector+ = NodeByName NodeName+ | NodeByFullNodeId FullNodeId+ | -- | e.g. 10.0.0.1 or even 10.0.0.*+ NodeByHost Server+ | -- | NodeAttrName can be a pattern, e.g. rack*. The value can too.+ NodeByAttribute NodeAttrName Text+ deriving stock (Eq, Show)++-- | Unique, automatically-generated name assigned to nodes that are+-- usually returned in node-oriented APIs.+newtype FullNodeId = FullNodeId {fullNodeId :: Text}+ deriving newtype (Eq, Ord, Show, FromJSON)++-- | A human-readable node name that is supplied by the user in the+-- node config or automatically generated by Elasticsearch.+newtype NodeName = NodeName {nodeName :: Text}+ deriving newtype (Eq, Ord, Show, FromJSON)++newtype ClusterName = ClusterName {clusterName :: Text}+ deriving newtype (Eq, Ord, Show, FromJSON)++-- | Username type used for HTTP Basic authentication. See 'basicAuthHook'.+newtype EsUsername = EsUsername {esUsername :: Text} deriving (Read, Eq, Show)++-- | Password type used for HTTP Basic authentication. See 'basicAuthHook'.+newtype EsPassword = EsPassword {esPassword :: Text} deriving (Read, Eq, Show)++data NodesInfo = NodesInfo+ { nodesInfo :: [NodeInfo],+ nodesClusterName :: ClusterName+ }+ deriving stock (Eq, Show)++data NodesStats = NodesStats+ { nodesStats :: [NodeStats],+ nodesStatsClusterName :: ClusterName+ }+ deriving stock (Eq, Show)++data NodeStats = NodeStats+ { nodeStatsName :: NodeName,+ nodeStatsFullId :: FullNodeId,+ nodeStatsBreakersStats :: Maybe NodeBreakersStats,+ nodeStatsHTTP :: NodeHTTPStats,+ nodeStatsTransport :: NodeTransportStats,+ nodeStatsFS :: NodeFSStats,+ nodeStatsNetwork :: Maybe NodeNetworkStats,+ nodeStatsThreadPool :: Map Text NodeThreadPoolStats,+ nodeStatsJVM :: NodeJVMStats,+ nodeStatsProcess :: NodeProcessStats,+ nodeStatsOS :: NodeOSStats,+ nodeStatsIndices :: NodeIndicesStats+ }+ deriving stock (Eq, Show)++data NodeBreakersStats = NodeBreakersStats+ { nodeStatsParentBreaker :: NodeBreakerStats,+ nodeStatsRequestBreaker :: NodeBreakerStats,+ nodeStatsFieldDataBreaker :: NodeBreakerStats+ }+ deriving stock (Eq, Show)++data NodeBreakerStats = NodeBreakerStats+ { nodeBreakersTripped :: Int,+ nodeBreakersOverhead :: Double,+ nodeBreakersEstSize :: Bytes,+ nodeBreakersLimitSize :: Bytes+ }+ deriving stock (Eq, Show)++data NodeHTTPStats = NodeHTTPStats+ { nodeHTTPTotalOpened :: Int,+ nodeHTTPCurrentOpen :: Int+ }+ deriving stock (Eq, Show)++data NodeTransportStats = NodeTransportStats+ { nodeTransportTXSize :: Bytes,+ nodeTransportCount :: Int,+ nodeTransportRXSize :: Bytes,+ nodeTransportRXCount :: Int,+ nodeTransportServerOpen :: Int+ }+ deriving stock (Eq, Show)++data NodeFSStats = NodeFSStats+ { nodeFSDataPaths :: [NodeDataPathStats],+ nodeFSTotal :: NodeFSTotalStats,+ nodeFSTimestamp :: UTCTime+ }+ deriving stock (Eq, Show)++data NodeDataPathStats = NodeDataPathStats+ { nodeDataPathDiskServiceTime :: Maybe Double,+ nodeDataPathDiskQueue :: Maybe Double,+ nodeDataPathIOSize :: Maybe Bytes,+ nodeDataPathWriteSize :: Maybe Bytes,+ nodeDataPathReadSize :: Maybe Bytes,+ nodeDataPathIOOps :: Maybe Int,+ nodeDataPathWrites :: Maybe Int,+ nodeDataPathReads :: Maybe Int,+ nodeDataPathAvailable :: Bytes,+ nodeDataPathFree :: Bytes,+ nodeDataPathTotal :: Bytes,+ nodeDataPathType :: Maybe Text,+ nodeDataPathDevice :: Maybe Text,+ nodeDataPathMount :: Text,+ nodeDataPathPath :: Text+ }+ deriving stock (Eq, Show)++data NodeFSTotalStats = NodeFSTotalStats+ { nodeFSTotalDiskServiceTime :: Maybe Double,+ nodeFSTotalDiskQueue :: Maybe Double,+ nodeFSTotalIOSize :: Maybe Bytes,+ nodeFSTotalWriteSize :: Maybe Bytes,+ nodeFSTotalReadSize :: Maybe Bytes,+ nodeFSTotalIOOps :: Maybe Int,+ nodeFSTotalWrites :: Maybe Int,+ nodeFSTotalReads :: Maybe Int,+ nodeFSTotalAvailable :: Bytes,+ nodeFSTotalFree :: Bytes,+ nodeFSTotalTotal :: Bytes+ }+ deriving stock (Eq, Show)++data NodeNetworkStats = NodeNetworkStats+ { nodeNetTCPOutRSTs :: Int,+ nodeNetTCPInErrs :: Int,+ nodeNetTCPAttemptFails :: Int,+ nodeNetTCPEstabResets :: Int,+ nodeNetTCPRetransSegs :: Int,+ nodeNetTCPOutSegs :: Int,+ nodeNetTCPInSegs :: Int,+ nodeNetTCPCurrEstab :: Int,+ nodeNetTCPPassiveOpens :: Int,+ nodeNetTCPActiveOpens :: Int+ }+ deriving stock (Eq, Show)++data NodeThreadPoolStats = NodeThreadPoolStats+ { nodeThreadPoolCompleted :: Int,+ nodeThreadPoolLargest :: Int,+ nodeThreadPoolRejected :: Int,+ nodeThreadPoolActive :: Int,+ nodeThreadPoolQueue :: Int,+ nodeThreadPoolThreads :: Int+ }+ deriving stock (Eq, Show)++data NodeJVMStats = NodeJVMStats+ { nodeJVMStatsMappedBufferPool :: JVMBufferPoolStats,+ nodeJVMStatsDirectBufferPool :: JVMBufferPoolStats,+ nodeJVMStatsGCOldCollector :: JVMGCStats,+ nodeJVMStatsGCYoungCollector :: JVMGCStats,+ nodeJVMStatsPeakThreadsCount :: Int,+ nodeJVMStatsThreadsCount :: Int,+ nodeJVMStatsOldPool :: JVMPoolStats,+ nodeJVMStatsSurvivorPool :: JVMPoolStats,+ nodeJVMStatsYoungPool :: JVMPoolStats,+ nodeJVMStatsNonHeapCommitted :: Bytes,+ nodeJVMStatsNonHeapUsed :: Bytes,+ nodeJVMStatsHeapMax :: Bytes,+ nodeJVMStatsHeapCommitted :: Bytes,+ nodeJVMStatsHeapUsedPercent :: Int,+ nodeJVMStatsHeapUsed :: Bytes,+ nodeJVMStatsUptime :: NominalDiffTime,+ nodeJVMStatsTimestamp :: UTCTime+ }+ deriving stock (Eq, Show)++data JVMBufferPoolStats = JVMBufferPoolStats+ { jvmBufferPoolStatsTotalCapacity :: Bytes,+ jvmBufferPoolStatsUsed :: Bytes,+ jvmBufferPoolStatsCount :: Int+ }+ deriving stock (Eq, Show)++data JVMGCStats = JVMGCStats+ { jvmGCStatsCollectionTime :: NominalDiffTime,+ jvmGCStatsCollectionCount :: Int+ }+ deriving stock (Eq, Show)++data JVMPoolStats = JVMPoolStats+ { jvmPoolStatsPeakMax :: Bytes,+ jvmPoolStatsPeakUsed :: Bytes,+ jvmPoolStatsMax :: Bytes,+ jvmPoolStatsUsed :: Bytes+ }+ deriving stock (Eq, Show)++data NodeProcessStats = NodeProcessStats+ { nodeProcessTimestamp :: UTCTime,+ nodeProcessOpenFDs :: Int,+ nodeProcessMaxFDs :: Int,+ nodeProcessCPUPercent :: Int,+ nodeProcessCPUTotal :: NominalDiffTime,+ nodeProcessMemTotalVirtual :: Bytes+ }+ deriving stock (Eq, Show)++data NodeOSStats = NodeOSStats+ { nodeOSTimestamp :: UTCTime,+ nodeOSCPUPercent :: Int,+ nodeOSLoad :: Maybe LoadAvgs,+ nodeOSMemTotal :: Bytes,+ nodeOSMemFree :: Bytes,+ nodeOSMemFreePercent :: Int,+ nodeOSMemUsed :: Bytes,+ nodeOSMemUsedPercent :: Int,+ nodeOSSwapTotal :: Bytes,+ nodeOSSwapFree :: Bytes,+ nodeOSSwapUsed :: Bytes+ }+ deriving stock (Eq, Show)++data LoadAvgs = LoadAvgs+ { loadAvg1Min :: Double,+ loadAvg5Min :: Double,+ loadAvg15Min :: Double+ }+ deriving stock (Eq, Show)++data NodeIndicesStats = NodeIndicesStats+ { nodeIndicesStatsRecoveryThrottleTime :: Maybe NominalDiffTime,+ nodeIndicesStatsRecoveryCurrentAsTarget :: Maybe Int,+ nodeIndicesStatsRecoveryCurrentAsSource :: Maybe Int,+ nodeIndicesStatsQueryCacheMisses :: Maybe Int,+ nodeIndicesStatsQueryCacheHits :: Maybe Int,+ nodeIndicesStatsQueryCacheEvictions :: Maybe Int,+ nodeIndicesStatsQueryCacheSize :: Maybe Bytes,+ nodeIndicesStatsSuggestCurrent :: Maybe Int,+ nodeIndicesStatsSuggestTime :: Maybe NominalDiffTime,+ nodeIndicesStatsSuggestTotal :: Maybe Int,+ nodeIndicesStatsTranslogSize :: Bytes,+ nodeIndicesStatsTranslogOps :: Int,+ nodeIndicesStatsSegFixedBitSetMemory :: Maybe Bytes,+ nodeIndicesStatsSegVersionMapMemory :: Bytes,+ nodeIndicesStatsSegIndexWriterMaxMemory :: Maybe Bytes,+ nodeIndicesStatsSegIndexWriterMemory :: Bytes,+ nodeIndicesStatsSegMemory :: Bytes,+ nodeIndicesStatsSegCount :: Int,+ nodeIndicesStatsCompletionSize :: Bytes,+ nodeIndicesStatsPercolateQueries :: Maybe Int,+ nodeIndicesStatsPercolateMemory :: Maybe Bytes,+ nodeIndicesStatsPercolateCurrent :: Maybe Int,+ nodeIndicesStatsPercolateTime :: Maybe NominalDiffTime,+ nodeIndicesStatsPercolateTotal :: Maybe Int,+ nodeIndicesStatsFieldDataEvictions :: Int,+ nodeIndicesStatsFieldDataMemory :: Bytes,+ nodeIndicesStatsWarmerTotalTime :: NominalDiffTime,+ nodeIndicesStatsWarmerTotal :: Int,+ nodeIndicesStatsWarmerCurrent :: Int,+ nodeIndicesStatsFlushTotalTime :: NominalDiffTime,+ nodeIndicesStatsFlushTotal :: Int,+ nodeIndicesStatsRefreshTotalTime :: NominalDiffTime,+ nodeIndicesStatsRefreshTotal :: Int,+ nodeIndicesStatsMergesTotalSize :: Bytes,+ nodeIndicesStatsMergesTotalDocs :: Int,+ nodeIndicesStatsMergesTotalTime :: NominalDiffTime,+ nodeIndicesStatsMergesTotal :: Int,+ nodeIndicesStatsMergesCurrentSize :: Bytes,+ nodeIndicesStatsMergesCurrentDocs :: Int,+ nodeIndicesStatsMergesCurrent :: Int,+ nodeIndicesStatsSearchFetchCurrent :: Int,+ nodeIndicesStatsSearchFetchTime :: NominalDiffTime,+ nodeIndicesStatsSearchFetchTotal :: Int,+ nodeIndicesStatsSearchQueryCurrent :: Int,+ nodeIndicesStatsSearchQueryTime :: NominalDiffTime,+ nodeIndicesStatsSearchQueryTotal :: Int,+ nodeIndicesStatsSearchOpenContexts :: Int,+ nodeIndicesStatsGetCurrent :: Int,+ nodeIndicesStatsGetMissingTime :: NominalDiffTime,+ nodeIndicesStatsGetMissingTotal :: Int,+ nodeIndicesStatsGetExistsTime :: NominalDiffTime,+ nodeIndicesStatsGetExistsTotal :: Int,+ nodeIndicesStatsGetTime :: NominalDiffTime,+ nodeIndicesStatsGetTotal :: Int,+ nodeIndicesStatsIndexingThrottleTime :: Maybe NominalDiffTime,+ nodeIndicesStatsIndexingIsThrottled :: Maybe Bool,+ nodeIndicesStatsIndexingNoopUpdateTotal :: Maybe Int,+ nodeIndicesStatsIndexingDeleteCurrent :: Int,+ nodeIndicesStatsIndexingDeleteTime :: NominalDiffTime,+ nodeIndicesStatsIndexingDeleteTotal :: Int,+ nodeIndicesStatsIndexingIndexCurrent :: Int,+ nodeIndicesStatsIndexingIndexTime :: NominalDiffTime,+ nodeIndicesStatsIndexingTotal :: Int,+ nodeIndicesStatsStoreThrottleTime :: Maybe NominalDiffTime,+ nodeIndicesStatsStoreSize :: Bytes,+ nodeIndicesStatsDocsDeleted :: Int,+ nodeIndicesStatsDocsCount :: Int+ }+ deriving stock (Eq, Show)++-- | A quirky address format used throughout Elasticsearch. An example+-- would be inet[/1.1.1.1:9200]. inet may be a placeholder for a+-- <https://en.wikipedia.org/wiki/Fully_qualified_domain_name FQDN>.+newtype EsAddress = EsAddress {esAddress :: Text}+ deriving newtype (Eq, Ord, Show, FromJSON)++-- | Typically a 7 character hex string.+newtype BuildHash = BuildHash {buildHash :: Text}+ deriving newtype (Eq, Ord, Show, FromJSON, ToJSON)++newtype PluginName = PluginName {pluginName :: Text}+ deriving newtype (Eq, Ord, Show, FromJSON)++data NodeInfo = NodeInfo+ { nodeInfoHTTPAddress :: Maybe EsAddress,+ nodeInfoBuild :: BuildHash,+ nodeInfoESVersion :: VersionNumber,+ nodeInfoIP :: Server,+ nodeInfoHost :: Server,+ nodeInfoTransportAddress :: EsAddress,+ nodeInfoName :: NodeName,+ nodeInfoFullId :: FullNodeId,+ nodeInfoPlugins :: [NodePluginInfo],+ nodeInfoHTTP :: NodeHTTPInfo,+ nodeInfoTransport :: NodeTransportInfo,+ nodeInfoNetwork :: Maybe NodeNetworkInfo,+ nodeInfoThreadPool :: Map Text NodeThreadPoolInfo,+ nodeInfoJVM :: NodeJVMInfo,+ nodeInfoProcess :: NodeProcessInfo,+ nodeInfoOS :: NodeOSInfo,+ -- | The members of the settings objects are not consistent,+ -- dependent on plugins, etc.+ nodeInfoSettings :: Object+ }+ deriving stock (Eq, Show)++data NodePluginInfo = NodePluginInfo+ { -- | Is this a site plugin?+ nodePluginSite :: Maybe Bool,+ -- | Is this plugin running on the JVM+ nodePluginJVM :: Maybe Bool,+ nodePluginDescription :: Text,+ nodePluginVersion :: MaybeNA VersionNumber,+ nodePluginName :: PluginName+ }+ deriving stock (Eq, Show)++data NodeHTTPInfo = NodeHTTPInfo+ { nodeHTTPMaxContentLength :: Bytes,+ nodeHTTPpublishAddress :: EsAddress,+ nodeHTTPbound_address :: [EsAddress]+ }+ deriving stock (Eq, Show)++data NodeTransportInfo = NodeTransportInfo+ { nodeTransportProfiles :: [BoundTransportAddress],+ nodeTransportPublishAddress :: EsAddress,+ nodeTransportBoundAddress :: [EsAddress]+ }+ deriving stock (Eq, Show)++data BoundTransportAddress = BoundTransportAddress+ { publishAddress :: EsAddress,+ boundAddress :: [EsAddress]+ }+ deriving stock (Eq, Show)++data NodeNetworkInfo = NodeNetworkInfo+ { nodeNetworkPrimaryInterface :: NodeNetworkInterface,+ nodeNetworkRefreshInterval :: NominalDiffTime+ }+ deriving stock (Eq, Show)++newtype MacAddress = MacAddress {macAddress :: Text}+ deriving newtype (Eq, Ord, Show, FromJSON)++newtype NetworkInterfaceName = NetworkInterfaceName {networkInterfaceName :: Text}+ deriving newtype (Eq, Ord, Show, FromJSON)++data NodeNetworkInterface = NodeNetworkInterface+ { nodeNetIfaceMacAddress :: MacAddress,+ nodeNetIfaceName :: NetworkInterfaceName,+ nodeNetIfaceAddress :: Server+ }+ deriving stock (Eq, Show)++data ThreadPool = ThreadPool+ { nodeThreadPoolName :: Text,+ nodeThreadPoolInfo :: NodeThreadPoolInfo+ }+ deriving stock (Eq, Show)++data NodeThreadPoolInfo = NodeThreadPoolInfo+ { nodeThreadPoolQueueSize :: ThreadPoolSize,+ nodeThreadPoolKeepalive :: Maybe NominalDiffTime,+ nodeThreadPoolMin :: Maybe Int,+ nodeThreadPoolMax :: Maybe Int,+ nodeThreadPoolType :: ThreadPoolType+ }+ deriving stock (Eq, Show)++data ThreadPoolSize+ = ThreadPoolBounded Int+ | ThreadPoolUnbounded+ deriving stock (Eq, Show)++data ThreadPoolType+ = ThreadPoolScaling+ | ThreadPoolFixed+ | ThreadPoolCached+ | ThreadPoolFixedAutoQueueSize+ deriving stock (Eq, Show)++data NodeJVMInfo = NodeJVMInfo+ { nodeJVMInfoMemoryPools :: [JVMMemoryPool],+ nodeJVMInfoMemoryPoolsGCCollectors :: [JVMGCCollector],+ nodeJVMInfoMemoryInfo :: JVMMemoryInfo,+ nodeJVMInfoStartTime :: UTCTime,+ nodeJVMInfoVMVendor :: Text,+ -- | JVM doesn't seme to follow normal version conventions+ nodeJVMVMVersion :: VersionNumber,+ nodeJVMVMName :: Text,+ nodeJVMVersion :: JVMVersion,+ nodeJVMPID :: PID+ }+ deriving stock (Eq, Show)++-- | We cannot parse JVM version numbers and we're not going to try.+newtype JVMVersion = JVMVersion {unJVMVersion :: Text}+ deriving stock (Eq, Show)++instance FromJSON JVMVersion where+ parseJSON = withText "JVMVersion" (pure . JVMVersion)++data JVMMemoryInfo = JVMMemoryInfo+ { jvmMemoryInfoDirectMax :: Bytes,+ jvmMemoryInfoNonHeapMax :: Bytes,+ jvmMemoryInfoNonHeapInit :: Bytes,+ jvmMemoryInfoHeapMax :: Bytes,+ jvmMemoryInfoHeapInit :: Bytes+ }+ deriving stock (Eq, Show)++newtype JVMMemoryPool = JVMMemoryPool+ { jvmMemoryPool :: Text+ }+ deriving newtype (Eq, Show, FromJSON)++newtype JVMGCCollector = JVMGCCollector+ { jvmGCCollector :: Text+ }+ deriving newtype (Eq, Show, FromJSON)++newtype PID = PID+ { pid :: Int+ }+ deriving newtype (Eq, Show, FromJSON)++data NodeOSInfo = NodeOSInfo+ { nodeOSRefreshInterval :: NominalDiffTime,+ nodeOSName :: Text,+ nodeOSArch :: Text,+ nodeOSVersion :: Text, -- semver breaks on "5.10.60.1-microsoft-standard-WSL2"+ nodeOSAvailableProcessors :: Int,+ nodeOSAllocatedProcessors :: Int+ }+ deriving stock (Eq, Show)++nodeOSRefreshIntervalLens :: Lens' NodeOSInfo NominalDiffTime+nodeOSRefreshIntervalLens = lens nodeOSRefreshInterval (\x y -> x {nodeOSRefreshInterval = y})++nodeOSNameLens :: Lens' NodeOSInfo Text+nodeOSNameLens = lens nodeOSName (\x y -> x {nodeOSName = y})++nodeOSArchLens :: Lens' NodeOSInfo Text+nodeOSArchLens = lens nodeOSArch (\x y -> x {nodeOSArch = y})++nodeOSVersionLens :: Lens' NodeOSInfo Text+nodeOSVersionLens = lens nodeOSVersion (\x y -> x {nodeOSVersion = y})++nodeOSAvailableProcessorsLens :: Lens' NodeOSInfo Int+nodeOSAvailableProcessorsLens = lens nodeOSAvailableProcessors (\x y -> x {nodeOSAvailableProcessors = y})++nodeOSAllocatedProcessorsLens :: Lens' NodeOSInfo Int+nodeOSAllocatedProcessorsLens = lens nodeOSAllocatedProcessors (\x y -> x {nodeOSAllocatedProcessors = y})++data CPUInfo = CPUInfo+ { cpuCacheSize :: Bytes,+ cpuCoresPerSocket :: Int,+ cpuTotalSockets :: Int,+ cpuTotalCores :: Int,+ cpuMHZ :: Int,+ cpuModel :: Text,+ cpuVendor :: Text+ }+ deriving stock (Eq, Show)++cpuCacheSizeLens :: Lens' CPUInfo Bytes+cpuCacheSizeLens = lens cpuCacheSize (\x y -> x {cpuCacheSize = y})++cpuCoresPerSocketLens :: Lens' CPUInfo Int+cpuCoresPerSocketLens = lens cpuCoresPerSocket (\x y -> x {cpuCoresPerSocket = y})++cpuTotalSocketsLens :: Lens' CPUInfo Int+cpuTotalSocketsLens = lens cpuTotalSockets (\x y -> x {cpuTotalSockets = y})++cpuTotalCoresLens :: Lens' CPUInfo Int+cpuTotalCoresLens = lens cpuTotalCores (\x y -> x {cpuTotalCores = y})++cpuMHZLens :: Lens' CPUInfo Int+cpuMHZLens = lens cpuMHZ (\x y -> x {cpuMHZ = y})++cpuModelLens :: Lens' CPUInfo Text+cpuModelLens = lens cpuModel (\x y -> x {cpuModel = y})++cpuVendorLens :: Lens' CPUInfo Text+cpuVendorLens = lens cpuVendor (\x y -> x {cpuVendor = y})++data NodeProcessInfo = NodeProcessInfo+ { -- | See <https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration.html>+ nodeProcessMLockAll :: Bool,+ nodeProcessMaxFileDescriptors :: Maybe Int,+ nodeProcessId :: PID,+ nodeProcessRefreshInterval :: NominalDiffTime+ }+ deriving stock (Eq, Show)++nodeProcessMLockAllLens :: Lens' NodeProcessInfo Bool+nodeProcessMLockAllLens = lens nodeProcessMLockAll (\x y -> x {nodeProcessMLockAll = y})++nodeProcessMaxFileDescriptorsLens :: Lens' NodeProcessInfo (Maybe Int)+nodeProcessMaxFileDescriptorsLens = lens nodeProcessMaxFileDescriptors (\x y -> x {nodeProcessMaxFileDescriptors = y})++nodeProcessIdLens :: Lens' NodeProcessInfo PID+nodeProcessIdLens = lens nodeProcessId (\x y -> x {nodeProcessId = y})++nodeProcessRefreshIntervalLens :: Lens' NodeProcessInfo NominalDiffTime+nodeProcessRefreshIntervalLens = lens nodeProcessRefreshInterval (\x y -> x {nodeProcessRefreshInterval = y})++instance FromJSON NodesInfo where+ parseJSON = withObject "NodesInfo" parse+ where+ parse o = do+ nodes <- o .: "nodes"+ infos <- forM (HM.toList nodes) $ \(fullNID, v) -> do+ node <- parseJSON v+ parseNodeInfo (FullNodeId fullNID) node+ cn <- o .: "cluster_name"+ return (NodesInfo infos cn)++instance FromJSON NodesStats where+ parseJSON = withObject "NodesStats" parse+ where+ parse o = do+ nodes <- o .: "nodes"+ stats <- forM (HM.toList nodes) $ \(fullNID, v) -> do+ node <- parseJSON v+ parseNodeStats (FullNodeId fullNID) node+ cn <- o .: "cluster_name"+ return (NodesStats stats cn)++instance FromJSON NodeBreakerStats where+ parseJSON = withObject "NodeBreakerStats" parse+ where+ parse o =+ NodeBreakerStats+ <$> o+ .: "tripped"+ <*> o+ .: "overhead"+ <*> o+ .: "estimated_size_in_bytes"+ <*> o+ .: "limit_size_in_bytes"++instance FromJSON NodeHTTPStats where+ parseJSON = withObject "NodeHTTPStats" parse+ where+ parse o =+ NodeHTTPStats+ <$> o+ .: "total_opened"+ <*> o+ .: "current_open"++instance FromJSON NodeTransportStats where+ parseJSON = withObject "NodeTransportStats" parse+ where+ parse o =+ NodeTransportStats+ <$> o+ .: "tx_size_in_bytes"+ <*> o+ .: "tx_count"+ <*> o+ .: "rx_size_in_bytes"+ <*> o+ .: "rx_count"+ <*> o+ .: "server_open"++instance FromJSON NodeFSStats where+ parseJSON = withObject "NodeFSStats" parse+ where+ parse o =+ NodeFSStats+ <$> o+ .: "data"+ <*> o+ .: "total"+ <*> (posixMS <$> o .: "timestamp")++instance FromJSON NodeDataPathStats where+ parseJSON = withObject "NodeDataPathStats" parse+ where+ parse o =+ NodeDataPathStats+ <$> (fmap unStringlyTypedDouble <$> o .:? "disk_service_time")+ <*> (fmap unStringlyTypedDouble <$> o .:? "disk_queue")+ <*> o+ .:? "disk_io_size_in_bytes"+ <*> o+ .:? "disk_write_size_in_bytes"+ <*> o+ .:? "disk_read_size_in_bytes"+ <*> o+ .:? "disk_io_op"+ <*> o+ .:? "disk_writes"+ <*> o+ .:? "disk_reads"+ <*> o+ .: "available_in_bytes"+ <*> o+ .: "free_in_bytes"+ <*> o+ .: "total_in_bytes"+ <*> o+ .:? "type"+ <*> o+ .:? "dev"+ <*> o+ .: "mount"+ <*> o+ .: "path"++instance FromJSON NodeFSTotalStats where+ parseJSON = withObject "NodeFSTotalStats" parse+ where+ parse o =+ NodeFSTotalStats+ <$> (fmap unStringlyTypedDouble <$> o .:? "disk_service_time")+ <*> (fmap unStringlyTypedDouble <$> o .:? "disk_queue")+ <*> o+ .:? "disk_io_size_in_bytes"+ <*> o+ .:? "disk_write_size_in_bytes"+ <*> o+ .:? "disk_read_size_in_bytes"+ <*> o+ .:? "disk_io_op"+ <*> o+ .:? "disk_writes"+ <*> o+ .:? "disk_reads"+ <*> o+ .: "available_in_bytes"+ <*> o+ .: "free_in_bytes"+ <*> o+ .: "total_in_bytes"++instance FromJSON NodeNetworkStats where+ parseJSON = withObject "NodeNetworkStats" parse+ where+ parse o = do+ tcp <- o .: "tcp"+ NodeNetworkStats+ <$> tcp+ .: "out_rsts"+ <*> tcp+ .: "in_errs"+ <*> tcp+ .: "attempt_fails"+ <*> tcp+ .: "estab_resets"+ <*> tcp+ .: "retrans_segs"+ <*> tcp+ .: "out_segs"+ <*> tcp+ .: "in_segs"+ <*> tcp+ .: "curr_estab"+ <*> tcp+ .: "passive_opens"+ <*> tcp+ .: "active_opens"++instance FromJSON NodeThreadPoolStats where+ parseJSON = withObject "NodeThreadPoolStats" parse+ where+ parse o =+ NodeThreadPoolStats+ <$> o+ .: "completed"+ <*> o+ .: "largest"+ <*> o+ .: "rejected"+ <*> o+ .: "active"+ <*> o+ .: "queue"+ <*> o+ .: "threads"++instance FromJSON NodeJVMStats where+ parseJSON = withObject "NodeJVMStats" parse+ where+ parse o = do+ bufferPools <- o .: "buffer_pools"+ mapped <- bufferPools .: "mapped"+ direct <- bufferPools .: "direct"+ gc <- o .: "gc"+ collectors <- gc .: "collectors"+ oldC <- collectors .: "old"+ youngC <- collectors .: "young"+ threads <- o .: "threads"+ mem <- o .: "mem"+ pools <- mem .: "pools"+ oldM <- pools .: "old"+ survivorM <- pools .: "survivor"+ youngM <- pools .: "young"+ NodeJVMStats+ <$> pure mapped+ <*> pure direct+ <*> pure oldC+ <*> pure youngC+ <*> threads+ .: "peak_count"+ <*> threads+ .: "count"+ <*> pure oldM+ <*> pure survivorM+ <*> pure youngM+ <*> mem+ .: "non_heap_committed_in_bytes"+ <*> mem+ .: "non_heap_used_in_bytes"+ <*> mem+ .: "heap_max_in_bytes"+ <*> mem+ .: "heap_committed_in_bytes"+ <*> mem+ .: "heap_used_percent"+ <*> mem+ .: "heap_used_in_bytes"+ <*> (unMS <$> o .: "uptime_in_millis")+ <*> (posixMS <$> o .: "timestamp")++instance FromJSON JVMBufferPoolStats where+ parseJSON = withObject "JVMBufferPoolStats" parse+ where+ parse o =+ JVMBufferPoolStats+ <$> o+ .: "total_capacity_in_bytes"+ <*> o+ .: "used_in_bytes"+ <*> o+ .: "count"++instance FromJSON JVMGCStats where+ parseJSON = withObject "JVMGCStats" parse+ where+ parse o =+ JVMGCStats+ <$> (unMS <$> o .: "collection_time_in_millis")+ <*> o+ .: "collection_count"++instance FromJSON JVMPoolStats where+ parseJSON = withObject "JVMPoolStats" parse+ where+ parse o =+ JVMPoolStats+ <$> o+ .: "peak_max_in_bytes"+ <*> o+ .: "peak_used_in_bytes"+ <*> o+ .: "max_in_bytes"+ <*> o+ .: "used_in_bytes"++instance FromJSON NodeProcessStats where+ parseJSON = withObject "NodeProcessStats" parse+ where+ parse o = do+ mem <- o .: "mem"+ cpu <- o .: "cpu"+ NodeProcessStats+ <$> (posixMS <$> o .: "timestamp")+ <*> o+ .: "open_file_descriptors"+ <*> o+ .: "max_file_descriptors"+ <*> cpu+ .: "percent"+ <*> (unMS <$> cpu .: "total_in_millis")+ <*> mem+ .: "total_virtual_in_bytes"++instance FromJSON NodeOSStats where+ parseJSON = withObject "NodeOSStats" parse+ where+ parse o = do+ swap <- o .: "swap"+ mem <- o .: "mem"+ cpu <- o .: "cpu"+ load <- o .:? "load_average"+ NodeOSStats+ <$> (posixMS <$> o .: "timestamp")+ <*> cpu+ .: "percent"+ <*> pure load+ <*> mem+ .: "total_in_bytes"+ <*> mem+ .: "free_in_bytes"+ <*> mem+ .: "free_percent"+ <*> mem+ .: "used_in_bytes"+ <*> mem+ .: "used_percent"+ <*> swap+ .: "total_in_bytes"+ <*> swap+ .: "free_in_bytes"+ <*> swap+ .: "used_in_bytes"++instance FromJSON LoadAvgs where+ parseJSON = withArray "LoadAvgs" parse+ where+ parse v = case V.toList v of+ [one, five, fifteen] ->+ LoadAvgs+ <$> parseJSON one+ <*> parseJSON five+ <*> parseJSON fifteen+ _ -> fail "Expecting a triple of Doubles"++instance FromJSON NodeIndicesStats where+ parseJSON = withObject "NodeIndicesStats" parse+ where+ parse o = do+ let (.::) mv k = case mv of+ Just v -> Just <$> v .: k+ Nothing -> pure Nothing+ mRecovery <- o .:? "recovery"+ mQueryCache <- o .:? "query_cache"+ mSuggest <- o .:? "suggest"+ translog <- o .: "translog"+ segments <- o .: "segments"+ completion <- o .: "completion"+ mPercolate <- o .:? "percolate"+ fielddata <- o .: "fielddata"+ warmer <- o .: "warmer"+ flush <- o .: "flush"+ refresh <- o .: "refresh"+ merges <- o .: "merges"+ search <- o .: "search"+ getStats <- o .: "get"+ indexing <- o .: "indexing"+ store <- o .: "store"+ docs <- o .: "docs"+ NodeIndicesStats+ <$> (fmap unMS <$> mRecovery .:: "throttle_time_in_millis")+ <*> mRecovery+ .:: "current_as_target"+ <*> mRecovery+ .:: "current_as_source"+ <*> mQueryCache+ .:: "miss_count"+ <*> mQueryCache+ .:: "hit_count"+ <*> mQueryCache+ .:: "evictions"+ <*> mQueryCache+ .:: "memory_size_in_bytes"+ <*> mSuggest+ .:: "current"+ <*> (fmap unMS <$> mSuggest .:: "time_in_millis")+ <*> mSuggest+ .:: "total"+ <*> translog+ .: "size_in_bytes"+ <*> translog+ .: "operations"+ <*> segments+ .:? "fixed_bit_set_memory_in_bytes"+ <*> segments+ .: "version_map_memory_in_bytes"+ <*> segments+ .:? "index_writer_max_memory_in_bytes"+ <*> segments+ .: "index_writer_memory_in_bytes"+ <*> segments+ .: "memory_in_bytes"+ <*> segments+ .: "count"+ <*> completion+ .: "size_in_bytes"+ <*> mPercolate+ .:: "queries"+ <*> mPercolate+ .:: "memory_size_in_bytes"+ <*> mPercolate+ .:: "current"+ <*> (fmap unMS <$> mPercolate .:: "time_in_millis")+ <*> mPercolate+ .:: "total"+ <*> fielddata+ .: "evictions"+ <*> fielddata+ .: "memory_size_in_bytes"+ <*> (unMS <$> warmer .: "total_time_in_millis")+ <*> warmer+ .: "total"+ <*> warmer+ .: "current"+ <*> (unMS <$> flush .: "total_time_in_millis")+ <*> flush+ .: "total"+ <*> (unMS <$> refresh .: "total_time_in_millis")+ <*> refresh+ .: "total"+ <*> merges+ .: "total_size_in_bytes"+ <*> merges+ .: "total_docs"+ <*> (unMS <$> merges .: "total_time_in_millis")+ <*> merges+ .: "total"+ <*> merges+ .: "current_size_in_bytes"+ <*> merges+ .: "current_docs"+ <*> merges+ .: "current"+ <*> search+ .: "fetch_current"+ <*> (unMS <$> search .: "fetch_time_in_millis")+ <*> search+ .: "fetch_total"+ <*> search+ .: "query_current"+ <*> (unMS <$> search .: "query_time_in_millis")+ <*> search+ .: "query_total"+ <*> search+ .: "open_contexts"+ <*> getStats+ .: "current"+ <*> (unMS <$> getStats .: "missing_time_in_millis")+ <*> getStats+ .: "missing_total"+ <*> (unMS <$> getStats .: "exists_time_in_millis")+ <*> getStats+ .: "exists_total"+ <*> (unMS <$> getStats .: "time_in_millis")+ <*> getStats+ .: "total"+ <*> (fmap unMS <$> indexing .:? "throttle_time_in_millis")+ <*> indexing+ .:? "is_throttled"+ <*> indexing+ .:? "noop_update_total"+ <*> indexing+ .: "delete_current"+ <*> (unMS <$> indexing .: "delete_time_in_millis")+ <*> indexing+ .: "delete_total"+ <*> indexing+ .: "index_current"+ <*> (unMS <$> indexing .: "index_time_in_millis")+ <*> indexing+ .: "index_total"+ <*> (fmap unMS <$> store .:? "throttle_time_in_millis")+ <*> store+ .: "size_in_bytes"+ <*> docs+ .: "deleted"+ <*> docs+ .: "count"++instance FromJSON NodeBreakersStats where+ parseJSON = withObject "NodeBreakersStats" parse+ where+ parse o =+ NodeBreakersStats+ <$> o+ .: "parent"+ <*> o+ .: "request"+ <*> o+ .: "fielddata"++parseNodeStats :: FullNodeId -> Object -> Parser NodeStats+parseNodeStats fnid o =+ NodeStats+ <$> o+ .: "name"+ <*> pure fnid+ <*> o+ .:? "breakers"+ <*> o+ .: "http"+ <*> o+ .: "transport"+ <*> o+ .: "fs"+ <*> o+ .:? "network"+ <*> o+ .: "thread_pool"+ <*> o+ .: "jvm"+ <*> o+ .: "process"+ <*> o+ .: "os"+ <*> o+ .: "indices"++parseNodeInfo :: FullNodeId -> Object -> Parser NodeInfo+parseNodeInfo nid o =+ NodeInfo+ <$> o+ .:? "http_address"+ <*> o+ .: "build_hash"+ <*> o+ .: "version"+ <*> o+ .: "ip"+ <*> o+ .: "host"+ <*> o+ .: "transport_address"+ <*> o+ .: "name"+ <*> pure nid+ <*> o+ .: "plugins"+ <*> o+ .: "http"+ <*> o+ .: "transport"+ <*> o+ .:? "network"+ <*> o+ .: "thread_pool"+ <*> o+ .: "jvm"+ <*> o+ .: "process"+ <*> o+ .: "os"+ <*> o+ .: "settings"++instance FromJSON NodePluginInfo where+ parseJSON = withObject "NodePluginInfo" parse+ where+ parse o =+ NodePluginInfo+ <$> o+ .:? "site"+ <*> o+ .:? "jvm"+ <*> o+ .: "description"+ <*> o+ .: "version"+ <*> o+ .: "name"++instance FromJSON NodeHTTPInfo where+ parseJSON = withObject "NodeHTTPInfo" parse+ where+ parse o =+ NodeHTTPInfo+ <$> o+ .: "max_content_length_in_bytes"+ <*> o+ .: "publish_address"+ <*> o+ .: "bound_address"++instance FromJSON BoundTransportAddress where+ parseJSON = withObject "BoundTransportAddress" parse+ where+ parse o =+ BoundTransportAddress+ <$> o+ .: "publish_address"+ <*> o+ .: "bound_address"++instance FromJSON NodeOSInfo where+ parseJSON = withObject "NodeOSInfo" parse+ where+ parse o =+ NodeOSInfo+ <$> (unMS <$> o .: "refresh_interval_in_millis")+ <*> o+ .: "name"+ <*> o+ .: "arch"+ <*> o+ .: "version"+ <*> o+ .: "available_processors"+ <*> o+ .: "allocated_processors"++instance FromJSON CPUInfo where+ parseJSON = withObject "CPUInfo" parse+ where+ parse o =+ CPUInfo+ <$> o+ .: "cache_size_in_bytes"+ <*> o+ .: "cores_per_socket"+ <*> o+ .: "total_sockets"+ <*> o+ .: "total_cores"+ <*> o+ .: "mhz"+ <*> o+ .: "model"+ <*> o+ .: "vendor"++instance FromJSON NodeProcessInfo where+ parseJSON = withObject "NodeProcessInfo" parse+ where+ parse o =+ NodeProcessInfo+ <$> o+ .: "mlockall"+ <*> o+ .:? "max_file_descriptors"+ <*> o+ .: "id"+ <*> (unMS <$> o .: "refresh_interval_in_millis")++instance FromJSON NodeJVMInfo where+ parseJSON = withObject "NodeJVMInfo" parse+ where+ parse o =+ NodeJVMInfo+ <$> o+ .: "memory_pools"+ <*> o+ .: "gc_collectors"+ <*> o+ .: "mem"+ <*> (posixMS <$> o .: "start_time_in_millis")+ <*> o+ .: "vm_vendor"+ <*> o+ .: "vm_version"+ <*> o+ .: "vm_name"+ <*> o+ .: "version"+ <*> o+ .: "pid"++instance FromJSON JVMMemoryInfo where+ parseJSON = withObject "JVMMemoryInfo" parse+ where+ parse o =+ JVMMemoryInfo+ <$> o+ .: "direct_max_in_bytes"+ <*> o+ .: "non_heap_max_in_bytes"+ <*> o+ .: "non_heap_init_in_bytes"+ <*> o+ .: "heap_max_in_bytes"+ <*> o+ .: "heap_init_in_bytes"++instance FromJSON NodeThreadPoolInfo where+ parseJSON = withObject "NodeThreadPoolInfo" parse+ where+ parse o = do+ ka <- maybe (return Nothing) (fmap Just . parseStringInterval) =<< o .:? "keep_alive"+ NodeThreadPoolInfo+ <$> (parseJSON . unStringlyTypeJSON =<< o .: "queue_size")+ <*> pure ka+ <*> o+ .:? "min"+ <*> o+ .:? "max"+ <*> o+ .: "type"++instance FromJSON ThreadPoolSize where+ parseJSON v = parseAsNumber v <|> parseAsString v+ where+ parseAsNumber = parseAsInt <=< parseJSON+ parseAsInt (-1) = return ThreadPoolUnbounded+ parseAsInt n+ | n >= 0 = return (ThreadPoolBounded n)+ | otherwise = fail "Thread pool size must be >= -1."+ parseAsString = withText "ThreadPoolSize" $ \t ->+ case first (readMay . T.unpack) (T.span isNumber t) of+ (Just n, "k") -> return (ThreadPoolBounded (n * 1000))+ (Just n, "") -> return (ThreadPoolBounded n)+ _ -> fail ("Invalid thread pool size " <> T.unpack t)++instance FromJSON ThreadPoolType where+ parseJSON = withText "ThreadPoolType" parse+ where+ parse "scaling" = return ThreadPoolScaling+ parse "fixed" = return ThreadPoolFixed+ parse "cached" = return ThreadPoolCached+ parse "fixed_auto_queue_size" = return ThreadPoolFixedAutoQueueSize+ parse e = fail ("Unexpected thread pool type" <> T.unpack e)++instance FromJSON NodeTransportInfo where+ parseJSON = withObject "NodeTransportInfo" parse+ where+ parse o =+ NodeTransportInfo+ <$> (maybe (return mempty) parseProfiles =<< o .:? "profiles")+ <*> o+ .: "publish_address"+ <*> o+ .: "bound_address"+ parseProfiles (Object o) | X.null o = return []+ parseProfiles v@(Array _) = parseJSON v+ parseProfiles Null = return []+ parseProfiles _ = fail "Could not parse profiles"++instance FromJSON NodeNetworkInfo where+ parseJSON = withObject "NodeNetworkInfo" parse+ where+ parse o =+ NodeNetworkInfo+ <$> o+ .: "primary_interface"+ <*> (unMS <$> o .: "refresh_interval_in_millis")++instance FromJSON NodeNetworkInterface where+ parseJSON = withObject "NodeNetworkInterface" parse+ where+ parse o =+ NodeNetworkInterface+ <$> o+ .: "mac_address"+ <*> o+ .: "name"+ <*> o+ .: "address"++data InitialShardCount+ = QuorumShards+ | QuorumMinus1Shards+ | FullShards+ | FullMinus1Shards+ | ExplicitShards Int+ deriving stock (Eq, Show, Generic)++instance FromJSON InitialShardCount where+ parseJSON v =+ withText "InitialShardCount" parseText v+ <|> ExplicitShards <$> parseJSON v+ where+ parseText "quorum" = pure QuorumShards+ parseText "quorum-1" = pure QuorumMinus1Shards+ parseText "full" = pure FullShards+ parseText "full-1" = pure FullMinus1Shards+ parseText _ = mzero++instance ToJSON InitialShardCount where+ toJSON QuorumShards = String "quorum"+ toJSON QuorumMinus1Shards = String "quorum-1"+ toJSON FullShards = String "full"+ toJSON FullMinus1Shards = String "full-1"+ toJSON (ExplicitShards x) = toJSON x++newtype ShardsResult = ShardsResult+ { srShards :: ShardResult+ }+ deriving stock (Eq, Show)++instance FromJSON ShardsResult where+ parseJSON =+ withObject "ShardsResult" $ \v ->+ ShardsResult+ <$> v+ .: "_shards"++srShardsLens :: Lens' ShardsResult ShardResult+srShardsLens = lens srShards (\x y -> x {srShards = y})++data ShardResult = ShardResult+ { shardTotal :: Int,+ shardsSuccessful :: Int,+ shardsSkipped :: Int,+ shardsFailed :: Int+ }+ deriving stock (Eq, Show)++instance FromJSON ShardResult where+ parseJSON =+ withObject "ShardResult" $ \v ->+ ShardResult+ <$> v .:? "total" .!= 0+ <*> v .:? "successful" .!= 0+ <*> v .:? "skipped" .!= 0+ <*> v .:? "failed" .!= 0++instance ToJSON ShardResult where+ toJSON ShardResult {..} =+ object+ [ "total" .= shardTotal,+ "successful" .= shardsSuccessful,+ "skipped" .= shardsSkipped,+ "failed" .= shardsFailed+ ]++shardTotalLens :: Lens' ShardResult Int+shardTotalLens = lens shardTotal (\x y -> x {shardTotal = y})++shardsSuccessfulLens :: Lens' ShardResult Int+shardsSuccessfulLens = lens shardsSuccessful (\x y -> x {shardsSuccessful = y})++shardsSkippedLens :: Lens' ShardResult Int+shardsSkippedLens = lens shardsSkipped (\x y -> x {shardsSkipped = y})++shardsFailedLens :: Lens' ShardResult Int+shardsFailedLens = lens shardsFailed (\x y -> x {shardsFailed = y})++-- | 'Version' is embedded in 'Status'+data Version = Version+ { number :: VersionNumber,+ build_hash :: BuildHash,+ build_date :: UTCTime,+ build_snapshot :: Bool,+ lucene_version :: VersionNumber+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON Version where+ toJSON Version {..} =+ object+ [ "number" .= number,+ "build_hash" .= build_hash,+ "build_date" .= build_date,+ "build_snapshot" .= build_snapshot,+ "lucene_version" .= lucene_version+ ]++instance FromJSON Version where+ parseJSON = withObject "Version" parse+ where+ parse o =+ Version+ <$> o+ .: "number"+ <*> o+ .: "build_hash"+ <*> o+ .: "build_date"+ <*> o+ .: "build_snapshot"+ <*> o+ .: "lucene_version"++versionNumberLens :: Lens' Version VersionNumber+versionNumberLens = lens number (\x y -> x {number = y})++versionBuildHashLens :: Lens' Version BuildHash+versionBuildHashLens = lens build_hash (\x y -> x {build_hash = y})++versionBuildDateLens :: Lens' Version UTCTime+versionBuildDateLens = lens build_date (\x y -> x {build_date = y})++versionBuildSnapshotLens :: Lens' Version Bool+versionBuildSnapshotLens = lens build_snapshot (\x y -> x {build_snapshot = y})++versionLuceneVersionLens :: Lens' Version VersionNumber+versionLuceneVersionLens = lens lucene_version (\x y -> x {lucene_version = y})++-- | Traditional software versioning number+newtype VersionNumber = VersionNumber+ {versionNumber :: Versions.Version}+ deriving stock (Eq, Ord, Show)++instance ToJSON VersionNumber where+ toJSON = toJSON . Versions.prettyVer . versionNumber++instance FromJSON VersionNumber where+ parseJSON = withText "VersionNumber" parse+ where+ parse t =+ case Versions.version t of+ (Left err) -> fail $ show err+ (Right v) -> return (VersionNumber v)
+ src/Database/Bloodhound/Internal/Versions/Common/Types/PointInTime.hs view
@@ -0,0 +1,29 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}++module Database.Bloodhound.Internal.Versions.Common.Types.PointInTime where++import Database.Bloodhound.Internal.Utils.Imports++data PointInTime = PointInTime+ { pointInTimeId :: Text,+ pointInTimeKeepAlive :: Text+ }+ deriving stock (Eq, Show)++instance ToJSON PointInTime where+ toJSON PointInTime {..} =+ object+ [ "id" .= pointInTimeId,+ "keep_alive" .= pointInTimeKeepAlive+ ]++instance FromJSON PointInTime where+ parseJSON (Object o) = PointInTime <$> o .: "id" <*> o .: "keep_alive"+ parseJSON x = typeMismatch "PointInTime" x++pointInTimeIdLens :: Lens' PointInTime Text+pointInTimeIdLens = lens pointInTimeId (\x y -> x {pointInTimeId = y})++pointInTimeKeepAliveLens :: Lens' PointInTime Text+pointInTimeKeepAliveLens = lens pointInTimeKeepAlive (\x y -> x {pointInTimeKeepAlive = y})
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Query.hs view
@@ -0,0 +1,935 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Query+ ( module X,+ BoolMatch (..),+ BoolQuery (..),+ BoostingQuery (..),+ Cache,+ ComponentFunctionScoreFunction (..),+ DisMaxQuery (..),+ Distance (..),+ DistanceRange (..),+ DistanceType (..),+ DistanceUnit (..),+ Filter (..),+ FunctionScoreFunctions (..),+ FunctionScoreQuery (..),+ GeoBoundingBox (..),+ GeoBoundingBoxConstraint (..),+ GeoFilterType (..),+ GeoPoint (..),+ HasChildQuery (..),+ HasParentQuery (..),+ IndicesQuery (..),+ InnerHits (..),+ LatLon (..),+ NestedQuery (..),+ OptimizeBbox (..),+ Query (..),+ RangeExecution (..),+ ScoreType (..),+ TemplateQueryKeyValuePairs (..),+ TemplateQueryValue,+ Term (..),+ defaultCache,+ functionScoreFunctionsPair,+ mkBoolQuery,+ showDistanceUnit,+ )+where++import qualified Data.Aeson.KeyMap as X+import qualified Data.HashMap.Strict as HM+import qualified Data.Text as T+import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.Internal.Versions.Common.Types.Query.CommonTerms as X+import Database.Bloodhound.Internal.Versions.Common.Types.Query.Commons as X+import Database.Bloodhound.Internal.Versions.Common.Types.Query.Fuzzy as X+import Database.Bloodhound.Internal.Versions.Common.Types.Query.Match as X+import Database.Bloodhound.Internal.Versions.Common.Types.Query.MoreLikeThis as X+import Database.Bloodhound.Internal.Versions.Common.Types.Query.MoreLikeThisField as X+import Database.Bloodhound.Internal.Versions.Common.Types.Query.Prefix as X+import Database.Bloodhound.Internal.Versions.Common.Types.Query.QueryString as X+import Database.Bloodhound.Internal.Versions.Common.Types.Query.Range as X+import Database.Bloodhound.Internal.Versions.Common.Types.Query.Regexp as X+import Database.Bloodhound.Internal.Versions.Common.Types.Query.SimpleQueryString as X+import Database.Bloodhound.Internal.Versions.Common.Types.Query.Wildcard as X+import Database.Bloodhound.Internal.Versions.Common.Types.Script as X+import GHC.Generics++data Query+ = TermQuery Term (Maybe Boost)+ | TermsQuery Key (NonEmpty Text)+ | QueryMatchQuery MatchQuery+ | QueryMultiMatchQuery MultiMatchQuery+ | QueryBoolQuery BoolQuery+ | QueryBoostingQuery BoostingQuery+ | QueryCommonTermsQuery CommonTermsQuery+ | ConstantScoreQuery Query Boost+ | QueryFunctionScoreQuery FunctionScoreQuery+ | QueryDisMaxQuery DisMaxQuery+ | QueryFuzzyLikeThisQuery FuzzyLikeThisQuery+ | QueryFuzzyLikeFieldQuery FuzzyLikeFieldQuery+ | QueryFuzzyQuery FuzzyQuery+ | QueryHasChildQuery HasChildQuery+ | QueryHasParentQuery HasParentQuery+ | IdsQuery [DocId]+ | QueryIndicesQuery IndicesQuery+ | MatchAllQuery (Maybe Boost)+ | QueryMoreLikeThisQuery MoreLikeThisQuery+ | QueryMoreLikeThisFieldQuery MoreLikeThisFieldQuery+ | QueryNestedQuery NestedQuery+ | QueryPrefixQuery PrefixQuery+ | QueryQueryStringQuery QueryStringQuery+ | QuerySimpleQueryStringQuery SimpleQueryStringQuery+ | QueryRangeQuery RangeQuery+ | QueryRegexpQuery RegexpQuery+ | QueryExistsQuery FieldName+ | QueryMatchNoneQuery+ | QueryWildcardQuery WildcardQuery+ deriving stock (Eq, Show, Generic)++instance ToJSON Query where+ toJSON (TermQuery (Term termQueryField termQueryValue) boost) =+ object+ [ "term"+ .= object [termQueryField .= object merged]+ ]+ where+ base = ["value" .= termQueryValue]+ boosted = maybe [] (return . ("boost" .=)) boost+ merged = mappend base boosted+ toJSON (TermsQuery fieldName terms) =+ object ["terms" .= object conjoined]+ where+ conjoined = [fieldName .= terms]+ toJSON (IdsQuery docIds) =+ object ["ids" .= object conjoined]+ where+ conjoined = ["values" .= fmap toJSON docIds]+ toJSON (QueryQueryStringQuery qQueryStringQuery) =+ object ["query_string" .= qQueryStringQuery]+ toJSON (QueryMatchQuery matchQuery) =+ object ["match" .= matchQuery]+ toJSON (QueryMultiMatchQuery multiMatchQuery) =+ toJSON multiMatchQuery+ toJSON (QueryBoolQuery boolQuery) =+ object ["bool" .= boolQuery]+ toJSON (QueryBoostingQuery boostingQuery) =+ object ["boosting" .= boostingQuery]+ toJSON (QueryCommonTermsQuery commonTermsQuery) =+ object ["common" .= commonTermsQuery]+ toJSON (ConstantScoreQuery query boost) =+ object+ [ "constant_score"+ .= object+ [ "filter" .= query,+ "boost" .= boost+ ]+ ]+ toJSON (QueryFunctionScoreQuery functionScoreQuery') =+ object ["function_score" .= functionScoreQuery']+ toJSON (QueryDisMaxQuery disMaxQuery) =+ object ["dis_max" .= disMaxQuery]+ toJSON (QueryFuzzyLikeThisQuery fuzzyQuery) =+ object ["fuzzy_like_this" .= fuzzyQuery]+ toJSON (QueryFuzzyLikeFieldQuery fuzzyFieldQuery) =+ object ["fuzzy_like_this_field" .= fuzzyFieldQuery]+ toJSON (QueryFuzzyQuery fuzzyQuery) =+ object ["fuzzy" .= fuzzyQuery]+ toJSON (QueryHasChildQuery childQuery) =+ object ["has_child" .= childQuery]+ toJSON (QueryHasParentQuery parentQuery) =+ object ["has_parent" .= parentQuery]+ toJSON (QueryIndicesQuery qIndicesQuery) =+ object ["indices" .= qIndicesQuery]+ toJSON (MatchAllQuery boost) =+ object ["match_all" .= omitNulls ["boost" .= boost]]+ toJSON (QueryMoreLikeThisQuery query) =+ object ["more_like_this" .= query]+ toJSON (QueryMoreLikeThisFieldQuery query) =+ object ["more_like_this_field" .= query]+ toJSON (QueryNestedQuery query) =+ object ["nested" .= query]+ toJSON (QueryPrefixQuery query) =+ object ["prefix" .= query]+ toJSON (QueryRangeQuery query) =+ object ["range" .= query]+ toJSON (QueryRegexpQuery query) =+ object ["regexp" .= query]+ toJSON (QuerySimpleQueryStringQuery query) =+ object ["simple_query_string" .= query]+ toJSON (QueryExistsQuery (FieldName fieldName)) =+ object+ [ "exists"+ .= object+ ["field" .= fieldName]+ ]+ toJSON QueryMatchNoneQuery =+ object ["match_none" .= object []]+ toJSON (QueryWildcardQuery query) =+ object ["wildcard" .= query]++instance FromJSON Query where+ parseJSON v = withObject "Query" parse v+ where+ parse o =+ termQuery+ `taggedWith` "term"+ <|> termsQuery+ `taggedWith` "terms"+ <|> idsQuery+ `taggedWith` "ids"+ <|> queryQueryStringQuery+ `taggedWith` "query_string"+ <|> queryMatchQuery+ `taggedWith` "match"+ <|> queryMultiMatchQuery+ <|> queryBoolQuery+ `taggedWith` "bool"+ <|> queryBoostingQuery+ `taggedWith` "boosting"+ <|> queryCommonTermsQuery+ `taggedWith` "common"+ <|> constantScoreQuery+ `taggedWith` "constant_score"+ <|> queryFunctionScoreQuery+ `taggedWith` "function_score"+ <|> queryDisMaxQuery+ `taggedWith` "dis_max"+ <|> queryFuzzyLikeThisQuery+ `taggedWith` "fuzzy_like_this"+ <|> queryFuzzyLikeFieldQuery+ `taggedWith` "fuzzy_like_this_field"+ <|> queryFuzzyQuery+ `taggedWith` "fuzzy"+ <|> queryHasChildQuery+ `taggedWith` "has_child"+ <|> queryHasParentQuery+ `taggedWith` "has_parent"+ <|> queryIndicesQuery+ `taggedWith` "indices"+ <|> matchAllQuery+ `taggedWith` "match_all"+ <|> queryMoreLikeThisQuery+ `taggedWith` "more_like_this"+ <|> queryMoreLikeThisFieldQuery+ `taggedWith` "more_like_this_field"+ <|> queryNestedQuery+ `taggedWith` "nested"+ <|> queryPrefixQuery+ `taggedWith` "prefix"+ <|> queryRangeQuery+ `taggedWith` "range"+ <|> queryRegexpQuery+ `taggedWith` "regexp"+ <|> querySimpleQueryStringQuery+ `taggedWith` "simple_query_string"+ <|> queryWildcardQuery+ `taggedWith` "wildcard"+ where+ taggedWith parser k = parser =<< o .: k+ termQuery = fieldTagged $ \(FieldName fn) o ->+ TermQuery <$> (Term (fromText fn) <$> o .: "value") <*> o .:? "boost"+ termsQuery o = case HM.toList o of+ [(fn, vs)] -> do+ vals <- parseJSON vs+ case vals of+ x : xs -> return (TermsQuery fn (x :| xs))+ _ -> fail "Expected non empty list of values"+ _ -> fail "Expected object with 1 field-named key"+ idsQuery o = IdsQuery <$> o .: "values"+ queryQueryStringQuery = pure . QueryQueryStringQuery+ queryMatchQuery = pure . QueryMatchQuery+ queryMultiMatchQuery = QueryMultiMatchQuery <$> parseJSON v+ queryBoolQuery = pure . QueryBoolQuery+ queryBoostingQuery = pure . QueryBoostingQuery+ queryCommonTermsQuery = pure . QueryCommonTermsQuery+ constantScoreQuery o = case X.lookup "filter" o of+ Just x ->+ ConstantScoreQuery+ <$> parseJSON x+ <*> o .: "boost"+ _ -> fail "Does not appear to be a ConstantScoreQuery"+ queryFunctionScoreQuery = pure . QueryFunctionScoreQuery+ queryDisMaxQuery = pure . QueryDisMaxQuery+ queryFuzzyLikeThisQuery = pure . QueryFuzzyLikeThisQuery+ queryFuzzyLikeFieldQuery = pure . QueryFuzzyLikeFieldQuery+ queryFuzzyQuery = pure . QueryFuzzyQuery+ queryHasChildQuery = pure . QueryHasChildQuery+ queryHasParentQuery = pure . QueryHasParentQuery+ queryIndicesQuery = pure . QueryIndicesQuery+ matchAllQuery o = MatchAllQuery <$> o .:? "boost"+ queryMoreLikeThisQuery = pure . QueryMoreLikeThisQuery+ queryMoreLikeThisFieldQuery = pure . QueryMoreLikeThisFieldQuery+ queryNestedQuery = pure . QueryNestedQuery+ queryPrefixQuery = pure . QueryPrefixQuery+ queryRangeQuery = pure . QueryRangeQuery+ queryRegexpQuery = pure . QueryRegexpQuery+ querySimpleQueryStringQuery = pure . QuerySimpleQueryStringQuery+ -- queryExistsQuery o = QueryExistsQuery <$> o .: "field"+ queryWildcardQuery = pure . QueryWildcardQuery++-- | As of Elastic 2.0, 'Filters' are just 'Queries' housed in a+-- Bool Query, and flagged in a different context.+newtype Filter = Filter {unFilter :: Query}+ deriving stock (Eq, Show)++instance ToJSON Filter where+ toJSON = toJSON . unFilter++instance FromJSON Filter where+ parseJSON v = Filter <$> parseJSON v++data NestedQuery = NestedQuery+ { nestedQueryPath :: QueryPath,+ nestedQueryScoreType :: ScoreType,+ nestedQuery :: Query,+ nestedQueryInnerHits :: Maybe InnerHits+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON NestedQuery where+ toJSON (NestedQuery nqPath nqScoreType nqQuery nqInnerHits) =+ omitNulls+ [ "path" .= nqPath,+ "score_mode" .= nqScoreType,+ "query" .= nqQuery,+ "inner_hits" .= nqInnerHits+ ]++instance FromJSON NestedQuery where+ parseJSON = withObject "NestedQuery" parse+ where+ parse o =+ NestedQuery+ <$> o .: "path"+ <*> o .: "score_mode"+ <*> o .: "query"+ <*> o .:? "inner_hits"++data IndicesQuery = IndicesQuery+ { indicesQueryIndices :: [IndexName],+ indicesQuery :: Query,+ -- default "all"+ indicesQueryNoMatch :: Maybe Query+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON IndicesQuery where+ toJSON (IndicesQuery indices query noMatch) =+ omitNulls+ [ "indices" .= indices,+ "no_match_query" .= noMatch,+ "query" .= query+ ]++instance FromJSON IndicesQuery where+ parseJSON = withObject "IndicesQuery" parse+ where+ parse o =+ IndicesQuery+ <$> o .:? "indices" .!= []+ <*> o .: "query"+ <*> o .:? "no_match_query"++data HasParentQuery = HasParentQuery+ { hasParentQueryType :: RelationName,+ hasParentQuery :: Query,+ hasParentQueryScore :: Maybe AggregateParentScore,+ hasParentIgnoreUnmapped :: Maybe IgnoreUnmapped+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON HasParentQuery where+ toJSON (HasParentQuery queryType query scoreType ignoreUnmapped) =+ omitNulls+ [ "parent_type" .= queryType,+ "score" .= scoreType,+ "query" .= query,+ "ignore_unmapped" .= ignoreUnmapped+ ]++instance FromJSON HasParentQuery where+ parseJSON = withObject "HasParentQuery" parse+ where+ parse o =+ HasParentQuery+ <$> o .: "parent_type"+ <*> o .: "query"+ <*> o .:? "score"+ <*> o .:? "ignore_unmapped"++data HasChildQuery = HasChildQuery+ { hasChildQueryType :: RelationName,+ hasChildQuery :: Query,+ hasChildQueryScoreType :: Maybe ScoreType,+ hasChildIgnoreUnmappped :: Maybe IgnoreUnmapped,+ hasChildMinChildren :: Maybe MinChildren,+ hasChildMaxChildren :: Maybe MaxChildren+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON HasChildQuery where+ toJSON (HasChildQuery queryType query scoreType ignoreUnmapped minChildren maxChildren) =+ omitNulls+ [ "query" .= query,+ "score_mode" .= scoreType,+ "type" .= queryType,+ "min_children" .= minChildren,+ "max_children" .= maxChildren,+ "ignore_unmapped" .= ignoreUnmapped+ ]++instance FromJSON HasChildQuery where+ parseJSON = withObject "HasChildQuery" parse+ where+ parse o =+ HasChildQuery+ <$> o .: "type"+ <*> o .: "query"+ <*> o .:? "score_mode"+ <*> o .:? "ignore_unmapped"+ <*> o .:? "min_children"+ <*> o .:? "max_children"++data ScoreType+ = ScoreTypeMax+ | ScoreTypeSum+ | ScoreTypeAvg+ | ScoreTypeNone+ deriving stock (Eq, Show, Generic)++instance ToJSON ScoreType where+ toJSON ScoreTypeMax = "max"+ toJSON ScoreTypeAvg = "avg"+ toJSON ScoreTypeSum = "sum"+ toJSON ScoreTypeNone = "none"++instance FromJSON ScoreType where+ parseJSON = withText "ScoreType" parse+ where+ parse "max" = pure ScoreTypeMax+ parse "avg" = pure ScoreTypeAvg+ parse "sum" = pure ScoreTypeSum+ parse "none" = pure ScoreTypeNone+ parse t = fail ("Unexpected ScoreType: " <> show t)++data DisMaxQuery = DisMaxQuery+ { disMaxQueries :: [Query],+ -- default 0.0+ disMaxTiebreaker :: Tiebreaker,+ disMaxBoost :: Maybe Boost+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON DisMaxQuery where+ toJSON (DisMaxQuery queries tiebreaker boost) =+ omitNulls base+ where+ base =+ [ "queries" .= queries,+ "boost" .= boost,+ "tie_breaker" .= tiebreaker+ ]++instance FromJSON DisMaxQuery where+ parseJSON = withObject "DisMaxQuery" parse+ where+ parse o =+ DisMaxQuery+ <$> o .:? "queries" .!= []+ <*> o .: "tie_breaker"+ <*> o .:? "boost"++data BoolQuery = BoolQuery+ { boolQueryMustMatch :: [Query],+ boolQueryFilter :: [Filter],+ boolQueryMustNotMatch :: [Query],+ boolQueryShouldMatch :: [Query],+ boolQueryMinimumShouldMatch :: Maybe MinimumMatch,+ boolQueryBoost :: Maybe Boost,+ boolQueryDisableCoord :: Maybe DisableCoord+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON BoolQuery where+ toJSON (BoolQuery mustM filterM' notM shouldM bqMin boost disableCoord) =+ omitNulls base+ where+ base =+ [ "must" .= mustM,+ "filter" .= filterM',+ "must_not" .= notM,+ "should" .= shouldM,+ "minimum_should_match" .= bqMin,+ "boost" .= boost,+ "disable_coord" .= disableCoord+ ]++instance FromJSON BoolQuery where+ parseJSON = withObject "BoolQuery" parse+ where+ parse o =+ BoolQuery+ <$> o .:? "must" .!= []+ <*> o .:? "filter" .!= []+ <*> o .:? "must_not" .!= []+ <*> o .:? "should" .!= []+ <*> o .:? "minimum_should_match"+ <*> o .:? "boost"+ <*> o .:? "disable_coord"++mkBoolQuery :: [Query] -> [Filter] -> [Query] -> [Query] -> BoolQuery+mkBoolQuery must filt mustNot should =+ BoolQuery must filt mustNot should Nothing Nothing Nothing++data BoostingQuery = BoostingQuery+ { positiveQuery :: Query,+ negativeQuery :: Query,+ negativeBoost :: Boost+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON BoostingQuery where+ toJSON (BoostingQuery bqPositiveQuery bqNegativeQuery bqNegativeBoost) =+ object+ [ "positive" .= bqPositiveQuery,+ "negative" .= bqNegativeQuery,+ "negative_boost" .= bqNegativeBoost+ ]++instance FromJSON BoostingQuery where+ parseJSON = withObject "BoostingQuery" parse+ where+ parse o =+ BoostingQuery+ <$> o .: "positive"+ <*> o .: "negative"+ <*> o .: "negative_boost"++data RangeExecution+ = RangeExecutionIndex+ | RangeExecutionFielddata+ deriving stock (Eq, Show, Generic)++-- index for smaller ranges, fielddata for longer ranges+instance ToJSON RangeExecution where+ toJSON RangeExecutionIndex = "index"+ toJSON RangeExecutionFielddata = "fielddata"++instance FromJSON RangeExecution where+ parseJSON = withText "RangeExecution" parse+ where+ parse "index" = pure RangeExecutionIndex+ parse "fielddata" = pure RangeExecutionFielddata+ parse t = error ("Unrecognized RangeExecution " <> show t)++data Term = Term+ { termField :: Key,+ termValue :: Text+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON Term where+ toJSON (Term field value) =+ object+ [ "term"+ .= object+ [field .= value]+ ]++instance FromJSON Term where+ parseJSON = withObject "Term" parse+ where+ parse o = do+ termObj <- o .: "term"+ case HM.toList termObj of+ [(fn, v)] -> Term fn <$> parseJSON v+ _ -> fail "Expected object with 1 field-named key"++data BoolMatch+ = MustMatch Term Cache+ | MustNotMatch Term Cache+ | ShouldMatch [Term] Cache+ deriving stock (Eq, Show, Generic)++instance ToJSON BoolMatch where+ toJSON (MustMatch term cache) =+ object+ [ "must" .= term,+ "_cache" .= cache+ ]+ toJSON (MustNotMatch term cache) =+ object+ [ "must_not" .= term,+ "_cache" .= cache+ ]+ toJSON (ShouldMatch terms cache) =+ object+ [ "should" .= fmap toJSON terms,+ "_cache" .= cache+ ]++instance FromJSON BoolMatch where+ parseJSON = withObject "BoolMatch" parse+ where+ parse o =+ mustMatch+ `taggedWith` "must"+ <|> mustNotMatch+ `taggedWith` "must_not"+ <|> shouldMatch+ `taggedWith` "should"+ where+ taggedWith parser k = parser =<< o .: k+ mustMatch t = MustMatch t <$> o .:? "_cache" .!= defaultCache+ mustNotMatch t = MustNotMatch t <$> o .:? "_cache" .!= defaultCache+ shouldMatch t = ShouldMatch t <$> o .:? "_cache" .!= defaultCache++-- "memory" or "indexed"+data GeoFilterType+ = GeoFilterMemory+ | GeoFilterIndexed+ deriving stock (Eq, Show, Generic)++instance ToJSON GeoFilterType where+ toJSON GeoFilterMemory = String "memory"+ toJSON GeoFilterIndexed = String "indexed"++instance FromJSON GeoFilterType where+ parseJSON = withText "GeoFilterType" parse+ where+ parse "memory" = pure GeoFilterMemory+ parse "indexed" = pure GeoFilterIndexed+ parse t = fail ("Unrecognized GeoFilterType: " <> show t)++data LatLon = LatLon+ { lat :: Double,+ lon :: Double+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON LatLon where+ toJSON (LatLon lLat lLon) =+ object+ [ "lat" .= lLat,+ "lon" .= lLon+ ]++instance FromJSON LatLon where+ parseJSON = withObject "LatLon" parse+ where+ parse o =+ LatLon+ <$> o .: "lat"+ <*> o .: "lon"++data GeoBoundingBox = GeoBoundingBox+ { topLeft :: LatLon,+ bottomRight :: LatLon+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON GeoBoundingBox where+ toJSON (GeoBoundingBox gbbTopLeft gbbBottomRight) =+ object+ [ "top_left" .= gbbTopLeft,+ "bottom_right" .= gbbBottomRight+ ]++instance FromJSON GeoBoundingBox where+ parseJSON = withObject "GeoBoundingBox" parse+ where+ parse o =+ GeoBoundingBox+ <$> o .: "top_left"+ <*> o .: "bottom_right"++data GeoBoundingBoxConstraint = GeoBoundingBoxConstraint+ { geoBBField :: FieldName,+ constraintBox :: GeoBoundingBox,+ bbConstraintcache :: Cache,+ geoType :: GeoFilterType+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON GeoBoundingBoxConstraint where+ toJSON+ ( GeoBoundingBoxConstraint+ (FieldName gbbcGeoBBField)+ gbbcConstraintBox+ cache+ type'+ ) =+ object+ [ fromText gbbcGeoBBField .= gbbcConstraintBox,+ "_cache" .= cache,+ "type" .= type'+ ]++instance FromJSON GeoBoundingBoxConstraint where+ parseJSON = withObject "GeoBoundingBoxConstraint" parse+ where+ parse o = case X.toList (deleteSeveral ["type", "_cache"] o) of+ [(fn, v)] ->+ GeoBoundingBoxConstraint (FieldName $ toText fn)+ <$> parseJSON v+ <*> o .:? "_cache" .!= defaultCache+ <*> o .: "type"+ _ -> fail "Could not find field name for GeoBoundingBoxConstraint"++data GeoPoint = GeoPoint+ { geoField :: FieldName,+ latLon :: LatLon+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON GeoPoint where+ toJSON (GeoPoint (FieldName geoPointField) geoPointLatLon) =+ object [fromText geoPointField .= geoPointLatLon]++data DistanceUnit+ = Miles+ | Yards+ | Feet+ | Inches+ | Kilometers+ | Meters+ | Centimeters+ | Millimeters+ | NauticalMiles+ deriving stock (Eq, Show, Generic)++showDistanceUnit :: DistanceUnit -> Text+showDistanceUnit x =+ case x of+ Miles -> "mi"+ Yards -> "yd"+ Feet -> "ft"+ Inches -> "in"+ Kilometers -> "km"+ Meters -> "m"+ Centimeters -> "cm"+ Millimeters -> "mm"+ NauticalMiles -> "nmi"++instance ToJSON DistanceUnit where+ toJSON = String . showDistanceUnit++instance FromJSON DistanceUnit where+ parseJSON = withText "DistanceUnit" parse+ where+ parse "mi" = pure Miles+ parse "yd" = pure Yards+ parse "ft" = pure Feet+ parse "in" = pure Inches+ parse "km" = pure Kilometers+ parse "m" = pure Meters+ parse "cm" = pure Centimeters+ parse "mm" = pure Millimeters+ parse "nmi" = pure NauticalMiles+ parse u = fail ("Unrecognized DistanceUnit: " <> show u)++data DistanceType+ = Arc+ | SloppyArc -- doesn't exist <1.0+ | Plane+ deriving stock (Eq, Show, Generic)++instance ToJSON DistanceType where+ toJSON Arc = String "arc"+ toJSON SloppyArc = String "sloppy_arc"+ toJSON Plane = String "plane"++instance FromJSON DistanceType where+ parseJSON = withText "DistanceType" parse+ where+ parse "arc" = pure Arc+ parse "sloppy_arc" = pure SloppyArc+ parse "plane" = pure Plane+ parse t = fail ("Unrecognized DistanceType: " <> show t)++data OptimizeBbox+ = OptimizeGeoFilterType GeoFilterType+ | NoOptimizeBbox+ deriving stock (Eq, Show, Generic)++instance ToJSON OptimizeBbox where+ toJSON NoOptimizeBbox = String "none"+ toJSON (OptimizeGeoFilterType gft) = toJSON gft++instance FromJSON OptimizeBbox where+ parseJSON v =+ withText "NoOptimizeBbox" parseNoOptimize v+ <|> parseOptimize v+ where+ parseNoOptimize "none" = pure NoOptimizeBbox+ parseNoOptimize _ = mzero+ parseOptimize = fmap OptimizeGeoFilterType . parseJSON++data Distance = Distance+ { coefficient :: Double,+ unit :: DistanceUnit+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON Distance where+ toJSON (Distance dCoefficient dUnit) =+ String boltedTogether+ where+ coefText = showText dCoefficient+ boltedTogether = mappend coefText $ showDistanceUnit dUnit++instance FromJSON Distance where+ parseJSON = withText "Distance" parse+ where+ parse t =+ Distance+ <$> parseCoeff nT+ <*> parseJSON (String unitT)+ where+ (nT, unitT) = T.span validForNumber t+ -- may be a better way to do this+ validForNumber '-' = True+ validForNumber '.' = True+ validForNumber 'e' = True+ validForNumber c = isNumber c+ parseCoeff "" = fail "Empty string cannot be parsed as number"+ parseCoeff s = return (read (T.unpack s))++data DistanceRange = DistanceRange+ { distanceFrom :: Distance,+ distanceTo :: Distance+ }+ deriving stock (Eq, Show, Generic)++type TemplateQueryValue = Text++newtype TemplateQueryKeyValuePairs+ = TemplateQueryKeyValuePairs (X.KeyMap TemplateQueryValue)+ deriving stock (Eq, Show)++instance ToJSON TemplateQueryKeyValuePairs where+ toJSON (TemplateQueryKeyValuePairs x) = Object $ String <$> x++instance FromJSON TemplateQueryKeyValuePairs where+ parseJSON (Object o) =+ pure . TemplateQueryKeyValuePairs $ X.mapMaybe getValue o+ where+ getValue (String x) = Just x+ getValue _ = Nothing+ parseJSON _ =+ fail "error parsing TemplateQueryKeyValuePairs"++-- | 'Cache' is for telling ES whether it should cache a 'Filter' not.+-- 'Query's cannot be cached.+type Cache = Bool -- caching on/off++defaultCache :: Cache+defaultCache = False++data FunctionScoreQuery = FunctionScoreQuery+ { functionScoreQuery :: Maybe Query,+ functionScoreBoost :: Maybe Boost,+ functionScoreFunctions :: FunctionScoreFunctions,+ functionScoreMaxBoost :: Maybe Boost,+ functionScoreBoostMode :: Maybe BoostMode,+ functionScoreMinScore :: Score,+ functionScoreScoreMode :: Maybe ScoreMode+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON FunctionScoreQuery where+ toJSON (FunctionScoreQuery query boost fns maxBoost boostMode minScore scoreMode) =+ omitNulls base+ where+ base =+ functionScoreFunctionsPair fns+ : [ "query" .= query,+ "boost" .= boost,+ "max_boost" .= maxBoost,+ "boost_mode" .= boostMode,+ "min_score" .= minScore,+ "score_mode" .= scoreMode+ ]++instance FromJSON FunctionScoreQuery where+ parseJSON = withObject "FunctionScoreQuery" parse+ where+ parse o =+ FunctionScoreQuery+ <$> o .:? "query"+ <*> o .:? "boost"+ <*> ( singleFunction o+ <|> multipleFunctions+ `taggedWith` "functions"+ )+ <*> o .:? "max_boost"+ <*> o .:? "boost_mode"+ <*> o .:? "min_score"+ <*> o .:? "score_mode"+ where+ taggedWith parser k = parser =<< o .: k+ singleFunction = fmap FunctionScoreSingle . parseFunctionScoreFunction+ multipleFunctions = pure . FunctionScoreMultiple++data FunctionScoreFunctions+ = FunctionScoreSingle FunctionScoreFunction+ | FunctionScoreMultiple (NonEmpty ComponentFunctionScoreFunction)+ deriving stock (Eq, Show, Generic)++data ComponentFunctionScoreFunction = ComponentFunctionScoreFunction+ { componentScoreFunctionFilter :: Maybe Filter,+ componentScoreFunction :: FunctionScoreFunction,+ componentScoreFunctionWeight :: Maybe Weight+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON ComponentFunctionScoreFunction where+ toJSON (ComponentFunctionScoreFunction filter' fn weight) =+ omitNulls base+ where+ base =+ functionScoreFunctionPair fn+ : [ "filter" .= filter',+ "weight" .= weight+ ]++instance FromJSON ComponentFunctionScoreFunction where+ parseJSON = withObject "ComponentFunctionScoreFunction" parse+ where+ parse o =+ ComponentFunctionScoreFunction+ <$> o .:? "filter"+ <*> parseFunctionScoreFunction o+ <*> o .:? "weight"++functionScoreFunctionsPair :: FunctionScoreFunctions -> (Key, Value)+functionScoreFunctionsPair (FunctionScoreSingle fn) =+ functionScoreFunctionPair fn+functionScoreFunctionsPair (FunctionScoreMultiple componentFns) =+ ("functions", toJSON componentFns)++data InnerHits = InnerHits+ { innerHitsFrom :: Maybe Integer,+ innerHitsSize :: Maybe Integer+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON InnerHits where+ toJSON (InnerHits ihFrom ihSize) =+ omitNulls+ [ "from" .= ihFrom,+ "size" .= ihSize+ ]++instance FromJSON InnerHits where+ parseJSON = withObject "InnerHits" parse+ where+ parse o =+ InnerHits+ <$> o .:? "from"+ <*> o .:? "size"
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Query/CommonTerms.hs view
@@ -0,0 +1,101 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Query.CommonTerms+ ( CommonMinimumMatch (..),+ CommonTermsQuery (..),+ MinimumMatchHighLow (..),+ )+where++import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.Internal.Versions.Common.Types.Query.Commons+import GHC.Generics++data CommonTermsQuery = CommonTermsQuery+ { commonField :: FieldName,+ commonQuery :: QueryString,+ commonCutoffFrequency :: CutoffFrequency,+ commonLowFreqOperator :: BooleanOperator,+ commonHighFreqOperator :: BooleanOperator,+ commonMinimumShouldMatch :: Maybe CommonMinimumMatch,+ commonBoost :: Maybe Boost,+ commonAnalyzer :: Maybe Analyzer,+ commonDisableCoord :: Maybe DisableCoord+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON CommonTermsQuery where+ toJSON+ ( CommonTermsQuery+ (FieldName fieldName)+ (QueryString query)+ cf+ lfo+ hfo+ msm+ boost+ analyzer+ disableCoord+ ) =+ object [fromText fieldName .= omitNulls base]+ where+ base =+ [ "query" .= query,+ "cutoff_frequency" .= cf,+ "low_freq_operator" .= lfo,+ "minimum_should_match" .= msm,+ "boost" .= boost,+ "analyzer" .= analyzer,+ "disable_coord" .= disableCoord,+ "high_freq_operator" .= hfo+ ]++instance FromJSON CommonTermsQuery where+ parseJSON = withObject "CommonTermsQuery" parse+ where+ parse = fieldTagged $ \fn o ->+ CommonTermsQuery fn+ <$> o .: "query"+ <*> o .: "cutoff_frequency"+ <*> o .: "low_freq_operator"+ <*> o .: "high_freq_operator"+ <*> o .:? "minimum_should_match"+ <*> o .:? "boost"+ <*> o .:? "analyzer"+ <*> o .:? "disable_coord"++data CommonMinimumMatch+ = CommonMinimumMatchHighLow MinimumMatchHighLow+ | CommonMinimumMatch MinimumMatch+ deriving stock (Eq, Show, Generic)++instance ToJSON CommonMinimumMatch where+ toJSON (CommonMinimumMatch mm) = toJSON mm+ toJSON (CommonMinimumMatchHighLow (MinimumMatchHighLow lowF highF)) =+ object+ [ "low_freq" .= lowF,+ "high_freq" .= highF+ ]++instance FromJSON CommonMinimumMatch where+ parseJSON v =+ parseMinimum v+ <|> parseMinimumHighLow v+ where+ parseMinimum = fmap CommonMinimumMatch . parseJSON+ parseMinimumHighLow =+ fmap CommonMinimumMatchHighLow+ . withObject+ "CommonMinimumMatchHighLow"+ ( \o ->+ MinimumMatchHighLow+ <$> o .: "low_freq"+ <*> o .: "high_freq"+ )++data MinimumMatchHighLow = MinimumMatchHighLow+ { lowFreq :: MinimumMatch,+ highFreq :: MinimumMatch+ }+ deriving stock (Eq, Show, Generic)
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Query/Commons.hs view
@@ -0,0 +1,64 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Query.Commons+ ( BooleanOperator (..),+ Fuzziness (..),+ ZeroTermsQuery (..),+ fieldTagged,+ )+where++import qualified Data.Aeson.KeyMap as X+import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import GHC.Generics++data ZeroTermsQuery+ = ZeroTermsNone+ | ZeroTermsAll+ deriving stock (Eq, Show, Generic)++instance ToJSON ZeroTermsQuery where+ toJSON ZeroTermsNone = String "none"+ toJSON ZeroTermsAll = String "all"++instance FromJSON ZeroTermsQuery where+ parseJSON = withText "ZeroTermsQuery" parse+ where+ parse "none" = pure ZeroTermsNone+ parse "all" = pure ZeroTermsAll+ parse q = fail ("Unexpected ZeroTermsQuery: " <> show q)++-- | 'BooleanOperator' is the usual And/Or operators with an ES compatible+-- JSON encoding baked in. Used all over the place.+data BooleanOperator = And | Or deriving stock (Eq, Show, Generic)++instance ToJSON BooleanOperator where+ toJSON And = String "and"+ toJSON Or = String "or"++instance FromJSON BooleanOperator where+ parseJSON = withText "BooleanOperator" parse+ where+ parse "and" = pure And+ parse "or" = pure Or+ parse o = fail ("Unexpected BooleanOperator: " <> show o)++-- | Fuzziness value as a number or 'AUTO'.+-- See:+-- https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#fuzziness+data Fuzziness = Fuzziness Double | FuzzinessAuto+ deriving stock (Eq, Show, Generic)++instance ToJSON Fuzziness where+ toJSON (Fuzziness n) = toJSON n+ toJSON FuzzinessAuto = String "AUTO"++instance FromJSON Fuzziness where+ parseJSON (String "AUTO") = return FuzzinessAuto+ parseJSON v = Fuzziness <$> parseJSON v++fieldTagged :: (Monad m, MonadFail m) => (FieldName -> Object -> m a) -> Object -> m a+fieldTagged f o = case X.toList o of+ [(k, Object o')] -> f (FieldName $ toText k) o'+ _ -> fail "Expected object with 1 field-named key"
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Query/Fuzzy.hs view
@@ -0,0 +1,157 @@+{-# LANGUAGE OverloadedStrings #-}++-- TODO Fuzziness ???+module Database.Bloodhound.Internal.Versions.Common.Types.Query.Fuzzy+ ( FuzzyQuery (..),+ FuzzyLikeFieldQuery (..),+ FuzzyLikeThisQuery (..),+ )+where++import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.Internal.Versions.Common.Types.Query.Commons+import GHC.Generics++data FuzzyQuery = FuzzyQuery+ { fuzzyQueryField :: FieldName,+ fuzzyQueryValue :: Text,+ fuzzyQueryPrefixLength :: PrefixLength,+ fuzzyQueryMaxExpansions :: MaxExpansions,+ fuzzyQueryFuzziness :: Fuzziness,+ fuzzyQueryBoost :: Maybe Boost+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON FuzzyQuery where+ toJSON+ ( FuzzyQuery+ (FieldName fieldName)+ queryText+ prefixLength+ maxEx+ fuzziness+ boost+ ) =+ object [fromText fieldName .= omitNulls base]+ where+ base =+ [ "value" .= queryText,+ "fuzziness" .= fuzziness,+ "prefix_length" .= prefixLength,+ "boost" .= boost,+ "max_expansions" .= maxEx+ ]++instance FromJSON FuzzyQuery where+ parseJSON = withObject "FuzzyQuery" parse+ where+ parse = fieldTagged $ \fn o ->+ FuzzyQuery fn+ <$> o .: "value"+ <*> o .: "prefix_length"+ <*> o .: "max_expansions"+ <*> o .: "fuzziness"+ <*> o .:? "boost"++data FuzzyLikeFieldQuery = FuzzyLikeFieldQuery+ { fuzzyLikeField :: FieldName,+ -- anaphora is good for the soul.+ fuzzyLikeFieldText :: Text,+ fuzzyLikeFieldMaxQueryTerms :: MaxQueryTerms,+ fuzzyLikeFieldIgnoreTermFrequency :: IgnoreTermFrequency,+ fuzzyLikeFieldFuzziness :: Fuzziness,+ fuzzyLikeFieldPrefixLength :: PrefixLength,+ fuzzyLikeFieldBoost :: Boost,+ fuzzyLikeFieldAnalyzer :: Maybe Analyzer+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON FuzzyLikeFieldQuery where+ toJSON+ ( FuzzyLikeFieldQuery+ (FieldName fieldName)+ fieldText+ maxTerms+ ignoreFreq+ fuzziness+ prefixLength+ boost+ analyzer+ ) =+ object+ [ fromText fieldName+ .= omitNulls+ [ "like_text" .= fieldText,+ "max_query_terms" .= maxTerms,+ "ignore_tf" .= ignoreFreq,+ "fuzziness" .= fuzziness,+ "prefix_length" .= prefixLength,+ "analyzer" .= analyzer,+ "boost" .= boost+ ]+ ]++instance FromJSON FuzzyLikeFieldQuery where+ parseJSON = withObject "FuzzyLikeFieldQuery" parse+ where+ parse = fieldTagged $ \fn o ->+ FuzzyLikeFieldQuery fn+ <$> o .: "like_text"+ <*> o .: "max_query_terms"+ <*> o .: "ignore_tf"+ <*> o .: "fuzziness"+ <*> o .: "prefix_length"+ <*> o .: "boost"+ <*> o .:? "analyzer"++data FuzzyLikeThisQuery = FuzzyLikeThisQuery+ { fuzzyLikeFields :: [FieldName],+ fuzzyLikeText :: Text,+ fuzzyLikeMaxQueryTerms :: MaxQueryTerms,+ fuzzyLikeIgnoreTermFrequency :: IgnoreTermFrequency,+ fuzzyLikeFuzziness :: Fuzziness,+ fuzzyLikePrefixLength :: PrefixLength,+ fuzzyLikeBoost :: Boost,+ fuzzyLikeAnalyzer :: Maybe Analyzer+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON FuzzyLikeThisQuery where+ toJSON+ ( FuzzyLikeThisQuery+ fields+ text+ maxTerms+ ignoreFreq+ fuzziness+ prefixLength+ boost+ analyzer+ ) =+ omitNulls base+ where+ base =+ [ "fields" .= fields,+ "like_text" .= text,+ "max_query_terms" .= maxTerms,+ "ignore_tf" .= ignoreFreq,+ "fuzziness" .= fuzziness,+ "prefix_length" .= prefixLength,+ "analyzer" .= analyzer,+ "boost" .= boost+ ]++instance FromJSON FuzzyLikeThisQuery where+ parseJSON = withObject "FuzzyLikeThisQuery" parse+ where+ parse o =+ FuzzyLikeThisQuery+ <$> o .:? "fields" .!= []+ <*> o .: "like_text"+ <*> o .: "max_query_terms"+ <*> o .: "ignore_tf"+ <*> o .: "fuzziness"+ <*> o .: "prefix_length"+ <*> o .: "boost"+ <*> o .:? "analyzer"
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Query/Match.hs view
@@ -0,0 +1,204 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Query.Match+ ( MatchQuery (..),+ MatchQueryType (..),+ MultiMatchQuery (..),+ MultiMatchQueryType (..),+ mkMatchQuery,+ mkMultiMatchQuery,+ )+where++import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.Internal.Versions.Common.Types.Query.Commons+import GHC.Generics++data MatchQuery = MatchQuery+ { matchQueryField :: FieldName,+ matchQueryQueryString :: QueryString,+ matchQueryOperator :: BooleanOperator,+ matchQueryZeroTerms :: ZeroTermsQuery,+ matchQueryCutoffFrequency :: Maybe CutoffFrequency,+ matchQueryMatchType :: Maybe MatchQueryType,+ matchQueryAnalyzer :: Maybe Analyzer,+ matchQueryMaxExpansions :: Maybe MaxExpansions,+ matchQueryLenient :: Maybe Lenient,+ matchQueryBoost :: Maybe Boost,+ matchQueryMinimumShouldMatch :: Maybe Text,+ matchQueryFuzziness :: Maybe Fuzziness+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON MatchQuery where+ toJSON+ ( MatchQuery+ (FieldName fieldName)+ (QueryString mqQueryString)+ booleanOperator+ zeroTermsQuery+ cutoffFrequency+ matchQueryType+ analyzer+ maxExpansions+ lenient+ boost+ minShouldMatch+ mqFuzziness+ ) =+ object [fromText fieldName .= omitNulls base]+ where+ base =+ [ "query" .= mqQueryString,+ "operator" .= booleanOperator,+ "zero_terms_query" .= zeroTermsQuery,+ "cutoff_frequency" .= cutoffFrequency,+ "type" .= matchQueryType,+ "analyzer" .= analyzer,+ "max_expansions" .= maxExpansions,+ "lenient" .= lenient,+ "boost" .= boost,+ "minimum_should_match" .= minShouldMatch,+ "fuzziness" .= mqFuzziness+ ]++instance FromJSON MatchQuery where+ parseJSON = withObject "MatchQuery" parse+ where+ parse = fieldTagged $ \fn o ->+ MatchQuery fn+ <$> o .: "query"+ <*> o .: "operator"+ <*> o .: "zero_terms_query"+ <*> o .:? "cutoff_frequency"+ <*> o .:? "type"+ <*> o .:? "analyzer"+ <*> o .:? "max_expansions"+ <*> o .:? "lenient"+ <*> o .:? "boost"+ <*> o .:? "minimum_should_match"+ <*> o .:? "fuzziness"++-- | 'mkMatchQuery' is a convenience function that defaults the less common parameters,+-- enabling you to provide only the 'FieldName' and 'QueryString' to make a 'MatchQuery'+mkMatchQuery :: FieldName -> QueryString -> MatchQuery+mkMatchQuery field query = MatchQuery field query Or ZeroTermsNone Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing++data MatchQueryType+ = MatchPhrase+ | MatchPhrasePrefix+ deriving stock (Eq, Show, Generic)++instance ToJSON MatchQueryType where+ toJSON MatchPhrase = "phrase"+ toJSON MatchPhrasePrefix = "phrase_prefix"++instance FromJSON MatchQueryType where+ parseJSON = withText "MatchQueryType" parse+ where+ parse "phrase" = pure MatchPhrase+ parse "phrase_prefix" = pure MatchPhrasePrefix+ parse t = fail ("Unexpected MatchQueryType: " <> show t)++data MultiMatchQuery = MultiMatchQuery+ { multiMatchQueryFields :: [FieldName],+ multiMatchQueryString :: QueryString,+ multiMatchQueryOperator :: BooleanOperator,+ multiMatchQueryZeroTerms :: ZeroTermsQuery,+ multiMatchQueryTiebreaker :: Maybe Tiebreaker,+ multiMatchQueryType :: Maybe MultiMatchQueryType,+ multiMatchQueryCutoffFrequency :: Maybe CutoffFrequency,+ multiMatchQueryAnalyzer :: Maybe Analyzer,+ multiMatchQueryMaxExpansions :: Maybe MaxExpansions,+ multiMatchQueryLenient :: Maybe Lenient+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON MultiMatchQuery where+ toJSON+ ( MultiMatchQuery+ fields+ (QueryString query)+ boolOp+ ztQ+ tb+ mmqt+ cf+ analyzer+ maxEx+ lenient+ ) =+ object ["multi_match" .= omitNulls base]+ where+ base =+ [ "fields" .= fmap toJSON fields,+ "query" .= query,+ "operator" .= boolOp,+ "zero_terms_query" .= ztQ,+ "tie_breaker" .= tb,+ "type" .= mmqt,+ "cutoff_frequency" .= cf,+ "analyzer" .= analyzer,+ "max_expansions" .= maxEx,+ "lenient" .= lenient+ ]++instance FromJSON MultiMatchQuery where+ parseJSON = withObject "MultiMatchQuery" parse+ where+ parse raw = do+ o <- raw .: "multi_match"+ MultiMatchQuery+ <$> o .:? "fields" .!= []+ <*> o .: "query"+ <*> o .: "operator"+ <*> o .: "zero_terms_query"+ <*> o .:? "tie_breaker"+ <*> o .:? "type"+ <*> o .:? "cutoff_frequency"+ <*> o .:? "analyzer"+ <*> o .:? "max_expansions"+ <*> o .:? "lenient"++-- | 'mkMultiMatchQuery' is a convenience function that defaults the less common parameters,+-- enabling you to provide only the list of 'FieldName's and 'QueryString' to+-- make a 'MultiMatchQuery'.+mkMultiMatchQuery :: [FieldName] -> QueryString -> MultiMatchQuery+mkMultiMatchQuery matchFields query =+ MultiMatchQuery+ matchFields+ query+ Or+ ZeroTermsNone+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing++data MultiMatchQueryType+ = MultiMatchBestFields+ | MultiMatchMostFields+ | MultiMatchCrossFields+ | MultiMatchPhrase+ | MultiMatchPhrasePrefix+ deriving stock (Eq, Show, Generic)++instance ToJSON MultiMatchQueryType where+ toJSON MultiMatchBestFields = "best_fields"+ toJSON MultiMatchMostFields = "most_fields"+ toJSON MultiMatchCrossFields = "cross_fields"+ toJSON MultiMatchPhrase = "phrase"+ toJSON MultiMatchPhrasePrefix = "phrase_prefix"++instance FromJSON MultiMatchQueryType where+ parseJSON = withText "MultiMatchPhrasePrefix" parse+ where+ parse "best_fields" = pure MultiMatchBestFields+ parse "most_fields" = pure MultiMatchMostFields+ parse "cross_fields" = pure MultiMatchCrossFields+ parse "phrase" = pure MultiMatchPhrase+ parse "phrase_prefix" = pure MultiMatchPhrasePrefix+ parse t = fail ("Unexpected MultiMatchPhrasePrefix: " <> show t)
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Query/MoreLikeThis.hs view
@@ -0,0 +1,84 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Query.MoreLikeThis+ ( MoreLikeThisQuery (..),+ )+where++import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import GHC.Generics++data MoreLikeThisQuery = MoreLikeThisQuery+ { moreLikeThisText :: Text,+ moreLikeThisFields :: Maybe (NonEmpty FieldName),+ -- default 0.3 (30%)+ moreLikeThisPercentMatch :: Maybe PercentMatch,+ moreLikeThisMinimumTermFreq :: Maybe MinimumTermFrequency,+ moreLikeThisMaxQueryTerms :: Maybe MaxQueryTerms,+ moreLikeThisStopWords :: Maybe (NonEmpty StopWord),+ moreLikeThisMinDocFrequency :: Maybe MinDocFrequency,+ moreLikeThisMaxDocFrequency :: Maybe MaxDocFrequency,+ moreLikeThisMinWordLength :: Maybe MinWordLength,+ moreLikeThisMaxWordLength :: Maybe MaxWordLength,+ moreLikeThisBoostTerms :: Maybe BoostTerms,+ moreLikeThisBoost :: Maybe Boost,+ moreLikeThisAnalyzer :: Maybe Analyzer+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON MoreLikeThisQuery where+ toJSON+ ( MoreLikeThisQuery+ text+ fields+ percent+ mtf+ mqt+ stopwords+ mindf+ maxdf+ minwl+ maxwl+ boostTerms+ boost+ analyzer+ ) =+ omitNulls base+ where+ base =+ [ "like_text" .= text,+ "fields" .= fields,+ "percent_terms_to_match" .= percent,+ "min_term_freq" .= mtf,+ "max_query_terms" .= mqt,+ "stop_words" .= stopwords,+ "min_doc_freq" .= mindf,+ "max_doc_freq" .= maxdf,+ "min_word_length" .= minwl,+ "max_word_length" .= maxwl,+ "boost_terms" .= boostTerms,+ "boost" .= boost,+ "analyzer" .= analyzer+ ]++instance FromJSON MoreLikeThisQuery where+ parseJSON = withObject "MoreLikeThisQuery" parse+ where+ parse o =+ MoreLikeThisQuery+ <$> o .: "like_text"+ -- <*> (optionalNE =<< o .:? "fields")+ <*> o .:? "fields"+ <*> o .:? "percent_terms_to_match"+ <*> o .:? "min_term_freq"+ <*> o .:? "max_query_terms"+ -- <*> (optionalNE =<< o .:? "stop_words")+ <*> o .:? "stop_words"+ <*> o .:? "min_doc_freq"+ <*> o .:? "max_doc_freq"+ <*> o .:? "min_word_length"+ <*> o .:? "max_word_length"+ <*> o .:? "boost_terms"+ <*> o .:? "boost"+ <*> o .:? "analyzer"
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Query/MoreLikeThisField.hs view
@@ -0,0 +1,83 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Query.MoreLikeThisField+ ( MoreLikeThisFieldQuery (..),+ )+where++import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.Internal.Versions.Common.Types.Query.Commons+import GHC.Generics++data MoreLikeThisFieldQuery = MoreLikeThisFieldQuery+ { moreLikeThisFieldText :: Text,+ moreLikeThisFieldFields :: FieldName,+ -- default 0.3 (30%)+ moreLikeThisFieldPercentMatch :: Maybe PercentMatch,+ moreLikeThisFieldMinimumTermFreq :: Maybe MinimumTermFrequency,+ moreLikeThisFieldMaxQueryTerms :: Maybe MaxQueryTerms,+ moreLikeThisFieldStopWords :: Maybe (NonEmpty StopWord),+ moreLikeThisFieldMinDocFrequency :: Maybe MinDocFrequency,+ moreLikeThisFieldMaxDocFrequency :: Maybe MaxDocFrequency,+ moreLikeThisFieldMinWordLength :: Maybe MinWordLength,+ moreLikeThisFieldMaxWordLength :: Maybe MaxWordLength,+ moreLikeThisFieldBoostTerms :: Maybe BoostTerms,+ moreLikeThisFieldBoost :: Maybe Boost,+ moreLikeThisFieldAnalyzer :: Maybe Analyzer+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON MoreLikeThisFieldQuery where+ toJSON+ ( MoreLikeThisFieldQuery+ text+ (FieldName fieldName)+ percent+ mtf+ mqt+ stopwords+ mindf+ maxdf+ minwl+ maxwl+ boostTerms+ boost+ analyzer+ ) =+ object [fromText fieldName .= omitNulls base]+ where+ base =+ [ "like_text" .= text,+ "percent_terms_to_match" .= percent,+ "min_term_freq" .= mtf,+ "max_query_terms" .= mqt,+ "stop_words" .= stopwords,+ "min_doc_freq" .= mindf,+ "max_doc_freq" .= maxdf,+ "min_word_length" .= minwl,+ "max_word_length" .= maxwl,+ "boost_terms" .= boostTerms,+ "boost" .= boost,+ "analyzer" .= analyzer+ ]++instance FromJSON MoreLikeThisFieldQuery where+ parseJSON = withObject "MoreLikeThisFieldQuery" parse+ where+ parse = fieldTagged $ \fn o ->+ MoreLikeThisFieldQuery+ <$> o .: "like_text"+ <*> pure fn+ <*> o .:? "percent_terms_to_match"+ <*> o .:? "min_term_freq"+ <*> o .:? "max_query_terms"+ -- <*> (optionalNE =<< o .:? "stop_words")+ <*> o .:? "stop_words"+ <*> o .:? "min_doc_freq"+ <*> o .:? "max_doc_freq"+ <*> o .:? "min_word_length"+ <*> o .:? "max_word_length"+ <*> o .:? "boost_terms"+ <*> o .:? "boost"+ <*> o .:? "analyzer"
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Query/Prefix.hs view
@@ -0,0 +1,35 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Query.Prefix+ ( PrefixQuery (..),+ )+where++import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.Internal.Versions.Common.Types.Query.Commons+import GHC.Generics++data PrefixQuery = PrefixQuery+ { prefixQueryField :: FieldName,+ prefixQueryPrefixValue :: Text,+ prefixQueryBoost :: Maybe Boost+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON PrefixQuery where+ toJSON (PrefixQuery (FieldName fieldName) queryValue boost) =+ object [fromText fieldName .= omitNulls base]+ where+ base =+ [ "value" .= queryValue,+ "boost" .= boost+ ]++instance FromJSON PrefixQuery where+ parseJSON = withObject "PrefixQuery" parse+ where+ parse = fieldTagged $ \fn o ->+ PrefixQuery fn+ <$> o .: "value"+ <*> o .:? "boost"
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Query/QueryString.hs view
@@ -0,0 +1,121 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Query.QueryString+ ( QueryStringQuery (..),+ mkQueryStringQuery,+ )+where++import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.Internal.Versions.Common.Types.Query.Commons+import GHC.Generics++-- use_dis_max and tie_breaker when fields are plural?+data QueryStringQuery = QueryStringQuery+ { queryStringQuery :: QueryString,+ queryStringDefaultField :: Maybe FieldName,+ queryStringOperator :: Maybe BooleanOperator,+ queryStringAnalyzer :: Maybe Analyzer,+ queryStringAllowLeadingWildcard :: Maybe AllowLeadingWildcard,+ queryStringLowercaseExpanded :: Maybe LowercaseExpanded,+ queryStringEnablePositionIncrements :: Maybe EnablePositionIncrements,+ queryStringFuzzyMaxExpansions :: Maybe MaxExpansions,+ queryStringFuzziness :: Maybe Fuzziness,+ queryStringFuzzyPrefixLength :: Maybe PrefixLength,+ queryStringPhraseSlop :: Maybe PhraseSlop,+ queryStringBoost :: Maybe Boost,+ queryStringAnalyzeWildcard :: Maybe AnalyzeWildcard,+ queryStringGeneratePhraseQueries :: Maybe GeneratePhraseQueries,+ queryStringMinimumShouldMatch :: Maybe MinimumMatch,+ queryStringLenient :: Maybe Lenient,+ queryStringLocale :: Maybe Locale+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON QueryStringQuery where+ toJSON+ ( QueryStringQuery+ qsQueryString+ qsDefaultField+ qsOperator+ qsAnalyzer+ qsAllowWildcard+ qsLowercaseExpanded+ qsEnablePositionIncrements+ qsFuzzyMaxExpansions+ qsFuzziness+ qsFuzzyPrefixLength+ qsPhraseSlop+ qsBoost+ qsAnalyzeWildcard+ qsGeneratePhraseQueries+ qsMinimumShouldMatch+ qsLenient+ qsLocale+ ) =+ omitNulls base+ where+ base =+ [ "query" .= qsQueryString,+ "default_field" .= qsDefaultField,+ "default_operator" .= qsOperator,+ "analyzer" .= qsAnalyzer,+ "allow_leading_wildcard" .= qsAllowWildcard,+ "lowercase_expanded_terms" .= qsLowercaseExpanded,+ "enable_position_increments" .= qsEnablePositionIncrements,+ "fuzzy_max_expansions" .= qsFuzzyMaxExpansions,+ "fuzziness" .= qsFuzziness,+ "fuzzy_prefix_length" .= qsFuzzyPrefixLength,+ "phrase_slop" .= qsPhraseSlop,+ "boost" .= qsBoost,+ "analyze_wildcard" .= qsAnalyzeWildcard,+ "auto_generate_phrase_queries" .= qsGeneratePhraseQueries,+ "minimum_should_match" .= qsMinimumShouldMatch,+ "lenient" .= qsLenient,+ "locale" .= qsLocale+ ]++instance FromJSON QueryStringQuery where+ parseJSON = withObject "QueryStringQuery" parse+ where+ parse o =+ QueryStringQuery+ <$> o .: "query"+ <*> o .:? "default_field"+ <*> o .:? "default_operator"+ <*> o .:? "analyzer"+ <*> o .:? "allow_leading_wildcard"+ <*> o .:? "lowercase_expanded_terms"+ <*> o .:? "enable_position_increments"+ <*> o .:? "fuzzy_max_expansions"+ <*> o .:? "fuzziness"+ <*> o .:? "fuzzy_prefix_length"+ <*> o .:? "phrase_slop"+ <*> o .:? "boost"+ <*> o .:? "analyze_wildcard"+ <*> o .:? "auto_generate_phrase_queries"+ <*> o .:? "minimum_should_match"+ <*> o .:? "lenient"+ <*> o .:? "locale"++mkQueryStringQuery :: QueryString -> QueryStringQuery+mkQueryStringQuery qs =+ QueryStringQuery+ qs+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Query/Range.hs view
@@ -0,0 +1,198 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Query.Range+ ( GreaterThan (..),+ GreaterThanD (..),+ GreaterThanEq (..),+ GreaterThanEqD (..),+ LessThan (..),+ LessThanD (..),+ LessThanEq (..),+ LessThanEqD (..),+ RangeQuery (..),+ RangeValue (..),+ mkRangeQuery,+ )+where++import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.Internal.Versions.Common.Types.Query.Commons+import GHC.Generics++data RangeQuery = RangeQuery+ { rangeQueryField :: FieldName,+ rangeQueryRange :: RangeValue,+ rangeQueryBoost :: Boost+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON RangeQuery where+ toJSON (RangeQuery (FieldName fieldName) range boost) =+ object [fromText fieldName .= object conjoined]+ where+ conjoined = ("boost" .= boost) : rangeValueToPair range++instance FromJSON RangeQuery where+ parseJSON = withObject "RangeQuery" parse+ where+ parse = fieldTagged $ \fn o ->+ RangeQuery fn+ <$> parseJSON (Object o)+ <*> o .: "boost"++mkRangeQuery :: FieldName -> RangeValue -> RangeQuery+mkRangeQuery f r = RangeQuery f r (Boost 1.0)++newtype LessThan = LessThan Double deriving stock (Eq, Show, Generic)++newtype LessThanEq = LessThanEq Double deriving stock (Eq, Show, Generic)++newtype GreaterThan = GreaterThan Double deriving stock (Eq, Show, Generic)++newtype GreaterThanEq = GreaterThanEq Double deriving stock (Eq, Show, Generic)++newtype LessThanD = LessThanD UTCTime deriving stock (Eq, Show, Generic)++newtype LessThanEqD = LessThanEqD UTCTime deriving stock (Eq, Show, Generic)++newtype GreaterThanD = GreaterThanD UTCTime deriving stock (Eq, Show, Generic)++newtype GreaterThanEqD = GreaterThanEqD UTCTime deriving stock (Eq, Show, Generic)++data RangeValue+ = RangeDateLte LessThanEqD+ | RangeDateLt LessThanD+ | RangeDateGte GreaterThanEqD+ | RangeDateGt GreaterThanD+ | RangeDateGtLt GreaterThanD LessThanD+ | RangeDateGteLte GreaterThanEqD LessThanEqD+ | RangeDateGteLt GreaterThanEqD LessThanD+ | RangeDateGtLte GreaterThanD LessThanEqD+ | RangeDoubleLte LessThanEq+ | RangeDoubleLt LessThan+ | RangeDoubleGte GreaterThanEq+ | RangeDoubleGt GreaterThan+ | RangeDoubleGtLt GreaterThan LessThan+ | RangeDoubleGteLte GreaterThanEq LessThanEq+ | RangeDoubleGteLt GreaterThanEq LessThan+ | RangeDoubleGtLte GreaterThan LessThanEq+ deriving stock (Eq, Show, Generic)++parseRangeValue ::+ ( FromJSON t4,+ FromJSON t3,+ FromJSON t2,+ FromJSON t1+ ) =>+ (t3 -> t5) ->+ (t1 -> t6) ->+ (t4 -> t7) ->+ (t2 -> t8) ->+ (t5 -> t6 -> b) ->+ (t7 -> t6 -> b) ->+ (t5 -> t8 -> b) ->+ (t7 -> t8 -> b) ->+ (t5 -> b) ->+ (t6 -> b) ->+ (t7 -> b) ->+ (t8 -> b) ->+ Parser b ->+ Object ->+ Parser b+parseRangeValue+ mkGt+ mkLt+ mkGte+ mkLte+ fGtLt+ fGteLt+ fGtLte+ fGteLte+ fGt+ fLt+ fGte+ fLte+ nada+ o = do+ lt <- o .:? "lt"+ lte <- o .:? "lte"+ gt <- o .:? "gt"+ gte <- o .:? "gte"+ case (lt, lte, gt, gte) of+ (Just a, _, Just b, _) ->+ return (fGtLt (mkGt b) (mkLt a))+ (Just a, _, _, Just b) ->+ return (fGteLt (mkGte b) (mkLt a))+ (_, Just a, Just b, _) ->+ return (fGtLte (mkGt b) (mkLte a))+ (_, Just a, _, Just b) ->+ return (fGteLte (mkGte b) (mkLte a))+ (_, _, Just a, _) ->+ return (fGt (mkGt a))+ (Just a, _, _, _) ->+ return (fLt (mkLt a))+ (_, _, _, Just a) ->+ return (fGte (mkGte a))+ (_, Just a, _, _) ->+ return (fLte (mkLte a))+ (Nothing, Nothing, Nothing, Nothing) ->+ nada++instance FromJSON RangeValue where+ parseJSON = withObject "RangeValue" parse+ where+ parse o =+ parseDate o+ <|> parseDouble o+ parseDate o =+ parseRangeValue+ GreaterThanD+ LessThanD+ GreaterThanEqD+ LessThanEqD+ RangeDateGtLt+ RangeDateGteLt+ RangeDateGtLte+ RangeDateGteLte+ RangeDateGt+ RangeDateLt+ RangeDateGte+ RangeDateLte+ mzero+ o+ parseDouble o =+ parseRangeValue+ GreaterThan+ LessThan+ GreaterThanEq+ LessThanEq+ RangeDoubleGtLt+ RangeDoubleGteLt+ RangeDoubleGtLte+ RangeDoubleGteLte+ RangeDoubleGt+ RangeDoubleLt+ RangeDoubleGte+ RangeDoubleLte+ mzero+ o++rangeValueToPair :: RangeValue -> [Pair]+rangeValueToPair rv = case rv of+ RangeDateLte (LessThanEqD t) -> ["lte" .= t]+ RangeDateGte (GreaterThanEqD t) -> ["gte" .= t]+ RangeDateLt (LessThanD t) -> ["lt" .= t]+ RangeDateGt (GreaterThanD t) -> ["gt" .= t]+ RangeDateGteLte (GreaterThanEqD l) (LessThanEqD g) -> ["gte" .= l, "lte" .= g]+ RangeDateGtLte (GreaterThanD l) (LessThanEqD g) -> ["gt" .= l, "lte" .= g]+ RangeDateGteLt (GreaterThanEqD l) (LessThanD g) -> ["gte" .= l, "lt" .= g]+ RangeDateGtLt (GreaterThanD l) (LessThanD g) -> ["gt" .= l, "lt" .= g]+ RangeDoubleLte (LessThanEq t) -> ["lte" .= t]+ RangeDoubleGte (GreaterThanEq t) -> ["gte" .= t]+ RangeDoubleLt (LessThan t) -> ["lt" .= t]+ RangeDoubleGt (GreaterThan t) -> ["gt" .= t]+ RangeDoubleGteLte (GreaterThanEq l) (LessThanEq g) -> ["gte" .= l, "lte" .= g]+ RangeDoubleGtLte (GreaterThan l) (LessThanEq g) -> ["gt" .= l, "lte" .= g]+ RangeDoubleGteLt (GreaterThanEq l) (LessThan g) -> ["gte" .= l, "lt" .= g]+ RangeDoubleGtLt (GreaterThan l) (LessThan g) -> ["gt" .= l, "lt" .= g]
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Query/Regexp.hs view
@@ -0,0 +1,96 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Query.Regexp+ ( Regexp (..),+ RegexpFlag (..),+ RegexpFlags (..),+ RegexpQuery (..),+ )+where++import qualified Data.Text as T+import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.Internal.Versions.Common.Types.Query.Commons+import GHC.Generics++data RegexpQuery = RegexpQuery+ { regexpQueryField :: FieldName,+ regexpQuery :: Regexp,+ regexpQueryFlags :: RegexpFlags,+ regexpQueryBoost :: Maybe Boost+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON RegexpQuery where+ toJSON+ ( RegexpQuery+ (FieldName rqQueryField)+ (Regexp regexpQueryQuery)+ rqQueryFlags+ rqQueryBoost+ ) =+ object [fromText rqQueryField .= omitNulls base]+ where+ base =+ [ "value" .= regexpQueryQuery,+ "flags" .= rqQueryFlags,+ "boost" .= rqQueryBoost+ ]++instance FromJSON RegexpQuery where+ parseJSON = withObject "RegexpQuery" parse+ where+ parse = fieldTagged $ \fn o ->+ RegexpQuery fn+ <$> o .: "value"+ <*> o .: "flags"+ <*> o .:? "boost"++newtype Regexp = Regexp Text deriving newtype (Eq, Show, FromJSON)++data RegexpFlags+ = AllRegexpFlags+ | NoRegexpFlags+ | SomeRegexpFlags (NonEmpty RegexpFlag)+ deriving stock (Eq, Show, Generic)++instance ToJSON RegexpFlags where+ toJSON AllRegexpFlags = String "ALL"+ toJSON NoRegexpFlags = String "NONE"+ toJSON (SomeRegexpFlags (h :| fs)) = String $ T.intercalate "|" flagStrs+ where+ flagStrs = map flagStr . nub $ h : fs+ flagStr AnyString = "ANYSTRING"+ flagStr Automaton = "AUTOMATON"+ flagStr Complement = "COMPLEMENT"+ flagStr Empty = "EMPTY"+ flagStr Intersection = "INTERSECTION"+ flagStr Interval = "INTERVAL"++instance FromJSON RegexpFlags where+ parseJSON = withText "RegexpFlags" parse+ where+ parse "ALL" = pure AllRegexpFlags+ parse "NONE" = pure NoRegexpFlags+ parse t = SomeRegexpFlags <$> parseNEJSON (String <$> T.splitOn "|" t)++data RegexpFlag+ = AnyString+ | Automaton+ | Complement+ | Empty+ | Intersection+ | Interval+ deriving stock (Eq, Show, Generic)++instance FromJSON RegexpFlag where+ parseJSON = withText "RegexpFlag" parse+ where+ parse "ANYSTRING" = pure AnyString+ parse "AUTOMATON" = pure Automaton+ parse "COMPLEMENT" = pure Complement+ parse "EMPTY" = pure Empty+ parse "INTERSECTION" = pure Intersection+ parse "INTERVAL" = pure Interval+ parse f = fail ("Unknown RegexpFlag: " <> show f)
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Query/SimpleQueryString.hs view
@@ -0,0 +1,116 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Query.SimpleQueryString+ ( FieldOrFields (..),+ SimpleQueryFlag (..),+ SimpleQueryStringQuery (..),+ )+where++import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.Internal.Versions.Common.Types.Query.Commons+import GHC.Generics++data SimpleQueryStringQuery = SimpleQueryStringQuery+ { simpleQueryStringQuery :: QueryString,+ simpleQueryStringField :: Maybe FieldOrFields,+ simpleQueryStringOperator :: Maybe BooleanOperator,+ simpleQueryStringAnalyzer :: Maybe Analyzer,+ simpleQueryStringFlags :: Maybe (NonEmpty SimpleQueryFlag),+ simpleQueryStringLowercaseExpanded :: Maybe LowercaseExpanded,+ simpleQueryStringLocale :: Maybe Locale+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON SimpleQueryStringQuery where+ toJSON SimpleQueryStringQuery {..} =+ omitNulls (base ++ maybeAdd)+ where+ base = ["query" .= simpleQueryStringQuery]+ maybeAdd =+ [ "fields" .= simpleQueryStringField,+ "default_operator" .= simpleQueryStringOperator,+ "analyzer" .= simpleQueryStringAnalyzer,+ "flags" .= simpleQueryStringFlags,+ "lowercase_expanded_terms" .= simpleQueryStringLowercaseExpanded,+ "locale" .= simpleQueryStringLocale+ ]++instance FromJSON SimpleQueryStringQuery where+ parseJSON = withObject "SimpleQueryStringQuery" parse+ where+ parse o =+ SimpleQueryStringQuery+ <$> o .: "query"+ <*> o .:? "fields"+ <*> o .:? "default_operator"+ <*> o .:? "analyzer"+ <*> (parseFlags <$> o .:? "flags")+ <*> o .:? "lowercase_expanded_terms"+ <*> o .:? "locale"+ parseFlags (Just (x : xs)) = Just (x :| xs)+ parseFlags _ = Nothing++data SimpleQueryFlag+ = SimpleQueryAll+ | SimpleQueryNone+ | SimpleQueryAnd+ | SimpleQueryOr+ | SimpleQueryPrefix+ | SimpleQueryPhrase+ | SimpleQueryPrecedence+ | SimpleQueryEscape+ | SimpleQueryWhitespace+ | SimpleQueryFuzzy+ | SimpleQueryNear+ | SimpleQuerySlop+ deriving stock (Eq, Show, Generic)++instance ToJSON SimpleQueryFlag where+ toJSON SimpleQueryAll = "ALL"+ toJSON SimpleQueryNone = "NONE"+ toJSON SimpleQueryAnd = "AND"+ toJSON SimpleQueryOr = "OR"+ toJSON SimpleQueryPrefix = "PREFIX"+ toJSON SimpleQueryPhrase = "PHRASE"+ toJSON SimpleQueryPrecedence = "PRECEDENCE"+ toJSON SimpleQueryEscape = "ESCAPE"+ toJSON SimpleQueryWhitespace = "WHITESPACE"+ toJSON SimpleQueryFuzzy = "FUZZY"+ toJSON SimpleQueryNear = "NEAR"+ toJSON SimpleQuerySlop = "SLOP"++instance FromJSON SimpleQueryFlag where+ parseJSON = withText "SimpleQueryFlag" parse+ where+ parse "ALL" = pure SimpleQueryAll+ parse "NONE" = pure SimpleQueryNone+ parse "AND" = pure SimpleQueryAnd+ parse "OR" = pure SimpleQueryOr+ parse "PREFIX" = pure SimpleQueryPrefix+ parse "PHRASE" = pure SimpleQueryPhrase+ parse "PRECEDENCE" = pure SimpleQueryPrecedence+ parse "ESCAPE" = pure SimpleQueryEscape+ parse "WHITESPACE" = pure SimpleQueryWhitespace+ parse "FUZZY" = pure SimpleQueryFuzzy+ parse "NEAR" = pure SimpleQueryNear+ parse "SLOP" = pure SimpleQuerySlop+ parse f = fail ("Unexpected SimpleQueryFlag: " <> show f)++data FieldOrFields+ = FofField FieldName+ | FofFields (NonEmpty FieldName)+ deriving stock (Eq, Show, Generic)++instance ToJSON FieldOrFields where+ toJSON (FofField fieldName) =+ toJSON fieldName+ toJSON (FofFields fieldNames) =+ toJSON fieldNames++instance FromJSON FieldOrFields where+ parseJSON v =+ FofField <$> parseJSON v+ <|> FofFields <$> (parseNEJSON =<< parseJSON v)
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Query/Wildcard.hs view
@@ -0,0 +1,40 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Query.Wildcard+ ( WildcardQuery (..),+ )+where++import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.Internal.Versions.Common.Types.Query.Commons+import GHC.Generics++data WildcardQuery = WildcardQuery+ { wildcardQueryField :: FieldName,+ wildcardQuery :: Key,+ wildcardQueryBoost :: Maybe Boost+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON WildcardQuery where+ toJSON+ ( WildcardQuery+ (FieldName wcQueryField)+ wcQueryQuery+ wcQueryBoost+ ) =+ object [fromText wcQueryField .= omitNulls base]+ where+ base =+ [ "value" .= wcQueryQuery,+ "boost" .= wcQueryBoost+ ]++instance FromJSON WildcardQuery where+ parseJSON = withObject "WildcardQuery" parse+ where+ parse = fieldTagged $ \fn o ->+ WildcardQuery fn+ <$> o .: "value"+ <*> o .:? "boost"
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Reindex.hs view
@@ -0,0 +1,297 @@+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Reindex where++import Data.Aeson+import Data.List.NonEmpty+import Data.Text (Text)+import Database.Bloodhound.Internal.Utils.Imports (omitNulls)+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes (IndexName)+import Database.Bloodhound.Internal.Versions.Common.Types.Query (Query)+import Database.Bloodhound.Internal.Versions.Common.Types.Script (ScriptLanguage)+import GHC.Generics+import Optics.Lens++data ReindexRequest = ReindexRequest+ { reindexConflicts :: Maybe ReindexConflicts,+ reindexSource :: ReindexSource,+ reindexDest :: ReindexDest,+ reindexScript :: Maybe ReindexScript+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON ReindexRequest where+ toJSON ReindexRequest {..} =+ omitNulls+ [ "conflicts" .= reindexConflicts,+ "source" .= reindexSource,+ "dest" .= reindexDest,+ "script" .= reindexScript+ ]++instance FromJSON ReindexRequest where+ parseJSON = withObject "ReindexRequest" $ \v ->+ ReindexRequest+ <$> v .:? "conflicts"+ <*> v .: "source"+ <*> v .: "dest"+ <*> v .:? "script"++reindexConflictsLens :: Lens' ReindexRequest (Maybe ReindexConflicts)+reindexConflictsLens = lens reindexConflicts (\x y -> x {reindexConflicts = y})++reindexSourceLens :: Lens' ReindexRequest ReindexSource+reindexSourceLens = lens reindexSource (\x y -> x {reindexSource = y})++reindexDestLens :: Lens' ReindexRequest ReindexDest+reindexDestLens = lens reindexDest (\x y -> x {reindexDest = y})++reindexScriptLens :: Lens' ReindexRequest (Maybe ReindexScript)+reindexScriptLens = lens reindexScript (\x y -> x {reindexScript = y})++data ReindexConflicts+ = ReindexAbortOnConflicts+ | ReindexProceedOnConflicts+ deriving stock (Eq, Show, Generic)++instance FromJSON ReindexConflicts where+ parseJSON = withText "ReindexConflicts" $ \case+ "abort" -> pure ReindexAbortOnConflicts+ "proceed" -> pure ReindexProceedOnConflicts+ s -> fail $ "Expected one of [abort, proceed], found: " <> show s++instance ToJSON ReindexConflicts where+ toJSON =+ String . \case+ ReindexAbortOnConflicts -> "abort"+ ReindexProceedOnConflicts -> "proceed"++-- | Elasticsearch also supports reindex from remote, it could be added here if required+data ReindexSource = ReindexSource+ { reindexSourceIndex :: NonEmpty IndexName,+ reindexSourceMaxDocs :: Maybe Int,+ reindexSourceQuery :: Maybe Query,+ reindexSourceSize :: Maybe Int,+ reindexSourceSlice :: Maybe ReindexSlice+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON ReindexSource where+ toJSON ReindexSource {..} =+ omitNulls+ [ "index" .= reindexSourceIndex,+ "max_docs" .= reindexSourceMaxDocs,+ "query" .= reindexSourceQuery,+ "size" .= reindexSourceSize,+ "slice" .= reindexSourceSlice+ ]++instance FromJSON ReindexSource where+ parseJSON = withObject "ReindexSource" $ \v ->+ ReindexSource+ <$> v .: "index"+ <*> v .:? "max_docs"+ <*> v .:? "query"+ <*> v .:? "size"+ <*> v .:? "slice"++reindexSourceIndexLens :: Lens' ReindexSource (NonEmpty IndexName)+reindexSourceIndexLens = lens reindexSourceIndex (\x y -> x {reindexSourceIndex = y})++reindexSourceMaxDocsLens :: Lens' ReindexSource (Maybe Int)+reindexSourceMaxDocsLens = lens reindexSourceMaxDocs (\x y -> x {reindexSourceMaxDocs = y})++reindexSourceQueryLens :: Lens' ReindexSource (Maybe Query)+reindexSourceQueryLens = lens reindexSourceQuery (\x y -> x {reindexSourceQuery = y})++reindexSourceSizeLens :: Lens' ReindexSource (Maybe Int)+reindexSourceSizeLens = lens reindexSourceSize (\x y -> x {reindexSourceSize = y})++reindexSourceSliceLens :: Lens' ReindexSource (Maybe ReindexSlice)+reindexSourceSliceLens = lens reindexSourceSlice (\x y -> x {reindexSourceSlice = y})++data ReindexSlice = ReindexSlice+ { reindexSliceId :: Maybe Int,+ reindexSliceMax :: Maybe Int+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON ReindexSlice where+ toJSON ReindexSlice {..} =+ omitNulls ["id" .= reindexSliceId, "max" .= reindexSliceMax]++instance FromJSON ReindexSlice where+ parseJSON = withObject "ReindexSlice" $ \v ->+ ReindexSlice <$> v .:? "id" <*> v .:? "max"++reindexSliceIdLens :: Lens' ReindexSlice (Maybe Int)+reindexSliceIdLens = lens reindexSliceId (\x y -> x {reindexSliceId = y})++reindexSliceMaxLens :: Lens' ReindexSlice (Maybe Int)+reindexSliceMaxLens = lens reindexSliceMax (\x y -> x {reindexSliceMax = y})++data ReindexDest = ReindexDest+ { reindexDestIndex :: IndexName,+ reindexDestVersionType :: Maybe VersionType,+ reindexDestOpType :: Maybe ReindexOpType+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON ReindexDest where+ toJSON ReindexDest {..} =+ omitNulls+ [ "index" .= reindexDestIndex,+ "version_type" .= reindexDestVersionType,+ "op_type" .= reindexDestOpType+ ]++instance FromJSON ReindexDest where+ parseJSON = withObject "ReindexDest" $ \v ->+ ReindexDest+ <$> v .: "index"+ <*> v .:? "version_type"+ <*> v .:? "op_type"++reindexDestIndexLens :: Lens' ReindexDest IndexName+reindexDestIndexLens = lens reindexDestIndex (\x y -> x {reindexDestIndex = y})++reindexDestVersionTypeLens :: Lens' ReindexDest (Maybe VersionType)+reindexDestVersionTypeLens = lens reindexDestVersionType (\x y -> x {reindexDestVersionType = y})++reindexDestOpTypeLens :: Lens' ReindexDest (Maybe ReindexOpType)+reindexDestOpTypeLens = lens reindexDestOpType (\x y -> x {reindexDestOpType = y})++data VersionType+ = VersionTypeInternal+ | VersionTypeExternal+ | VersionTypeExternalGT+ | VersionTypeExternalGTE+ deriving stock (Eq, Show, Generic)++instance ToJSON VersionType where+ toJSON =+ String . \case+ VersionTypeInternal -> "internal"+ VersionTypeExternal -> "external"+ VersionTypeExternalGT -> "external_gt"+ VersionTypeExternalGTE -> "external_gte"++instance FromJSON VersionType where+ parseJSON = withText "VersionType" $ \case+ "internal" -> pure VersionTypeInternal+ "external" -> pure VersionTypeExternal+ "external_gt" -> pure VersionTypeExternalGT+ "external_gte" -> pure VersionTypeExternalGTE+ s -> fail $ "Expected one of [internal, external, external_gt, external_gte], found: " <> show s++data ReindexOpType+ = OpCreate+ | OpIndex+ deriving stock (Eq, Show, Generic)++instance FromJSON ReindexOpType where+ parseJSON = withText "ReindexOpType" $ \case+ "create" -> pure OpCreate+ "index" -> pure OpIndex+ s -> fail $ "Expected one of [create, index], found: " <> show s++instance ToJSON ReindexOpType where+ toJSON OpCreate = String "create"+ toJSON OpIndex = String "index"++data ReindexScript = ReindexScript+ { reindexScriptLanguage :: ScriptLanguage,+ reindexScriptSource :: Text+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON ReindexScript where+ toJSON ReindexScript {..} =+ object+ [ "language" .= reindexScriptLanguage,+ "source" .= reindexScriptSource+ ]++instance FromJSON ReindexScript where+ parseJSON = withObject "ReindexScript" $ \v ->+ ReindexScript+ <$> v .: "language"+ <*> v .: "source"++reindexScriptLanguageLens :: Lens' ReindexScript ScriptLanguage+reindexScriptLanguageLens = lens reindexScriptLanguage (\x y -> x {reindexScriptLanguage = y})++reindexScriptSourceLens :: Lens' ReindexScript Text+reindexScriptSourceLens = lens reindexScriptSource (\x y -> x {reindexScriptSource = y})++mkReindexRequest :: IndexName -> IndexName -> ReindexRequest+mkReindexRequest src dst =+ ReindexRequest+ { reindexSource =+ ReindexSource+ { reindexSourceIndex = src :| [],+ reindexSourceMaxDocs = Nothing,+ reindexSourceQuery = Nothing,+ reindexSourceSize = Nothing,+ reindexSourceSlice = Nothing+ },+ reindexDest =+ ReindexDest+ { reindexDestIndex = dst,+ reindexDestVersionType = Nothing,+ reindexDestOpType = Nothing+ },+ reindexConflicts = Nothing,+ reindexScript = Nothing+ }++data ReindexResponse = ReindexResponse+ { reindexResponseTook :: Maybe Int,+ reindexResponseUpdated :: Int,+ reindexResponseCreated :: Int,+ reindexResponseBatches :: Int,+ reindexResponseVersionConflicts :: Int,+ reindexResponseThrottledMillis :: Int+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON ReindexResponse where+ toJSON ReindexResponse {..} =+ omitNulls+ [ "took" .= reindexResponseTook,+ "updated" .= reindexResponseUpdated,+ "created" .= reindexResponseCreated,+ "batches" .= reindexResponseBatches,+ "version_conflicts" .= reindexResponseVersionConflicts,+ "throttled_millis" .= reindexResponseThrottledMillis+ ]++instance FromJSON ReindexResponse where+ parseJSON = withObject "ReindexResponse" $ \v ->+ ReindexResponse+ <$> v .:? "took"+ <*> v .: "updated"+ <*> v .: "created"+ <*> v .: "batches"+ <*> v .: "version_conflicts"+ <*> v .: "throttled_millis"++reindexResponseTookLens :: Lens' ReindexResponse (Maybe Int)+reindexResponseTookLens = lens reindexResponseTook (\x y -> x {reindexResponseTook = y})++reindexResponseUpdatedLens :: Lens' ReindexResponse Int+reindexResponseUpdatedLens = lens reindexResponseUpdated (\x y -> x {reindexResponseUpdated = y})++reindexResponseCreatedLens :: Lens' ReindexResponse Int+reindexResponseCreatedLens = lens reindexResponseCreated (\x y -> x {reindexResponseCreated = y})++reindexResponseBatchesLens :: Lens' ReindexResponse Int+reindexResponseBatchesLens = lens reindexResponseBatches (\x y -> x {reindexResponseBatches = y})++reindexResponseVersionConflictsLens :: Lens' ReindexResponse Int+reindexResponseVersionConflictsLens = lens reindexResponseVersionConflicts (\x y -> x {reindexResponseVersionConflicts = y})++reindexResponseThrottledMillisLens :: Lens' ReindexResponse Int+reindexResponseThrottledMillisLens = lens reindexResponseThrottledMillis (\x y -> x {reindexResponseThrottledMillis = y})
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Script.hs view
@@ -0,0 +1,255 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Script where++import Data.Aeson.KeyMap+import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import GHC.Generics++newtype ScriptFields+ = ScriptFields (KeyMap ScriptFieldValue)+ deriving stock (Eq, Show)++type ScriptFieldValue = Value++data ScriptSource+ = ScriptId Text+ | ScriptInline Text+ deriving stock (Eq, Show, Generic)++data Script = Script+ { scriptLanguage :: Maybe ScriptLanguage,+ scriptSource :: ScriptSource,+ scriptParams :: Maybe ScriptParams+ }+ deriving stock (Eq, Show, Generic)++scriptLanguageLens :: Lens' Script (Maybe ScriptLanguage)+scriptLanguageLens = lens scriptLanguage (\x y -> x {scriptLanguage = y})++scriptSourceLens :: Lens' Script ScriptSource+scriptSourceLens = lens scriptSource (\x y -> x {scriptSource = y})++scriptParamsLens :: Lens' Script (Maybe ScriptParams)+scriptParamsLens = lens scriptParams (\x y -> x {scriptParams = y})++newtype ScriptLanguage+ = ScriptLanguage Text+ deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype ScriptParams+ = ScriptParams (KeyMap ScriptParamValue)+ deriving newtype (Eq, Show)++type ScriptParamValue = Value++data BoostMode+ = BoostModeMultiply+ | BoostModeReplace+ | BoostModeSum+ | BoostModeAvg+ | BoostModeMax+ | BoostModeMin+ deriving stock (Eq, Show, Generic)++data ScoreMode+ = ScoreModeMultiply+ | ScoreModeSum+ | ScoreModeAvg+ | ScoreModeFirst+ | ScoreModeMax+ | ScoreModeMin+ deriving stock (Eq, Show, Generic)++data FunctionScoreFunction+ = FunctionScoreFunctionScript Script+ | FunctionScoreFunctionRandom Seed+ | FunctionScoreFunctionFieldValueFactor FieldValueFactor+ deriving stock (Eq, Show, Generic)++newtype Weight+ = Weight Float+ deriving newtype (Eq, Show, FromJSON, ToJSON)++newtype Seed+ = Seed Float+ deriving newtype (Eq, Show, FromJSON, ToJSON)++data FieldValueFactor = FieldValueFactor+ { fieldValueFactorField :: FieldName,+ fieldValueFactor :: Maybe Factor,+ fieldValueFactorModifier :: Maybe FactorModifier,+ fieldValueFactorMissing :: Maybe FactorMissingFieldValue+ }+ deriving stock (Eq, Show, Generic)++newtype Factor+ = Factor Float+ deriving newtype (Eq, Show, FromJSON, ToJSON)++data FactorModifier+ = FactorModifierNone+ | FactorModifierLog+ | FactorModifierLog1p+ | FactorModifierLog2p+ | FactorModifierLn+ | FactorModifierLn1p+ | FactorModifierLn2p+ | FactorModifierSquare+ | FactorModifierSqrt+ | FactorModifierReciprocal+ deriving stock (Eq, Show, Generic)++newtype FactorMissingFieldValue+ = FactorMissingFieldValue Float+ deriving newtype (Eq, Show, FromJSON, ToJSON)++instance ToJSON BoostMode where+ toJSON BoostModeMultiply = "multiply"+ toJSON BoostModeReplace = "replace"+ toJSON BoostModeSum = "sum"+ toJSON BoostModeAvg = "avg"+ toJSON BoostModeMax = "max"+ toJSON BoostModeMin = "min"++instance FromJSON BoostMode where+ parseJSON = withText "BoostMode" parse+ where+ parse "multiply" = pure BoostModeMultiply+ parse "replace" = pure BoostModeReplace+ parse "sum" = pure BoostModeSum+ parse "avg" = pure BoostModeAvg+ parse "max" = pure BoostModeMax+ parse "min" = pure BoostModeMin+ parse bm = fail ("Unexpected BoostMode: " <> show bm)++instance ToJSON ScoreMode where+ toJSON ScoreModeMultiply = "multiply"+ toJSON ScoreModeSum = "sum"+ toJSON ScoreModeFirst = "first"+ toJSON ScoreModeAvg = "avg"+ toJSON ScoreModeMax = "max"+ toJSON ScoreModeMin = "min"++instance FromJSON ScoreMode where+ parseJSON = withText "ScoreMode" parse+ where+ parse "multiply" = pure ScoreModeMultiply+ parse "sum" = pure ScoreModeSum+ parse "first" = pure ScoreModeFirst+ parse "avg" = pure ScoreModeAvg+ parse "max" = pure ScoreModeMax+ parse "min" = pure ScoreModeMin+ parse sm = fail ("Unexpected ScoreMode: " <> show sm)++functionScoreFunctionPair :: FunctionScoreFunction -> (Key, Value)+functionScoreFunctionPair (FunctionScoreFunctionScript functionScoreScript) =+ ("script_score", toJSON functionScoreScript)+functionScoreFunctionPair (FunctionScoreFunctionRandom seed) =+ ("random_score", omitNulls ["seed" .= seed])+functionScoreFunctionPair (FunctionScoreFunctionFieldValueFactor fvf) =+ ("field_value_factor", toJSON fvf)++parseFunctionScoreFunction :: Object -> Parser FunctionScoreFunction+parseFunctionScoreFunction o =+ singleScript+ `taggedWith` "script_score"+ <|> singleRandom+ `taggedWith` "random_score"+ <|> singleFieldValueFactor+ `taggedWith` "field_value_factor"+ where+ taggedWith parser k = parser =<< o .: k+ singleScript = pure . FunctionScoreFunctionScript+ singleRandom o' = FunctionScoreFunctionRandom <$> o' .: "seed"+ singleFieldValueFactor = pure . FunctionScoreFunctionFieldValueFactor++instance ToJSON ScriptFields where+ toJSON (ScriptFields x) = Object x++instance FromJSON ScriptFields where+ parseJSON (Object o) = pure (ScriptFields o)+ parseJSON _ = fail "error parsing ScriptFields"++instance ToJSON Script where+ toJSON script =+ object ["script" .= omitNulls (base script)]+ where+ base (Script lang (ScriptInline source) params) =+ ["lang" .= lang, "source" .= source, "params" .= params]+ base (Script lang (ScriptId id_) params) =+ ["lang" .= lang, "id" .= id_, "params" .= params]++instance FromJSON Script where+ parseJSON = withObject "Script" parse+ where+ parseSource o = do+ inline <- o .:? "source"+ id_ <- o .:? "id"+ return $ case (inline, id_) of+ (Just x, Nothing) -> ScriptInline x+ (Nothing, Just x) -> ScriptId x+ (Nothing, Nothing) -> error "Script has to be either stored or inlined"+ (Just _, Just _) -> error "Script can't both be stored and inlined at the same time"+ parse o =+ o .: "script" >>= \o' ->+ Script+ <$> o' .:? "lang"+ <*> parseSource o'+ <*> o' .:? "params"++instance ToJSON ScriptParams where+ toJSON (ScriptParams x) = Object x++instance FromJSON ScriptParams where+ parseJSON (Object o) = pure (ScriptParams o)+ parseJSON _ = fail "error parsing ScriptParams"++instance ToJSON FieldValueFactor where+ toJSON (FieldValueFactor field factor modifier missing) =+ omitNulls base+ where+ base =+ [ "field" .= field,+ "factor" .= factor,+ "modifier" .= modifier,+ "missing" .= missing+ ]++instance FromJSON FieldValueFactor where+ parseJSON = withObject "FieldValueFactor" parse+ where+ parse o =+ FieldValueFactor+ <$> o .: "field"+ <*> o .:? "factor"+ <*> o .:? "modifier"+ <*> o .:? "missing"++instance ToJSON FactorModifier where+ toJSON FactorModifierNone = "none"+ toJSON FactorModifierLog = "log"+ toJSON FactorModifierLog1p = "log1p"+ toJSON FactorModifierLog2p = "log2p"+ toJSON FactorModifierLn = "ln"+ toJSON FactorModifierLn1p = "ln1p"+ toJSON FactorModifierLn2p = "ln2p"+ toJSON FactorModifierSquare = "square"+ toJSON FactorModifierSqrt = "sqrt"+ toJSON FactorModifierReciprocal = "reciprocal"++instance FromJSON FactorModifier where+ parseJSON = withText "FactorModifier" parse+ where+ parse "none" = pure FactorModifierNone+ parse "log" = pure FactorModifierLog+ parse "log1p" = pure FactorModifierLog1p+ parse "log2p" = pure FactorModifierLog2p+ parse "ln" = pure FactorModifierLn+ parse "ln1p" = pure FactorModifierLn1p+ parse "ln2p" = pure FactorModifierLn2p+ parse "square" = pure FactorModifierSquare+ parse "sqrt" = pure FactorModifierSqrt+ parse "reciprocal" = pure FactorModifierReciprocal+ parse fm = fail ("Unexpected FactorModifier: " <> show fm)
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Search.hs view
@@ -0,0 +1,363 @@+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE UndecidableInstances #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Search+ ( Exclude (..),+ ExpandWildcards (..),+ GetTemplateScript (..),+ Include (..),+ Pattern (..),+ PatternOrPatterns (..),+ ScrollId (..),+ Search (..),+ SearchResult (..),+ SearchTemplate (..),+ SearchTemplateId (..),+ SearchTemplateSource (..),+ SearchType (..),+ Source (..),+ TimeUnits (..),+ TrackSortScores,+ unpackId,++ -- * Optics+ tookLens,+ timedOutLens,+ shardsLens,+ searchHitsLens,+ aggregationsLens,+ scrollIdLens,+ suggestLens,+ pitIdLens,+ getTemplateScriptLangLens,+ getTemplateScriptSourceLens,+ getTemplateScriptOptionsLens,+ getTemplateScriptIdLens,+ getTemplateScriptFoundLens,+ )+where++import qualified Data.HashMap.Strict as HM+import Database.Bloodhound.Client.Cluster+import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Aggregation+import Database.Bloodhound.Internal.Versions.Common.Types.Highlight+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.Internal.Versions.Common.Types.PointInTime+import Database.Bloodhound.Internal.Versions.Common.Types.Query+import Database.Bloodhound.Internal.Versions.Common.Types.Sort+import Database.Bloodhound.Internal.Versions.Common.Types.Suggest++-- | 'unpackId' is a silly convenience function that gets used once.+unpackId :: DocId -> Text+unpackId (DocId docId) = docId++type TrackSortScores = Bool++data Search = Search+ { queryBody :: Maybe Query,+ filterBody :: Maybe Filter,+ sortBody :: Maybe Sort,+ aggBody :: Maybe Aggregations,+ highlight :: Maybe Highlights,+ -- default False+ trackSortScores :: TrackSortScores,+ from :: From,+ size :: Size,+ searchType :: SearchType,+ searchAfterKey :: Maybe SearchAfterKey,+ fields :: Maybe [FieldName],+ scriptFields :: Maybe ScriptFields,+ source :: Maybe Source,+ -- | Only one Suggestion request / response per Search is supported.+ suggestBody :: Maybe Suggest,+ pointInTime :: Maybe PointInTime+ }+ deriving stock (Eq, Show)++instance ToJSON Search where+ toJSON+ ( Search+ mquery+ sFilter+ sort+ searchAggs+ highlight+ sTrackSortScores+ sFrom+ sSize+ _+ sAfter+ sFields+ sScriptFields+ sSource+ sSuggest+ pPointInTime+ ) =+ omitNulls+ [ "query" .= query',+ "sort" .= sort,+ "aggregations" .= searchAggs,+ "highlight" .= highlight,+ "from" .= sFrom,+ "size" .= sSize,+ "track_scores" .= sTrackSortScores,+ "search_after" .= sAfter,+ "fields" .= sFields,+ "script_fields" .= sScriptFields,+ "_source" .= sSource,+ "suggest" .= sSuggest,+ "pit" .= pPointInTime+ ]+ where+ query' = case sFilter of+ Nothing -> mquery+ Just x ->+ Just+ . QueryBoolQuery+ $ mkBoolQuery+ (maybeToList mquery)+ [x]+ []+ []++data SearchType+ = SearchTypeQueryThenFetch+ | SearchTypeDfsQueryThenFetch+ deriving stock (Eq, Show)++instance ToJSON SearchType where+ toJSON SearchTypeQueryThenFetch = String "query_then_fetch"+ toJSON SearchTypeDfsQueryThenFetch = String "dfs_query_then_fetch"++instance FromJSON SearchType where+ parseJSON (String "query_then_fetch") = pure $ SearchTypeQueryThenFetch+ parseJSON (String "dfs_query_then_fetch") = pure $ SearchTypeDfsQueryThenFetch+ parseJSON _ = empty++data Source+ = NoSource+ | SourcePatterns PatternOrPatterns+ | SourceIncludeExclude Include Exclude+ deriving stock (Eq, Show)++instance ToJSON Source where+ toJSON NoSource = toJSON False+ toJSON (SourcePatterns patterns) = toJSON patterns+ toJSON (SourceIncludeExclude incl excl) = object ["includes" .= incl, "excludes" .= excl]++data PatternOrPatterns+ = PopPattern Pattern+ | PopPatterns [Pattern]+ deriving stock (Eq, Read, Show)++instance ToJSON PatternOrPatterns where+ toJSON (PopPattern pattern) = toJSON pattern+ toJSON (PopPatterns patterns) = toJSON patterns++data Include = Include [Pattern] deriving stock (Eq, Read, Show)++data Exclude = Exclude [Pattern] deriving stock (Eq, Read, Show)++instance ToJSON Include where+ toJSON (Include patterns) = toJSON patterns++instance ToJSON Exclude where+ toJSON (Exclude patterns) = toJSON patterns++newtype Pattern = Pattern Text deriving stock (Eq, Read, Show)++instance ToJSON Pattern where+ toJSON (Pattern pattern) = toJSON pattern++data SearchResult a = SearchResult+ { took :: Int,+ timedOut :: Bool,+ shards :: ShardResult,+ searchHits :: SearchHits a,+ aggregations :: Maybe AggregationResults,+ -- | Only one Suggestion request / response per+ -- Search is supported.+ scrollId :: Maybe ScrollId,+ suggest :: Maybe NamedSuggestionResponse,+ pitId :: Maybe Text+ }+ deriving stock (Eq, Show)++instance (FromJSON a) => FromJSON (SearchResult a) where+ parseJSON (Object v) =+ SearchResult+ <$> v+ .: "took"+ <*> v+ .: "timed_out"+ <*> v+ .: "_shards"+ <*> v+ .: "hits"+ <*> v+ .:? "aggregations"+ <*> v+ .:? "_scroll_id"+ <*> v+ .:? "suggest"+ <*> v+ .:? "pit_id"+ parseJSON _ = empty++tookLens :: Lens' (SearchResult a) Int+tookLens = lens took (\x y -> x {took = y})++timedOutLens :: Lens' (SearchResult a) Bool+timedOutLens = lens timedOut (\x y -> x {timedOut = y})++shardsLens :: Lens' (SearchResult a) ShardResult+shardsLens = lens shards (\x y -> x {shards = y})++searchHitsLens :: Lens' (SearchResult a) (SearchHits a)+searchHitsLens = lens searchHits (\x y -> x {searchHits = y})++aggregationsLens :: Lens' (SearchResult a) (Maybe AggregationResults)+aggregationsLens = lens aggregations (\x y -> x {aggregations = y})++scrollIdLens :: Lens' (SearchResult a) (Maybe ScrollId)+scrollIdLens = lens scrollId (\x y -> x {scrollId = y})++suggestLens :: Lens' (SearchResult a) (Maybe NamedSuggestionResponse)+suggestLens = lens suggest (\x y -> x {suggest = y})++pitIdLens :: Lens' (SearchResult a) (Maybe Text)+pitIdLens = lens pitId (\x y -> x {pitId = y})++newtype ScrollId+ = ScrollId Text+ deriving newtype (Eq, Ord, Show, ToJSON, FromJSON)++newtype SearchTemplateId = SearchTemplateId Text deriving stock (Eq, Show)++instance ToJSON SearchTemplateId where+ toJSON (SearchTemplateId x) = toJSON x++newtype SearchTemplateSource = SearchTemplateSource Text deriving stock (Eq, Show)++instance ToJSON SearchTemplateSource where+ toJSON (SearchTemplateSource x) = toJSON x++instance FromJSON SearchTemplateSource where+ parseJSON (String s) = pure $ SearchTemplateSource s+ parseJSON _ = empty++data ExpandWildcards+ = ExpandWildcardsAll+ | ExpandWildcardsOpen+ | ExpandWildcardsClosed+ | ExpandWildcardsNone+ deriving stock (Eq, Show)++instance ToJSON ExpandWildcards where+ toJSON ExpandWildcardsAll = String "all"+ toJSON ExpandWildcardsOpen = String "open"+ toJSON ExpandWildcardsClosed = String "closed"+ toJSON ExpandWildcardsNone = String "none"++instance FromJSON ExpandWildcards where+ parseJSON (String "all") = pure $ ExpandWildcardsAll+ parseJSON (String "open") = pure $ ExpandWildcardsOpen+ parseJSON (String "closed") = pure $ ExpandWildcardsClosed+ parseJSON (String "none") = pure $ ExpandWildcardsNone+ parseJSON _ = empty++data TimeUnits+ = TimeUnitDays+ | TimeUnitHours+ | TimeUnitMinutes+ | TimeUnitSeconds+ | TimeUnitMilliseconds+ | TimeUnitMicroseconds+ | TimeUnitNanoseconds+ deriving stock (Eq, Show)++instance ToJSON TimeUnits where+ toJSON TimeUnitDays = String "d"+ toJSON TimeUnitHours = String "h"+ toJSON TimeUnitMinutes = String "m"+ toJSON TimeUnitSeconds = String "s"+ toJSON TimeUnitMilliseconds = String "ms"+ toJSON TimeUnitMicroseconds = String "micros"+ toJSON TimeUnitNanoseconds = String "nanos"++instance FromJSON TimeUnits where+ parseJSON (String "d") = pure $ TimeUnitDays+ parseJSON (String "h") = pure $ TimeUnitHours+ parseJSON (String "m") = pure $ TimeUnitMinutes+ parseJSON (String "s") = pure $ TimeUnitSeconds+ parseJSON (String "ms") = pure $ TimeUnitMilliseconds+ parseJSON (String "micros") = pure $ TimeUnitMicroseconds+ parseJSON (String "nanos") = pure $ TimeUnitNanoseconds+ parseJSON _ = empty++data SearchTemplate = SearchTemplate+ { searchTemplate :: Either SearchTemplateId SearchTemplateSource,+ params :: TemplateQueryKeyValuePairs,+ explainSearchTemplate :: Maybe Bool,+ profileSearchTemplate :: Maybe Bool+ }+ deriving stock (Eq, Show)++instance ToJSON SearchTemplate where+ toJSON SearchTemplate {..} =+ omitNulls+ [ either ("id" .=) ("source" .=) searchTemplate,+ "params" .= params,+ "explain" .= explainSearchTemplate,+ "profile" .= profileSearchTemplate+ ]++data GetTemplateScript = GetTemplateScript+ { getTemplateScriptLang :: Maybe Text,+ getTemplateScriptSource :: Maybe SearchTemplateSource,+ getTemplateScriptOptions :: Maybe (HM.HashMap Text Text),+ getTemplateScriptId :: Text,+ getTemplateScriptFound :: Bool+ }+ deriving stock (Eq, Show)++instance FromJSON GetTemplateScript where+ parseJSON (Object v) = do+ script <- v .:? "script"+ maybe+ (GetTemplateScript Nothing Nothing Nothing <$> v .: "_id" <*> v .: "found")+ ( \s ->+ GetTemplateScript+ <$> s+ .:? "lang"+ <*> s+ .:? "source"+ <*> s+ .:? "options"+ <*> v+ .: "_id"+ <*> v+ .: "found"+ )+ script+ parseJSON _ = empty++getTemplateScriptLangLens :: Lens' GetTemplateScript (Maybe Text)+getTemplateScriptLangLens = lens getTemplateScriptLang (\x y -> x {getTemplateScriptLang = y})++getTemplateScriptSourceLens :: Lens' GetTemplateScript (Maybe SearchTemplateSource)+getTemplateScriptSourceLens = lens getTemplateScriptSource (\x y -> x {getTemplateScriptSource = y})++getTemplateScriptOptionsLens :: Lens' GetTemplateScript (Maybe (HM.HashMap Text Text))+getTemplateScriptOptionsLens = lens getTemplateScriptOptions (\x y -> x {getTemplateScriptOptions = y})++getTemplateScriptIdLens :: Lens' GetTemplateScript Text+getTemplateScriptIdLens = lens getTemplateScriptId (\x y -> x {getTemplateScriptId = y})++getTemplateScriptFoundLens :: Lens' GetTemplateScript Bool+getTemplateScriptFoundLens = lens getTemplateScriptFound (\x y -> x {getTemplateScriptFound = y})
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Snapshots.hs view
@@ -0,0 +1,630 @@+{-# LANGUAGE CPP #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE UndecidableInstances #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Snapshots+ ( FsSnapshotRepo (..),+ GenericSnapshotRepo (..),+ GenericSnapshotRepoSettings (..),+ RRGroupRefNum (..),+ RestoreIndexSettings (..),+ RestoreRenamePattern (..),+ RestoreRenameToken (..),+ SnapshotCreateSettings (..),+ SnapshotInfo (..),+ SnapshotNodeVerification (..),+ SnapshotPattern (..),+ SnapshotRepo (..),+ SnapshotRepoConversionError (..),+ SnapshotRepoName (..),+ SnapshotRepoPattern (..),+ SnapshotRepoSelection (..),+ SnapshotRepoType (..),+ SnapshotRepoUpdateSettings (..),+ SnapshotRestoreSettings (..),+ SnapshotSelection (..),+ SnapshotShardFailure (..),+ SnapshotState (..),+ SnapshotVerification (..),+ defaultSnapshotCreateSettings,+ defaultSnapshotRepoUpdateSettings,+ defaultSnapshotRestoreSettings,+ mkRRGroupRefNum,++ -- * Optics+ snapshotRepoNameLens,+ gSnapshotRepoNameLens,+ gSnapshotRepoTypeLens,+ gSnapshotRepoSettingsLens,+ snapshotRepoTypeLens,+ gSnapshotRepoSettingsObjectLens,+ snapshotNodeVerificationsLens,+ snvFullIdLens,+ snvNodeNameLens,+ snapRestoreWaitForCompletionLens,+ snapRestoreIndicesLens,+ snapRestoreIgnoreUnavailableLens,+ snapRestoreIncludeGlobalStateLens,+ snapRestoreRenamePatternLens,+ snapRestoreRenameReplacementLens,+ snapRestorePartialLens,+ snapRestoreIncludeAliasesLens,+ snapRestoreIndexSettingsOverridesLens,+ snapRestoreIgnoreIndexSettingsLens,+ repoUpdateVerifyLens,+ fsrNameLens,+ fsrLocationLens,+ fsrCompressMetadataLens,+ fsrChunkSizeLens,+ fsrMaxRestoreBytesPerSecLens,+ fsrMaxSnapshotBytesPerSecLens,+ snapWaitForCompletionLens,+ snapIndicesLens,+ snapIgnoreUnavailableLens,+ snapIncludeGlobalStateLens,+ snapPartialLens,+ snapInfoShardsLens,+ snapInfoFailuresLens,+ snapInfoDurationLens,+ snapInfoEndTimeLens,+ snapInfoStartTimeLens,+ snapInfoStateLens,+ snapInfoIndicesLens,+ snapInfoNameLens,+ snapShardFailureIndexLens,+ snapShardFailureNodeIdLens,+ snapShardFailureReasonLens,+ snapShardFailureShardIdLens,+ rrPatternLens,+ restoreOverrideReplicasLens,+ )+where++import Control.Monad.Catch+import qualified Data.Aeson.Key as X+import qualified Data.Aeson.KeyMap as X+import qualified Data.HashMap.Strict as HM+import qualified Data.Text as T+import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Utils.StringlyTyped+import Database.Bloodhound.Internal.Versions.Common.Types.Indices+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.Internal.Versions.Common.Types.Nodes+import Database.Bloodhound.Internal.Versions.Common.Types.Units+import GHC.Generics++data SnapshotRepoSelection+ = SnapshotRepoList (NonEmpty SnapshotRepoPattern)+ | AllSnapshotRepos+ deriving stock (Eq, Show)++-- | Either specifies an exact repo name or one with globs in it,+-- e.g. @RepoPattern "foo*"@ __NOTE__: Patterns are not supported on ES < 1.7+data SnapshotRepoPattern+ = ExactRepo SnapshotRepoName+ | RepoPattern Text+ deriving stock (Eq, Show)++-- | The unique name of a snapshot repository.+newtype SnapshotRepoName = SnapshotRepoName {snapshotRepoName :: Text}+ deriving newtype (Eq, Ord, Show, ToJSON, FromJSON)++snapshotRepoNameLens :: Lens' SnapshotRepoName Text+snapshotRepoNameLens = lens snapshotRepoName (\x y -> x {snapshotRepoName = y})++-- | A generic representation of a snapshot repo. This is what gets+-- sent to and parsed from the server. For repo types enabled by+-- plugins that aren't exported by this library, consider making a+-- custom type which implements 'SnapshotRepo'. If it is a common repo+-- type, consider submitting a pull request to have it included in the+-- library proper+data GenericSnapshotRepo = GenericSnapshotRepo+ { gSnapshotRepoName :: SnapshotRepoName,+ gSnapshotRepoType :: SnapshotRepoType,+ gSnapshotRepoSettings :: GenericSnapshotRepoSettings+ }+ deriving stock (Eq, Show)++instance SnapshotRepo GenericSnapshotRepo where+ toGSnapshotRepo = id+ fromGSnapshotRepo = Right++gSnapshotRepoNameLens :: Lens' GenericSnapshotRepo SnapshotRepoName+gSnapshotRepoNameLens = lens gSnapshotRepoName (\x y -> x {gSnapshotRepoName = y})++gSnapshotRepoTypeLens :: Lens' GenericSnapshotRepo SnapshotRepoType+gSnapshotRepoTypeLens = lens gSnapshotRepoType (\x y -> x {gSnapshotRepoType = y})++gSnapshotRepoSettingsLens :: Lens' GenericSnapshotRepo GenericSnapshotRepoSettings+gSnapshotRepoSettingsLens = lens gSnapshotRepoSettings (\x y -> x {gSnapshotRepoSettings = y})++newtype SnapshotRepoType = SnapshotRepoType {snapshotRepoType :: Text}+ deriving newtype (Eq, Ord, Show, ToJSON, FromJSON)++snapshotRepoTypeLens :: Lens' SnapshotRepoType Text+snapshotRepoTypeLens = lens snapshotRepoType (\x y -> x {snapshotRepoType = y})++-- | Opaque representation of snapshot repo settings. Instances of+-- 'SnapshotRepo' will produce this.+newtype GenericSnapshotRepoSettings = GenericSnapshotRepoSettings {gSnapshotRepoSettingsObject :: Object}+ deriving newtype (Eq, Show, ToJSON)++-- Regardless of whether you send strongly typed json, my version of+-- ES sends back stringly typed json in the settings, e.g. booleans+-- as strings, so we'll try to convert them.+instance FromJSON GenericSnapshotRepoSettings where+ parseJSON = fmap (GenericSnapshotRepoSettings . fmap unStringlyTypeJSON) . parseJSON++gSnapshotRepoSettingsObjectLens :: Lens' GenericSnapshotRepoSettings Object+gSnapshotRepoSettingsObjectLens = lens gSnapshotRepoSettingsObject (\x y -> x {gSnapshotRepoSettingsObject = y})++-- | The result of running 'verifySnapshotRepo'.+newtype SnapshotVerification = SnapshotVerification+ { snapshotNodeVerifications :: [SnapshotNodeVerification]+ }+ deriving stock (Eq, Show)++instance FromJSON SnapshotVerification where+ parseJSON = withObject "SnapshotVerification" parse+ where+ parse o = do+ o2 <- o .: "nodes"+ SnapshotVerification <$> mapM (uncurry parse') (HM.toList o2)+ parse' rawFullId = withObject "SnapshotNodeVerification" $ \o ->+ SnapshotNodeVerification (FullNodeId rawFullId) <$> o .: "name"++snapshotNodeVerificationsLens :: Lens' SnapshotVerification [SnapshotNodeVerification]+snapshotNodeVerificationsLens = lens snapshotNodeVerifications (\x y -> x {snapshotNodeVerifications = y})++-- | A node that has verified a snapshot+data SnapshotNodeVerification = SnapshotNodeVerification+ { snvFullId :: FullNodeId,+ snvNodeName :: NodeName+ }+ deriving stock (Eq, Show)++snvFullIdLens :: Lens' SnapshotNodeVerification FullNodeId+snvFullIdLens = lens snvFullId (\x y -> x {snvFullId = y})++snvNodeNameLens :: Lens' SnapshotNodeVerification NodeName+snvNodeNameLens = lens snvNodeName (\x y -> x {snvNodeName = y})++data SnapshotState+ = SnapshotInit+ | SnapshotStarted+ | SnapshotSuccess+ | SnapshotFailed+ | SnapshotAborted+ | SnapshotMissing+ | SnapshotWaiting+ deriving stock (Eq, Show)++instance FromJSON SnapshotState where+ parseJSON = withText "SnapshotState" parse+ where+ parse "INIT" = return SnapshotInit+ parse "STARTED" = return SnapshotStarted+ parse "SUCCESS" = return SnapshotSuccess+ parse "FAILED" = return SnapshotFailed+ parse "ABORTED" = return SnapshotAborted+ parse "MISSING" = return SnapshotMissing+ parse "WAITING" = return SnapshotWaiting+ parse t = fail ("Invalid snapshot state " <> T.unpack t)++data SnapshotRestoreSettings = SnapshotRestoreSettings+ { -- | Should the API call return immediately after initializing+ -- the restore or wait until completed? Note that if this is+ -- enabled, it could wait a long time, so you should adjust your+ -- 'ManagerSettings' accordingly to set long timeouts or+ -- explicitly handle timeouts.+ snapRestoreWaitForCompletion :: Bool,+ -- | Nothing will restore all indices in the snapshot. Just [] is+ -- permissable and will essentially be a no-op restore.+ snapRestoreIndices :: Maybe IndexSelection,+ -- | If set to True, any indices that do not exist will be ignored+ -- during snapshot rather than failing the restore.+ snapRestoreIgnoreUnavailable :: Bool,+ -- | If set to false, will ignore any global state in the snapshot+ -- and will not restore it.+ snapRestoreIncludeGlobalState :: Bool,+ -- | A regex pattern for matching indices. Used with+ -- 'snapRestoreRenameReplacement', the restore can reference the+ -- matched index and create a new index name upon restore.+ snapRestoreRenamePattern :: Maybe RestoreRenamePattern,+ -- | Expression of how index renames should be constructed.+ snapRestoreRenameReplacement :: Maybe (NonEmpty RestoreRenameToken),+ -- | If some indices fail to restore, should the process proceed?+ snapRestorePartial :: Bool,+ -- | Should the restore also restore the aliases captured in the+ -- snapshot.+ snapRestoreIncludeAliases :: Bool,+ -- | Settings to apply during the restore process. __NOTE:__ This+ -- option is not supported in ES < 1.5 and should be set to+ -- Nothing in that case.+ snapRestoreIndexSettingsOverrides :: Maybe RestoreIndexSettings,+ -- | This type could be more rich but it isn't clear which+ -- settings are allowed to be ignored during restore, so we're+ -- going with including this feature in a basic form rather than+ -- omitting it. One example here would be+ -- "index.refresh_interval". Any setting specified here will+ -- revert back to the server default during the restore process.+ snapRestoreIgnoreIndexSettings :: Maybe (NonEmpty Text)+ }+ deriving stock (Eq, Show)++snapRestoreWaitForCompletionLens :: Lens' SnapshotRestoreSettings Bool+snapRestoreWaitForCompletionLens = lens snapRestoreWaitForCompletion (\x y -> x {snapRestoreWaitForCompletion = y})++snapRestoreIndicesLens :: Lens' SnapshotRestoreSettings (Maybe IndexSelection)+snapRestoreIndicesLens = lens snapRestoreIndices (\x y -> x {snapRestoreIndices = y})++snapRestoreIgnoreUnavailableLens :: Lens' SnapshotRestoreSettings Bool+snapRestoreIgnoreUnavailableLens = lens snapRestoreIgnoreUnavailable (\x y -> x {snapRestoreIgnoreUnavailable = y})++snapRestoreIncludeGlobalStateLens :: Lens' SnapshotRestoreSettings Bool+snapRestoreIncludeGlobalStateLens = lens snapRestoreIncludeGlobalState (\x y -> x {snapRestoreIncludeGlobalState = y})++snapRestoreRenamePatternLens :: Lens' SnapshotRestoreSettings (Maybe RestoreRenamePattern)+snapRestoreRenamePatternLens = lens snapRestoreRenamePattern (\x y -> x {snapRestoreRenamePattern = y})++snapRestoreRenameReplacementLens :: Lens' SnapshotRestoreSettings (Maybe (NonEmpty RestoreRenameToken))+snapRestoreRenameReplacementLens = lens snapRestoreRenameReplacement (\x y -> x {snapRestoreRenameReplacement = y})++snapRestorePartialLens :: Lens' SnapshotRestoreSettings Bool+snapRestorePartialLens = lens snapRestorePartial (\x y -> x {snapRestorePartial = y})++snapRestoreIncludeAliasesLens :: Lens' SnapshotRestoreSettings Bool+snapRestoreIncludeAliasesLens = lens snapRestoreIncludeAliases (\x y -> x {snapRestoreIncludeAliases = y})++snapRestoreIndexSettingsOverridesLens :: Lens' SnapshotRestoreSettings (Maybe RestoreIndexSettings)+snapRestoreIndexSettingsOverridesLens = lens snapRestoreIndexSettingsOverrides (\x y -> x {snapRestoreIndexSettingsOverrides = y})++snapRestoreIgnoreIndexSettingsLens :: Lens' SnapshotRestoreSettings (Maybe (NonEmpty Text))+snapRestoreIgnoreIndexSettingsLens = lens snapRestoreIgnoreIndexSettings (\x y -> x {snapRestoreIgnoreIndexSettings = y})++newtype SnapshotRepoUpdateSettings = SnapshotRepoUpdateSettings+ { -- | After creation/update, synchronously check that nodes can+ -- write to this repo. Defaults to True. You may use False if you+ -- need a faster response and plan on verifying manually later+ -- with 'verifySnapshotRepo'.+ repoUpdateVerify :: Bool+ }+ deriving stock (Eq, Show)++repoUpdateVerifyLens :: Lens' SnapshotRepoUpdateSettings Bool+repoUpdateVerifyLens = lens repoUpdateVerify (\x y -> x {repoUpdateVerify = y})++-- | Reasonable defaults for repo creation/update+--+-- * repoUpdateVerify True+defaultSnapshotRepoUpdateSettings :: SnapshotRepoUpdateSettings+defaultSnapshotRepoUpdateSettings = SnapshotRepoUpdateSettings True++-- | A filesystem-based snapshot repo that ships with+-- Elasticsearch. This is an instance of 'SnapshotRepo' so it can be+-- used with 'updateSnapshotRepo'+data FsSnapshotRepo = FsSnapshotRepo+ { fsrName :: SnapshotRepoName,+ fsrLocation :: FilePath,+ fsrCompressMetadata :: Bool,+ -- | Size by which to split large files during snapshotting.+ fsrChunkSize :: Maybe Bytes,+ -- | Throttle node restore rate. If not supplied, defaults to 40mb/sec+ fsrMaxRestoreBytesPerSec :: Maybe Bytes,+ -- | Throttle node snapshot rate. If not supplied, defaults to 40mb/sec+ fsrMaxSnapshotBytesPerSec :: Maybe Bytes+ }+ deriving stock (Eq, Show, Generic)++instance SnapshotRepo FsSnapshotRepo where+ toGSnapshotRepo FsSnapshotRepo {..} =+ GenericSnapshotRepo fsrName fsRepoType (GenericSnapshotRepoSettings settings)+ where+ settings =+ X.fromList $+ [ X.fromText "location" .= fsrLocation,+ X.fromText "compress" .= fsrCompressMetadata+ ]+ ++ optionalPairs+ optionalPairs =+ catMaybes+ [ ("chunk_size" .=) <$> fsrChunkSize,+ ("max_restore_bytes_per_sec" .=) <$> fsrMaxRestoreBytesPerSec,+ ("max_snapshot_bytes_per_sec" .=) <$> fsrMaxSnapshotBytesPerSec+ ]+ fromGSnapshotRepo GenericSnapshotRepo {..}+ | gSnapshotRepoType == fsRepoType = do+ let o = gSnapshotRepoSettingsObject gSnapshotRepoSettings+ parseRepo $+ FsSnapshotRepo gSnapshotRepoName+ <$> o+ .: "location"+ <*> o+ .:? "compress"+ .!= False+ <*> o+ .:? "chunk_size"+ <*> o+ .:? "max_restore_bytes_per_sec"+ <*> o+ .:? "max_snapshot_bytes_per_sec"+ | otherwise = Left (RepoTypeMismatch fsRepoType gSnapshotRepoType)++fsrNameLens :: Lens' FsSnapshotRepo SnapshotRepoName+fsrNameLens = lens fsrName (\x y -> x {fsrName = y})++fsrLocationLens :: Lens' FsSnapshotRepo FilePath+fsrLocationLens = lens fsrLocation (\x y -> x {fsrLocation = y})++fsrCompressMetadataLens :: Lens' FsSnapshotRepo Bool+fsrCompressMetadataLens = lens fsrCompressMetadata (\x y -> x {fsrCompressMetadata = y})++fsrChunkSizeLens :: Lens' FsSnapshotRepo (Maybe Bytes)+fsrChunkSizeLens = lens fsrChunkSize (\x y -> x {fsrChunkSize = y})++fsrMaxRestoreBytesPerSecLens :: Lens' FsSnapshotRepo (Maybe Bytes)+fsrMaxRestoreBytesPerSecLens = lens fsrMaxRestoreBytesPerSec (\x y -> x {fsrMaxRestoreBytesPerSec = y})++fsrMaxSnapshotBytesPerSecLens :: Lens' FsSnapshotRepo (Maybe Bytes)+fsrMaxSnapshotBytesPerSecLens = lens fsrMaxSnapshotBytesPerSec (\x y -> x {fsrMaxSnapshotBytesPerSec = y})++parseRepo :: Parser a -> Either SnapshotRepoConversionError a+parseRepo parser = case parseEither (const parser) () of+ Left e -> Left (OtherRepoConversionError (T.pack e))+ Right a -> Right a++fsRepoType :: SnapshotRepoType+fsRepoType = SnapshotRepoType "fs"++-- | Law: fromGSnapshotRepo (toGSnapshotRepo r) == Right r+class SnapshotRepo r where+ toGSnapshotRepo :: r -> GenericSnapshotRepo+ fromGSnapshotRepo :: GenericSnapshotRepo -> Either SnapshotRepoConversionError r++data SnapshotRepoConversionError+ = -- | Expected type and actual type+ RepoTypeMismatch SnapshotRepoType SnapshotRepoType+ | OtherRepoConversionError Text+ deriving stock (Eq, Show)++instance Exception SnapshotRepoConversionError++data SnapshotCreateSettings = SnapshotCreateSettings+ { -- | Should the API call return immediately after initializing+ -- the snapshot or wait until completed? Note that if this is+ -- enabled it could wait a long time, so you should adjust your+ -- 'ManagerSettings' accordingly to set long timeouts or+ -- explicitly handle timeouts.+ snapWaitForCompletion :: Bool,+ -- | Nothing will snapshot all indices. Just [] is permissable and+ -- will essentially be a no-op snapshot.+ snapIndices :: Maybe IndexSelection,+ -- | If set to True, any matched indices that don't exist will be+ -- ignored. Otherwise it will be an error and fail.+ snapIgnoreUnavailable :: Bool,+ snapIncludeGlobalState :: Bool,+ -- | If some indices failed to snapshot (e.g. if not all primary+ -- shards are available), should the process proceed?+ snapPartial :: Bool+ }+ deriving stock (Eq, Show)++snapWaitForCompletionLens :: Lens' SnapshotCreateSettings Bool+snapWaitForCompletionLens = lens snapWaitForCompletion (\x y -> x {snapWaitForCompletion = y})++snapIndicesLens :: Lens' SnapshotCreateSettings (Maybe IndexSelection)+snapIndicesLens = lens snapIndices (\x y -> x {snapIndices = y})++snapIgnoreUnavailableLens :: Lens' SnapshotCreateSettings Bool+snapIgnoreUnavailableLens = lens snapIgnoreUnavailable (\x y -> x {snapIgnoreUnavailable = y})++snapIncludeGlobalStateLens :: Lens' SnapshotCreateSettings Bool+snapIncludeGlobalStateLens = lens snapIncludeGlobalState (\x y -> x {snapIncludeGlobalState = y})++snapPartialLens :: Lens' SnapshotCreateSettings Bool+snapPartialLens = lens snapPartial (\x y -> x {snapPartial = y})++-- | Reasonable defaults for snapshot creation+--+-- * snapWaitForCompletion False+-- * snapIndices Nothing+-- * snapIgnoreUnavailable False+-- * snapIncludeGlobalState True+-- * snapPartial False+defaultSnapshotCreateSettings :: SnapshotCreateSettings+defaultSnapshotCreateSettings =+ SnapshotCreateSettings+ { snapWaitForCompletion = False,+ snapIndices = Nothing,+ snapIgnoreUnavailable = False,+ snapIncludeGlobalState = True,+ snapPartial = False+ }++data SnapshotSelection+ = SnapshotList (NonEmpty SnapshotPattern)+ | AllSnapshots+ deriving stock (Eq, Show)++-- | Either specifies an exact snapshot name or one with globs in it,+-- e.g. @SnapPattern "foo*"@ __NOTE__: Patterns are not supported on+-- ES < 1.7+data SnapshotPattern+ = ExactSnap SnapshotName+ | SnapPattern Text+ deriving stock (Eq, Show)++-- | General information about the state of a snapshot. Has some+-- redundancies with 'SnapshotStatus'+data SnapshotInfo = SnapshotInfo+ { snapInfoShards :: ShardResult,+ snapInfoFailures :: [SnapshotShardFailure],+ snapInfoDuration :: NominalDiffTime,+ snapInfoEndTime :: UTCTime,+ snapInfoStartTime :: UTCTime,+ snapInfoState :: SnapshotState,+ snapInfoIndices :: [IndexName],+ snapInfoName :: SnapshotName+ }+ deriving stock (Eq, Show)++instance FromJSON SnapshotInfo where+ parseJSON = withObject "SnapshotInfo" parse+ where+ parse o =+ SnapshotInfo+ <$> o+ .: "shards"+ <*> o+ .: "failures"+ <*> (unMS <$> o .: "duration_in_millis")+ <*> (posixMS <$> o .: "end_time_in_millis")+ <*> (posixMS <$> o .: "start_time_in_millis")+ <*> o+ .: "state"+ <*> o+ .: "indices"+ <*> o+ .: "snapshot"++snapInfoShardsLens :: Lens' SnapshotInfo ShardResult+snapInfoShardsLens = lens snapInfoShards (\x y -> x {snapInfoShards = y})++snapInfoFailuresLens :: Lens' SnapshotInfo [SnapshotShardFailure]+snapInfoFailuresLens = lens snapInfoFailures (\x y -> x {snapInfoFailures = y})++snapInfoDurationLens :: Lens' SnapshotInfo NominalDiffTime+snapInfoDurationLens = lens snapInfoDuration (\x y -> x {snapInfoDuration = y})++snapInfoEndTimeLens :: Lens' SnapshotInfo UTCTime+snapInfoEndTimeLens = lens snapInfoEndTime (\x y -> x {snapInfoEndTime = y})++snapInfoStartTimeLens :: Lens' SnapshotInfo UTCTime+snapInfoStartTimeLens = lens snapInfoStartTime (\x y -> x {snapInfoStartTime = y})++snapInfoStateLens :: Lens' SnapshotInfo SnapshotState+snapInfoStateLens = lens snapInfoState (\x y -> x {snapInfoState = y})++snapInfoIndicesLens :: Lens' SnapshotInfo [IndexName]+snapInfoIndicesLens = lens snapInfoIndices (\x y -> x {snapInfoIndices = y})++snapInfoNameLens :: Lens' SnapshotInfo SnapshotName+snapInfoNameLens = lens snapInfoName (\x y -> x {snapInfoName = y})++data SnapshotShardFailure = SnapshotShardFailure+ { snapShardFailureIndex :: IndexName,+ snapShardFailureNodeId :: Maybe NodeName, -- I'm not 100% sure this isn't actually 'FullNodeId'+ snapShardFailureReason :: Text,+ snapShardFailureShardId :: ShardId+ }+ deriving stock (Eq, Show)++instance FromJSON SnapshotShardFailure where+ parseJSON = withObject "SnapshotShardFailure" parse+ where+ parse o =+ SnapshotShardFailure+ <$> o+ .: "index"+ <*> o+ .:? "node_id"+ <*> o+ .: "reason"+ <*> o+ .: "shard_id"++snapShardFailureIndexLens :: Lens' SnapshotShardFailure IndexName+snapShardFailureIndexLens = lens snapShardFailureIndex (\x y -> x {snapShardFailureIndex = y})++snapShardFailureNodeIdLens :: Lens' SnapshotShardFailure (Maybe NodeName)+snapShardFailureNodeIdLens = lens snapShardFailureNodeId (\x y -> x {snapShardFailureNodeId = y})++snapShardFailureReasonLens :: Lens' SnapshotShardFailure Text+snapShardFailureReasonLens = lens snapShardFailureReason (\x y -> x {snapShardFailureReason = y})++snapShardFailureShardIdLens :: Lens' SnapshotShardFailure ShardId+snapShardFailureShardIdLens = lens snapShardFailureShardId (\x y -> x {snapShardFailureShardId = y})++-- | Regex-stype pattern, e.g. "index_(.+)" to match index names+newtype RestoreRenamePattern = RestoreRenamePattern {rrPattern :: Text}+ deriving newtype (Eq, Ord, Show, ToJSON)++rrPatternLens :: Lens' RestoreRenamePattern Text+rrPatternLens = lens rrPattern (\x y -> x {rrPattern = y})++-- | A single token in a index renaming scheme for a restore. These+-- are concatenated into a string before being sent to+-- Elasticsearch. Check out these Java+-- <https://docs.oracle.com/javase/7/docs/api/java/util/regex/Matcher.html docs> to find out more if you're into that sort of thing.+data RestoreRenameToken+ = -- | Just a literal string of characters+ RRTLit Text+ | -- | Equivalent to $0. The entire matched pattern, not any subgroup+ RRSubWholeMatch+ | -- | A specific reference to a group number+ RRSubGroup RRGroupRefNum+ deriving stock (Eq, Show)++-- | A group number for regex matching. Only values from 1-9 are+-- supported. Construct with 'mkRRGroupRefNum'+newtype RRGroupRefNum = RRGroupRefNum {rrGroupRefNum :: Int}+ deriving stock (Eq, Ord, Show)++instance Bounded RRGroupRefNum where+ minBound = RRGroupRefNum 1+ maxBound = RRGroupRefNum 9++-- | Only allows valid group number references (1-9).+mkRRGroupRefNum :: Int -> Maybe RRGroupRefNum+mkRRGroupRefNum i+ | i >= rrGroupRefNum minBound+ && i <= rrGroupRefNum maxBound =+ Just $ RRGroupRefNum i+ | otherwise = Nothing++-- | Reasonable defaults for snapshot restores+--+-- * snapRestoreWaitForCompletion False+-- * snapRestoreIndices Nothing+-- * snapRestoreIgnoreUnavailable False+-- * snapRestoreIncludeGlobalState True+-- * snapRestoreRenamePattern Nothing+-- * snapRestoreRenameReplacement Nothing+-- * snapRestorePartial False+-- * snapRestoreIncludeAliases True+-- * snapRestoreIndexSettingsOverrides Nothing+-- * snapRestoreIgnoreIndexSettings Nothing+defaultSnapshotRestoreSettings :: SnapshotRestoreSettings+defaultSnapshotRestoreSettings =+ SnapshotRestoreSettings+ { snapRestoreWaitForCompletion = False,+ snapRestoreIndices = Nothing,+ snapRestoreIgnoreUnavailable = False,+ snapRestoreIncludeGlobalState = True,+ snapRestoreRenamePattern = Nothing,+ snapRestoreRenameReplacement = Nothing,+ snapRestorePartial = False,+ snapRestoreIncludeAliases = True,+ snapRestoreIndexSettingsOverrides = Nothing,+ snapRestoreIgnoreIndexSettings = Nothing+ }++-- | Index settings that can be overridden. The docs only mention you+-- can update number of replicas, but there may be more. You+-- definitely cannot override shard count.+newtype RestoreIndexSettings = RestoreIndexSettings+ { restoreOverrideReplicas :: Maybe ReplicaCount+ }+ deriving stock (Eq, Show)++instance ToJSON RestoreIndexSettings where+ toJSON RestoreIndexSettings {..} = object prs+ where+ prs = catMaybes [("index.number_of_replicas" .=) <$> restoreOverrideReplicas]++restoreOverrideReplicasLens :: Lens' RestoreIndexSettings (Maybe ReplicaCount)+restoreOverrideReplicasLens = lens restoreOverrideReplicas (\x y -> x {restoreOverrideReplicas = y})
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Sort.hs view
@@ -0,0 +1,135 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Sort where++import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.Internal.Versions.Common.Types.Query++-- | 'SortMode' prescribes how to handle sorting array/multi-valued fields.+--+-- http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#_sort_mode_option+data SortMode+ = SortMin+ | SortMax+ | SortSum+ | SortAvg+ deriving stock (Eq, Show)++instance ToJSON SortMode where+ toJSON SortMin = String "min"+ toJSON SortMax = String "max"+ toJSON SortSum = String "sum"+ toJSON SortAvg = String "avg"++-- | 'mkSort' defaults everything but the 'FieldName' and the 'SortOrder' so+-- that you can concisely describe the usual kind of 'SortSpec's you want.+mkSort :: FieldName -> SortOrder -> DefaultSort+mkSort fieldName sOrder = DefaultSort fieldName sOrder Nothing Nothing Nothing Nothing++-- | 'Sort' is a synonym for a list of 'SortSpec's. Sort behavior is order+-- dependent with later sorts acting as tie-breakers for earlier sorts.+type Sort = [SortSpec]++-- | 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.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#search-request-sort>+data SortSpec+ = DefaultSortSpec DefaultSort+ | GeoDistanceSortSpec SortOrder GeoPoint DistanceUnit+ deriving stock (Eq, Show)++instance ToJSON SortSpec where+ toJSON+ ( DefaultSortSpec+ ( DefaultSort+ (FieldName dsSortFieldName)+ dsSortOrder+ dsIgnoreUnmapped+ dsSortMode+ dsMissingSort+ dsNestedFilter+ )+ ) =+ object [fromText dsSortFieldName .= omitNulls base]+ where+ base =+ [ "order" .= dsSortOrder,+ "unmapped_type" .= dsIgnoreUnmapped,+ "mode" .= dsSortMode,+ "missing" .= dsMissingSort,+ "nested_filter" .= dsNestedFilter+ ]+ toJSON (GeoDistanceSortSpec gdsSortOrder (GeoPoint (FieldName field) gdsLatLon) units) =+ object+ [ "unit" .= units,+ fromText field .= gdsLatLon,+ "order" .= gdsSortOrder+ ]++-- | '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.+--+-- The `ignoreUnmapped`, when `Just` field is used to set the elastic 'unmapped_type'+--+-- <http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#search-request-sort>+data DefaultSort = DefaultSort+ { sortFieldName :: FieldName,+ sortOrder :: SortOrder,+ -- default False+ ignoreUnmapped :: Maybe Text,+ sortMode :: Maybe SortMode,+ missingSort :: Maybe Missing,+ nestedFilter :: Maybe Filter+ }+ deriving stock (Eq, Show)++sortFieldNameLens :: Lens' DefaultSort FieldName+sortFieldNameLens = lens sortFieldName (\x y -> x {sortFieldName = y})++sortOrderLens :: Lens' DefaultSort SortOrder+sortOrderLens = lens sortOrder (\x y -> x {sortOrder = y})++ignoreUnmappedLens :: Lens' DefaultSort (Maybe Text)+ignoreUnmappedLens = lens ignoreUnmapped (\x y -> x {ignoreUnmapped = y})++sortModeLens :: Lens' DefaultSort (Maybe SortMode)+sortModeLens = lens sortMode (\x y -> x {sortMode = y})++missingSortLens :: Lens' DefaultSort (Maybe Missing)+missingSortLens = lens missingSort (\x y -> x {missingSort = y})++nestedFilterLens :: Lens' DefaultSort (Maybe Filter)+nestedFilterLens = lens nestedFilter (\x y -> x {nestedFilter = y})++-- | 'SortOrder' is 'Ascending' or 'Descending', as you might expect. These get+-- encoded into "asc" or "desc" when turned into JSON.+--+-- <http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#search-request-sort>+data SortOrder+ = Ascending+ | Descending+ deriving stock (Eq, Show)++instance ToJSON SortOrder where+ toJSON Ascending = String "asc"+ toJSON Descending = String "desc"++-- | '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.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#_missing_values>+data Missing+ = LastMissing+ | FirstMissing+ | CustomMissing Text+ deriving stock (Eq, Show)++instance ToJSON Missing where+ toJSON LastMissing = String "_last"+ toJSON FirstMissing = String "_first"+ toJSON (CustomMissing txt) = String txt
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Suggest.hs view
@@ -0,0 +1,431 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Suggest where++import qualified Data.Aeson.KeyMap as X+import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.Internal.Versions.Common.Types.Query (Query, TemplateQueryKeyValuePairs)+import GHC.Generics++data Suggest = Suggest+ { suggestText :: Text,+ suggestName :: Text,+ suggestType :: SuggestType+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON Suggest where+ toJSON Suggest {..} =+ object+ [ "text" .= suggestText,+ fromText suggestName .= suggestType+ ]++instance FromJSON Suggest where+ parseJSON (Object o) = do+ suggestText' <- o .: "text"+ let dropTextList =+ X.toList $+ X.filterWithKey (\x _ -> x /= "text") o+ suggestName' <-+ case dropTextList of+ [(x, _)] -> return x+ _ -> fail "error parsing Suggest field name"+ suggestType' <- o .: suggestName'+ return $ Suggest suggestText' (toText suggestName') suggestType'+ parseJSON x = typeMismatch "Suggest" x++suggestTextLens :: Lens' Suggest Text+suggestTextLens = lens suggestText (\x y -> x {suggestText = y})++suggestNameLens :: Lens' Suggest Text+suggestNameLens = lens suggestName (\x y -> x {suggestName = y})++suggestTypeLens :: Lens' Suggest SuggestType+suggestTypeLens = lens suggestType (\x y -> x {suggestType = y})++data SuggestType+ = SuggestTypePhraseSuggester PhraseSuggester -- TODO GDF+ deriving stock (Eq, Show, Generic)++instance ToJSON SuggestType where+ toJSON (SuggestTypePhraseSuggester x) =+ object ["phrase" .= x]++instance FromJSON SuggestType where+ parseJSON = withObject "SuggestType" parse+ where+ parse o = phraseSuggester `taggedWith` "phrase"+ where+ taggedWith parser k = parser =<< o .: k+ phraseSuggester = pure . SuggestTypePhraseSuggester++data PhraseSuggester = PhraseSuggester+ { phraseSuggesterField :: FieldName,+ phraseSuggesterGramSize :: Maybe Int,+ phraseSuggesterRealWordErrorLikelihood :: Maybe Int,+ phraseSuggesterConfidence :: Maybe Int,+ phraseSuggesterMaxErrors :: Maybe Int,+ phraseSuggesterSeparator :: Maybe Text,+ phraseSuggesterSize :: Maybe Size,+ phraseSuggesterAnalyzer :: Maybe Analyzer,+ phraseSuggesterShardSize :: Maybe Int,+ phraseSuggesterHighlight :: Maybe PhraseSuggesterHighlighter,+ phraseSuggesterCollate :: Maybe PhraseSuggesterCollate,+ phraseSuggesterCandidateGenerators :: [DirectGenerators]+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON PhraseSuggester where+ toJSON PhraseSuggester {..} =+ omitNulls+ [ "field" .= phraseSuggesterField,+ "gram_size" .= phraseSuggesterGramSize,+ "real_word_error_likelihood"+ .= phraseSuggesterRealWordErrorLikelihood,+ "confidence" .= phraseSuggesterConfidence,+ "max_errors" .= phraseSuggesterMaxErrors,+ "separator" .= phraseSuggesterSeparator,+ "size" .= phraseSuggesterSize,+ "analyzer" .= phraseSuggesterAnalyzer,+ "shard_size" .= phraseSuggesterShardSize,+ "highlight" .= phraseSuggesterHighlight,+ "collate" .= phraseSuggesterCollate,+ "direct_generator"+ .= phraseSuggesterCandidateGenerators+ ]++instance FromJSON PhraseSuggester where+ parseJSON = withObject "PhraseSuggester" parse+ where+ parse o =+ PhraseSuggester+ <$> o .: "field"+ <*> o .:? "gram_size"+ <*> o .:? "real_word_error_likelihood"+ <*> o .:? "confidence"+ <*> o .:? "max_errors"+ <*> o .:? "separator"+ <*> o .:? "size"+ <*> o .:? "analyzer"+ <*> o .:? "shard_size"+ <*> o .:? "highlight"+ <*> o .:? "collate"+ <*> o .:? "direct_generator" .!= []++mkPhraseSuggester :: FieldName -> PhraseSuggester+mkPhraseSuggester fName =+ PhraseSuggester+ fName+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ []++phraseSuggesterFieldLens :: Lens' PhraseSuggester FieldName+phraseSuggesterFieldLens = lens phraseSuggesterField (\x y -> x {phraseSuggesterField = y})++phraseSuggesterGramSizeLens :: Lens' PhraseSuggester (Maybe Int)+phraseSuggesterGramSizeLens = lens phraseSuggesterGramSize (\x y -> x {phraseSuggesterGramSize = y})++phraseSuggesterRealWordErrorLikelihoodLens :: Lens' PhraseSuggester (Maybe Int)+phraseSuggesterRealWordErrorLikelihoodLens = lens phraseSuggesterRealWordErrorLikelihood (\x y -> x {phraseSuggesterRealWordErrorLikelihood = y})++phraseSuggesterConfidenceLens :: Lens' PhraseSuggester (Maybe Int)+phraseSuggesterConfidenceLens = lens phraseSuggesterConfidence (\x y -> x {phraseSuggesterConfidence = y})++phraseSuggesterMaxErrorsLens :: Lens' PhraseSuggester (Maybe Int)+phraseSuggesterMaxErrorsLens = lens phraseSuggesterMaxErrors (\x y -> x {phraseSuggesterMaxErrors = y})++phraseSuggesterSeparatorLens :: Lens' PhraseSuggester (Maybe Text)+phraseSuggesterSeparatorLens = lens phraseSuggesterSeparator (\x y -> x {phraseSuggesterSeparator = y})++phraseSuggesterSizeLens :: Lens' PhraseSuggester (Maybe Size)+phraseSuggesterSizeLens = lens phraseSuggesterSize (\x y -> x {phraseSuggesterSize = y})++phraseSuggesterAnalyzerLens :: Lens' PhraseSuggester (Maybe Analyzer)+phraseSuggesterAnalyzerLens = lens phraseSuggesterAnalyzer (\x y -> x {phraseSuggesterAnalyzer = y})++phraseSuggesterShardSizeLens :: Lens' PhraseSuggester (Maybe Int)+phraseSuggesterShardSizeLens = lens phraseSuggesterShardSize (\x y -> x {phraseSuggesterShardSize = y})++phraseSuggesterHighlightLens :: Lens' PhraseSuggester (Maybe PhraseSuggesterHighlighter)+phraseSuggesterHighlightLens = lens phraseSuggesterHighlight (\x y -> x {phraseSuggesterHighlight = y})++phraseSuggesterCollateLens :: Lens' PhraseSuggester (Maybe PhraseSuggesterCollate)+phraseSuggesterCollateLens = lens phraseSuggesterCollate (\x y -> x {phraseSuggesterCollate = y})++phraseSuggesterCandidateGeneratorsLens :: Lens' PhraseSuggester [DirectGenerators]+phraseSuggesterCandidateGeneratorsLens = lens phraseSuggesterCandidateGenerators (\x y -> x {phraseSuggesterCandidateGenerators = y})++data PhraseSuggesterHighlighter = PhraseSuggesterHighlighter+ { phraseSuggesterHighlighterPreTag :: Text,+ phraseSuggesterHighlighterPostTag :: Text+ }+ deriving stock (Eq, Show, Generic)++phraseSuggesterHighlighterPreTagLens :: Lens' PhraseSuggesterHighlighter Text+phraseSuggesterHighlighterPreTagLens = lens phraseSuggesterHighlighterPreTag (\x y -> x {phraseSuggesterHighlighterPreTag = y})++phraseSuggesterHighlighterPostTagLens :: Lens' PhraseSuggesterHighlighter Text+phraseSuggesterHighlighterPostTagLens = lens phraseSuggesterHighlighterPostTag (\x y -> x {phraseSuggesterHighlighterPostTag = y})++instance ToJSON PhraseSuggesterHighlighter where+ toJSON PhraseSuggesterHighlighter {..} =+ object+ [ "pre_tag" .= phraseSuggesterHighlighterPreTag,+ "post_tag" .= phraseSuggesterHighlighterPostTag+ ]++instance FromJSON PhraseSuggesterHighlighter where+ parseJSON = withObject "PhraseSuggesterHighlighter" parse+ where+ parse o =+ PhraseSuggesterHighlighter+ <$> o .: "pre_tag"+ <*> o .: "post_tag"++data PhraseSuggesterCollate = PhraseSuggesterCollate+ { phraseSuggesterCollateTemplateQuery :: Query,+ phraseSuggesterCollateParams :: TemplateQueryKeyValuePairs,+ phraseSuggesterCollatePrune :: Bool+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON PhraseSuggesterCollate where+ toJSON PhraseSuggesterCollate {..} =+ object+ [ "query"+ .= object+ [ "source" .= phraseSuggesterCollateTemplateQuery+ ],+ "params" .= phraseSuggesterCollateParams,+ "prune" .= phraseSuggesterCollatePrune+ ]++instance FromJSON PhraseSuggesterCollate where+ parseJSON (Object o) = do+ query' <- o .: "query"+ inline' <- query' .: "source"+ params' <- o .: "params"+ prune' <- o .:? "prune" .!= False+ return $ PhraseSuggesterCollate inline' params' prune'+ parseJSON x = typeMismatch "PhraseSuggesterCollate" x++phraseSuggesterCollateTemplateQueryLens :: Lens' PhraseSuggesterCollate Query+phraseSuggesterCollateTemplateQueryLens = lens phraseSuggesterCollateTemplateQuery (\x y -> x {phraseSuggesterCollateTemplateQuery = y})++phraseSuggesterCollateParamsLens :: Lens' PhraseSuggesterCollate TemplateQueryKeyValuePairs+phraseSuggesterCollateParamsLens = lens phraseSuggesterCollateParams (\x y -> x {phraseSuggesterCollateParams = y})++phraseSuggesterCollatePruneLens :: Lens' PhraseSuggesterCollate Bool+phraseSuggesterCollatePruneLens = lens phraseSuggesterCollatePrune (\x y -> x {phraseSuggesterCollatePrune = y})++data SuggestOptions = SuggestOptions+ { suggestOptionsText :: Text,+ suggestOptionsScore :: Double,+ suggestOptionsFreq :: Maybe Int,+ suggestOptionsHighlighted :: Maybe Text+ }+ deriving stock (Eq, Read, Show)++instance FromJSON SuggestOptions where+ parseJSON = withObject "SuggestOptions" parse+ where+ parse o =+ SuggestOptions+ <$> o .: "text"+ <*> o .: "score"+ <*> o .:? "freq"+ <*> o .:? "highlighted"++suggestOptionsTextLens :: Lens' SuggestOptions Text+suggestOptionsTextLens = lens suggestOptionsText (\x y -> x {suggestOptionsText = y})++suggestOptionsScoreLens :: Lens' SuggestOptions Double+suggestOptionsScoreLens = lens suggestOptionsScore (\x y -> x {suggestOptionsScore = y})++suggestOptionsFreqLens :: Lens' SuggestOptions (Maybe Int)+suggestOptionsFreqLens = lens suggestOptionsFreq (\x y -> x {suggestOptionsFreq = y})++suggestOptionsHighlightedLens :: Lens' SuggestOptions (Maybe Text)+suggestOptionsHighlightedLens = lens suggestOptionsHighlighted (\x y -> x {suggestOptionsHighlighted = y})++data SuggestResponse = SuggestResponse+ { suggestResponseText :: Text,+ suggestResponseOffset :: Int,+ suggestResponseLength :: Int,+ suggestResponseOptions :: [SuggestOptions]+ }+ deriving stock (Eq, Read, Show)++instance FromJSON SuggestResponse where+ parseJSON = withObject "SuggestResponse" parse+ where+ parse o =+ SuggestResponse+ <$> o .: "text"+ <*> o .: "offset"+ <*> o .: "length"+ <*> o .: "options"++suggestResponseTextLens :: Lens' SuggestResponse Text+suggestResponseTextLens = lens suggestResponseText (\x y -> x {suggestResponseText = y})++suggestResponseOffsetLens :: Lens' SuggestResponse Int+suggestResponseOffsetLens = lens suggestResponseOffset (\x y -> x {suggestResponseOffset = y})++suggestResponseLengthLens :: Lens' SuggestResponse Int+suggestResponseLengthLens = lens suggestResponseLength (\x y -> x {suggestResponseLength = y})++suggestResponseOptionsLens :: Lens' SuggestResponse [SuggestOptions]+suggestResponseOptionsLens = lens suggestResponseOptions (\x y -> x {suggestResponseOptions = y})++data NamedSuggestionResponse = NamedSuggestionResponse+ { nsrName :: Text,+ nsrResponses :: [SuggestResponse]+ }+ deriving stock (Eq, Read, Show)++instance FromJSON NamedSuggestionResponse where+ parseJSON (Object o) = do+ suggestionName' <- case X.toList o of+ [(x, _)] -> return x+ _ -> fail "error parsing NamedSuggestionResponse name"+ suggestionResponses' <- o .: suggestionName'+ return $ NamedSuggestionResponse (toText suggestionName') suggestionResponses'+ parseJSON x = typeMismatch "NamedSuggestionResponse" x++nsrNameLens :: Lens' NamedSuggestionResponse Text+nsrNameLens = lens nsrName (\x y -> x {nsrName = y})++nsrResponsesLens :: Lens' NamedSuggestionResponse [SuggestResponse]+nsrResponsesLens = lens nsrResponses (\x y -> x {nsrResponses = y})++data DirectGeneratorSuggestModeTypes+ = DirectGeneratorSuggestModeMissing+ | DirectGeneratorSuggestModePopular+ | DirectGeneratorSuggestModeAlways+ deriving stock (Eq, Show, Generic)++instance ToJSON DirectGeneratorSuggestModeTypes where+ toJSON DirectGeneratorSuggestModeMissing = "missing"+ toJSON DirectGeneratorSuggestModePopular = "popular"+ toJSON DirectGeneratorSuggestModeAlways = "always"++instance FromJSON DirectGeneratorSuggestModeTypes where+ parseJSON = withText "DirectGeneratorSuggestModeTypes" parse+ where+ parse "missing" =+ pure DirectGeneratorSuggestModeMissing+ parse "popular" =+ pure DirectGeneratorSuggestModePopular+ parse "always" =+ pure DirectGeneratorSuggestModeAlways+ parse f =+ fail ("Unexpected DirectGeneratorSuggestModeTypes: " <> show f)++data DirectGenerators = DirectGenerators+ { directGeneratorsField :: FieldName,+ directGeneratorsSize :: Maybe Int,+ directGeneratorSuggestMode :: DirectGeneratorSuggestModeTypes,+ directGeneratorMaxEdits :: Maybe Double,+ directGeneratorPrefixLength :: Maybe Int,+ directGeneratorMinWordLength :: Maybe Int,+ directGeneratorMaxInspections :: Maybe Int,+ directGeneratorMinDocFreq :: Maybe Double,+ directGeneratorMaxTermFreq :: Maybe Double,+ directGeneratorPreFilter :: Maybe Text,+ directGeneratorPostFilter :: Maybe Text+ }+ deriving stock (Eq, Show, Generic)++instance ToJSON DirectGenerators where+ toJSON DirectGenerators {..} =+ omitNulls+ [ "field" .= directGeneratorsField,+ "size" .= directGeneratorsSize,+ "suggest_mode" .= directGeneratorSuggestMode,+ "max_edits" .= directGeneratorMaxEdits,+ "prefix_length" .= directGeneratorPrefixLength,+ "min_word_length" .= directGeneratorMinWordLength,+ "max_inspections" .= directGeneratorMaxInspections,+ "min_doc_freq" .= directGeneratorMinDocFreq,+ "max_term_freq" .= directGeneratorMaxTermFreq,+ "pre_filter" .= directGeneratorPreFilter,+ "post_filter" .= directGeneratorPostFilter+ ]++instance FromJSON DirectGenerators where+ parseJSON = withObject "DirectGenerators" parse+ where+ parse o =+ DirectGenerators+ <$> o .: "field"+ <*> o .:? "size"+ <*> o .: "suggest_mode"+ <*> o .:? "max_edits"+ <*> o .:? "prefix_length"+ <*> o .:? "min_word_length"+ <*> o .:? "max_inspections"+ <*> o .:? "min_doc_freq"+ <*> o .:? "max_term_freq"+ <*> o .:? "pre_filter"+ <*> o .:? "post_filter"++mkDirectGenerators :: FieldName -> DirectGenerators+mkDirectGenerators fn =+ DirectGenerators+ fn+ Nothing+ DirectGeneratorSuggestModeMissing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing+ Nothing++directGeneratorsFieldLens :: Lens' DirectGenerators FieldName+directGeneratorsFieldLens = lens directGeneratorsField (\x y -> x {directGeneratorsField = y})++directGeneratorsSizeLens :: Lens' DirectGenerators (Maybe Int)+directGeneratorsSizeLens = lens directGeneratorsSize (\x y -> x {directGeneratorsSize = y})++directGeneratorSuggestModeLens :: Lens' DirectGenerators DirectGeneratorSuggestModeTypes+directGeneratorSuggestModeLens = lens directGeneratorSuggestMode (\x y -> x {directGeneratorSuggestMode = y})++directGeneratorMaxEditsLens :: Lens' DirectGenerators (Maybe Double)+directGeneratorMaxEditsLens = lens directGeneratorMaxEdits (\x y -> x {directGeneratorMaxEdits = y})++directGeneratorPrefixLengthLens :: Lens' DirectGenerators (Maybe Int)+directGeneratorPrefixLengthLens = lens directGeneratorPrefixLength (\x y -> x {directGeneratorPrefixLength = y})++directGeneratorMinWordLengthLens :: Lens' DirectGenerators (Maybe Int)+directGeneratorMinWordLengthLens = lens directGeneratorMinWordLength (\x y -> x {directGeneratorMinWordLength = y})++directGeneratorMaxInspectionsLens :: Lens' DirectGenerators (Maybe Int)+directGeneratorMaxInspectionsLens = lens directGeneratorMaxInspections (\x y -> x {directGeneratorMaxInspections = y})++directGeneratorMinDocFreqLens :: Lens' DirectGenerators (Maybe Double)+directGeneratorMinDocFreqLens = lens directGeneratorMinDocFreq (\x y -> x {directGeneratorMinDocFreq = y})++directGeneratorMaxTermFreqLens :: Lens' DirectGenerators (Maybe Double)+directGeneratorMaxTermFreqLens = lens directGeneratorMaxTermFreq (\x y -> x {directGeneratorMaxTermFreq = y})++directGeneratorPreFilterLens :: Lens' DirectGenerators (Maybe Text)+directGeneratorPreFilterLens = lens directGeneratorPreFilter (\x y -> x {directGeneratorPreFilter = y})++directGeneratorPostFilterLens :: Lens' DirectGenerators (Maybe Text)+directGeneratorPostFilterLens = lens directGeneratorPostFilter (\x y -> x {directGeneratorPostFilter = y})
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Task.hs view
@@ -0,0 +1,95 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Task where++import Data.Aeson+import Data.Text (Text)+import GHC.Generics+import Optics.Lens++data TaskResponse a = TaskResponse+ { taskResponseCompleted :: Bool,+ taskResponseTask :: Task a,+ taskResponseReponse :: Maybe a,+ taskResponseError :: Maybe Object+ }+ deriving stock (Eq, Show, Generic)++instance (FromJSON a) => FromJSON (TaskResponse a) where+ parseJSON = withObject "TaskResponse" $ \v ->+ TaskResponse+ <$> v .: "completed"+ <*> v .: "task"+ <*> v .:? "reponse"+ <*> v .:? "error"++taskResponseCompletedLens :: Lens' (TaskResponse a) Bool+taskResponseCompletedLens = lens taskResponseCompleted (\x y -> x {taskResponseCompleted = y})++taskResponseTaskLens :: Lens' (TaskResponse a) (Task a)+taskResponseTaskLens = lens taskResponseTask (\x y -> x {taskResponseTask = y})++taskResponseReponseLens :: Lens' (TaskResponse a) (Maybe a)+taskResponseReponseLens = lens taskResponseReponse (\x y -> x {taskResponseReponse = y})++taskResponseErrorLens :: Lens' (TaskResponse a) (Maybe Object)+taskResponseErrorLens = lens taskResponseError (\x y -> x {taskResponseError = y})++data Task a = Task+ { taskNode :: Text,+ taskId :: Int,+ taskType :: Text,+ taskAction :: Text,+ taskStatus :: a,+ taskDescription :: Text,+ taskStartTimeInMillis :: Integer,+ taskRunningTimeInNanos :: Integer,+ taskCancellable :: Bool+ }+ deriving stock (Eq, Show, Generic)++instance (FromJSON a) => FromJSON (Task a) where+ parseJSON = withObject "Task" $ \v ->+ Task+ <$> v .: "node"+ <*> v .: "id"+ <*> v .: "type"+ <*> v .: "action"+ <*> v .: "status"+ <*> v .: "description"+ <*> v .: "start_time_in_millis"+ <*> v .: "running_time_in_nanos"+ <*> v .: "cancellable"++newtype TaskNodeId = TaskNodeId Text+ deriving stock (Eq, Show)++instance FromJSON TaskNodeId where+ parseJSON = withObject "TaskNodeId" $ \o -> TaskNodeId <$> o .: "task"++taskNodeLens :: Lens' (Task a) Text+taskNodeLens = lens taskNode (\x y -> x {taskNode = y})++taskIdLens :: Lens' (Task a) Int+taskIdLens = lens taskId (\x y -> x {taskId = y})++taskTypeLens :: Lens' (Task a) Text+taskTypeLens = lens taskType (\x y -> x {taskType = y})++taskActionLens :: Lens' (Task a) Text+taskActionLens = lens taskAction (\x y -> x {taskAction = y})++taskStatusLens :: Lens' (Task a) a+taskStatusLens = lens taskStatus (\x y -> x {taskStatus = y})++taskDescriptionLens :: Lens' (Task a) Text+taskDescriptionLens = lens taskDescription (\x y -> x {taskDescription = y})++taskStartTimeInMillisLens :: Lens' (Task a) Integer+taskStartTimeInMillisLens = lens taskStartTimeInMillis (\x y -> x {taskStartTimeInMillis = y})++taskRunningTimeInNanosLens :: Lens' (Task a) Integer+taskRunningTimeInNanosLens = lens taskRunningTimeInNanos (\x y -> x {taskRunningTimeInNanos = y})++taskCancellableLens :: Lens' (Task a) Bool+taskCancellableLens = lens taskCancellable (\x y -> x {taskCancellable = y})
+ src/Database/Bloodhound/Internal/Versions/Common/Types/Units.hs view
@@ -0,0 +1,100 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.Internal.Versions.Common.Types.Units+ ( Bytes (..),+ Interval (..),+ TimeInterval (..),+ gigabytes,+ kilobytes,+ megabytes,+ parseStringInterval,+ )+where++import Database.Bloodhound.Internal.Utils.Imports+import Text.Read (Read (..))+import qualified Text.Read as TR++-- | A measure of bytes used for various configurations. You may want+-- to use smart constructors like 'gigabytes' for larger values.+--+-- >>> gigabytes 9+-- Bytes 9000000000+--+-- >>> megabytes 9+-- Bytes 9000000+--+-- >>> kilobytes 9+-- Bytes 9000+newtype Bytes+ = Bytes Int+ deriving newtype (Eq, Show, Ord, ToJSON, FromJSON)++gigabytes :: Int -> Bytes+gigabytes n = megabytes (1000 * n)++megabytes :: Int -> Bytes+megabytes n = kilobytes (1000 * n)++kilobytes :: Int -> Bytes+kilobytes n = Bytes (1000 * n)++data TimeInterval+ = Weeks+ | Days+ | Hours+ | Minutes+ | Seconds+ deriving stock (Eq)++instance Show TimeInterval where+ show Weeks = "w"+ show Days = "d"+ show Hours = "h"+ show Minutes = "m"+ show Seconds = "s"++instance Read TimeInterval where+ readPrec = f =<< TR.get+ where+ f 'w' = return Weeks+ f 'd' = return Days+ f 'h' = return Hours+ f 'm' = return Minutes+ f 's' = return Seconds+ f _ = fail "TimeInterval expected one of w, d, h, m, s"++data Interval+ = Year+ | Quarter+ | Month+ | Week+ | Day+ | Hour+ | Minute+ | Second+ deriving stock (Eq, Show)++instance ToJSON Interval where+ toJSON Year = "year"+ toJSON Quarter = "quarter"+ toJSON Month = "month"+ toJSON Week = "week"+ toJSON Day = "day"+ toJSON Hour = "hour"+ toJSON Minute = "minute"+ toJSON Second = "second"++parseStringInterval :: (Monad m, MonadFail m) => String -> m NominalDiffTime+parseStringInterval s = case span isNumber s of+ ("", _) -> fail "Invalid interval"+ (nS, unitS) -> case (readMay nS, readMay unitS) of+ (Just n, Just unit) -> return (fromInteger (n * unitNDT unit))+ (Nothing, _) -> fail "Invalid interval number"+ (_, Nothing) -> fail "Invalid interval unit"+ where+ unitNDT Seconds = 1+ unitNDT Minutes = 60+ unitNDT Hours = 60 * 60+ unitNDT Days = 24 * 60 * 60+ unitNDT Weeks = 7 * 24 * 60 * 60
+ src/Database/Bloodhound/Internal/Versions/ElasticSearch7/Types/PointInTime.hs view
@@ -0,0 +1,64 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}++module Database.Bloodhound.Internal.Versions.ElasticSearch7.Types.PointInTime where++import Database.Bloodhound.Internal.Utils.Imports++data OpenPointInTimeResponse = OpenPointInTimeResponse+ { oPitId :: Text+ }+ deriving stock (Eq, Show)++oPitIdLens :: Lens' OpenPointInTimeResponse Text+oPitIdLens = lens oPitId (\x y -> x {oPitId = y})++instance ToJSON OpenPointInTimeResponse where+ toJSON OpenPointInTimeResponse {..} =+ object ["id" .= oPitId]++instance FromJSON OpenPointInTimeResponse where+ parseJSON (Object o) = OpenPointInTimeResponse <$> o .: "id"+ parseJSON x = typeMismatch "OpenPointInTimeResponse" x++data ClosePointInTime = ClosePointInTime+ { cPitId :: Text+ }+ deriving stock (Eq, Show)++instance ToJSON ClosePointInTime where+ toJSON ClosePointInTime {..} =+ object ["id" .= cPitId]++instance FromJSON ClosePointInTime where+ parseJSON (Object o) = ClosePointInTime <$> o .: "id"+ parseJSON x = typeMismatch "ClosePointInTime" x++data ClosePointInTimeResponse = ClosePointInTimeResponse+ { succeeded :: Bool,+ numFreed :: Int+ }+ deriving stock (Eq, Show)++cPitIdLens :: Lens' ClosePointInTime Text+cPitIdLens = lens cPitId (\x y -> x {cPitId = y})++instance ToJSON ClosePointInTimeResponse where+ toJSON ClosePointInTimeResponse {..} =+ object+ [ "succeeded" .= succeeded,+ "num_freed" .= numFreed+ ]++instance FromJSON ClosePointInTimeResponse where+ parseJSON (Object o) = do+ succeeded' <- o .: "succeeded"+ numFreed' <- o .: "num_freed"+ return $ ClosePointInTimeResponse succeeded' numFreed'+ parseJSON x = typeMismatch "ClosePointInTimeResponse" x++succeededLens :: Lens' ClosePointInTimeResponse Bool+succeededLens = lens succeeded (\x y -> x {succeeded = y})++numFreedLens :: Lens' ClosePointInTimeResponse Int+numFreedLens = lens numFreed (\x y -> x {numFreed = y})
+ src/Database/Bloodhound/Internal/Versions/OpenSearch2/Types/PointInTime.hs view
@@ -0,0 +1,77 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}++module Database.Bloodhound.Internal.Versions.OpenSearch2.Types.PointInTime where++import Database.Bloodhound.Internal.Utils.Imports+import Database.Bloodhound.Internal.Versions.Common.Types.Nodes (ShardResult)++data OpenPointInTimeResponse = OpenPointInTimeResponse+ { oos2PitId :: Text,+ oos2Shards :: ShardResult,+ oos2CreationTime :: POSIXTime+ }+ deriving stock (Eq, Show)++instance ToJSON OpenPointInTimeResponse where+ toJSON OpenPointInTimeResponse {..} =+ object ["pit_id" .= oos2PitId, "_shards" .= oos2Shards, "creation_time" .= oos2CreationTime]++instance FromJSON OpenPointInTimeResponse where+ parseJSON (Object o) =+ OpenPointInTimeResponse+ <$> o .: "pit_id"+ <*> o .: "_shards"+ <*> o .: "creation_time"+ parseJSON x = typeMismatch "OpenPointInTimeResponse" x++oos2PitIdLens :: Lens' OpenPointInTimeResponse Text+oos2PitIdLens = lens oos2PitId (\x y -> x {oos2PitId = y})++oos2ShardsLens :: Lens' OpenPointInTimeResponse ShardResult+oos2ShardsLens = lens oos2Shards (\x y -> x {oos2Shards = y})++oos2CreationTimeLens :: Lens' OpenPointInTimeResponse POSIXTime+oos2CreationTimeLens = lens oos2CreationTime (\x y -> x {oos2CreationTime = y})++data ClosePointInTime = ClosePointInTime+ { cPitId :: Text+ }+ deriving stock (Eq, Show)++instance ToJSON ClosePointInTime where+ toJSON ClosePointInTime {..} =+ object ["id" .= cPitId]++instance FromJSON ClosePointInTime where+ parseJSON (Object o) = ClosePointInTime <$> o .: "id"+ parseJSON x = typeMismatch "ClosePointInTime" x++cPitIdLens :: Lens' ClosePointInTime Text+cPitIdLens = lens cPitId (\x y -> x {cPitId = y})++data ClosePointInTimeResponse = ClosePointInTimeResponse+ { succeeded :: Bool,+ numFreed :: Int+ }+ deriving stock (Eq, Show)++instance ToJSON ClosePointInTimeResponse where+ toJSON ClosePointInTimeResponse {..} =+ object+ [ "succeeded" .= succeeded,+ "num_freed" .= numFreed+ ]++instance FromJSON ClosePointInTimeResponse where+ parseJSON (Object o) = do+ succeeded' <- o .: "succeeded"+ numFreed' <- o .: "num_freed"+ return $ ClosePointInTimeResponse succeeded' numFreed'+ parseJSON x = typeMismatch "ClosePointInTimeResponse" x++succeededLens :: Lens' ClosePointInTimeResponse Bool+succeededLens = lens succeeded (\x y -> x {succeeded = y})++numFreedLens :: Lens' ClosePointInTimeResponse Int+numFreedLens = lens numFreed (\x y -> x {numFreed = y})
+ src/Database/Bloodhound/OpenSearch1/Client.hs view
@@ -0,0 +1,6 @@+module Database.Bloodhound.OpenSearch1.Client+ ( module Reexport,+ )+where++import Database.Bloodhound.Common.Client as Reexport
+ src/Database/Bloodhound/OpenSearch1/Requests.hs view
@@ -0,0 +1,6 @@+module Database.Bloodhound.OpenSearch1.Requests+ ( module Reexport,+ )+where++import Database.Bloodhound.Common.Requests as Reexport
+ src/Database/Bloodhound/OpenSearch1/Types.hs view
@@ -0,0 +1,6 @@+module Database.Bloodhound.OpenSearch1.Types+ ( module Reexport,+ )+where++import Database.Bloodhound.Common.Types as Reexport
+ src/Database/Bloodhound/OpenSearch2/Client.hs view
@@ -0,0 +1,91 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE ScopedTypeVariables #-}++module Database.Bloodhound.OpenSearch2.Client+ ( module Reexport,+ pitSearch,+ openPointInTime,+ closePointInTime,+ )+where++import Control.Monad+import Data.Aeson+import Data.Monoid+import Database.Bloodhound.Client.Cluster+import Database.Bloodhound.Common.Client as Reexport+import Database.Bloodhound.Internal.Client.BHRequest+import qualified Database.Bloodhound.OpenSearch2.Requests as Requests+import Database.Bloodhound.OpenSearch2.Types+import Prelude hiding (filter, head)++-- | 'pitSearch' uses the point in time (PIT) API of elastic, for a given+-- 'IndexName'. Requires Elasticsearch >=7.10. Note that this will consume the+-- entire search result set and will be doing O(n) list appends so this may+-- not be suitable for large result sets. In that case, the point in time API+-- should be used directly with `openPointInTime` and `closePointInTime`.+--+-- Note that 'pitSearch' utilizes the 'search_after' parameter under the hood,+-- which requires a non-empty 'sortBody' field in the provided 'Search' value.+-- Otherwise, 'pitSearch' will fail to return all matching documents.+--+-- For more information see+-- <https://opensearch.org/docs/latest/search-plugins/point-in-time/>.+pitSearch :: forall a m. (FromJSON a, MonadBH m) => IndexName -> Search -> m [Hit a]+pitSearch indexName search = do+ openResp <- openPointInTime indexName+ case openResp of+ Left e -> throwEsError e+ Right OpenPointInTimeResponse {..} -> do+ let searchPIT = search {pointInTime = Just (PointInTime oos2PitId "1m")}+ hits <- pitAccumulator searchPIT []+ closeResp <- closePointInTime (ClosePointInTime oos2PitId)+ case closeResp of+ Left _ -> return []+ Right (ClosePointInTimeResponse False _) ->+ error "failed to close point in time (PIT)"+ Right (ClosePointInTimeResponse True _) -> return hits+ where+ pitAccumulator :: Search -> [Hit a] -> m [Hit a]+ pitAccumulator search' oldHits = do+ resp <- tryPerformBHRequest $ Requests.searchAll search'+ case resp of+ Left _ -> return []+ Right searchResult -> case hits (searchHits searchResult) of+ [] -> return oldHits+ newHits -> case (hitSort $ last newHits, pitId searchResult) of+ (Nothing, Nothing) ->+ error "no point in time (PIT) ID or last sort value"+ (Just _, Nothing) -> error "no point in time (PIT) ID"+ (Nothing, _) -> return (oldHits <> newHits)+ (Just lastSort, Just pitId') -> do+ let newSearch =+ search'+ { pointInTime = Just (PointInTime pitId' "1m"),+ searchAfterKey = Just lastSort+ }+ pitAccumulator newSearch (oldHits <> newHits)++-- | 'openPointInTime' opens a point in time for an index given an 'IndexName'.+-- Note that the point in time should be closed with 'closePointInTime' as soon+-- as it is no longer needed.+--+-- For more information see+-- <https://opensearch.org/docs/latest/search-plugins/point-in-time/>.+openPointInTime ::+ (MonadBH m) =>+ IndexName ->+ m (ParsedEsResponse OpenPointInTimeResponse)+openPointInTime indexName = performBHRequest $ Requests.openPointInTime indexName++-- | 'closePointInTime' closes a point in time given a 'ClosePointInTime'.+--+-- For more information see+-- <https://opensearch.org/docs/latest/search-plugins/point-in-time/>.+closePointInTime ::+ (MonadBH m) =>+ ClosePointInTime ->+ m (ParsedEsResponse ClosePointInTimeResponse)+closePointInTime q = performBHRequest $ Requests.closePointInTime q
+ src/Database/Bloodhound/OpenSearch2/Requests.hs view
@@ -0,0 +1,40 @@+{-# LANGUAGE OverloadedLists #-}+{-# LANGUAGE OverloadedStrings #-}++module Database.Bloodhound.OpenSearch2.Requests+ ( module Reexport,+ openPointInTime,+ closePointInTime,+ )+where++import Data.Aeson+import Database.Bloodhound.Client.Cluster+import Database.Bloodhound.Common.Requests as Reexport+import Database.Bloodhound.Internal.Client.BHRequest+import Database.Bloodhound.Internal.Utils.Requests+import Database.Bloodhound.Internal.Versions.Common.Types.Newtypes+import Database.Bloodhound.OpenSearch2.Types+import Prelude hiding (filter, head)++-- | 'openPointInTime' opens a point in time for an index given an 'IndexName'.+-- Note that the point in time should be closed with 'closePointInTime' as soon+-- as it is no longer needed.+--+-- For more information see+-- <https://opensearch.org/docs/latest/search-plugins/point-in-time/>.+openPointInTime ::+ IndexName ->+ BHRequest StatusDependant (ParsedEsResponse OpenPointInTimeResponse)+openPointInTime indexName =+ withBHResponseParsedEsResponse $ post @StatusDependant [unIndexName indexName, "_search", "point_in_time?keep_alive=1m"] emptyBody++-- | 'closePointInTime' closes a point in time given a 'ClosePointInTime'.+--+-- For more information see+-- <https://opensearch.org/docs/latest/search-plugins/point-in-time/>.+closePointInTime ::+ ClosePointInTime ->+ BHRequest StatusDependant (ParsedEsResponse ClosePointInTimeResponse)+closePointInTime q = do+ withBHResponseParsedEsResponse $ deleteWithBody @StatusDependant ["_search", "point_in_time"] (encode q)
+ src/Database/Bloodhound/OpenSearch2/Types.hs view
@@ -0,0 +1,7 @@+module Database.Bloodhound.OpenSearch2.Types+ ( module Reexport,+ )+where++import Database.Bloodhound.Common.Types as Reexport+import Database.Bloodhound.Internal.Versions.OpenSearch2.Types.PointInTime as Reexport
+ src/Database/Bloodhound/Requests.hs view
@@ -0,0 +1,6 @@+module Database.Bloodhound.Requests+ ( module Reexport,+ )+where++import Database.Bloodhound.ElasticSearch7.Requests as Reexport
src/Database/Bloodhound/Types.hs view
@@ -1,707 +1,6 @@-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE MultiParamTypeClasses #-}-{-# LANGUAGE NamedFieldPuns #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE UndecidableInstances #-}---- |--- Module : Database.Bloodhound.Types--- Copyright : (C) 2014, 2018 Chris Allen--- License : BSD-style (see the file LICENSE)--- Maintainer : Chris Allen <cma@bitemyapp.com--- Stability : provisional--- Portability : GHC------ 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 'Query's and 'Filter's. 'Filter's are more like--- traditional database constraints and often have preferable performance--- properties. 'Query's support human-written textual queries, such as fuzzy--- queries. module Database.Bloodhound.Types- ( defaultCache,- defaultIndexSettings,- defaultIndexMappingsLimits,- defaultIndexDocumentSettings,- mkSort,- showText,- unpackId,- mkMatchQuery,- mkMultiMatchQuery,- mkBoolQuery,- mkRangeQuery,- mkQueryStringQuery,- mkAggregations,- mkTermsAggregation,- mkTermsScriptAggregation,- mkDateHistogram,- mkCardinalityAggregation,- mkDocVersion,- mkStatsAggregation,- mkExtendedStatsAggregation,- docVersionNumber,- toMissing,- toTerms,- toDateHistogram,- toTopHits,- omitNulls,- BH (..),- runBH,- BHEnv,- bhServer,- bhManager,- bhRequestHook,- mkBHEnv,- MonadBH (..),- Version (..),- VersionNumber (..),- MaybeNA (..),- BuildHash (..),- Status (..),- Existence (..),- NullValue (..),- IndexMappingsLimits (..),- IndexSettings (..),- UpdatableIndexSetting (..),- IndexSettingsSummary (..),- AllocationPolicy (..),- Compression (..),- ReplicaBounds (..),- Bytes (..),- gigabytes,- megabytes,- kilobytes,- FSType (..),- InitialShardCount (..),- NodeAttrFilter (..),- NodeAttrName (..),- CompoundFormat (..),- IndexTemplate (..),- Server (..),- EsResult (..),- EsResultFound (..),- EsError (..),- EsProtocolException (..),- IndexAlias (..),- IndexAliasName (..),- IndexAliasAction (..),- IndexAliasCreate (..),- IndexAliasSummary (..),- IndexAliasesSummary (..),- AliasRouting (..),- SearchAliasRouting (..),- IndexAliasRouting (..),- RoutingValue (..),- DocVersion,- ExternalDocVersion (..),- VersionControl (..),- JoinRelation (..),- IndexDocumentSettings (..),- Query (..),- Search (..),- SearchType (..),- SearchResult (..),- ScrollId (..),- HitsTotalRelation (..),- HitsTotal (..),- SearchHits (..),- TrackSortScores,- From (..),- Size (..),- Source (..),- PatternOrPatterns (..),- Include (..),- Exclude (..),- Pattern (..),- ShardResult (..),- Hit (..),- HitFields (..),- Filter (..),- BoolMatch (..),- Term (..),- GeoPoint (..),- GeoBoundingBoxConstraint (..),- GeoBoundingBox (..),- GeoFilterType (..),- Distance (..),- DistanceUnit (..),- DistanceType (..),- DistanceRange (..),- OptimizeBbox (..),- LatLon (..),- RangeValue (..),- RangeExecution (..),- LessThan (..),- LessThanEq (..),- GreaterThan (..),- GreaterThanEq (..),- LessThanD (..),- LessThanEqD (..),- GreaterThanD (..),- GreaterThanEqD (..),- Regexp (..),- RegexpFlags (..),- RegexpFlag (..),- FieldName (..),- ScriptFields (..),- ScriptFieldValue,- Script (..),- ScriptLanguage (..),- ScriptSource (..),- ScriptParams (..),- ScriptParamValue,- IndexName (..),- IndexSelection (..),- NodeSelection (..),- NodeSelector (..),- ForceMergeIndexSettings (..),- defaultForceMergeIndexSettings,- TemplateName (..),- IndexPattern (..),- DocId (..),- CacheName (..),- CacheKey (..),- BulkOperation (..),- ReplicaCount (..),- ShardCount (..),- Sort,- SortMode (..),- SortOrder (..),- SortSpec (..),- DefaultSort (..),- Missing (..),- OpenCloseIndex (..),- Method,- Boost (..),- MatchQuery (..),- MultiMatchQuery (..),- BoolQuery (..),- BoostingQuery (..),- CommonTermsQuery (..),- FunctionScoreQuery (..),- BoostMode (..),- ScoreMode (..),- FunctionScoreFunctions (..),- ComponentFunctionScoreFunction (..),- FunctionScoreFunction (..),- Weight (..),- Seed (..),- FieldValueFactor (..),- Factor (..),- FactorModifier (..),- FactorMissingFieldValue (..),- DisMaxQuery (..),- FuzzyLikeThisQuery (..),- FuzzyLikeFieldQuery (..),- FuzzyQuery (..),- HasChildQuery (..),- HasParentQuery (..),- IndicesQuery (..),- MoreLikeThisQuery (..),- MoreLikeThisFieldQuery (..),- NestedQuery (..),- PrefixQuery (..),- QueryStringQuery (..),- SimpleQueryStringQuery (..),- RangeQuery (..),- RegexpQuery (..),- QueryString (..),- SearchTemplateId (..),- SearchTemplateSource (..),- SearchTemplate (..),- GetTemplateScript (..),- TemplateQueryKeyValuePairs (..),- WildcardQuery (..),- BooleanOperator (..),- ZeroTermsQuery (..),- CutoffFrequency (..),- Analyzer (..),- Tokenizer (..),- TokenFilter (..),- CharFilter (..),- MaxExpansions (..),- Lenient (..),- MatchQueryType (..),- MultiMatchQueryType (..),- Tiebreaker (..),- MinimumMatch (..),- DisableCoord (..),- CommonMinimumMatch (..),- MinimumMatchHighLow (..),- PrefixLength (..),- Fuzziness (..),- IgnoreTermFrequency (..),- MaxQueryTerms (..),- AggregateParentScore (..),- IgnoreUnmapped (..),- MinChildren (..),- MaxChildren (..),- ScoreType (..),- InnerHits (..),- Score,- Cache,- RelationName (..),- BoostTerms (..),- MaxWordLength (..),- MinWordLength (..),- MaxDocFrequency (..),- MinDocFrequency (..),- PhraseSlop (..),- StopWord (..),- QueryPath (..),- MinimumTermFrequency (..),- PercentMatch (..),- FieldDefinition (..),- MappingField (..),- Mapping (..),- UpsertActionMetadata (..),- buildUpsertActionMetadata,- UpsertPayload (..),- AllowLeadingWildcard (..),- LowercaseExpanded (..),- GeneratePhraseQueries (..),- Locale (..),- AnalyzeWildcard (..),- EnablePositionIncrements (..),- SimpleQueryFlag (..),- FieldOrFields (..),- Monoid (..),- ToJSON (..),- Interval (..),- TimeInterval (..),- ExecutionHint (..),- CollectionMode (..),- TermOrder (..),- TermInclusion (..),- SnapshotRepoSelection (..),- GenericSnapshotRepo (..),- SnapshotRepo (..),- SnapshotRepoConversionError (..),- SnapshotRepoType (..),- GenericSnapshotRepoSettings (..),- SnapshotRepoUpdateSettings (..),- defaultSnapshotRepoUpdateSettings,- SnapshotRepoName (..),- SnapshotRepoPattern (..),- SnapshotVerification (..),- SnapshotNodeVerification (..),- FullNodeId (..),- NodeName (..),- ClusterName (..),- NodesInfo (..),- NodesStats (..),- NodeStats (..),- NodeBreakersStats (..),- NodeBreakerStats (..),- NodeHTTPStats (..),- NodeTransportStats (..),- NodeFSStats (..),- NodeDataPathStats (..),- NodeFSTotalStats (..),- NodeNetworkStats (..),- NodeThreadPoolStats (..),- NodeJVMStats (..),- JVMBufferPoolStats (..),- JVMGCStats (..),- JVMPoolStats (..),- NodeProcessStats (..),- NodeOSStats (..),- LoadAvgs (..),- NodeIndicesStats (..),- EsAddress (..),- PluginName (..),- NodeInfo (..),- NodePluginInfo (..),- NodeHTTPInfo (..),- NodeTransportInfo (..),- BoundTransportAddress (..),- NodeNetworkInfo (..),- MacAddress (..),- NetworkInterfaceName (..),- NodeNetworkInterface (..),- NodeThreadPoolInfo (..),- ThreadPoolSize (..),- ThreadPoolType (..),- NodeJVMInfo (..),- JVMMemoryPool (..),- JVMGCCollector (..),- JVMMemoryInfo (..),- PID (..),- NodeOSInfo (..),- CPUInfo (..),- NodeProcessInfo (..),- FsSnapshotRepo (..),- SnapshotCreateSettings (..),- defaultSnapshotCreateSettings,- SnapshotSelection (..),- SnapshotPattern (..),- SnapshotInfo (..),- SnapshotShardFailure (..),- ShardId (..),- SnapshotName (..),- SnapshotState (..),- SnapshotRestoreSettings (..),- defaultSnapshotRestoreSettings,- RestoreRenamePattern (..),- RestoreRenameToken (..),- RRGroupRefNum,- rrGroupRefNum,- mkRRGroupRefNum,- RestoreIndexSettings (..),- Suggest (..),- SuggestType (..),- PhraseSuggester (..),- PhraseSuggesterHighlighter (..),- PhraseSuggesterCollate (..),- mkPhraseSuggester,- SuggestOptions (..),- SuggestResponse (..),- NamedSuggestionResponse (..),- DirectGenerators (..),- mkDirectGenerators,- DirectGeneratorSuggestModeTypes (..),- Aggregation (..),- Aggregations,- AggregationResults,- BucketValue (..),- Bucket (..),- BucketAggregation (..),- TermsAggregation (..),- MissingAggregation (..),- ValueCountAggregation (..),- FilterAggregation (..),- CardinalityAggregation (..),- DateHistogramAggregation (..),- DateRangeAggregation (..),- DateRangeAggRange (..),- DateMathExpr (..),- DateMathAnchor (..),- DateMathModifier (..),- DateMathUnit (..),- TopHitsAggregation (..),- StatisticsAggregation (..),- SearchAfterKey,- CountQuery (..),- CountResponse (..),- CountShards (..),- PointInTime (..),- OpenPointInTimeResponse (..),- ClosePointInTime (..),- ClosePointInTimeResponse (..),- SumAggregation (..),- Highlights (..),- FieldHighlight (..),- HighlightSettings (..),- PlainHighlight (..),- PostingsHighlight (..),- FastVectorHighlight (..),- CommonHighlight (..),- NonPostings (..),- HighlightEncoder (..),- HighlightTag (..),- HitHighlight,- MissingResult (..),- TermsResult (..),- DateHistogramResult (..),- DateRangeResult (..),- TopHitResult (..),- EsUsername (..),- EsPassword (..),- Analysis (..),- AnalyzerDefinition (..),- TokenizerDefinition (..),- TokenFilterDefinition (..),- CharFilterDefinition (..),- Ngram (..),- NgramFilter (..),- EdgeNgramFilterSide (..),- TokenChar (..),- Shingle (..),- Language (..),- BHRequest (..),- mkFullRequest,- mkSimpleRequest,- Endpoint (..),- withQueries,- mkEndpoint,- getEndpoint,- BHResponse (..),- ParsedEsResponse,+ ( module Reexport, ) where -import Bloodhound.Import-import qualified Data.HashMap.Strict as HM-import Database.Bloodhound.Internal.Aggregation-import Database.Bloodhound.Internal.Analysis-import Database.Bloodhound.Internal.Client-import Database.Bloodhound.Internal.Client.BHRequest-import Database.Bloodhound.Internal.Client.Doc-import Database.Bloodhound.Internal.Count-import Database.Bloodhound.Internal.Highlight-import Database.Bloodhound.Internal.Newtypes-import Database.Bloodhound.Internal.PointInTime-import Database.Bloodhound.Internal.Query-import Database.Bloodhound.Internal.Sort-import Database.Bloodhound.Internal.Suggest---- | 'unpackId' is a silly convenience function that gets used once.-unpackId :: DocId -> Text-unpackId (DocId docId) = docId--type TrackSortScores = Bool--data Search = Search- { queryBody :: Maybe Query,- filterBody :: Maybe Filter,- sortBody :: Maybe Sort,- aggBody :: Maybe Aggregations,- highlight :: Maybe Highlights,- -- default False- trackSortScores :: TrackSortScores,- from :: From,- size :: Size,- searchType :: SearchType,- searchAfterKey :: Maybe SearchAfterKey,- fields :: Maybe [FieldName],- scriptFields :: Maybe ScriptFields,- source :: Maybe Source,- -- | Only one Suggestion request / response per Search is supported.- suggestBody :: Maybe Suggest,- pointInTime :: Maybe PointInTime- }- deriving (Eq, Show)--instance ToJSON Search where- toJSON- ( Search- mquery- sFilter- sort- searchAggs- highlight- sTrackSortScores- sFrom- sSize- _- sAfter- sFields- sScriptFields- sSource- sSuggest- pPointInTime- ) =- omitNulls- [ "query" .= query',- "sort" .= sort,- "aggregations" .= searchAggs,- "highlight" .= highlight,- "from" .= sFrom,- "size" .= sSize,- "track_scores" .= sTrackSortScores,- "search_after" .= sAfter,- "fields" .= sFields,- "script_fields" .= sScriptFields,- "_source" .= sSource,- "suggest" .= sSuggest,- "pit" .= pPointInTime- ]- where- query' = case sFilter of- Nothing -> mquery- Just x ->- Just- . QueryBoolQuery- $ mkBoolQuery- (maybeToList mquery)- [x]- []- []--data SearchType- = SearchTypeQueryThenFetch- | SearchTypeDfsQueryThenFetch- deriving (Eq, Show)--instance ToJSON SearchType where- toJSON SearchTypeQueryThenFetch = String "query_then_fetch"- toJSON SearchTypeDfsQueryThenFetch = String "dfs_query_then_fetch"--instance FromJSON SearchType where- parseJSON (String "query_then_fetch") = pure $ SearchTypeQueryThenFetch- parseJSON (String "dfs_query_then_fetch") = pure $ SearchTypeDfsQueryThenFetch- parseJSON _ = empty--data Source- = NoSource- | SourcePatterns PatternOrPatterns- | SourceIncludeExclude Include Exclude- deriving (Eq, Show)--instance ToJSON Source where- toJSON NoSource = toJSON False- toJSON (SourcePatterns patterns) = toJSON patterns- toJSON (SourceIncludeExclude incl excl) = object ["includes" .= incl, "excludes" .= excl]--data PatternOrPatterns- = PopPattern Pattern- | PopPatterns [Pattern]- deriving (Eq, Read, Show)--instance ToJSON PatternOrPatterns where- toJSON (PopPattern pattern) = toJSON pattern- toJSON (PopPatterns patterns) = toJSON patterns--data Include = Include [Pattern] deriving (Eq, Read, Show)--data Exclude = Exclude [Pattern] deriving (Eq, Read, Show)--instance ToJSON Include where- toJSON (Include patterns) = toJSON patterns--instance ToJSON Exclude where- toJSON (Exclude patterns) = toJSON patterns--newtype Pattern = Pattern Text deriving (Eq, Read, Show)--instance ToJSON Pattern where- toJSON (Pattern pattern) = toJSON pattern--data SearchResult a = SearchResult- { took :: Int,- timedOut :: Bool,- shards :: ShardResult,- searchHits :: SearchHits a,- aggregations :: Maybe AggregationResults,- -- | Only one Suggestion request / response per- -- Search is supported.- scrollId :: Maybe ScrollId,- suggest :: Maybe NamedSuggestionResponse,- pitId :: Maybe Text- }- deriving (Eq, Show)--instance (FromJSON a) => FromJSON (SearchResult a) where- parseJSON (Object v) =- SearchResult- <$> v .: "took"- <*> v .: "timed_out"- <*> v .: "_shards"- <*> v .: "hits"- <*> v .:? "aggregations"- <*> v .:? "_scroll_id"- <*> v .:? "suggest"- <*> v .:? "pit_id"- parseJSON _ = empty--newtype ScrollId- = ScrollId Text- deriving (Eq, Show, Ord, ToJSON, FromJSON)--newtype SearchTemplateId = SearchTemplateId Text deriving (Eq, Show)--instance ToJSON SearchTemplateId where- toJSON (SearchTemplateId x) = toJSON x--newtype SearchTemplateSource = SearchTemplateSource Text deriving (Eq, Show)--instance ToJSON SearchTemplateSource where- toJSON (SearchTemplateSource x) = toJSON x--instance FromJSON SearchTemplateSource where- parseJSON (String s) = pure $ SearchTemplateSource s- parseJSON _ = empty--data ExpandWildcards- = ExpandWildcardsAll- | ExpandWildcardsOpen- | ExpandWildcardsClosed- | ExpandWildcardsNone- deriving (Eq, Show)--instance ToJSON ExpandWildcards where- toJSON ExpandWildcardsAll = String "all"- toJSON ExpandWildcardsOpen = String "open"- toJSON ExpandWildcardsClosed = String "closed"- toJSON ExpandWildcardsNone = String "none"--instance FromJSON ExpandWildcards where- parseJSON (String "all") = pure $ ExpandWildcardsAll- parseJSON (String "open") = pure $ ExpandWildcardsOpen- parseJSON (String "closed") = pure $ ExpandWildcardsClosed- parseJSON (String "none") = pure $ ExpandWildcardsNone- parseJSON _ = empty--data TimeUnits- = TimeUnitDays- | TimeUnitHours- | TimeUnitMinutes- | TimeUnitSeconds- | TimeUnitMilliseconds- | TimeUnitMicroseconds- | TimeUnitNanoseconds- deriving (Eq, Show)--instance ToJSON TimeUnits where- toJSON TimeUnitDays = String "d"- toJSON TimeUnitHours = String "h"- toJSON TimeUnitMinutes = String "m"- toJSON TimeUnitSeconds = String "s"- toJSON TimeUnitMilliseconds = String "ms"- toJSON TimeUnitMicroseconds = String "micros"- toJSON TimeUnitNanoseconds = String "nanos"--instance FromJSON TimeUnits where- parseJSON (String "d") = pure $ TimeUnitDays- parseJSON (String "h") = pure $ TimeUnitHours- parseJSON (String "m") = pure $ TimeUnitMinutes- parseJSON (String "s") = pure $ TimeUnitSeconds- parseJSON (String "ms") = pure $ TimeUnitMilliseconds- parseJSON (String "micros") = pure $ TimeUnitMicroseconds- parseJSON (String "nanos") = pure $ TimeUnitNanoseconds- parseJSON _ = empty--data SearchTemplate = SearchTemplate- { searchTemplate :: Either SearchTemplateId SearchTemplateSource,- params :: TemplateQueryKeyValuePairs,- explainSearchTemplate :: Maybe Bool,- profileSearchTemplate :: Maybe Bool- }- deriving (Eq, Show)--instance ToJSON SearchTemplate where- toJSON SearchTemplate {..} =- omitNulls- [ either ("id" .=) ("source" .=) searchTemplate,- "params" .= params,- "explain" .= explainSearchTemplate,- "profile" .= profileSearchTemplate- ]--data GetTemplateScript = GetTemplateScript- { getTemplateScriptLang :: Maybe Text,- getTemplateScriptSource :: Maybe SearchTemplateSource,- getTemplateScriptOptions :: Maybe (HM.HashMap Text Text),- getTemplateScriptId :: Text,- getTemplateScriptFound :: Bool- }- deriving (Eq, Show)--instance FromJSON GetTemplateScript where- parseJSON (Object v) = do- script <- v .:? "script"- maybe- (GetTemplateScript Nothing Nothing Nothing <$> v .: "_id" <*> v .: "found")- ( \s ->- GetTemplateScript- <$> s .:? "lang"- <*> s .:? "source"- <*> s .:? "options"- <*> v .: "_id"- <*> v .: "found"- )- script- parseJSON _ = empty+import Database.Bloodhound.ElasticSearch7.Types as Reexport
− src/X.hs
@@ -1,90 +0,0 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE PolyKinds #-}-{-# LANGUAGE TypeApplications #-}--module X where--import Control.Monad (forM_)-import qualified Data.Map.Strict as Map-import qualified Data.Set as Set-import GHC.Generics---- type family X :: k0 -> '[k1] where--- X V1 = '[]--- X U1 = '[]--- X (Par1 p) = '[]--- X (Rec1 p) = '[]--- X (K1 R c) = '[c]--- X (K1 i c) = X c--- X (M1 i c f) = X f--- X (f :+: g) =--main :: IO ()-main = do- let depsOf x = Map.findWithDefault mempty x direct- transitiveDependencies :: String -> Set.Set String- transitiveDependencies x = go (Set.singleton x) mempty- go :: Set.Set String -> Set.Set String -> Set.Set String- go queue walked =- case Set.maxView queue of- Nothing ->- walked- Just (x, xs)- | Set.member x walked -> go xs walked- Just (x, xs) ->- go (depsOf x `Set.union` xs) (Set.insert x walked)- queryDeps :: Map.Map String (Set.Set String)- queryDeps = Map.fromSet transitiveDependencies $ depsOf "Query"- queryNoRecDeps :: Map.Map String (Set.Set String)- queryNoRecDeps = Map.filter (not . Set.member "Query") queryDeps- countDeps = Set.size . Set.unions . Map.elems- commons = Set.unions [Set.intersection xs ys | (x, xs) <- Map.toList queryNoRecDeps, (y, ys) <- Map.toList queryNoRecDeps, x /= y]- queryNoRecDepsNoCommons = Map.filter (not . Set.null) $ (Set.\\ commons) <$> queryNoRecDeps- dropQuery s =- case s of- "" -> ""- "Query" -> ""- (x : xs) -> x : dropQuery xs-- forM_ (Map.toList queryNoRecDepsNoCommons) $ \(k, ds) -> putStrLn $ k <> " -> " <> show (Set.toList ds)- print ("total", countDeps queryDeps)- print ("extractable", countDeps queryNoRecDeps)- print ("commons", Set.size commons, Set.toList commons)---- forM_ (Map.toList queryNoRecDepsNoCommons) $ \(k, ds) -> putStrLn $ "Database.Bloodhound.Internal.Versions.Common.Types.Query." <> dropQuery k--direct :: Map.Map String (Set.Set String)-direct =- Map.fromList- [ ("Query", Set.fromList ["Term", "MatchQuery", "MultiMatchQuery", "BoolQuery", "BoostingQuery", "CommonTermsQuery", "Query", "Boost", "FunctionScoreQuery", "DisMaxQuery", "FuzzyLikeThisQuery", "FuzzyLikeFieldQuery", "FuzzyQuery", "HasChildQuery", "HasParentQuery", "IndicesQuery", "MoreLikeThisQuery", "MoreLikeThisFieldQuery", "NestedQuery", "PrefixQuery", "QueryStringQuery", "SimpleQueryStringQuery", "RangeQuery", "RegexpQuery", "WildcardQuery"]),- ("MatchQuery", Set.fromList ["QueryString", "BooleanOperator", "ZeroTermsQuery", "CutoffFrequency", "MatchQueryType", "Analyzer", "MaxExpansions", "Lenient", "Boost", "Fuzziness"]),- ("MultiMatchQuery", Set.fromList ["QueryString", "BooleanOperator", "ZeroTermsQuery", "Tiebreaker", "MultiMatchQueryType", "CutoffFrequency", "Analyzer", "MaxExpansions", "Lenient"]),- ("BoolQuery", Set.fromList ["Query", "Filter", "MinimumMatch", "Boost", "DisableCoord"]),- ("BoostingQuery", Set.fromList ["Boost", "Query"]),- ("CommonTermsQuery", Set.fromList ["QueryString", "CutoffFrequency", "BooleanOperator", "BooleanOperator", "CommonMinimumMatch", "Boost", "Analyzer", "DisableCoord"]),- ("FunctionScoreQuery", Set.fromList ["FunctionScoreFunctions", "Query", "Boost", "Boost", "BoostMode", "Double", "ScoreMode"]),- ("DisMaxQuery", Set.fromList ["Boost", "Tiebreaker", "Query"]),- ("FuzzyLikeThisQuery", Set.fromList ["MaxQueryTerms", "IgnoreTermFrequency", "Fuzziness", "PrefixLength", "Boost", "Analyzer"]),- ("FuzzyLikeFieldQuery", Set.fromList ["MaxQueryTerms", "IgnoreTermFrequency", "Fuzziness", "PrefixLength", "Boost", "Analyzer"]),- ("FuzzyQuery", Set.fromList ["PrefixLength", "MaxExpansions", "Fuzziness", "Boost"]),- ("HasChildQuery", Set.fromList ["RelationName", "Query", "ScoreType", "IgnoreUnmapped", "MinChildren", "MaxChildren"]),- ("HasParentQuery", Set.fromList ["RelationName", "Query", "AggregateParentScore", "IgnoreUnmapped"]),- ("IndicesQuery", Set.fromList ["Query", "IndexName"]),- ("MoreLikeThisQuery", Set.fromList ["PercentMatch", "MinimumTermFrequency", "MaxQueryTerms", "StopWord", "MinDocFrequency", "MaxDocFrequency", "MinWordLength", "MaxWordLength", "BoostTerms", "Boost", "Analyzer"]),- ("MoreLikeThisFieldQuery", Set.fromList ["PercentMatch", "MinimumTermFrequency", "MaxQueryTerms", "StopWord", "MinDocFrequency", "MaxDocFrequency", "MinWordLength", "MaxWordLength", "BoostTerms", "Boost", "Analyzer"]),- ("NestedQuery", Set.fromList ["QueryPath", "ScoreType", "Query", "InnerHits"]),- ("PrefixQuery", Set.fromList ["Boost"]),- ("QueryStringQuery", Set.fromList ["QueryString", "BooleanOperator", "Analyzer", "AllowLeadingWildcard", "LowercaseExpanded", "EnablePositionIncrements", "MaxExpansions", "Fuzziness", "PrefixLength", "PhraseSlop", "Boost", "AnalyzeWildcard", "GeneratePhraseQueries", "MinimumMatch", "Lenient", "Locale"]),- ("SimpleQueryStringQuery", Set.fromList ["QueryString", "FieldOrFields", "BooleanOperator", "Analyzer", "SimpleQueryFlag", "LowercaseExpanded", "Locale"]),- ("RangeQuery", Set.fromList ["RangeValue", "Boost"]),- ("RegexpQuery", Set.fromList ["Regexp", "RegexpFlags", "Boost"]),- ("WildcardQuery", Set.fromList ["Boost"]),- ("CommonMinimumMatch", Set.fromList ["MinimumMatchHighLow", "MinimumMatch"]),- ("Filter", Set.fromList ["Query"]),- ("FunctionScoreFunctions", Set.fromList ["FunctionScoreFunction", "ComponentFunctionScoreFunction"]),- ("FunctionScoreFunction", Set.fromList ["Script", "Seed", "FieldValueFactor"]),- ("RangeValue", Set.fromList ["LessThanEqD", "LessThanD", "GreaterThanEqD", "GreaterThanD", "LessThanEq", "LessThan", "GreaterThanEq", "GreaterThan"]),- ("MinimumMatchHighLow", Set.fromList ["MinimumMatch"]),- ("FieldValueFactor", Set.fromList ["Factor", "FactorModifier", "FactorMissingFieldValue"]),- ("ComponentFunctionScoreFunction", Set.fromList ["Filter", "FunctionScoreFunction", "Weight"])- ]
+ tests/Doctests.hs view
@@ -0,0 +1,6 @@+module Main where++import Test.DocTest++main :: IO ()+main = doctest ["-isrc"]
+ tests/Spec.hs view
@@ -0,0 +1,1 @@+{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
− tests/Test/Aggregation.hs
@@ -1,165 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}--module Test.Aggregation (spec) where--import Control.Error (fmapL, note)-import qualified Data.Map as M-import qualified Database.Bloodhound-import Test.Common-import Test.Import--spec :: Spec-spec =- describe "Aggregation API" $ do- it "returns term aggregation results" $- withTestEnv $ do- _ <- insertData- let terms = TermsAgg $ mkTermsAggregation "user"- let search = mkAggregateSearch Nothing $ mkAggregations "users" terms- searchExpectAggs search- searchValidBucketAgg search "users" toTerms-- it "return sub-aggregation results" $- withTestEnv $ do- _ <- insertData- let subaggs = mkAggregations "age_agg" . TermsAgg $ mkTermsAggregation "age"- agg = TermsAgg $ (mkTermsAggregation "user") {termAggs = Just subaggs}- search = mkAggregateSearch Nothing $ mkAggregations "users" agg- response <- searchByIndex testIndex search- let result = decodeResponse response :: Maybe (SearchResult Tweet)- usersAggResults = result >>= aggregations >>= toTerms "users"- subAggResults = usersAggResults >>= (listToMaybe . buckets) >>= termsAggs >>= toTerms "age_agg"- subAddResultsExists = isJust subAggResults- liftIO $ subAddResultsExists `shouldBe` True-- it "returns cardinality aggregation results" $- withTestEnv $ do- _ <- insertData- let cardinality = CardinalityAgg $ mkCardinalityAggregation $ FieldName "user"- let search = mkAggregateSearch Nothing $ mkAggregations "users" cardinality- let search' = search {Database.Bloodhound.from = From 0, size = Size 0}- searchExpectAggs search'- let docCountPair k n = (k, object ["value" .= Number n])- res <- searchTweets search'- liftIO $- fmap aggregations res `shouldBe` Right (Just (M.fromList [docCountPair "users" 1]))-- it "returns stats aggregation results" $- withTestEnv $ do- _ <- insertData- let stats = StatsAgg $ mkStatsAggregation $ FieldName "age"- let search = mkAggregateSearch Nothing $ mkAggregations "users" stats- let search' = search {Database.Bloodhound.from = From 0, size = Size 0}- searchExpectAggs search'- let statsAggRes k n =- ( k,- object- [ "max" .= Number n,- "avg" .= Number n,- "count" .= Number 1,- "min" .= Number n,- "sum" .= Number n- ]- )- res <- searchTweets search'- liftIO $- fmap aggregations res `shouldBe` Right (Just (M.fromList [statsAggRes "users" 10000]))-- it "can give collection hint parameters to term aggregations" $- withTestEnv $ do- _ <- insertData- let terms = TermsAgg $ (mkTermsAggregation "user") {termCollectMode = Just BreadthFirst}- let search = mkAggregateSearch Nothing $ mkAggregations "users" terms- searchExpectAggs search- searchValidBucketAgg search "users" toTerms-- it "can give execution hint parameters to term aggregations" $- withTestEnv $ do- _ <- insertData- searchTermsAggHint [GlobalOrdinals, Map]- -- One of the above.-- it "can execute value_count aggregations" $- withTestEnv $ do- _ <- insertData- _ <- insertOther- let ags =- mkAggregations "user_count" (ValueCountAgg (FieldValueCount (FieldName "user")))- <> mkAggregations "bogus_count" (ValueCountAgg (FieldValueCount (FieldName "bogus")))- let search = mkAggregateSearch Nothing ags- let docCountPair k n = (k, object ["value" .= Number n])- res <- searchTweets search- liftIO $- fmap aggregations res- `shouldBe` Right- ( Just- ( M.fromList- [ docCountPair "user_count" 2,- docCountPair "bogus_count" 0- ]- )- )-- it "can execute date_range aggregations" $- withTestEnv $ do- let now = fromGregorian 2015 3 14- let ltAMonthAgo = UTCTime (fromGregorian 2015 3 1) 0- let ltAWeekAgo = UTCTime (fromGregorian 2015 3 10) 0- let oldDoc = exampleTweet {postDate = ltAMonthAgo}- let newDoc = exampleTweet {postDate = ltAWeekAgo}- _ <- indexDocument testIndex defaultIndexDocumentSettings oldDoc (DocId "1")- _ <- indexDocument testIndex defaultIndexDocumentSettings newDoc (DocId "2")- _ <- refreshIndex testIndex- let thisMonth = DateRangeFrom (DateMathExpr (DMDate now) [SubtractTime 1 DMMonth])- let thisWeek = DateRangeFrom (DateMathExpr (DMDate now) [SubtractTime 1 DMWeek])- let agg = DateRangeAggregation (FieldName "postDate") Nothing (thisMonth :| [thisWeek])- let ags = mkAggregations "date_ranges" (DateRangeAgg agg)- let search = mkAggregateSearch Nothing ags- res <- searchTweets search- liftIO $ hitsTotal . searchHits <$> res `shouldBe` Right (HitsTotal 2 HTR_EQ)- let bucks = do- magrs <- fmapL show (aggregations <$> res)- agrs <- note "no aggregations returned" magrs- rawBucks <- note "no date_ranges aggregation" $ M.lookup "date_ranges" agrs- parseEither parseJSON rawBucks- let fromMonthT = UTCTime (fromGregorian 2015 2 14) 0- let fromWeekT = UTCTime (fromGregorian 2015 3 7) 0- liftIO $- buckets <$> bucks- `shouldBe` Right- [ DateRangeResult- "2015-02-14T00:00:00.000Z-*"- (Just fromMonthT)- (Just "2015-02-14T00:00:00.000Z")- Nothing- Nothing- 2- Nothing,- DateRangeResult- "2015-03-07T00:00:00.000Z-*"- (Just fromWeekT)- (Just "2015-03-07T00:00:00.000Z")- Nothing- Nothing- 1- Nothing- ]-- it "returns date histogram aggregation results" $- withTestEnv $ do- _ <- insertData- let histogram = DateHistogramAgg $ mkDateHistogram (FieldName "postDate") Minute- let search = mkAggregateSearch Nothing (mkAggregations "byDate" histogram)- searchExpectAggs search- searchValidBucketAgg search "byDate" toDateHistogram-- it "can execute missing aggregations" $- withTestEnv $ do- _ <- insertData- _ <- insertExtra- let ags = mkAggregations "missing_agg" (MissingAgg (MissingAggregation "extra"))- let search = mkAggregateSearch Nothing ags- let docCountPair k n = (k, object ["doc_count" .= Number n])- res <- searchTweets search- liftIO $- fmap aggregations res `shouldBe` Right (Just (M.fromList [docCountPair "missing_agg" 1]))
+ tests/Test/AggregationSpec.hs view
@@ -0,0 +1,164 @@+{-# LANGUAGE OverloadedStrings #-}++module Test.AggregationSpec (spec) where++import Control.Error (fmapL, note)+import qualified Data.Map as M+import qualified Database.Bloodhound+import TestsUtils.Common+import TestsUtils.Import++spec :: Spec+spec =+ describe "Aggregation API" $ do+ it "returns term aggregation results" $+ withTestEnv $ do+ _ <- insertData+ let terms = TermsAgg $ mkTermsAggregation "user"+ let search = mkAggregateSearch Nothing $ mkAggregations "users" terms+ searchExpectAggs search+ searchValidBucketAgg search "users" toTerms++ it "return sub-aggregation results" $+ withTestEnv $ do+ _ <- insertData+ let subaggs = mkAggregations "age_agg" . TermsAgg $ mkTermsAggregation "age"+ agg = TermsAgg $ (mkTermsAggregation "user") {termAggs = Just subaggs}+ search = mkAggregateSearch Nothing $ mkAggregations "users" agg+ result <- performBHRequest $ searchByIndex @Tweet testIndex search+ let usersAggResults = aggregations result >>= toTerms "users"+ subAggResults = usersAggResults >>= (listToMaybe . buckets) >>= termsAggs >>= toTerms "age_agg"+ subAddResultsExists = isJust subAggResults+ liftIO $ subAddResultsExists `shouldBe` True++ it "returns cardinality aggregation results" $+ withTestEnv $ do+ _ <- insertData+ let cardinality = CardinalityAgg $ mkCardinalityAggregation $ FieldName "user"+ let search = mkAggregateSearch Nothing $ mkAggregations "users" cardinality+ let search' = search {Database.Bloodhound.from = From 0, size = Size 0}+ searchExpectAggs search'+ let docCountPair k n = (k, object ["value" .= Number n])+ res <- searchTweets search'+ liftIO $+ fmap aggregations res `shouldBe` Right (Just (M.fromList [docCountPair "users" 1]))++ it "returns stats aggregation results" $+ withTestEnv $ do+ _ <- insertData+ let stats = StatsAgg $ mkStatsAggregation $ FieldName "age"+ let search = mkAggregateSearch Nothing $ mkAggregations "users" stats+ let search' = search {Database.Bloodhound.from = From 0, size = Size 0}+ searchExpectAggs search'+ let statsAggRes k n =+ ( k,+ object+ [ "max" .= Number n,+ "avg" .= Number n,+ "count" .= Number 1,+ "min" .= Number n,+ "sum" .= Number n+ ]+ )+ res <- searchTweets search'+ liftIO $+ fmap aggregations res `shouldBe` Right (Just (M.fromList [statsAggRes "users" 10000]))++ it "can give collection hint parameters to term aggregations" $+ withTestEnv $ do+ _ <- insertData+ let terms = TermsAgg $ (mkTermsAggregation "user") {termCollectMode = Just BreadthFirst}+ let search = mkAggregateSearch Nothing $ mkAggregations "users" terms+ searchExpectAggs search+ searchValidBucketAgg search "users" toTerms++ it "can give execution hint parameters to term aggregations" $+ withTestEnv $ do+ _ <- insertData+ searchTermsAggHint [GlobalOrdinals, Map]+ -- One of the above.++ it "can execute value_count aggregations" $+ withTestEnv $ do+ _ <- insertData+ _ <- insertOther+ let ags =+ mkAggregations "user_count" (ValueCountAgg (FieldValueCount (FieldName "user")))+ <> mkAggregations "bogus_count" (ValueCountAgg (FieldValueCount (FieldName "bogus")))+ let search = mkAggregateSearch Nothing ags+ let docCountPair k n = (k, object ["value" .= Number n])+ res <- searchTweets search+ liftIO $+ fmap aggregations res+ `shouldBe` Right+ ( Just+ ( M.fromList+ [ docCountPair "user_count" 2,+ docCountPair "bogus_count" 0+ ]+ )+ )++ it "can execute date_range aggregations" $+ withTestEnv $ do+ let now = fromGregorian 2015 3 14+ let ltAMonthAgo = UTCTime (fromGregorian 2015 3 1) 0+ let ltAWeekAgo = UTCTime (fromGregorian 2015 3 10) 0+ let oldDoc = exampleTweet {postDate = ltAMonthAgo}+ let newDoc = exampleTweet {postDate = ltAWeekAgo}+ _ <- performBHRequest $ indexDocument testIndex defaultIndexDocumentSettings oldDoc (DocId "1")+ _ <- performBHRequest $ indexDocument testIndex defaultIndexDocumentSettings newDoc (DocId "2")+ _ <- performBHRequest $ refreshIndex testIndex+ let thisMonth = DateRangeFrom (DateMathExpr (DMDate now) [SubtractTime 1 DMMonth])+ let thisWeek = DateRangeFrom (DateMathExpr (DMDate now) [SubtractTime 1 DMWeek])+ let agg = DateRangeAggregation (FieldName "postDate") Nothing (thisMonth :| [thisWeek])+ let ags = mkAggregations "date_ranges" (DateRangeAgg agg)+ let search = mkAggregateSearch Nothing ags+ res <- searchTweets search+ liftIO $ hitsTotal . searchHits <$> res `shouldBe` Right (HitsTotal 2 HTR_EQ)+ let bucks = do+ magrs <- fmapL show (aggregations <$> res)+ agrs <- note "no aggregations returned" magrs+ rawBucks <- note "no date_ranges aggregation" $ M.lookup "date_ranges" agrs+ parseEither parseJSON rawBucks+ let fromMonthT = UTCTime (fromGregorian 2015 2 14) 0+ let fromWeekT = UTCTime (fromGregorian 2015 3 7) 0+ liftIO $+ buckets <$> bucks+ `shouldBe` Right+ [ DateRangeResult+ "2015-02-14T00:00:00.000Z-*"+ (Just fromMonthT)+ (Just "2015-02-14T00:00:00.000Z")+ Nothing+ Nothing+ 2+ Nothing,+ DateRangeResult+ "2015-03-07T00:00:00.000Z-*"+ (Just fromWeekT)+ (Just "2015-03-07T00:00:00.000Z")+ Nothing+ Nothing+ 1+ Nothing+ ]++ it "returns date histogram aggregation results" $+ withTestEnv $ do+ _ <- insertData+ let histogram = DateHistogramAgg $ mkDateHistogram (FieldName "postDate") Minute+ let search = mkAggregateSearch Nothing (mkAggregations "byDate" histogram)+ searchExpectAggs search+ searchValidBucketAgg search "byDate" toDateHistogram++ it "can execute missing aggregations" $+ withTestEnv $ do+ _ <- insertData+ _ <- insertExtra+ let ags = mkAggregations "missing_agg" (MissingAgg (MissingAggregation "extra"))+ let search = mkAggregateSearch Nothing ags+ let docCountPair k n = (k, object ["doc_count" .= Number n])+ res <- searchTweets search+ liftIO $+ fmap aggregations res `shouldBe` Right (Just (M.fromList [docCountPair "missing_agg" 1]))
− tests/Test/ApproxEq.hs
@@ -1,75 +0,0 @@-{-# LANGUAGE DefaultSignatures #-}-{-# LANGUAGE OverloadedStrings #-}--module Test.ApproxEq where--import qualified Data.List.NonEmpty as NE-import Database.Bloodhound-import Test.Import---- | Typeclass for "equal where it matters". Use this to specify--- less-strict equivalence for things such as lists that can wind up--- in an unpredictable order-class ApproxEq a where- (=~) :: a -> a -> Bool-- showApproxEq :: a -> String- default showApproxEq :: (Show a) => a -> String- showApproxEq = show--(==~) :: (ApproxEq a) => a -> a -> Property-a ==~ b = counterexample (showApproxEq a ++ " !=~ " ++ showApproxEq b) (a =~ b)--instance ApproxEq NominalDiffTime where (=~) = (==)--instance ApproxEq Bool where (=~) = (==)--instance ApproxEq Int where (=~) = (==)--instance (Eq a, Show a) => ApproxEq (Maybe a) where (=~) = (==)--instance ApproxEq Char where- (=~) = (==)--instance ApproxEq NodeAttrFilter where (=~) = (==)--instance ApproxEq NodeAttrName where (=~) = (==)--instance (Eq a, Show a) => ApproxEq (NonEmpty a) where (=~) = (==)--instance (ApproxEq l, Show l, ApproxEq r, Show r) => ApproxEq (Either l r) where- Left a =~ Left b = a =~ b- Right a =~ Right b = a =~ b- _ =~ _ = False- showApproxEq (Left x) = "Left " <> showApproxEq x- showApproxEq (Right x) = "Right " <> showApproxEq x--instance (ApproxEq a, Show a) => ApproxEq [a] where- as =~ bs = and (zipWith (=~) as bs)--instance ApproxEq ReplicaCount where (=~) = (==)--instance ApproxEq ReplicaBounds where (=~) = (==)--instance ApproxEq Bytes where (=~) = (==)--instance ApproxEq AllocationPolicy where (=~) = (==)--instance ApproxEq InitialShardCount where (=~) = (==)--instance ApproxEq FSType where (=~) = (==)---- | Due to the way nodeattrfilters get serialized here, they may come--- out in a different order, but they are morally equivalent-instance ApproxEq UpdatableIndexSetting where- RoutingAllocationInclude a =~ RoutingAllocationInclude b =- NE.sort a =~ NE.sort b- RoutingAllocationExclude a =~ RoutingAllocationExclude b =- NE.sort a =~ NE.sort b- RoutingAllocationRequire a =~ RoutingAllocationRequire b =- NE.sort a =~ NE.sort b- a =~ b = a == b- showApproxEq (RoutingAllocationInclude xs) = show (RoutingAllocationInclude (NE.sort xs))- showApproxEq (RoutingAllocationExclude xs) = show (RoutingAllocationExclude (NE.sort xs))- showApproxEq (RoutingAllocationRequire xs) = show (RoutingAllocationRequire (NE.sort xs))- showApproxEq x = show x
− tests/Test/BulkAPI.hs
@@ -1,194 +0,0 @@-{-# LANGUAGE CPP #-}-{-# LANGUAGE OverloadedStrings #-}--module Test.BulkAPI (spec) where--import qualified Data.Aeson.KeyMap as X-import qualified Data.Vector as V-import qualified Lens.Micro.Aeson as LMA-import Test.Common-import Test.Import--newtype BulkTest- = BulkTest Text- deriving (Eq, Show)--instance ToJSON BulkTest where- toJSON (BulkTest name') =- object ["name" .= name']--instance FromJSON BulkTest where- parseJSON = withObject "BulkTest" parse- where- parse o = do- t <- o .: "name"- BulkTest <$> parseJSON t--data BulkScriptTest = BulkScriptTest- { bstName :: Text,- bstCounter :: Int- }- deriving (Eq, Show)--instance ToJSON BulkScriptTest where- toJSON (BulkScriptTest name' count) =- object ["name" .= name', "counter" .= count]--instance FromJSON BulkScriptTest where- parseJSON = withObject "BulkScriptTest" $ \v ->- BulkScriptTest- <$> v .: "name"- <*> v .: "counter"--assertDocs :: (FromJSON a, Show a, Eq a) => [(DocId, a)] -> BH IO ()-assertDocs as = do- let (ids, docs) = unzip as- res <-- ids- & traverse (getDocument testIndex)- <&> traverse (fmap getSource . eitherDecodeResponse)-- liftIO $ res `shouldBe` Right (Just <$> docs)--upsertDocs ::- (ToJSON a, Show a, Eq a) =>- (Value -> UpsertPayload) ->- [(DocId, a)] ->- BH IO ()-upsertDocs f as = do- let batch = as <&> (\(id_, doc) -> BulkUpsert testIndex id_ (f $ toJSON doc) []) & V.fromList- bulk batch >> refreshIndex testIndex >> pure ()--spec :: Spec-spec =- describe "Bulk API" $ do- it "upsert operations" $- withTestEnv $ do- _ <- insertData-- -- Upserting in a to a fresh index should insert- let toInsert = [(DocId "3", BulkTest "stringer"), (DocId "5", BulkTest "sobotka"), (DocId "7", BulkTest "snoop")]- upsertDocs UpsertDoc toInsert- assertDocs toInsert-- -- Upserting existing documents should update- let toUpsert = [(DocId "3", BulkTest "bell"), (DocId "5", BulkTest "frank"), (DocId "7", BulkTest "snoop")]- upsertDocs UpsertDoc toUpsert- assertDocs toUpsert-- it "upsert with a script" $- withTestEnv $ do- _ <- insertData-- -- first insert the batch- let batch = [(DocId "3", BulkScriptTest "stringer" 0), (DocId "5", BulkScriptTest "sobotka" 3)]- upsertDocs UpsertDoc batch-- -- then upsert with the script-- let script =- Script- { scriptLanguage = Just $ ScriptLanguage "painless",- scriptSource = ScriptInline "ctx._source.counter += params.count",- scriptParams = Just $ ScriptParams $ X.fromList [("count", Number 2)]- }-- upsertDocs (UpsertScript False script) batch- assertDocs (batch <&> (\(i, v) -> (i, v {bstCounter = bstCounter v + 2})))-- it "script upsert without scripted_upsert" $- withTestEnv $ do- _ <- insertData-- let batch = [(DocId "3", BulkScriptTest "stringer" 0), (DocId "5", BulkScriptTest "sobotka" 3)]-- let script =- Script- { scriptLanguage = Just $ ScriptLanguage "painless",- scriptSource = ScriptInline "ctx._source.counter += params.count",- scriptParams = Just $ ScriptParams $ X.fromList [("count", Number 2)]- }-- -- Without "script_upsert" flag new documents are simply inserted and are not handled by the script- upsertDocs (UpsertScript False script) batch- assertDocs batch-- it "script upsert with scripted_upsert -- will fail if a bug on elasticsearch is fix, delete patch line" $- withTestEnv $ do- _ <- insertData-- let batch = [(DocId "3", BulkScriptTest "stringer" 0), (DocId "5", BulkScriptTest "sobotka" 3)]-- let script =- Script- { scriptLanguage = Just $ ScriptLanguage "painless",- scriptSource = ScriptInline "ctx._source.counter += params.count",- scriptParams = Just $ ScriptParams $ X.fromList [("count", Number 2)]- }-- -- Without "script_upsert" flag new documents are simply inserted and are not handled by the script- upsertDocs (UpsertScript True script) batch-- -- if this test fails due to a bug in ES7: https://github.com/elastic/elasticsearch/issues/48670, delete next line when it is solved.- assertDocs (batch <&> (\(i, v) -> (i, v {bstCounter = bstCounter v + 2})))-- it "inserts all documents we request" $- withTestEnv $ do- _ <- insertData- let firstTest = BulkTest "blah"- let secondTest = BulkTest "bloo"- let thirdTest = BulkTest "graffle"- let fourthTest = BulkTest "garabadoo"- let fifthTest = BulkTest "serenity"- let firstDoc = BulkIndex testIndex (DocId "2") (toJSON firstTest)- let secondDoc = BulkCreate testIndex (DocId "3") (toJSON secondTest)- let thirdDoc = BulkCreateEncoding testIndex (DocId "4") (toEncoding thirdTest)- let fourthDoc = BulkIndexAuto testIndex (toJSON fourthTest)- let fifthDoc = BulkIndexEncodingAuto testIndex (toEncoding fifthTest)- let stream = V.fromList [firstDoc, secondDoc, thirdDoc, fourthDoc, fifthDoc]- _ <- bulk stream- -- liftIO $ pPrint bulkResp- _ <- refreshIndex testIndex- -- liftIO $ pPrint refreshResp- fDoc <- getDocument testIndex (DocId "2")- sDoc <- getDocument testIndex (DocId "3")- tDoc <- getDocument testIndex (DocId "4")- -- note that we cannot query for fourthDoc and fifthDoc since we- -- do not know their autogenerated ids.- let maybeFirst =- eitherDecodeResponse fDoc ::- Either String (EsResult BulkTest)- let maybeSecond =- eitherDecodeResponse sDoc ::- Either String (EsResult BulkTest)- let maybeThird =- eitherDecodeResponse tDoc ::- Either String (EsResult BulkTest)- -- liftIO $ pPrint [maybeFirst, maybeSecond, maybeThird]- liftIO $ do- fmap getSource maybeFirst `shouldBe` Right (Just firstTest)- fmap getSource maybeSecond `shouldBe` Right (Just secondTest)- fmap getSource maybeThird `shouldBe` Right (Just thirdTest)- -- Since we can't get the docs by doc id, we check for their existence in- -- a match all query.- let query = MatchAllQuery Nothing- let search = mkSearch (Just query) Nothing- resp <- searchByIndex testIndex search- parsed <- parseEsResponse resp :: BH IO (Either EsError (SearchResult Value))- case parsed of- Left e ->- liftIO $ expectationFailure ("Expected a script-transformed result but got: " <> show e)- (Right sr) -> do- liftIO $- hitsTotal (searchHits sr) `shouldBe` HitsTotal 6 HTR_EQ- let nameList :: [Text]- nameList =- hits (searchHits sr)- ^.. traverse- . to hitSource- . _Just- . LMA.key "name"- . _String- liftIO $- nameList- `shouldBe` ["blah", "bloo", "graffle", "garabadoo", "serenity"]
+ tests/Test/BulkAPISpec.hs view
@@ -0,0 +1,188 @@+{-# LANGUAGE CPP #-}+{-# LANGUAGE OverloadedStrings #-}++module Test.BulkAPISpec (spec) where++import qualified Data.Aeson.KeyMap as X+import qualified Data.Aeson.Optics as LMA+import qualified Data.Vector as V+import Optics+import TestsUtils.Common+import TestsUtils.Import++newtype BulkTest+ = BulkTest Text+ deriving stock (Eq, Show)++instance ToJSON BulkTest where+ toJSON (BulkTest name') =+ object ["name" .= name']++instance FromJSON BulkTest where+ parseJSON = withObject "BulkTest" parse+ where+ parse o = do+ t <- o .: "name"+ BulkTest <$> parseJSON t++data BulkScriptTest = BulkScriptTest+ { bstName :: Text,+ bstCounter :: Int+ }+ deriving stock (Eq, Show)++instance ToJSON BulkScriptTest where+ toJSON (BulkScriptTest name' count) =+ object ["name" .= name', "counter" .= count]++instance FromJSON BulkScriptTest where+ parseJSON = withObject "BulkScriptTest" $ \v ->+ BulkScriptTest+ <$> v+ .: "name"+ <*> v+ .: "counter"++assertDocs :: (FromJSON a, Show a, Eq a) => [(DocId, a)] -> BH IO ()+assertDocs as = do+ let (ids, docs) = unzip as+ res <- traverse (fmap getSource . performBHRequest . getDocument testIndex) ids+ liftIO $ res `shouldBe` map Just docs++upsertDocs ::+ (ToJSON a, Show a, Eq a) =>+ (Value -> UpsertPayload) ->+ [(DocId, a)] ->+ BH IO ()+upsertDocs f as = do+ let batch = as <&> (\(id_, doc) -> BulkUpsert testIndex id_ (f $ toJSON doc) []) & V.fromList+ _ <- performBHRequest (bulk @StatusDependant batch)+ _ <- performBHRequest (refreshIndex testIndex)+ pure ()++spec :: Spec+spec =+ describe "Bulk API" $ do+ it "upsert operations" $+ withTestEnv $ do+ _ <- insertData++ -- Upserting in a to a fresh index should insert+ let toInsert = [(DocId "3", BulkTest "stringer"), (DocId "5", BulkTest "sobotka"), (DocId "7", BulkTest "snoop")]+ upsertDocs UpsertDoc toInsert+ assertDocs toInsert++ -- Upserting existing documents should update+ let toUpsert = [(DocId "3", BulkTest "bell"), (DocId "5", BulkTest "frank"), (DocId "7", BulkTest "snoop")]+ upsertDocs UpsertDoc toUpsert+ assertDocs toUpsert++ it "upsert with a script" $+ withTestEnv $ do+ _ <- insertData++ -- first insert the batch+ let batch = [(DocId "3", BulkScriptTest "stringer" 0), (DocId "5", BulkScriptTest "sobotka" 3)]+ upsertDocs UpsertDoc batch++ -- then upsert with the script++ let script =+ Script+ { scriptLanguage = Just $ ScriptLanguage "painless",+ scriptSource = ScriptInline "ctx._source.counter += params.count",+ scriptParams = Just $ ScriptParams $ X.fromList [("count", Number 2)]+ }++ upsertDocs (UpsertScript False script) batch+ assertDocs (batch <&> (\(i, v) -> (i, v {bstCounter = bstCounter v + 2})))++ it "script upsert without scripted_upsert" $+ withTestEnv $ do+ _ <- insertData++ let batch = [(DocId "3", BulkScriptTest "stringer" 0), (DocId "5", BulkScriptTest "sobotka" 3)]++ let script =+ Script+ { scriptLanguage = Just $ ScriptLanguage "painless",+ scriptSource = ScriptInline "ctx._source.counter += params.count",+ scriptParams = Just $ ScriptParams $ X.fromList [("count", Number 2)]+ }++ -- Without "script_upsert" flag new documents are simply inserted and are not handled by the script+ upsertDocs (UpsertScript False script) batch+ assertDocs batch++ it "script upsert with scripted_upsert -- will fail if a bug on elasticsearch is fix, delete patch line" $+ withTestEnv $ do+ _ <- insertData++ let batch = [(DocId "3", BulkScriptTest "stringer" 0), (DocId "5", BulkScriptTest "sobotka" 3)]++ let script =+ Script+ { scriptLanguage = Just $ ScriptLanguage "painless",+ scriptSource = ScriptInline "ctx._source.counter += params.count",+ scriptParams = Just $ ScriptParams $ X.fromList [("count", Number 2)]+ }++ -- Without "script_upsert" flag new documents are simply inserted and are not handled by the script+ upsertDocs (UpsertScript True script) batch++ -- if this test fails due to a bug in ES7: https://github.com/elastic/elasticsearch/issues/48670, delete next line when it is solved.+ assertDocs (batch <&> (\(i, v) -> (i, v {bstCounter = bstCounter v + 2})))++ it "inserts all documents we request" $+ withTestEnv $ do+ _ <- insertData+ let firstTest = BulkTest "blah"+ let secondTest = BulkTest "bloo"+ let thirdTest = BulkTest "graffle"+ let fourthTest = BulkTest "garabadoo"+ let fifthTest = BulkTest "serenity"+ let firstDoc = BulkIndex testIndex (DocId "2") (toJSON firstTest)+ let secondDoc = BulkCreate testIndex (DocId "3") (toJSON secondTest)+ let thirdDoc = BulkCreateEncoding testIndex (DocId "4") (toEncoding thirdTest)+ let fourthDoc = BulkIndexAuto testIndex (toJSON fourthTest)+ let fifthDoc = BulkIndexEncodingAuto testIndex (toEncoding fifthTest)+ let stream = V.fromList [firstDoc, secondDoc, thirdDoc, fourthDoc, fifthDoc]+ bulkResponse <- performBHRequest $ bulk @StatusDependant stream+ -- liftIO $ pPrint bulkResp+ _ <- performBHRequest $ refreshIndex testIndex+ -- liftIO $ pPrint refreshResp+ maybeFirst <- performBHRequest $ getDocument @BulkTest testIndex (DocId "2")+ maybeSecond <- performBHRequest $ getDocument @BulkTest testIndex (DocId "3")+ maybeThird <- performBHRequest $ getDocument @BulkTest testIndex (DocId "4")+ -- note that we cannot query for fourthDoc and fifthDoc since we+ -- do not know their autogenerated ids.+ -- liftIO $ pPrint [maybeFirst, maybeSecond, maybeThird]+ liftIO $ do+ getSource maybeFirst `shouldBe` Just firstTest+ getSource maybeSecond `shouldBe` Just secondTest+ getSource maybeThird `shouldBe` Just thirdTest+ bulkErrors bulkResponse `shouldBe` False+ length (bulkActionItems bulkResponse) `shouldBe` 5+ baiAction <$> bulkActionItems bulkResponse `shouldBe` [Index, Create, Create, Index, Index]+ bulkActionItems bulkResponse `shouldSatisfy` all ((== "bloodhound-tests-twitter-1") . biIndex . baiItem)+ bulkActionItems bulkResponse `shouldSatisfy` all ((== Just 201) . biStatus . baiItem)+ bulkActionItems bulkResponse `shouldSatisfy` all ((== Nothing) . biError . baiItem)+ -- Since we can't get the docs by doc id, we check for their existence in+ -- a match all query.+ let query = MatchAllQuery Nothing+ let search = mkSearch (Just query) Nothing+ sr <- performBHRequest $ searchByIndex @Value testIndex search+ liftIO $+ hitsTotal (searchHits sr) `shouldBe` HitsTotal 6 HTR_EQ+ let nameList :: [Text]+ nameList =+ hits (searchHits sr)+ ^.. traversed+ % to hitSource+ % _Just+ % LMA.key "name"+ % LMA._String++ liftIO $+ nameList+ `shouldBe` ["blah", "bloo", "graffle", "garabadoo", "serenity"]
− tests/Test/Common.hs
@@ -1,307 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TemplateHaskell #-}--module Test.Common where--import qualified Data.Map as M-import qualified Data.SemVer as SemVer-import qualified Network.HTTP.Types.Status as NHTS-import Test.Import--testServer :: Server-testServer = Server "http://localhost:9200"--testIndex :: IndexName-testIndex = IndexName "bloodhound-tests-twitter-1"--withTestEnv :: BH IO a -> IO a-withTestEnv = withBH defaultManagerSettings testServer--data Location = Location- { lat :: Double,- lon :: Double- }- deriving (Eq, Show)--data Tweet = Tweet- { user :: Text,- postDate :: UTCTime,- message :: Text,- age :: Int,- location :: Location,- extra :: Maybe Text- }- deriving (Eq, Show)--$(deriveJSON defaultOptions ''Location)-$(deriveJSON defaultOptions ''Tweet)--data ConversationMapping = ConversationMapping deriving (Eq, Show)--instance ToJSON ConversationMapping where- toJSON ConversationMapping =- object- [ "properties"- .= object- [ "reply_join"- .= object- [ "type" .= ("join" :: Text),- "relations" .= object ["message" .= ("reply" :: Text)]- ],- "user"- .= object- [ "type" .= ("text" :: Text),- "fielddata" .= True- ],- -- Serializing the date as a date is breaking other tests, mysteriously.- -- , "postDate" .= object [ "type" .= ("date" :: Text)- -- , "format" .= ("YYYY-MM-dd`T`HH:mm:ss.SSSZZ" :: Text)]- "message" .= object ["type" .= ("text" :: Text)],- "age" .= object ["type" .= ("integer" :: Text)],- "location" .= object ["type" .= ("geo_point" :: Text)],- "extra" .= object ["type" .= ("keyword" :: Text)]- ]- ]--getServerVersion :: IO (Either String SemVer.Version)-getServerVersion = fmap extractVersion <$> withTestEnv getStatus- where- extractVersion = versionNumber . number . version--createExampleIndex :: (MonadBH m) => m (BHResponse Acknowledged)-createExampleIndex =- createIndex (IndexSettings (ShardCount 1) (ReplicaCount 0) defaultIndexMappingsLimits) testIndex--deleteExampleIndex :: (MonadBH m) => m (BHResponse Acknowledged)-deleteExampleIndex =- deleteIndex testIndex--validateStatus :: Show body => BHResponse body -> Int -> Expectation-validateStatus resp expected =- if actual == expected- then return ()- else expectationFailure ("Expected " <> show expected <> " but got " <> show actual <> ": " <> show body)- where- actual = NHTS.statusCode (responseStatus $ getResponse resp)- body = responseBody $ getResponse resp--data TweetMapping = TweetMapping deriving (Eq, Show)--instance ToJSON TweetMapping where- toJSON TweetMapping =- object- [ "properties"- .= object- [ "user"- .= object- [ "type" .= ("text" :: Text),- "fielddata" .= True- ],- -- Serializing the date as a date is breaking other tests, mysteriously.- -- , "postDate" .= object [ "type" .= ("date" :: Text)- -- , "format" .= ("YYYY-MM-dd`T`HH:mm:ss.SSSZZ" :: Text)]- "message" .= object ["type" .= ("text" :: Text)],- "age" .= object ["type" .= ("integer" :: Text)],- "location" .= object ["type" .= ("geo_point" :: Text)],- "extra" .= object ["type" .= ("keyword" :: Text)]- ]- ]--exampleTweet :: Tweet-exampleTweet =- Tweet- { user = "bitemyapp",- postDate =- UTCTime- (ModifiedJulianDay 55000)- (secondsToDiffTime 10),- message = "Use haskell!",- age = 10000,- location = Location 40.12 (-71.34),- extra = Nothing- }--tweetWithExtra :: Tweet-tweetWithExtra =- Tweet- { user = "bitemyapp",- postDate =- UTCTime- (ModifiedJulianDay 55000)- (secondsToDiffTime 10),- message = "Use haskell!",- age = 10000,- location = Location 40.12 (-71.34),- extra = Just "blah blah"- }--exampleTweetWithAge :: Int -> Tweet-exampleTweetWithAge age' =- Tweet- { user = "bitemyapp",- postDate =- UTCTime- (ModifiedJulianDay 55000)- (secondsToDiffTime 10),- message = "Use haskell!",- age = age',- location = Location 40.12 (-71.34),- extra = Nothing- }--newAge :: Int-newAge = 31337--newUser :: Text-newUser = "someotherapp"--tweetPatch :: Value-tweetPatch =- object- [ "age" .= newAge,- "user" .= newUser- ]--patchedTweet :: Tweet-patchedTweet = exampleTweet {age = newAge, user = newUser}--otherTweet :: Tweet-otherTweet =- Tweet- { user = "notmyapp",- postDate =- UTCTime- (ModifiedJulianDay 55000)- (secondsToDiffTime 11),- message = "Use haskell!",- age = 1000,- location = Location 40.12 (-71.34),- extra = Nothing- }--resetIndex :: BH IO ()-resetIndex = do- _ <- deleteExampleIndex- _ <- createExampleIndex- _ <- putMapping testIndex TweetMapping- return ()--insertData :: BH IO (BHResponse IndexedDocument)-insertData = do- resetIndex- insertData' defaultIndexDocumentSettings--insertData' :: IndexDocumentSettings -> BH IO (BHResponse IndexedDocument)-insertData' ids = do- r <- indexDocument testIndex ids exampleTweet (DocId "1")- _ <- refreshIndex testIndex- return r--insertTweetWithDocId :: Tweet -> Text -> BH IO (BHResponse IndexedDocument)-insertTweetWithDocId tweet docId = do- let ids = defaultIndexDocumentSettings- r <- indexDocument testIndex ids tweet (DocId docId)- _ <- refreshIndex testIndex- return r--updateData :: BH IO (BHResponse IndexedDocument)-updateData = do- r <- updateDocument testIndex defaultIndexDocumentSettings tweetPatch (DocId "1")- _ <- refreshIndex testIndex- return r--insertOther :: BH IO ()-insertOther = do- _ <- indexDocument testIndex defaultIndexDocumentSettings otherTweet (DocId "2")- _ <- refreshIndex testIndex- return ()--insertExtra :: BH IO ()-insertExtra = do- _ <- indexDocument testIndex defaultIndexDocumentSettings tweetWithExtra (DocId "4")- _ <- refreshIndex testIndex- return ()--insertWithSpaceInId :: BH IO ()-insertWithSpaceInId = do- _ <- indexDocument testIndex defaultIndexDocumentSettings exampleTweet (DocId "Hello World")- _ <- refreshIndex testIndex- return ()--searchTweet :: Search -> BH IO (Either EsError Tweet)-searchTweet search = do- result <- searchTweets search- let myTweet :: Either EsError Tweet- myTweet = grabFirst result- return myTweet--searchTweets :: Search -> BH IO (Either EsError (SearchResult Tweet))-searchTweets search = parseEsResponse =<< searchByIndex testIndex search--searchExpectNoResults :: Search -> BH IO ()-searchExpectNoResults search = do- result <- searchTweets search- let emptyHits = fmap (hits . searchHits) result- liftIO $- emptyHits `shouldBe` Right []--searchExpectAggs :: Search -> BH IO ()-searchExpectAggs search = do- response <- searchByIndex testIndex search- let isEmpty x = return (M.null x)- let result = decodeResponse response :: Maybe (SearchResult Tweet)- liftIO $- (result >>= aggregations >>= isEmpty) `shouldBe` Just False--searchValidBucketAgg ::- (BucketAggregation a, FromJSON a, Show a) =>- Search ->- Key ->- (Key -> AggregationResults -> Maybe (Bucket a)) ->- BH IO ()-searchValidBucketAgg search aggKey extractor = do- response <- searchByIndex testIndex search- let bucketDocs = docCount . head . buckets- let result = decodeResponse response :: Maybe (SearchResult Tweet)- let count = result >>= aggregations >>= extractor aggKey >>= \x -> return (bucketDocs x)- liftIO $- count `shouldBe` Just 1--searchTermsAggHint :: [ExecutionHint] -> BH IO ()-searchTermsAggHint hints = do- let terms hint = TermsAgg $ (mkTermsAggregation "user.keyword") {termExecutionHint = Just hint}- let search hint = mkAggregateSearch Nothing $ mkAggregations "users" $ terms hint- forM_ hints $ searchExpectAggs . search---- forM_ hints (\x -> searchValidBucketAgg (search x) "users" toTerms)--searchTweetHighlight ::- Search ->- BH IO (Either EsError (Maybe HitHighlight))-searchTweetHighlight search = do- result <- searchTweets search- let tweetHit :: Either EsError (Maybe (Hit Tweet))- tweetHit = fmap (headMay . hits . searchHits) result- myHighlight :: Either EsError (Maybe HitHighlight)- myHighlight = (join . fmap hitHighlight) <$> tweetHit- return myHighlight--searchExpectSource :: Source -> Either EsError Value -> BH IO ()-searchExpectSource src expected = do- _ <- insertData- let query = QueryMatchQuery $ mkMatchQuery (FieldName "message") (QueryString "haskell")- let search = (mkSearch (Just query) Nothing) {source = Just src}- response <- searchByIndex testIndex search- result <- parseEsResponse response- let value_ = grabFirst result- liftIO $- value_ `shouldBe` expected--atleast :: SemVer.Version -> IO Bool-atleast v = getServerVersion >>= \x -> return $ x >= Right v--atmost :: SemVer.Version -> IO Bool-atmost v = getServerVersion >>= \x -> return $ x <= Right v--is :: SemVer.Version -> IO Bool-is v = getServerVersion >>= \x -> return $ x == Right v
− tests/Test/Count.hs
@@ -1,17 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}--module Test.Count (spec) where--import Test.Common-import Test.Import--spec :: Spec-spec =- describe "Count" $- it "returns count of a query" $- withTestEnv $ do- _ <- insertData- let query = MatchAllQuery Nothing- count = CountQuery query- c <- countByIndex testIndex count- liftIO $ (crCount <$> c) `shouldBe` (Right 1)
+ tests/Test/CountSpec.hs view
@@ -0,0 +1,17 @@+{-# LANGUAGE OverloadedStrings #-}++module Test.CountSpec (spec) where++import TestsUtils.Common+import TestsUtils.Import++spec :: Spec+spec =+ describe "Count" $+ it "returns count of a query" $+ withTestEnv $ do+ _ <- insertData+ let query = MatchAllQuery Nothing+ count = CountQuery query+ c <- performBHRequest $ countByIndex testIndex count+ liftIO $ crCount c `shouldBe` 1
− tests/Test/Documents.hs
@@ -1,67 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}--module Test.Documents where--import Test.Common-import Test.Import--spec :: Spec-spec =- describe "document API" $ do- it "indexes, updates, gets, and then deletes the generated document" $- withTestEnv $ do- _ <- insertData- _ <- updateData- docInserted <- getDocument testIndex (DocId "1")- let newTweet =- eitherDecodeResponse docInserted ::- Either String (EsResult Tweet)- liftIO $ fmap getSource newTweet `shouldBe` Right (Just patchedTweet)-- it "indexes, gets, and then deletes the generated document with a DocId containing a space" $- withTestEnv $ do- _ <- insertWithSpaceInId- docInserted <- getDocument testIndex (DocId "Hello World")- let newTweet =- eitherDecodeResponse docInserted ::- Either String (EsResult Tweet)- liftIO $ fmap getSource newTweet `shouldBe` Right (Just exampleTweet)-- it "produces a parseable result when looking up a bogus document" $- withTestEnv $ do- doc <- getDocument testIndex (DocId "bogus")- let noTweet =- eitherDecodeResponse doc ::- Either String (EsResult Tweet)- liftIO $ fmap foundResult noTweet `shouldBe` Right Nothing-- it "can use optimistic concurrency control" $- withTestEnv $ do- let ev = ExternalDocVersion minBound- let cfg = defaultIndexDocumentSettings {idsVersionControl = ExternalGT ev}- resetIndex- res <- insertData' cfg- liftIO $ isCreated res `shouldBe` True- res' <- insertData' cfg- liftIO $ isVersionConflict res' `shouldBe` True-- it "indexes two documents in a parent/child relationship and checks that the child exists" $- withTestEnv $ do- resetIndex- _ <- putMapping testIndex ConversationMapping-- let parentSettings = defaultIndexDocumentSettings {idsJoinRelation = Just (ParentDocument (FieldName "reply_join") (RelationName "message"))}- let childSettings = defaultIndexDocumentSettings {idsJoinRelation = Just (ChildDocument (FieldName "reply_join") (RelationName "reply") (DocId "1"))}-- _ <- indexDocument testIndex parentSettings exampleTweet (DocId "1")- _ <- indexDocument testIndex childSettings otherTweet (DocId "2")-- _ <- refreshIndex testIndex-- let query = QueryHasParentQuery $ HasParentQuery (RelationName "message") (MatchAllQuery Nothing) Nothing Nothing- let search = mkSearch (Just query) Nothing-- resp <- searchByIndex testIndex search- parsed <- parseEsResponse resp :: BH IO (Either EsError (SearchResult Value))-- liftIO $ fmap (hitsTotal . searchHits) parsed `shouldBe` Right (HitsTotal 1 HTR_EQ)
+ tests/Test/DocumentsSpec.hs view
@@ -0,0 +1,81 @@+{-# LANGUAGE OverloadedStrings #-}++module Test.DocumentsSpec where++import TestsUtils.Common+import TestsUtils.Import++spec :: Spec+spec =+ describe "document API" $ do+ it "indexes, updates, gets, and then deletes the generated document" $+ withTestEnv $ do+ _ <- insertData+ _ <- updateData+ newTweet <- performBHRequest $ getDocument @Tweet testIndex (DocId "1")+ liftIO $ getSource newTweet `shouldBe` Just patchedTweet++ it "indexes, gets, and then deletes the generated document with a DocId containing a space" $+ withTestEnv $ do+ _ <- insertWithSpaceInId+ newTweet <- performBHRequest $ getDocument @Tweet testIndex (DocId "Hello World")+ liftIO $ getSource newTweet `shouldBe` Just exampleTweet++ it "produces a parseable result when looking up a bogus document" $+ withTestEnv $ do+ noTweet <- performBHRequest $ getDocument @Tweet testIndex (DocId "bogus")+ liftIO $ foundResult noTweet `shouldBe` Nothing++ it "can use optimistic concurrency control" $+ withTestEnv $ do+ let ev = ExternalDocVersion minBound+ let cfg = defaultIndexDocumentSettings {idsVersionControl = ExternalGT ev}+ resetIndex+ (res, _) <- insertData' cfg+ liftIO $ isCreated res `shouldBe` True+ insertedConflict <- tryEsError $ insertData' cfg+ case insertedConflict of+ Right (res', _) -> liftIO $ isVersionConflict res' `shouldBe` True+ Left e -> liftIO $ errorStatus e `shouldBe` Just 409++ it "indexes two documents in a parent/child relationship and checks that the child exists" $+ withTestEnv $ do+ resetIndex+ _ <- performBHRequest $ putMapping @Value testIndex ConversationMapping++ let parentSettings = defaultIndexDocumentSettings {idsJoinRelation = Just (ParentDocument (FieldName "reply_join") (RelationName "message"))}+ let childSettings = defaultIndexDocumentSettings {idsJoinRelation = Just (ChildDocument (FieldName "reply_join") (RelationName "reply") (DocId "1"))}++ _ <- performBHRequest $ indexDocument testIndex parentSettings exampleTweet (DocId "1")+ _ <- performBHRequest $ indexDocument testIndex childSettings otherTweet (DocId "2")++ _ <- performBHRequest $ refreshIndex testIndex++ let query = QueryHasParentQuery $ HasParentQuery (RelationName "message") (MatchAllQuery Nothing) Nothing Nothing+ let search = mkSearch (Just query) Nothing++ response <- performBHRequest $ searchByIndex @Value testIndex search+ liftIO $ hitsTotal (searchHits response) `shouldBe` HitsTotal 1 HTR_EQ++ it "updates documents by query" $ withTestEnv $ do+ _ <- insertData+ _ <- insertOther+ _ <- insertExtra+ let query = (TermQuery (Term "user" "bitemyapp") Nothing)+ script =+ Script+ (Just (ScriptLanguage "painless"))+ (ScriptInline "ctx._source.age *= 2")+ Nothing+ _ <- performBHRequest $ updateByQuery @Value testIndex query (Just script)+ _ <- performBHRequest $ refreshIndex testIndex+ let search = mkSearch (Just query) Nothing+ parsed <- searchTweets search+ case parsed of+ Left e ->+ liftIO $ expectationFailure ("Expected tweets as search result but got: " <> show e)+ Right sr -> do+ let results =+ map (fmap age . hitSource) (hits (searchHits sr))+ liftIO $+ results `shouldBe` [Just $ age exampleTweet * 2, Just $ age tweetWithExtra * 2]
− tests/Test/Generators.hs
@@ -1,597 +0,0 @@-{-# LANGUAGE CPP #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE OverloadedStrings #-}--module Test.Generators where--import qualified Data.Aeson.KeyMap as X-import qualified Data.List as L-import qualified Data.List.NonEmpty as NE-import qualified Data.Map as M-import qualified Data.SemVer as SemVer-import qualified Data.Text as T-import Database.Bloodhound-import Generic.Random-import Test.ApproxEq-import Test.Import--instance Arbitrary NominalDiffTime where- arbitrary = fromInteger <$> arbitrary--#if !MIN_VERSION_QuickCheck(2,8,0)-instance (Arbitrary k, Ord k, Arbitrary v) => Arbitrary (M.Map k v) where- arbitrary = M.fromList <$> arbitrary-#endif--instance Arbitrary Text where- arbitrary = T.pack <$> arbitrary--instance Arbitrary UTCTime where- arbitrary =- UTCTime- <$> arbitrary- <*> (fromRational . toRational <$> choose (0 :: Double, 86400))--instance Arbitrary Day where- arbitrary =- ModifiedJulianDay . (2000 +) <$> arbitrary- shrink =- (ModifiedJulianDay <$>) . shrink . toModifiedJulianDay--#if !MIN_VERSION_QuickCheck(2,9,0)-instance Arbitrary a => Arbitrary (NonEmpty a) where- arbitrary = liftA2 (:|) arbitrary arbitrary-#endif--arbitraryScore :: Gen Score-arbitraryScore = fmap getPositive <$> arbitrary--instance (Arbitrary a, Typeable a) => Arbitrary (Hit a) where- arbitrary =- Hit- <$> arbitrary- <*> arbitrary- <*> arbitraryScore- <*> arbitrary- <*> return Nothing- <*> arbitrary- <*> arbitrary- <*> return Nothing--instance Arbitrary HitFields where- arbitrary = pure (HitFields M.empty)- shrink = const []--instance Arbitrary HitsTotalRelation where- arbitrary = oneof [pure HTR_EQ, pure HTR_GTE]--instance Arbitrary HitsTotal where- arbitrary = do- tot <- getPositive <$> arbitrary- relation_ <- arbitrary- return $ HitsTotal tot relation_--instance (Arbitrary a, Typeable a) => Arbitrary (SearchHits a) where- arbitrary = reduceSize $ do- tot <- arbitrary- score <- arbitraryScore- hs <- arbitrary- return $ SearchHits tot score hs--reduceSize :: Gen a -> Gen a-reduceSize f = sized $ \n -> resize (n `div` 2) f--arbitraryAlphaNum :: Gen Char-arbitraryAlphaNum =- oneof- [ choose ('a', 'z'),- choose ('A', 'Z'),- choose ('0', '9')- ]--instance Arbitrary RoutingValue where- arbitrary = RoutingValue . T.pack <$> listOf1 arbitraryAlphaNum--instance Arbitrary AliasRouting where- arbitrary =- oneof- [ allAlias,- one,- theOther,- both'- ]- where- one =- GranularAliasRouting- <$> (Just <$> arbitrary)- <*> pure Nothing- theOther =- GranularAliasRouting Nothing- <$> (Just <$> arbitrary)- both' =- GranularAliasRouting- <$> (Just <$> arbitrary)- <*> (Just <$> arbitrary)- allAlias = AllAliasRouting <$> arbitrary--instance Arbitrary FieldName where- arbitrary =- FieldName- . T.pack- <$> listOf1 arbitraryAlphaNum--#if MIN_VERSION_base(4,10,0)--- Test.QuickCheck.Modifiers--qcNonEmptyToNonEmpty :: NonEmptyList a -> NonEmpty a-qcNonEmptyToNonEmpty (NonEmpty (a : xs)) = (a :| xs)-qcNonEmptyToNonEmpty (NonEmpty []) = error "NonEmpty was empty!"--instance Arbitrary a => Arbitrary (NonEmpty a) where- arbitrary =- qcNonEmptyToNonEmpty- <$> arbitrary-#endif-instance Arbitrary ScriptFields where- arbitrary =- pure $- ScriptFields $- X.fromList []-- shrink = const []--instance Arbitrary ScriptParams where- arbitrary =- pure $- ScriptParams $- X.fromList- [ ("a", Number 42),- ("b", String "forty two")- ]-- shrink = const []--instance Arbitrary RegexpFlags where- arbitrary =- oneof- [ pure AllRegexpFlags,- pure NoRegexpFlags,- SomeRegexpFlags <$> genUniqueFlags- ]- where- genUniqueFlags =- NE.fromList . L.nub- <$> listOf1 arbitrary--instance Arbitrary IndexAliasCreate where- arbitrary =- IndexAliasCreate- <$> arbitrary- <*> reduceSize arbitrary--instance Arbitrary Query where- arbitrary =- reduceSize $- oneof- [ TermQuery <$> arbitrary <*> arbitrary,- TermsQuery <$> arbitrary <*> arbitrary,- QueryMatchQuery <$> arbitrary,- QueryMultiMatchQuery <$> arbitrary,- QueryBoolQuery <$> arbitrary,- QueryBoostingQuery <$> arbitrary,- QueryCommonTermsQuery <$> arbitrary,- ConstantScoreQuery <$> arbitrary <*> arbitrary,- QueryDisMaxQuery <$> arbitrary,- QueryFuzzyLikeThisQuery <$> arbitrary,- QueryFuzzyLikeFieldQuery <$> arbitrary,- QueryFuzzyQuery <$> arbitrary,- QueryHasChildQuery <$> arbitrary,- QueryHasParentQuery <$> arbitrary,- IdsQuery <$> arbitrary,- QueryIndicesQuery <$> arbitrary,- MatchAllQuery <$> arbitrary,- QueryMoreLikeThisQuery <$> arbitrary,- QueryMoreLikeThisFieldQuery <$> arbitrary,- QueryNestedQuery <$> arbitrary,- QueryPrefixQuery <$> arbitrary,- QueryQueryStringQuery <$> arbitrary,- QuerySimpleQueryStringQuery <$> arbitrary,- QueryRangeQuery <$> arbitrary,- QueryRegexpQuery <$> arbitrary- ]---- TODO: Implement shrink--- shrink = genericShrink--instance Arbitrary Filter where- arbitrary =- Filter <$> arbitrary- shrink (Filter q) =- Filter <$> shrink q--instance Arbitrary ReplicaBounds where- arbitrary =- oneof- [ replicasBounded,- replicasLowerBounded,- pure ReplicasUnbounded- ]- where- replicasBounded = do- Positive a <- arbitrary- Positive b <- arbitrary- return (ReplicasBounded a b)- replicasLowerBounded = do- Positive a <- arbitrary- return (ReplicasLowerBounded a)--instance Arbitrary NodeAttrName where- arbitrary =- NodeAttrName- . T.pack- <$> listOf1 arbitraryAlphaNum--instance Arbitrary NodeAttrFilter where- arbitrary = do- n <- arbitrary- xs <- listOf1 (listOf1 arbitraryAlphaNum)- let (s, ss) = unpackConsPartial xs- ts = T.pack <$> s :| ss- return (NodeAttrFilter n ts)- where- -- listOf1 means this shouldn't blow up.- unpackConsPartial (x : xs) = (x, xs)- unpackConsPartial _ = error "unpackConsPartial failed but shouldn't have"--instance Arbitrary VersionNumber where- arbitrary = do- major <- posInt- minor <- posInt- patch <- posInt- return $ VersionNumber $ SemVer.version major minor patch [] []- where- posInt = getPositive <$> arbitrary--instance Arbitrary TemplateQueryKeyValuePairs where- arbitrary = TemplateQueryKeyValuePairs . X.fromList <$> arbitrary- shrink (TemplateQueryKeyValuePairs x) = map (TemplateQueryKeyValuePairs . X.fromList) . shrink $ X.toList x--instance Arbitrary IndexName where arbitrary = genericArbitraryU--instance Arbitrary DocId where arbitrary = genericArbitraryU--instance Arbitrary Version where arbitrary = genericArbitraryU--instance Arbitrary BuildHash where arbitrary = genericArbitraryU--instance Arbitrary IndexAliasRouting where arbitrary = genericArbitraryU--instance Arbitrary ShardCount where arbitrary = genericArbitraryU--instance Arbitrary ReplicaCount where arbitrary = genericArbitraryU--instance Arbitrary TemplateName where arbitrary = genericArbitraryU--instance Arbitrary IndexPattern where arbitrary = genericArbitraryU--instance Arbitrary QueryString where arbitrary = genericArbitraryU--instance Arbitrary CacheName where arbitrary = genericArbitraryU--instance Arbitrary CacheKey where arbitrary = genericArbitraryU--instance Arbitrary Existence where arbitrary = genericArbitraryU--instance Arbitrary CutoffFrequency where arbitrary = genericArbitraryU--instance Arbitrary Analyzer where arbitrary = genericArbitraryU--instance Arbitrary MaxExpansions where arbitrary = genericArbitraryU--instance Arbitrary Lenient where arbitrary = genericArbitraryU--instance Arbitrary Tiebreaker where arbitrary = genericArbitraryU--instance Arbitrary Boost where arbitrary = genericArbitraryU--instance Arbitrary BoostTerms where arbitrary = genericArbitraryU--instance Arbitrary MinimumMatch where arbitrary = genericArbitraryU--instance Arbitrary DisableCoord where arbitrary = genericArbitraryU--instance Arbitrary IgnoreTermFrequency where arbitrary = genericArbitraryU--instance Arbitrary MinimumTermFrequency where arbitrary = genericArbitraryU--instance Arbitrary MaxQueryTerms where arbitrary = genericArbitraryU--instance Arbitrary Fuzziness where arbitrary = genericArbitraryU--instance Arbitrary PrefixLength where arbitrary = genericArbitraryU--instance Arbitrary RelationName where arbitrary = genericArbitraryU--instance Arbitrary PercentMatch where arbitrary = genericArbitraryU--instance Arbitrary StopWord where arbitrary = genericArbitraryU--instance Arbitrary QueryPath where arbitrary = genericArbitraryU--instance Arbitrary AllowLeadingWildcard where arbitrary = genericArbitraryU--instance Arbitrary LowercaseExpanded where arbitrary = genericArbitraryU--instance Arbitrary EnablePositionIncrements where arbitrary = genericArbitraryU--instance Arbitrary AnalyzeWildcard where arbitrary = genericArbitraryU--instance Arbitrary GeneratePhraseQueries where arbitrary = genericArbitraryU--instance Arbitrary Locale where arbitrary = genericArbitraryU--instance Arbitrary MaxWordLength where arbitrary = genericArbitraryU--instance Arbitrary MinWordLength where arbitrary = genericArbitraryU--instance Arbitrary PhraseSlop where arbitrary = genericArbitraryU--instance Arbitrary MinDocFrequency where arbitrary = genericArbitraryU--instance Arbitrary MaxDocFrequency where arbitrary = genericArbitraryU--instance Arbitrary Regexp where arbitrary = genericArbitraryU--instance Arbitrary SimpleQueryStringQuery where arbitrary = genericArbitraryU--instance Arbitrary FieldOrFields where arbitrary = genericArbitraryU--instance Arbitrary SimpleQueryFlag where arbitrary = genericArbitraryU--instance Arbitrary RegexpQuery where arbitrary = genericArbitraryU--instance Arbitrary QueryStringQuery where arbitrary = genericArbitraryU--instance Arbitrary RangeQuery where arbitrary = genericArbitraryU--instance Arbitrary RangeValue where arbitrary = genericArbitraryU--instance Arbitrary PrefixQuery where arbitrary = genericArbitraryU--instance Arbitrary NestedQuery where arbitrary = genericArbitraryU--instance Arbitrary MoreLikeThisFieldQuery where arbitrary = genericArbitraryU--instance Arbitrary MoreLikeThisQuery where arbitrary = genericArbitraryU--instance Arbitrary IndicesQuery where arbitrary = genericArbitraryU--instance Arbitrary IgnoreUnmapped where arbitrary = genericArbitraryU--instance Arbitrary MinChildren where arbitrary = genericArbitraryU--instance Arbitrary MaxChildren where arbitrary = genericArbitraryU--instance Arbitrary AggregateParentScore where arbitrary = genericArbitraryU--instance Arbitrary HasParentQuery where arbitrary = genericArbitraryU--instance Arbitrary HasChildQuery where arbitrary = genericArbitraryU--instance Arbitrary FuzzyQuery where arbitrary = genericArbitraryU--instance Arbitrary FuzzyLikeFieldQuery where arbitrary = genericArbitraryU--instance Arbitrary FuzzyLikeThisQuery where arbitrary = genericArbitraryU--instance Arbitrary DisMaxQuery where arbitrary = genericArbitraryU--instance Arbitrary CommonTermsQuery where arbitrary = genericArbitraryU--instance Arbitrary DistanceRange where arbitrary = genericArbitraryU--instance Arbitrary MultiMatchQuery where arbitrary = genericArbitraryU--instance Arbitrary LessThanD where arbitrary = genericArbitraryU--instance Arbitrary LessThanEqD where arbitrary = genericArbitraryU--instance Arbitrary GreaterThanD where arbitrary = genericArbitraryU--instance Arbitrary GreaterThanEqD where arbitrary = genericArbitraryU--instance Arbitrary LessThan where arbitrary = genericArbitraryU--instance Arbitrary LessThanEq where arbitrary = genericArbitraryU--instance Arbitrary GreaterThan where arbitrary = genericArbitraryU--instance Arbitrary GreaterThanEq where arbitrary = genericArbitraryU--instance Arbitrary GeoPoint where arbitrary = genericArbitraryU--instance Arbitrary NullValue where arbitrary = genericArbitraryU--instance Arbitrary MinimumMatchHighLow where arbitrary = genericArbitraryU--instance Arbitrary CommonMinimumMatch where arbitrary = genericArbitraryU--instance Arbitrary BoostingQuery where arbitrary = genericArbitraryU--instance Arbitrary BoolQuery where arbitrary = genericArbitraryU--instance Arbitrary MatchQuery where arbitrary = genericArbitraryU--instance Arbitrary MultiMatchQueryType where arbitrary = genericArbitraryU--instance Arbitrary BooleanOperator where arbitrary = genericArbitraryU--instance Arbitrary ZeroTermsQuery where arbitrary = genericArbitraryU--instance Arbitrary MatchQueryType where arbitrary = genericArbitraryU--instance Arbitrary SearchAliasRouting where arbitrary = genericArbitraryU--instance Arbitrary ScoreType where arbitrary = genericArbitraryU--instance Arbitrary Distance where arbitrary = genericArbitraryU--instance Arbitrary DistanceUnit where arbitrary = genericArbitraryU--instance Arbitrary DistanceType where arbitrary = genericArbitraryU--instance Arbitrary OptimizeBbox where arbitrary = genericArbitraryU--instance Arbitrary GeoBoundingBoxConstraint where arbitrary = genericArbitraryU--instance Arbitrary GeoFilterType where arbitrary = genericArbitraryU--instance Arbitrary GeoBoundingBox where arbitrary = genericArbitraryU--instance Arbitrary LatLon where arbitrary = genericArbitraryU--instance Arbitrary RangeExecution where arbitrary = genericArbitraryU--instance Arbitrary RegexpFlag where arbitrary = genericArbitraryU--instance Arbitrary BoolMatch where arbitrary = genericArbitraryU--instance Arbitrary Term where arbitrary = genericArbitraryU--instance Arbitrary IndexMappingsLimits where arbitrary = genericArbitraryU--instance Arbitrary IndexSettings where arbitrary = genericArbitraryU--instance Arbitrary TokenChar where arbitrary = genericArbitraryU--instance Arbitrary Ngram where arbitrary = genericArbitraryU--instance Arbitrary TokenizerDefinition where arbitrary = genericArbitraryU--instance Arbitrary TokenFilter where arbitrary = genericArbitraryU--instance Arbitrary NgramFilter where arbitrary = genericArbitraryU--instance Arbitrary EdgeNgramFilterSide where arbitrary = genericArbitraryU--instance Arbitrary TokenFilterDefinition where arbitrary = genericArbitraryU--instance Arbitrary Language where arbitrary = genericArbitraryU--instance Arbitrary Shingle where arbitrary = genericArbitraryU--instance Arbitrary CharFilter where arbitrary = genericArbitraryU--instance Arbitrary AnalyzerDefinition where arbitrary = genericArbitraryU---- TODO: This should have a proper generator that doesn't--- create garbage that has to be filtered out.-instance Arbitrary CharFilterDefinition where- arbitrary =- oneof- [ CharFilterDefinitionMapping- . chomp- <$> arbitrary,- CharFilterDefinitionPatternReplace- <$> arbitrary- <*> arbitrary- <*> arbitrary- ]- where- chomp =- M.map T.strip- . M.mapKeys (T.replace "=>" "" . T.strip)--instance Arbitrary Analysis where arbitrary = genericArbitraryU--instance Arbitrary Tokenizer where arbitrary = genericArbitraryU--instance Arbitrary Compression where arbitrary = genericArbitraryU--instance Arbitrary Bytes where arbitrary = genericArbitraryU--instance Arbitrary AllocationPolicy where arbitrary = genericArbitraryU--instance Arbitrary InitialShardCount where arbitrary = genericArbitraryU--instance Arbitrary FSType where arbitrary = genericArbitraryU--instance Arbitrary CompoundFormat where arbitrary = genericArbitraryU--instance Arbitrary FsSnapshotRepo where arbitrary = genericArbitraryU--instance Arbitrary SnapshotRepoName where arbitrary = genericArbitraryU--instance Arbitrary DirectGeneratorSuggestModeTypes where arbitrary = genericArbitraryU--instance Arbitrary DirectGenerators where arbitrary = genericArbitraryU--instance Arbitrary PhraseSuggesterCollate where arbitrary = genericArbitraryU--instance Arbitrary PhraseSuggesterHighlighter where arbitrary = genericArbitraryU--instance Arbitrary Size where arbitrary = genericArbitraryU--instance Arbitrary PhraseSuggester where arbitrary = genericArbitraryU--instance Arbitrary SuggestType where arbitrary = genericArbitraryU--instance Arbitrary Suggest where arbitrary = genericArbitraryU--instance Arbitrary FunctionScoreQuery where arbitrary = genericArbitraryU--instance Arbitrary FunctionScoreFunction where arbitrary = genericArbitraryU--instance Arbitrary FunctionScoreFunctions where arbitrary = genericArbitraryU--instance Arbitrary ComponentFunctionScoreFunction where arbitrary = genericArbitraryU--instance Arbitrary Script where arbitrary = genericArbitraryU--instance Arbitrary ScriptLanguage where arbitrary = genericArbitraryU--instance Arbitrary ScriptSource where arbitrary = genericArbitraryU--instance Arbitrary ScoreMode where arbitrary = genericArbitraryU--instance Arbitrary BoostMode where arbitrary = genericArbitraryU--instance Arbitrary Seed where arbitrary = genericArbitraryU--instance Arbitrary FieldValueFactor where arbitrary = genericArbitraryU--instance Arbitrary Weight where arbitrary = genericArbitraryU--instance Arbitrary Factor where arbitrary = genericArbitraryU--instance Arbitrary FactorMissingFieldValue where arbitrary = genericArbitraryU--instance Arbitrary FactorModifier where arbitrary = genericArbitraryU--instance Arbitrary UpdatableIndexSetting where- arbitrary = resize 10 genericArbitraryU--newtype UpdatableIndexSetting'- = UpdatableIndexSetting' UpdatableIndexSetting- deriving (Show, Eq, ToJSON, FromJSON, ApproxEq, Typeable)--instance Arbitrary UpdatableIndexSetting' where- arbitrary = do- settings <- arbitrary- return $- UpdatableIndexSetting' $ case settings of- RoutingAllocationInclude xs ->- RoutingAllocationInclude (dropDuplicateAttrNames xs)- RoutingAllocationExclude xs ->- RoutingAllocationExclude (dropDuplicateAttrNames xs)- RoutingAllocationRequire xs ->- RoutingAllocationRequire (dropDuplicateAttrNames xs)- x -> x- where- dropDuplicateAttrNames =- NE.fromList . L.nubBy sameAttrName . NE.toList- sameAttrName a b =- nodeAttrFilterName a == nodeAttrFilterName b- shrink (UpdatableIndexSetting' x) = map UpdatableIndexSetting' (shrink x)--instance Arbitrary InnerHits where arbitrary = genericArbitraryU
− tests/Test/Highlights.hs
@@ -1,33 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}--module Test.Highlights where--import qualified Data.Map as M-import Test.Common-import Test.Import--initHighlights :: Text -> BH IO (Either EsError (Maybe HitHighlight))-initHighlights fieldName = do- _ <- insertData- _ <- insertOther- let query = QueryMatchQuery $ mkMatchQuery (FieldName fieldName) (QueryString "haskell")- let testHighlight = Highlights Nothing [FieldHighlight (FieldName fieldName) Nothing]- let search = mkHighlightSearch (Just query) testHighlight- searchTweetHighlight search--spec :: Spec-spec =- describe "Highlights API" $ do- it "returns highlight from query when there should be one" $- withTestEnv $ do- myHighlight <- initHighlights "message"- liftIO $- myHighlight- `shouldBe` Right (Just (M.fromList [("message", ["Use <em>haskell</em>!"])]))-- it "doesn't return highlight from a query when it shouldn't" $- withTestEnv $ do- myHighlight <- initHighlights "user"- liftIO $- myHighlight- `shouldBe` Right Nothing
+ tests/Test/HighlightsSpec.hs view
@@ -0,0 +1,33 @@+{-# LANGUAGE OverloadedStrings #-}++module Test.HighlightsSpec where++import qualified Data.Map as M+import TestsUtils.Common+import TestsUtils.Import++initHighlights :: Text -> BH IO (Either EsError (Maybe HitHighlight))+initHighlights fieldName = do+ _ <- insertData+ _ <- insertOther+ let query = QueryMatchQuery $ mkMatchQuery (FieldName fieldName) (QueryString "haskell")+ let testHighlight = Highlights Nothing [FieldHighlight (FieldName fieldName) Nothing]+ let search = mkHighlightSearch (Just query) testHighlight+ searchTweetHighlight search++spec :: Spec+spec =+ describe "Highlights API" $ do+ it "returns highlight from query when there should be one" $+ withTestEnv $ do+ myHighlight <- initHighlights "message"+ liftIO $+ myHighlight+ `shouldBe` Right (Just (M.fromList [("message", ["Use <em>haskell</em>!"])]))++ it "doesn't return highlight from a query when it shouldn't" $+ withTestEnv $ do+ myHighlight <- initHighlights "user"+ liftIO $+ myHighlight+ `shouldBe` Right Nothing
− tests/Test/Import.hs
@@ -1,57 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}--module Test.Import- ( module X,- module Test.Import,- )-where--import Control.Applicative as X-import Control.Exception as X (evaluate)-import Control.Monad as X-import Control.Monad.Catch as X-import Control.Monad.Reader as X-import Data.Aeson as X-import Data.Aeson.TH as X-import Data.Aeson.Types as X (parseEither)-import qualified Data.List as L-import Data.List.NonEmpty as X (NonEmpty (..))-import Data.Maybe as X-import Data.Monoid as X-import Data.Ord as X (comparing)-import Data.Proxy as X-import Data.Text as X (Text)-import Data.Time.Calendar as X (Day (..), fromGregorian)-import Data.Time.Clock as X-import Data.Typeable as X-import Database.Bloodhound as X hiding (key)-import Lens.Micro as X-import Lens.Micro.Aeson as X-import Network.HTTP.Client as X hiding (Proxy, fileSize)-import System.IO.Temp as X-import System.PosixCompat.Files as X-import Test.Hspec as X-import Test.Hspec.QuickCheck as X (prop)-import Test.QuickCheck as X hiding (Result, Success, isSuccess)-import Test.QuickCheck.Property.Monoid as X (T (..), eq, prop_Monoid)-import Text.Pretty.Simple as X (pPrint)--noDuplicates :: Eq a => [a] -> Bool-noDuplicates xs = L.nub xs == xs--getSource :: EsResult a -> Maybe a-getSource = fmap _source . foundResult--grabFirst :: Either EsError (SearchResult a) -> Either EsError a-grabFirst r =- case fmap (hitSource . head . hits . searchHits) r of- (Left e) -> Left e- (Right Nothing) -> Left (EsError (Just 500) "Source was missing")- (Right (Just x)) -> Right x--when' :: Monad m => m Bool -> m () -> m ()-when' b f = b >>= \x -> when x f--headMay :: [a] -> Maybe a-headMay (x : _) = Just x-headMay _ = Nothing
− tests/Test/Indices.hs
@@ -1,190 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}--module Test.Indices where--import qualified Data.List as L-import qualified Data.Map as M-import Test.Common-import Test.Import--checkHasSettings :: [UpdatableIndexSetting] -> BH IO ()-checkHasSettings settings = do- currentSettingsE <- getIndexSettings testIndex- case currentSettingsE of- Left err -> fail $ "could not get index settings: " <> show err- Right (IndexSettingsSummary _ _ currentSettings) -> liftIO $ L.intersect currentSettings settings `shouldBe` settings--spec :: Spec-spec = do- describe "Index create/delete API" $ do- it "creates and then deletes the requested index" $- withTestEnv $ do- -- priming state.- _ <- deleteExampleIndex- resp <- createExampleIndex- deleteResp <- deleteExampleIndex- liftIO $ do- validateStatus resp 200- validateStatus deleteResp 200-- describe "Index aliases" $ do- let aname = IndexAliasName (IndexName "bloodhound-tests-twitter-1-alias")- let alias = IndexAlias (testIndex) aname- let create = IndexAliasCreate Nothing Nothing- let action = AddAlias alias create- it "handles the simple case of aliasing an existing index" $ do- withTestEnv $ do- resetIndex- resp <- updateIndexAliases (action :| [])- liftIO $ validateStatus resp 200- let cleanup = withTestEnv (updateIndexAliases (RemoveAlias alias :| []))- ( do- aliases <- withTestEnv getIndexAliases- let expected = IndexAliasSummary alias create- case aliases of- Right (IndexAliasesSummary summs) ->- L.find ((== alias) . indexAliasSummaryAlias) summs `shouldBe` Just expected- Left e -> expectationFailure ("Expected an IndexAliasesSummary but got " <> show e)- )- `finally` cleanup- it "allows alias deletion" $ do- aliases <- withTestEnv $ do- resetIndex- resp <- updateIndexAliases (action :| [])- liftIO $ validateStatus resp 200- _ <- deleteIndexAlias aname- getIndexAliases- -- let expected = IndexAliasSummary alias create- case aliases of- Right (IndexAliasesSummary summs) ->- L.find- ( (== aname)- . indexAlias- . indexAliasSummaryAlias- )- summs- `shouldBe` Nothing- Left e -> expectationFailure ("Expected an IndexAliasesSummary but got " <> show e)-- describe "Index Listing" $ do- it "returns a list of index names" $- withTestEnv $ do- _ <- createExampleIndex- ixns <- listIndices- liftIO (ixns `shouldContain` [testIndex])-- describe "Index Settings" $ do- it "persists settings" $- withTestEnv $ do- _ <- deleteExampleIndex- _ <- createExampleIndex- let updates = BlocksWrite False :| []- updateResp <- updateIndexSettings updates testIndex- liftIO $ validateStatus updateResp 200- checkHasSettings [BlocksWrite False]-- it "allows total fields to be set" $- withTestEnv $ do- _ <- deleteExampleIndex- _ <- createExampleIndex- let updates = MappingTotalFieldsLimit 2500 :| []- updateResp <- updateIndexSettings updates testIndex- liftIO $ validateStatus updateResp 200- checkHasSettings [MappingTotalFieldsLimit 2500]-- it "allows unassigned.node_left.delayed_timeout to be set" $- withTestEnv $ do- _ <- deleteExampleIndex- _ <- createExampleIndex- let updates = UnassignedNodeLeftDelayedTimeout 10 :| []- updateResp <- updateIndexSettings updates testIndex- liftIO $ validateStatus updateResp 200- checkHasSettings [UnassignedNodeLeftDelayedTimeout 10]-- it "accepts customer analyzers" $- withTestEnv $ do- _ <- deleteExampleIndex- let analysis =- Analysis- ( M.singleton- "ex_analyzer"- ( AnalyzerDefinition- (Just (Tokenizer "ex_tokenizer"))- ( map- TokenFilter- [ "ex_filter_lowercase",- "ex_filter_uppercase",- "ex_filter_apostrophe",- "ex_filter_reverse",- "ex_filter_snowball",- "ex_filter_shingle"- ]- )- ( map- CharFilter- ["html_strip", "ex_mapping", "ex_pattern_replace"]- )- )- )- ( M.singleton- "ex_tokenizer"- ( TokenizerDefinitionNgram- (Ngram 3 4 [TokenLetter, TokenDigit])- )- )- ( M.fromList- [ ("ex_filter_lowercase", TokenFilterDefinitionLowercase (Just Greek)),- ("ex_filter_uppercase", TokenFilterDefinitionUppercase Nothing),- ("ex_filter_apostrophe", TokenFilterDefinitionApostrophe),- ("ex_filter_reverse", TokenFilterDefinitionReverse),- ("ex_filter_snowball", TokenFilterDefinitionSnowball English),- ("ex_filter_shingle", TokenFilterDefinitionShingle (Shingle 3 3 True False " " "_")),- ("ex_filter_stemmer", TokenFilterDefinitionStemmer German),- ("ex_filter_stop1", TokenFilterDefinitionStop (Left French)),- ( "ex_filter_stop2",- TokenFilterDefinitionStop- ( Right $- map StopWord ["a", "is", "the"]- )- )- ]- )- ( M.fromList- [ ("ex_mapping", CharFilterDefinitionMapping (M.singleton "١" "1")),- ("ex_pattern_replace", CharFilterDefinitionPatternReplace "(\\d+)-(?=\\d)" "$1_" Nothing)- ]- )- updates = [AnalysisSetting analysis]- createResp <- createIndexWith (updates ++ [NumberOfReplicas (ReplicaCount 0)]) 1 testIndex- liftIO $ validateStatus createResp 200- checkHasSettings updates-- it "accepts default compression codec" $- withTestEnv $ do- _ <- deleteExampleIndex- let updates = [CompressionSetting CompressionDefault]- createResp <- createIndexWith (updates ++ [NumberOfReplicas (ReplicaCount 0)]) 1 testIndex- liftIO $ validateStatus createResp 200- checkHasSettings updates-- it "accepts best compression codec" $- withTestEnv $ do- _ <- deleteExampleIndex- let updates = [CompressionSetting CompressionBest]- createResp <- createIndexWith (updates ++ [NumberOfReplicas (ReplicaCount 0)]) 1 testIndex- liftIO $ validateStatus createResp 200- checkHasSettings updates-- describe "Index Optimization" $ do- it "returns a successful response upon completion" $- withTestEnv $ do- _ <- createExampleIndex- resp <- forceMergeIndex (IndexList (testIndex :| [])) defaultForceMergeIndexSettings- liftIO $ validateStatus resp 200-- describe "Index flushing" $ do- it "returns a successful response upon flushing" $- withTestEnv $ do- _ <- createExampleIndex- resp <- flushIndex testIndex- liftIO $ validateStatus resp 200
+ tests/Test/IndicesSpec.hs view
@@ -0,0 +1,184 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE QuasiQuotes #-}+{-# LANGUAGE TemplateHaskell #-}++module Test.IndicesSpec where++import qualified Data.List as L+import qualified Data.Map as M+import TestsUtils.Common+import TestsUtils.Import++checkHasSettings :: [UpdatableIndexSetting] -> BH IO ()+checkHasSettings settings = do+ IndexSettingsSummary _ _ currentSettings <- performBHRequest $ getIndexSettings testIndex+ liftIO $ L.intersect currentSettings settings `shouldBe` settings++spec :: Spec+spec = do+ describe "Index create/delete API" $ do+ it "creates and then deletes the requested index" $+ withTestEnv $ do+ -- priming state.+ _ <- deleteExampleIndex+ (resp, _) <- createExampleIndex+ (deleteResp, _) <- deleteExampleIndex+ liftIO $ do+ validateStatus resp 200+ validateStatus deleteResp 200++ describe "Index aliases" $ do+ let aName = IndexAliasName ([qqIndexName|bloodhound-tests-twitter-1-alias|])+ let alias = IndexAlias testIndex aName+ let create = IndexAliasCreate Nothing Nothing+ let action = AddAlias alias create+ it "handles the simple case of aliasing an existing index" $ do+ withTestEnv $ do+ resetIndex+ (resp, _) <- performBHRequest $ keepBHResponse $ updateIndexAliases (action :| [])+ liftIO $ validateStatus resp 200+ let cleanup = withTestEnv (performBHRequest $ updateIndexAliases (RemoveAlias alias :| []))+ ( do+ IndexAliasesSummary summs <- withTestEnv (performBHRequest getIndexAliases)+ let expected = IndexAliasSummary alias create+ L.find ((== alias) . indexAliasSummaryAlias) summs `shouldBe` Just expected+ )+ `finally` cleanup+ it "allows alias deletion" $ do+ IndexAliasesSummary summs <- withTestEnv $ do+ resetIndex+ (resp, _) <- performBHRequest $ keepBHResponse $ updateIndexAliases (action :| [])+ liftIO $ validateStatus resp 200+ _ <- performBHRequest $ deleteIndexAlias aName+ performBHRequest getIndexAliases+ -- let expected = IndexAliasSummary alias create+ L.find+ ( (== aName)+ . indexAlias+ . indexAliasSummaryAlias+ )+ summs+ `shouldBe` Nothing++ describe "Index Listing" $ do+ it "returns a list of index names" $+ withTestEnv $ do+ _ <- createExampleIndex+ ixns <- performBHRequest listIndices+ liftIO (ixns `shouldContain` [testIndex])++ describe "Index Settings" $ do+ it "persists settings" $+ withTestEnv $ do+ _ <- deleteExampleIndex+ _ <- createExampleIndex+ let updates = BlocksWrite False :| []+ (updateResp, _) <- performBHRequest $ keepBHResponse $ updateIndexSettings updates testIndex+ liftIO $ validateStatus updateResp 200+ checkHasSettings [BlocksWrite False]++ it "allows total fields to be set" $+ withTestEnv $ do+ _ <- deleteExampleIndex+ _ <- createExampleIndex+ let updates = MappingTotalFieldsLimit 2500 :| []+ (updateResp, _) <- performBHRequest $ keepBHResponse $ updateIndexSettings updates testIndex+ liftIO $ validateStatus updateResp 200+ checkHasSettings [MappingTotalFieldsLimit 2500]++ it "allows unassigned.node_left.delayed_timeout to be set" $+ withTestEnv $ do+ _ <- deleteExampleIndex+ _ <- createExampleIndex+ let updates = UnassignedNodeLeftDelayedTimeout 10 :| []+ (updateResp, _) <- performBHRequest $ keepBHResponse $ updateIndexSettings updates testIndex+ liftIO $ validateStatus updateResp 200+ checkHasSettings [UnassignedNodeLeftDelayedTimeout 10]++ it "accepts customer analyzers" $+ withTestEnv $ do+ _ <- deleteExampleIndex+ let analysis =+ Analysis+ ( M.singleton+ "ex_analyzer"+ ( AnalyzerDefinition+ (Just (Tokenizer "ex_tokenizer"))+ ( map+ TokenFilter+ [ "ex_filter_lowercase",+ "ex_filter_uppercase",+ "ex_filter_apostrophe",+ "ex_filter_reverse",+ "ex_filter_snowball",+ "ex_filter_shingle"+ ]+ )+ ( map+ CharFilter+ ["html_strip", "ex_mapping", "ex_pattern_replace"]+ )+ )+ )+ ( M.singleton+ "ex_tokenizer"+ ( TokenizerDefinitionNgram+ (Ngram 3 4 [TokenLetter, TokenDigit])+ )+ )+ ( M.fromList+ [ ("ex_filter_lowercase", TokenFilterDefinitionLowercase (Just Greek)),+ ("ex_filter_uppercase", TokenFilterDefinitionUppercase Nothing),+ ("ex_filter_apostrophe", TokenFilterDefinitionApostrophe),+ ("ex_filter_reverse", TokenFilterDefinitionReverse),+ ("ex_filter_snowball", TokenFilterDefinitionSnowball English),+ ("ex_filter_shingle", TokenFilterDefinitionShingle (Shingle 3 3 True False " " "_")),+ ("ex_filter_stemmer", TokenFilterDefinitionStemmer German),+ ("ex_filter_stop1", TokenFilterDefinitionStop (Left French)),+ ( "ex_filter_stop2",+ TokenFilterDefinitionStop+ ( Right $+ map StopWord ["a", "is", "the"]+ )+ )+ ]+ )+ ( M.fromList+ [ ("ex_mapping", CharFilterDefinitionMapping (M.singleton "١" "1")),+ ("ex_pattern_replace", CharFilterDefinitionPatternReplace "(\\d+)-(?=\\d)" "$1_" Nothing)+ ]+ )+ updates = [AnalysisSetting analysis]+ (createResp, _) <- performBHRequest $ keepBHResponse $ createIndexWith (updates ++ [NumberOfReplicas (ReplicaCount 0)]) 1 testIndex+ liftIO $ validateStatus createResp 200+ checkHasSettings updates++ it "accepts default compression codec" $+ withTestEnv $ do+ _ <- deleteExampleIndex+ let updates = [CompressionSetting CompressionDefault]+ (createResp, _) <- performBHRequest $ keepBHResponse $ createIndexWith (updates ++ [NumberOfReplicas (ReplicaCount 0)]) 1 testIndex+ liftIO $ validateStatus createResp 200+ checkHasSettings updates++ it "accepts best compression codec" $+ withTestEnv $ do+ _ <- deleteExampleIndex+ let updates = [CompressionSetting CompressionBest]+ (createResp, _) <- performBHRequest $ keepBHResponse $ createIndexWith (updates ++ [NumberOfReplicas (ReplicaCount 0)]) 1 testIndex+ liftIO $ validateStatus createResp 200+ checkHasSettings updates++ describe "Index Optimization" $ do+ it "returns a successful response upon completion" $+ withTestEnv $ do+ _ <- createExampleIndex+ (resp, _) <- performBHRequest $ keepBHResponse $ forceMergeIndex (IndexList (testIndex :| [])) defaultForceMergeIndexSettings+ liftIO $ validateStatus resp 200++ describe "Index flushing" $ do+ it "returns a successful response upon flushing" $+ withTestEnv $ do+ _ <- createExampleIndex+ (resp, _) <- performBHRequest $ keepBHResponse $ flushIndex testIndex+ liftIO $ validateStatus resp 200
− tests/Test/JSON.hs
@@ -1,247 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE ScopedTypeVariables #-}--module Test.JSON (spec) where--import qualified Data.Aeson.KeyMap as X-import qualified Data.ByteString.Lazy.Char8 as BL8-import qualified Data.List as L-import qualified Data.List.NonEmpty as NE-import qualified Data.Text as T-import qualified Data.Vector as V-import Test.ApproxEq-import Test.Generators-import Test.Import--propJSON ::- forall a.- ( Arbitrary a,- ToJSON a,- FromJSON a,- Show a,- Eq a,- Typeable a- ) =>- Proxy a ->- Spec-propJSON _ = prop testName $ \(a :: a) ->- let jsonStr = "via " <> BL8.unpack (encode a)- in counterexample- jsonStr- ( parseEither parseJSON (toJSON a)- === Right a- )- where- testName = show ty <> " FromJSON/ToJSON roundtrips"- ty = typeOf (undefined :: a)--propApproxJSON ::- forall a.- ( Arbitrary a,- ToJSON a,- FromJSON a,- Show a,- ApproxEq a,- Typeable a- ) =>- Proxy a ->- Spec-propApproxJSON _ = prop testName $ \(a :: a) ->- let jsonStr = "via " <> BL8.unpack (encode a)- in counterexample- jsonStr- ( parseEither parseJSON (toJSON a)- ==~ Right a- )- where- testName = show ty <> " FromJSON/ToJSON roundtrips"- ty = typeOf (undefined :: a)--spec :: Spec-spec = do- describe "ToJSON RegexpFlags" $ do- it "generates the correct JSON for AllRegexpFlags" $- toJSON AllRegexpFlags `shouldBe` String "ALL"-- it "generates the correct JSON for NoRegexpFlags" $- toJSON NoRegexpFlags `shouldBe` String "NONE"-- it "generates the correct JSON for SomeRegexpFlags" $- let flags =- AnyString- :| [ Automaton,- Complement,- Empty,- Intersection,- Interval- ]- in toJSON (SomeRegexpFlags flags) `shouldBe` String "ANYSTRING|AUTOMATON|COMPLEMENT|EMPTY|INTERSECTION|INTERVAL"-- prop "removes duplicates from flags" $ \(flags :: RegexpFlags) ->- let String str = toJSON flags- flagStrs = T.splitOn "|" str- in noDuplicates flagStrs-- describe "omitNulls" $ do- it "checks that omitNulls drops list elements when it should" $- let dropped =- omitNulls $- [ "test1" .= (toJSON ([] :: [Int])),- "test2" .= (toJSON ("some value" :: Text))- ]- in dropped `shouldBe` Object (X.fromList [("test2", String "some value")])-- it "checks that omitNulls doesn't drop list elements when it shouldn't" $- let notDropped =- omitNulls $- [ "test1" .= (toJSON ([1] :: [Int])),- "test2" .= (toJSON ("some value" :: Text))- ]- in notDropped- `shouldBe` Object- ( X.fromList- [ ("test1", Array (V.fromList [Number 1.0])),- ("test2", String "some value")- ]- )- it "checks that omitNulls drops non list elements when it should" $- let dropped =- omitNulls $- [ "test1" .= (toJSON Null),- "test2" .= (toJSON ("some value" :: Text))- ]- in dropped `shouldBe` Object (X.fromList [("test2", String "some value")])- it "checks that omitNulls doesn't drop non list elements when it shouldn't" $- let notDropped =- omitNulls $- [ "test1" .= (toJSON (1 :: Int)),- "test2" .= (toJSON ("some value" :: Text))- ]- in notDropped- `shouldBe` Object- ( X.fromList- [ ("test1", Number 1.0),- ("test2", String "some value")- ]- )-- describe "Exact isomorphism JSON instances" $ do- propJSON (Proxy :: Proxy Version)- propJSON (Proxy :: Proxy IndexName)- propJSON (Proxy :: Proxy DocId)- propJSON (Proxy :: Proxy IndexAliasRouting)- propJSON (Proxy :: Proxy RoutingValue)- propJSON (Proxy :: Proxy ShardCount)- propJSON (Proxy :: Proxy ReplicaCount)- propJSON (Proxy :: Proxy TemplateName)- propJSON (Proxy :: Proxy IndexPattern)- propJSON (Proxy :: Proxy QueryString)- propJSON (Proxy :: Proxy FieldName)- propJSON (Proxy :: Proxy Script)- propJSON (Proxy :: Proxy ScriptLanguage)- propJSON (Proxy :: Proxy ScriptParams)- propJSON (Proxy :: Proxy CacheName)- propJSON (Proxy :: Proxy CacheKey)- propJSON (Proxy :: Proxy Existence)- propJSON (Proxy :: Proxy CutoffFrequency)- propJSON (Proxy :: Proxy Analyzer)- propJSON (Proxy :: Proxy MaxExpansions)- propJSON (Proxy :: Proxy Lenient)- propJSON (Proxy :: Proxy Tiebreaker)- propJSON (Proxy :: Proxy Boost)- propJSON (Proxy :: Proxy BoostTerms)- propJSON (Proxy :: Proxy MinimumMatch)- propJSON (Proxy :: Proxy DisableCoord)- propJSON (Proxy :: Proxy IgnoreTermFrequency)- propJSON (Proxy :: Proxy MinimumTermFrequency)- propJSON (Proxy :: Proxy MaxQueryTerms)- propJSON (Proxy :: Proxy Fuzziness)- propJSON (Proxy :: Proxy PrefixLength)- propJSON (Proxy :: Proxy RelationName)- propJSON (Proxy :: Proxy PercentMatch)- propJSON (Proxy :: Proxy StopWord)- propJSON (Proxy :: Proxy QueryPath)- propJSON (Proxy :: Proxy AllowLeadingWildcard)- propJSON (Proxy :: Proxy LowercaseExpanded)- propJSON (Proxy :: Proxy EnablePositionIncrements)- propJSON (Proxy :: Proxy AnalyzeWildcard)- propJSON (Proxy :: Proxy GeneratePhraseQueries)- propJSON (Proxy :: Proxy Locale)- propJSON (Proxy :: Proxy MaxWordLength)- propJSON (Proxy :: Proxy MinWordLength)- propJSON (Proxy :: Proxy PhraseSlop)- propJSON (Proxy :: Proxy MinDocFrequency)- propJSON (Proxy :: Proxy MaxDocFrequency)- propJSON (Proxy :: Proxy Filter)- propJSON (Proxy :: Proxy Query)- propJSON (Proxy :: Proxy SimpleQueryStringQuery)- propJSON (Proxy :: Proxy FieldOrFields)- propJSON (Proxy :: Proxy SimpleQueryFlag)- propJSON (Proxy :: Proxy RegexpQuery)- propJSON (Proxy :: Proxy QueryStringQuery)- propJSON (Proxy :: Proxy RangeQuery)- propJSON (Proxy :: Proxy PrefixQuery)- propJSON (Proxy :: Proxy NestedQuery)- propJSON (Proxy :: Proxy MoreLikeThisFieldQuery)- propJSON (Proxy :: Proxy MoreLikeThisQuery)- propJSON (Proxy :: Proxy IndicesQuery)- propJSON (Proxy :: Proxy IgnoreUnmapped)- propJSON (Proxy :: Proxy MinChildren)- propJSON (Proxy :: Proxy MaxChildren)- propJSON (Proxy :: Proxy AggregateParentScore)- propJSON (Proxy :: Proxy HasParentQuery)- propJSON (Proxy :: Proxy HasChildQuery)- propJSON (Proxy :: Proxy FuzzyQuery)- propJSON (Proxy :: Proxy FuzzyLikeFieldQuery)- propJSON (Proxy :: Proxy FuzzyLikeThisQuery)- propJSON (Proxy :: Proxy FunctionScoreQuery)- propJSON (Proxy :: Proxy BoostMode)- propJSON (Proxy :: Proxy ScoreMode)- propJSON (Proxy :: Proxy ComponentFunctionScoreFunction)- propJSON (Proxy :: Proxy FieldValueFactor)- propJSON (Proxy :: Proxy FactorModifier)- propJSON (Proxy :: Proxy DisMaxQuery)- propJSON (Proxy :: Proxy CommonTermsQuery)- propJSON (Proxy :: Proxy CommonMinimumMatch)- propJSON (Proxy :: Proxy BoostingQuery)- propJSON (Proxy :: Proxy BoolQuery)- propJSON (Proxy :: Proxy MatchQuery)- propJSON (Proxy :: Proxy MultiMatchQueryType)- propJSON (Proxy :: Proxy BooleanOperator)- propJSON (Proxy :: Proxy ZeroTermsQuery)- propJSON (Proxy :: Proxy MatchQueryType)- propJSON (Proxy :: Proxy AliasRouting)- propJSON (Proxy :: Proxy IndexAliasCreate)- propJSON (Proxy :: Proxy SearchAliasRouting)- propJSON (Proxy :: Proxy ScoreType)- propJSON (Proxy :: Proxy Distance)- propJSON (Proxy :: Proxy DistanceUnit)- propJSON (Proxy :: Proxy DistanceType)- propJSON (Proxy :: Proxy OptimizeBbox)- propJSON (Proxy :: Proxy GeoBoundingBoxConstraint)- propJSON (Proxy :: Proxy GeoFilterType)- propJSON (Proxy :: Proxy GeoBoundingBox)- propJSON (Proxy :: Proxy LatLon)- propJSON (Proxy :: Proxy RangeExecution)- prop "RegexpFlags FromJSON/ToJSON roundtrips, removing dups " $ \rfs ->- let expected = case rfs of- SomeRegexpFlags fs -> SomeRegexpFlags (NE.fromList (L.nub (NE.toList fs)))- x -> x- in parseEither parseJSON (toJSON rfs) === Right expected- propJSON (Proxy :: Proxy BoolMatch)- propJSON (Proxy :: Proxy Term)- propJSON (Proxy :: Proxy MultiMatchQuery)- -- propJSON (Proxy :: Proxy IndexSettings)- propJSON (Proxy :: Proxy CompoundFormat)- propJSON (Proxy :: Proxy Suggest)- propJSON (Proxy :: Proxy DirectGenerators)- propJSON (Proxy :: Proxy DirectGeneratorSuggestModeTypes)-- describe "Approximate isomorphism JSON instances" $ do- propApproxJSON (Proxy :: Proxy UpdatableIndexSetting')- propApproxJSON (Proxy :: Proxy ReplicaCount)- propApproxJSON (Proxy :: Proxy ReplicaBounds)- propApproxJSON (Proxy :: Proxy Bytes)- propApproxJSON (Proxy :: Proxy AllocationPolicy)- propApproxJSON (Proxy :: Proxy InitialShardCount)- propApproxJSON (Proxy :: Proxy FSType)
+ tests/Test/JSONSpec.hs view
@@ -0,0 +1,202 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}++module Test.JSONSpec (spec) where++import qualified Data.ByteString.Lazy.Char8 as BL8+import qualified Data.List as L+import qualified Data.List.NonEmpty as NE+import qualified Data.Text as T+import TestsUtils.ApproxEq+import TestsUtils.Generators+import TestsUtils.Import++propJSON ::+ forall a.+ ( Arbitrary a,+ ToJSON a,+ FromJSON a,+ Show a,+ Eq a,+ Typeable a+ ) =>+ Proxy a ->+ Spec+propJSON _ = prop testName $ \(a :: a) ->+ let jsonStr = "via " <> BL8.unpack (encode a)+ in counterexample+ jsonStr+ ( parseEither parseJSON (toJSON a)+ === Right a+ )+ where+ testName = show ty <> " FromJSON/ToJSON roundtrips"+ ty = typeOf (undefined :: a)++propApproxJSON ::+ forall a.+ ( Arbitrary a,+ ToJSON a,+ FromJSON a,+ Show a,+ ApproxEq a,+ Typeable a+ ) =>+ Proxy a ->+ Spec+propApproxJSON _ = prop testName $ \(a :: a) ->+ let jsonStr = "via " <> BL8.unpack (encode a)+ in counterexample+ jsonStr+ ( parseEither parseJSON (toJSON a)+ ==~ Right a+ )+ where+ testName = show ty <> " FromJSON/ToJSON roundtrips"+ ty = typeOf (undefined :: a)++spec :: Spec+spec = do+ describe "ToJSON RegexpFlags" $ do+ it "generates the correct JSON for AllRegexpFlags" $+ toJSON AllRegexpFlags `shouldBe` String "ALL"++ it "generates the correct JSON for NoRegexpFlags" $+ toJSON NoRegexpFlags `shouldBe` String "NONE"++ it "generates the correct JSON for SomeRegexpFlags" $+ let flags =+ AnyString+ :| [ Automaton,+ Complement,+ Empty,+ Intersection,+ Interval+ ]+ in toJSON (SomeRegexpFlags flags) `shouldBe` String "ANYSTRING|AUTOMATON|COMPLEMENT|EMPTY|INTERSECTION|INTERVAL"++ prop "removes duplicates from flags" $ \(flags :: RegexpFlags) ->+ let String str = toJSON flags+ flagStrs = T.splitOn "|" str+ in noDuplicates flagStrs++ describe "Exact isomorphism JSON instances" $ do+ propJSON (Proxy :: Proxy IndexName)+ propJSON (Proxy :: Proxy DocId)+ propJSON (Proxy :: Proxy IndexAliasRouting)+ propJSON (Proxy :: Proxy RoutingValue)+ propJSON (Proxy :: Proxy ShardCount)+ propJSON (Proxy :: Proxy ReplicaCount)+ propJSON (Proxy :: Proxy TemplateName)+ propJSON (Proxy :: Proxy IndexPattern)+ propJSON (Proxy :: Proxy QueryString)+ propJSON (Proxy :: Proxy FieldName)+ propJSON (Proxy :: Proxy Script)+ propJSON (Proxy :: Proxy ScriptLanguage)+ propJSON (Proxy :: Proxy ScriptParams)+ propJSON (Proxy :: Proxy CacheName)+ propJSON (Proxy :: Proxy CacheKey)+ propJSON (Proxy :: Proxy Existence)+ propJSON (Proxy :: Proxy CutoffFrequency)+ propJSON (Proxy :: Proxy Analyzer)+ propJSON (Proxy :: Proxy MaxExpansions)+ propJSON (Proxy :: Proxy Lenient)+ propJSON (Proxy :: Proxy Tiebreaker)+ propJSON (Proxy :: Proxy Boost)+ propJSON (Proxy :: Proxy BoostTerms)+ propJSON (Proxy :: Proxy MinimumMatch)+ propJSON (Proxy :: Proxy DisableCoord)+ propJSON (Proxy :: Proxy IgnoreTermFrequency)+ propJSON (Proxy :: Proxy MinimumTermFrequency)+ propJSON (Proxy :: Proxy MaxQueryTerms)+ propJSON (Proxy :: Proxy Fuzziness)+ propJSON (Proxy :: Proxy PrefixLength)+ propJSON (Proxy :: Proxy RelationName)+ propJSON (Proxy :: Proxy PercentMatch)+ propJSON (Proxy :: Proxy StopWord)+ propJSON (Proxy :: Proxy QueryPath)+ propJSON (Proxy :: Proxy AllowLeadingWildcard)+ propJSON (Proxy :: Proxy LowercaseExpanded)+ propJSON (Proxy :: Proxy EnablePositionIncrements)+ propJSON (Proxy :: Proxy AnalyzeWildcard)+ propJSON (Proxy :: Proxy GeneratePhraseQueries)+ propJSON (Proxy :: Proxy Locale)+ propJSON (Proxy :: Proxy MaxWordLength)+ propJSON (Proxy :: Proxy MinWordLength)+ propJSON (Proxy :: Proxy PhraseSlop)+ propJSON (Proxy :: Proxy MinDocFrequency)+ propJSON (Proxy :: Proxy MaxDocFrequency)+ propJSON (Proxy :: Proxy Filter)+ propJSON (Proxy :: Proxy Query)+ propJSON (Proxy :: Proxy SimpleQueryStringQuery)+ propJSON (Proxy :: Proxy FieldOrFields)+ propJSON (Proxy :: Proxy SimpleQueryFlag)+ propJSON (Proxy :: Proxy RegexpQuery)+ propJSON (Proxy :: Proxy QueryStringQuery)+ propJSON (Proxy :: Proxy RangeQuery)+ propJSON (Proxy :: Proxy PrefixQuery)+ propJSON (Proxy :: Proxy NestedQuery)+ propJSON (Proxy :: Proxy MoreLikeThisFieldQuery)+ propJSON (Proxy :: Proxy MoreLikeThisQuery)+ propJSON (Proxy :: Proxy IndicesQuery)+ propJSON (Proxy :: Proxy IgnoreUnmapped)+ propJSON (Proxy :: Proxy MinChildren)+ propJSON (Proxy :: Proxy MaxChildren)+ propJSON (Proxy :: Proxy AggregateParentScore)+ propJSON (Proxy :: Proxy HasParentQuery)+ propJSON (Proxy :: Proxy HasChildQuery)+ propJSON (Proxy :: Proxy FuzzyQuery)+ propJSON (Proxy :: Proxy FuzzyLikeFieldQuery)+ propJSON (Proxy :: Proxy FuzzyLikeThisQuery)+ propJSON (Proxy :: Proxy FunctionScoreQuery)+ propJSON (Proxy :: Proxy BoostMode)+ propJSON (Proxy :: Proxy ScoreMode)+ propJSON (Proxy :: Proxy ComponentFunctionScoreFunction)+ propJSON (Proxy :: Proxy FieldValueFactor)+ propJSON (Proxy :: Proxy FactorModifier)+ propJSON (Proxy :: Proxy DisMaxQuery)+ propJSON (Proxy :: Proxy CommonTermsQuery)+ propJSON (Proxy :: Proxy CommonMinimumMatch)+ propJSON (Proxy :: Proxy BoostingQuery)+ propJSON (Proxy :: Proxy BoolQuery)+ propJSON (Proxy :: Proxy MatchQuery)+ propJSON (Proxy :: Proxy MultiMatchQueryType)+ propJSON (Proxy :: Proxy BooleanOperator)+ propJSON (Proxy :: Proxy ZeroTermsQuery)+ propJSON (Proxy :: Proxy MatchQueryType)+ propJSON (Proxy :: Proxy AliasRouting)+ propJSON (Proxy :: Proxy IndexAliasCreate)+ propJSON (Proxy :: Proxy SearchAliasRouting)+ propJSON (Proxy :: Proxy ScoreType)+ propJSON (Proxy :: Proxy Distance)+ propJSON (Proxy :: Proxy DistanceUnit)+ propJSON (Proxy :: Proxy DistanceType)+ propJSON (Proxy :: Proxy OptimizeBbox)+ propJSON (Proxy :: Proxy GeoBoundingBoxConstraint)+ propJSON (Proxy :: Proxy GeoFilterType)+ propJSON (Proxy :: Proxy GeoBoundingBox)+ propJSON (Proxy :: Proxy LatLon)+ propJSON (Proxy :: Proxy RangeExecution)+ prop "RegexpFlags FromJSON/ToJSON roundtrips, removing dups " $ \rfs ->+ let expected = case rfs of+ SomeRegexpFlags fs -> SomeRegexpFlags (NE.fromList (L.nub (NE.toList fs)))+ x -> x+ in parseEither parseJSON (toJSON rfs) === Right expected+ propJSON (Proxy :: Proxy BoolMatch)+ propJSON (Proxy :: Proxy Term)+ propJSON (Proxy :: Proxy MultiMatchQuery)+ -- propJSON (Proxy :: Proxy IndexSettings)+ propJSON (Proxy :: Proxy CompoundFormat)+ propJSON (Proxy :: Proxy Suggest)+ propJSON (Proxy :: Proxy DirectGenerators)+ propJSON (Proxy :: Proxy DirectGeneratorSuggestModeTypes)++ describe "Approximate isomorphism JSON instances" $ do+ propApproxJSON (Proxy :: Proxy UpdatableIndexSetting')+ propApproxJSON (Proxy :: Proxy ReplicaCount)+ propApproxJSON (Proxy :: Proxy ReplicaBounds)+ propApproxJSON (Proxy :: Proxy Bytes)+ propApproxJSON (Proxy :: Proxy AllocationPolicy)+ propApproxJSON (Proxy :: Proxy InitialShardCount)+ propApproxJSON (Proxy :: Proxy FSType)
+ tests/Test/NodesSpec.hs view
@@ -0,0 +1,27 @@+{-# LANGUAGE RecordWildCards #-}++module Test.NodesSpec (spec) where++import TestsUtils.Common+import TestsUtils.Import+import Prelude++spec :: Spec+spec = do+ describe "getNodesInfo" $+ it "fetches the responding node when LocalNode is used" $+ withTestEnv $ do+ NodesInfo {..} <- performBHRequest $ getNodesInfo LocalNode+ -- This is really just a smoke test for response+ -- parsing. Node info is so variable, there's not much I can+ -- assert here.+ liftIO $ length nodesInfo `shouldBe` 1++ describe "getNodesStats" $+ it "fetches the responding node when LocalNode is used" $+ withTestEnv $ do+ NodesStats {..} <- performBHRequest $ getNodesStats LocalNode+ -- This is really just a smoke test for response+ -- parsing. Node stats is so variable, there's not much I can+ -- assert here.+ liftIO $ length nodesStats `shouldBe` 1
+ tests/Test/PointInTimeSpec.hs view
@@ -0,0 +1,98 @@+module Test.PointInTimeSpec (spec) where++import qualified Data.Text as Text+import qualified Database.Bloodhound.OpenSearch2.Client as ClientOS2+import TestsUtils.Common+import TestsUtils.Import+import Prelude++spec :: Spec+spec = do+ describe "Point in time (PIT) API (ElasticSearch 7)" $ do+ it' <- runIO esOnlyIT+ it' "returns a single document using the point in time (PIT) API" $+ withTestEnv $ do+ _ <- insertData+ _ <- insertOther+ let search =+ ( mkSearch+ (Just $ MatchAllQuery Nothing)+ Nothing+ )+ { size = Size 1+ }+ regular_search <- searchTweet search+ pit_search' <- pitSearch testIndex search :: BH IO [Hit Tweet]+ let pit_search = map hitSource pit_search'+ liftIO $+ regular_search `shouldBe` Right exampleTweet -- Check that the size restriction is being honored+ liftIO $+ pit_search `shouldMatchList` [Just exampleTweet]+ it' "returns many documents using the point in time (PIT) API" $+ withTestEnv $ do+ resetIndex+ let ids = [1 .. 1000]+ let docs = map exampleTweetWithAge ids+ let docIds = map (Text.pack . show) ids+ mapM_ (uncurry insertTweetWithDocId) (docs `zip` docIds)+ let sort = mkSort (FieldName "postDate") Ascending+ let search =+ ( mkSearch+ (Just $ MatchAllQuery Nothing)+ Nothing+ )+ { sortBody = Just [DefaultSortSpec sort]+ }+ scan_search' <- scanSearch testIndex search :: BH IO [Hit Tweet]+ let scan_search = map hitSource scan_search'+ pit_search' <- pitSearch testIndex search :: BH IO [Hit Tweet]+ let pit_search = map hitSource pit_search'+ let expectedHits = map Just docs+ liftIO $+ scan_search `shouldMatchList` expectedHits+ liftIO $+ pit_search `shouldMatchList` expectedHits+ xdescribe "Point in time (PIT) API (OpenSearch 2)" $ do+ it' <- runIO os2OnlyIT+ it' "returns a single document using the point in time (PIT) API" $+ withTestEnv $ do+ _ <- insertData+ _ <- insertOther+ let search =+ ( mkSearch+ (Just $ MatchAllQuery Nothing)+ Nothing+ )+ { size = Size 1+ }+ regular_search <- searchTweet search+ pit_search' <- ClientOS2.pitSearch testIndex search :: BH IO [Hit Tweet]+ let pit_search = map hitSource pit_search'+ liftIO $+ regular_search `shouldBe` Right exampleTweet -- Check that the size restriction is being honored+ liftIO $+ pit_search `shouldMatchList` [Just exampleTweet]+ it' "returns many documents using the point in time (PIT) API" $+ withTestEnv $ do+ resetIndex+ let ids = [1 .. 1000]+ let docs = map exampleTweetWithAge ids+ let docIds = map (Text.pack . show) ids+ mapM_ (uncurry insertTweetWithDocId) (docs `zip` docIds)+ let sort = mkSort (FieldName "postDate") Ascending+ let search =+ ( mkSearch+ (Just $ MatchAllQuery Nothing)+ Nothing+ )+ { sortBody = Just [DefaultSortSpec sort]+ }+ scan_search' <- scanSearch testIndex search :: BH IO [Hit Tweet]+ let scan_search = map hitSource scan_search'+ pit_search' <- ClientOS2.pitSearch testIndex search :: BH IO [Hit Tweet]+ let pit_search = map hitSource pit_search'+ let expectedHits = map Just docs+ liftIO $+ scan_search `shouldMatchList` expectedHits+ liftIO $+ pit_search `shouldMatchList` expectedHits
− tests/Test/Query.hs
@@ -1,176 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}--module Test.Query where--import qualified Data.Aeson.KeyMap as X-import Test.Common-import Test.Import--spec :: Spec-spec =- describe "query API" $ do- it "returns document for term query and identity filter" $- withTestEnv $ do- _ <- insertData- let query = TermQuery (Term "user" "bitemyapp") Nothing- let filter' = Filter $ MatchAllQuery Nothing- let search = mkSearch (Just query) (Just filter')- myTweet <- searchTweet search- liftIO $- myTweet `shouldBe` Right exampleTweet-- it "handles constant score queries" $- withTestEnv $ do- _ <- insertData- let query = TermsQuery "user" ("bitemyapp" :| [])- let cfQuery = ConstantScoreQuery query (Boost 1.0)- let filter' = Filter $ MatchAllQuery Nothing- let search = mkSearch (Just cfQuery) (Just filter')- myTweet <- searchTweet search- liftIO $- myTweet `shouldBe` Right exampleTweet-- it "returns document for terms query and identity filter" $- withTestEnv $ do- _ <- insertData- let query = TermsQuery "user" ("bitemyapp" :| [])- let filter' = Filter $ MatchAllQuery Nothing- let search = mkSearch (Just query) (Just filter')- myTweet <- searchTweet search- liftIO $- myTweet `shouldBe` Right exampleTweet-- it "returns document for match query" $- withTestEnv $ do- _ <- insertData- let query = QueryMatchQuery $ mkMatchQuery (FieldName "user") (QueryString "bitemyapp")- let search = mkSearch (Just query) Nothing- myTweet <- searchTweet search- liftIO $- myTweet `shouldBe` Right exampleTweet-- it "returns document for match query with fuzziness" $- withTestEnv $ do- _ <- insertData- let match = mkMatchQuery (FieldName "user") (QueryString "bidemyapp")- let query = QueryMatchQuery $ match {matchQueryFuzziness = Just FuzzinessAuto}- let search = mkSearch (Just query) Nothing- myTweet <- searchTweet search- liftIO $- myTweet `shouldBe` Right exampleTweet-- it "returns document for multi-match query" $- withTestEnv $ do- _ <- insertData- let flds = [FieldName "user", FieldName "message"]- let query = QueryMultiMatchQuery $ mkMultiMatchQuery flds (QueryString "bitemyapp")- let search = mkSearch (Just query) Nothing- myTweet <- searchTweet search- liftIO $- myTweet `shouldBe` Right exampleTweet-- it "returns document for multi-match query with a custom tiebreaker" $- withTestEnv $ do- _ <- insertData- let tiebreaker = Just $ Tiebreaker 0.3- flds = [FieldName "user", FieldName "message"]- multiQuery' = mkMultiMatchQuery flds (QueryString "bitemyapp")- query = QueryMultiMatchQuery $ multiQuery' {multiMatchQueryTiebreaker = tiebreaker}- search = mkSearch (Just query) Nothing- myTweet <- searchTweet search- liftIO $- myTweet `shouldBe` Right exampleTweet-- it "returns document for bool query" $- withTestEnv $ do- _ <- insertData- let innerQuery =- QueryMatchQuery $- mkMatchQuery (FieldName "user") (QueryString "bitemyapp")- let query =- QueryBoolQuery $- mkBoolQuery [innerQuery] [] [] []- let search = mkSearch (Just query) Nothing- myTweet <- searchTweet search- liftIO $- myTweet `shouldBe` Right exampleTweet-- it "returns document for boosting query" $- withTestEnv $ do- _ <- insertData- let posQuery = QueryMatchQuery $ mkMatchQuery (FieldName "user") (QueryString "bitemyapp")- let negQuery = QueryMatchQuery $ mkMatchQuery (FieldName "user") (QueryString "notmyapp")- let query = QueryBoostingQuery $ BoostingQuery posQuery negQuery (Boost 0.2)- let search = mkSearch (Just query) Nothing- myTweet <- searchTweet search- liftIO $- myTweet `shouldBe` Right exampleTweet-- it "returns document for common terms query" $- withTestEnv $ do- _ <- insertData- let query =- QueryCommonTermsQuery $- CommonTermsQuery- (FieldName "user")- (QueryString "bitemyapp")- (CutoffFrequency 0.0001)- Or- Or- Nothing- Nothing- Nothing- Nothing- let search = mkSearch (Just query) Nothing- myTweet <- searchTweet search- liftIO $- myTweet `shouldBe` Right exampleTweet-- it "returns document for template query" $- withTestEnv $ do- _ <- insertData- let query = SearchTemplateSource "{\"query\": { \"match\" : { \"{{my_field}}\" : \"{{my_value}}\" } } }"- templateParams =- TemplateQueryKeyValuePairs $- X.fromList- [ ("my_field", "user"),- ("my_value", "bitemyapp")- ]- search = mkSearchTemplate (Right query) templateParams- response <- parseEsResponse =<< searchByIndexTemplate testIndex search- let myTweet = grabFirst response- liftIO $ myTweet `shouldBe` Right exampleTweet-- it "can save, use, read and delete template queries" $- withTestEnv $ do- _ <- insertData- let query = SearchTemplateSource "{\"query\": { \"match\" : { \"{{my_field}}\" : \"{{my_value}}\" } } }"- templateParams =- TemplateQueryKeyValuePairs $- X.fromList- [ ("my_field", "user"),- ("my_value", "bitemyapp")- ]- tid = SearchTemplateId "myTemplate"- search = mkSearchTemplate (Left tid) templateParams- _ <- storeSearchTemplate tid query- r1 <- getSearchTemplate tid- let t1 = eitherDecodeResponse r1 :: Either String GetTemplateScript- liftIO $ t1 `shouldBe` Right (GetTemplateScript {getTemplateScriptLang = Just "mustache", getTemplateScriptSource = Just (SearchTemplateSource "{\"query\": { \"match\" : { \"{{my_field}}\" : \"{{my_value}}\" } } }"), getTemplateScriptOptions = Nothing, getTemplateScriptId = "myTemplate", getTemplateScriptFound = True})- response <- parseEsResponse =<< searchByIndexTemplate testIndex search- _ <- deleteSearchTemplate tid- r2 <- getSearchTemplate tid- let myTweet = grabFirst response- t2 = eitherDecodeResponse r2 :: Either String GetTemplateScript- liftIO $ do- t2 `shouldBe` Right (GetTemplateScript {getTemplateScriptLang = Nothing, getTemplateScriptSource = Nothing, getTemplateScriptOptions = Nothing, getTemplateScriptId = "myTemplate", getTemplateScriptFound = False})- myTweet `shouldBe` Right exampleTweet-- it "returns document for wildcard query" $- withTestEnv $ do- _ <- insertData- let query = QueryWildcardQuery $ WildcardQuery (FieldName "user") "bitemy*" Nothing- let search = mkSearch (Just query) Nothing- myTweet <- searchTweet search- liftIO $- myTweet `shouldBe` Right exampleTweet
+ tests/Test/QuerySpec.hs view
@@ -0,0 +1,174 @@+{-# LANGUAGE OverloadedStrings #-}++module Test.QuerySpec where++import qualified Data.Aeson.KeyMap as X+import TestsUtils.Common+import TestsUtils.Import++spec :: Spec+spec =+ describe "query API" $ do+ it "returns document for term query and identity filter" $+ withTestEnv $ do+ _ <- insertData+ let query = TermQuery (Term "user" "bitemyapp") Nothing+ let filter' = Filter $ MatchAllQuery Nothing+ let search = mkSearch (Just query) (Just filter')+ myTweet <- searchTweet search+ liftIO $+ myTweet `shouldBe` Right exampleTweet++ it "handles constant score queries" $+ withTestEnv $ do+ _ <- insertData+ let query = TermsQuery "user" ("bitemyapp" :| [])+ let cfQuery = ConstantScoreQuery query (Boost 1.0)+ let filter' = Filter $ MatchAllQuery Nothing+ let search = mkSearch (Just cfQuery) (Just filter')+ myTweet <- searchTweet search+ liftIO $+ myTweet `shouldBe` Right exampleTweet++ it "returns document for terms query and identity filter" $+ withTestEnv $ do+ _ <- insertData+ let query = TermsQuery "user" ("bitemyapp" :| [])+ let filter' = Filter $ MatchAllQuery Nothing+ let search = mkSearch (Just query) (Just filter')+ myTweet <- searchTweet search+ liftIO $+ myTweet `shouldBe` Right exampleTweet++ it "returns document for match query" $+ withTestEnv $ do+ _ <- insertData+ let query = QueryMatchQuery $ mkMatchQuery (FieldName "user") (QueryString "bitemyapp")+ let search = mkSearch (Just query) Nothing+ myTweet <- searchTweet search+ liftIO $+ myTweet `shouldBe` Right exampleTweet++ it "returns document for match query with fuzziness" $+ withTestEnv $ do+ _ <- insertData+ let match = mkMatchQuery (FieldName "user") (QueryString "bidemyapp")+ let query = QueryMatchQuery $ match {matchQueryFuzziness = Just FuzzinessAuto}+ let search = mkSearch (Just query) Nothing+ myTweet <- searchTweet search+ liftIO $+ myTweet `shouldBe` Right exampleTweet++ it "returns document for multi-match query" $+ withTestEnv $ do+ _ <- insertData+ let flds = [FieldName "user", FieldName "message"]+ let query = QueryMultiMatchQuery $ mkMultiMatchQuery flds (QueryString "bitemyapp")+ let search = mkSearch (Just query) Nothing+ myTweet <- searchTweet search+ liftIO $+ myTweet `shouldBe` Right exampleTweet++ it "returns document for multi-match query with a custom tiebreaker" $+ withTestEnv $ do+ _ <- insertData+ let tiebreaker = Just $ Tiebreaker 0.3+ flds = [FieldName "user", FieldName "message"]+ multiQuery' = mkMultiMatchQuery flds (QueryString "bitemyapp")+ query = QueryMultiMatchQuery $ multiQuery' {multiMatchQueryTiebreaker = tiebreaker}+ search = mkSearch (Just query) Nothing+ myTweet <- searchTweet search+ liftIO $+ myTweet `shouldBe` Right exampleTweet++ it "returns document for bool query" $+ withTestEnv $ do+ _ <- insertData+ let innerQuery =+ QueryMatchQuery $+ mkMatchQuery (FieldName "user") (QueryString "bitemyapp")+ let query =+ QueryBoolQuery $+ mkBoolQuery [innerQuery] [] [] []+ let search = mkSearch (Just query) Nothing+ myTweet <- searchTweet search+ liftIO $+ myTweet `shouldBe` Right exampleTweet++ it "returns document for boosting query" $+ withTestEnv $ do+ _ <- insertData+ let posQuery = QueryMatchQuery $ mkMatchQuery (FieldName "user") (QueryString "bitemyapp")+ let negQuery = QueryMatchQuery $ mkMatchQuery (FieldName "user") (QueryString "notmyapp")+ let query = QueryBoostingQuery $ BoostingQuery posQuery negQuery (Boost 0.2)+ let search = mkSearch (Just query) Nothing+ myTweet <- searchTweet search+ liftIO $+ myTweet `shouldBe` Right exampleTweet++ it "returns document for common terms query" $+ withTestEnv $ do+ _ <- insertData+ let query =+ QueryCommonTermsQuery $+ CommonTermsQuery+ (FieldName "user")+ (QueryString "bitemyapp")+ (CutoffFrequency 0.0001)+ Or+ Or+ Nothing+ Nothing+ Nothing+ Nothing+ let search = mkSearch (Just query) Nothing+ myTweet <- searchTweet search+ liftIO $+ myTweet `shouldBe` Right exampleTweet++ it "returns document for template query" $+ withTestEnv $ do+ _ <- insertData+ let query = SearchTemplateSource "{\"query\": { \"match\" : { \"{{my_field}}\" : \"{{my_value}}\" } } }"+ templateParams =+ TemplateQueryKeyValuePairs $+ X.fromList+ [ ("my_field", "user"),+ ("my_value", "bitemyapp")+ ]+ search = mkSearchTemplate (Right query) templateParams+ response <- performBHRequest $ searchByIndexTemplate testIndex search+ let myTweet = grabFirst response+ liftIO $ myTweet `shouldBe` Right exampleTweet++ it "can save, use, read and delete template queries" $+ withTestEnv $ do+ _ <- insertData+ let query = SearchTemplateSource "{\"query\": { \"match\" : { \"{{my_field}}\" : \"{{my_value}}\" } } }"+ templateParams =+ TemplateQueryKeyValuePairs $+ X.fromList+ [ ("my_field", "user"),+ ("my_value", "bitemyapp")+ ]+ tid = SearchTemplateId "myTemplate"+ search = mkSearchTemplate (Left tid) templateParams+ _ <- performBHRequest $ storeSearchTemplate tid query+ t1 <- performBHRequest $ getSearchTemplate tid+ liftIO $ t1 `shouldBe` GetTemplateScript {getTemplateScriptLang = Just "mustache", getTemplateScriptSource = Just (SearchTemplateSource "{\"query\": { \"match\" : { \"{{my_field}}\" : \"{{my_value}}\" } } }"), getTemplateScriptOptions = Nothing, getTemplateScriptId = "myTemplate", getTemplateScriptFound = True}+ response <- performBHRequest $ searchByIndexTemplate testIndex search+ _ <- performBHRequest $ deleteSearchTemplate tid+ t2 <- performBHRequest $ getSearchTemplate tid+ let myTweet = grabFirst response+ liftIO $ do+ t2 `shouldBe` GetTemplateScript {getTemplateScriptLang = Nothing, getTemplateScriptSource = Nothing, getTemplateScriptOptions = Nothing, getTemplateScriptId = "myTemplate", getTemplateScriptFound = False}+ myTweet `shouldBe` Right exampleTweet++ it "returns document for wildcard query" $+ withTestEnv $ do+ _ <- insertData+ let query = QueryWildcardQuery $ WildcardQuery (FieldName "user") "bitemy*" Nothing+ let search = mkSearch (Just query) Nothing+ myTweet <- searchTweet search+ liftIO $+ myTweet `shouldBe` Right exampleTweet
+ tests/Test/ReindexSpec.hs view
@@ -0,0 +1,49 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE QuasiQuotes #-}+{-# LANGUAGE ScopedTypeVariables #-}++module Test.ReindexSpec (spec) where++import Control.Concurrent+import Numeric.Natural+import TestsUtils.Common+import TestsUtils.Import++spec :: Spec+spec =+ describe "Reindex" $ do+ it "reindexes synchronously" $ withTestEnv $ do+ _ <- insertData+ let newIndex = [qqIndexName|bloodhound-tests-twitter-index-1-reindexed|]+ _ <- tryPerformBHRequest $ deleteIndex newIndex+ _ <- performBHRequest $ createIndex (IndexSettings (ShardCount 1) (ReplicaCount 0) defaultIndexMappingsLimits) newIndex+ _ <- assertRight =<< tryPerformBHRequest (reindex $ mkReindexRequest testIndex newIndex)+ _ <- performBHRequest $ refreshIndex newIndex+ searchResult <- assertRight =<< tryPerformBHRequest (searchByIndex newIndex $ mkSearch Nothing Nothing)+ liftIO $+ map hitSource (hits (searchHits searchResult)) `shouldBe` [Just exampleTweet]++ it "reindexes asynchronously" $ withTestEnv $ do+ _ <- insertData+ let newIndex = [qqIndexName|bloodhound-tests-twitter-index-1-reindexed|]+ _ <- tryPerformBHRequest $ deleteIndex newIndex+ _ <- performBHRequest $ createIndex (IndexSettings (ShardCount 1) (ReplicaCount 0) defaultIndexMappingsLimits) newIndex+ taskNodeId <- assertRight =<< tryPerformBHRequest (reindexAsync $ mkReindexRequest testIndex newIndex)+ _ <- waitForTaskToComplete 10 taskNodeId+ _ <- performBHRequest $ refreshIndex newIndex+ searchResult <- assertRight =<< tryPerformBHRequest (searchByIndex newIndex (mkSearch Nothing Nothing))+ liftIO $+ (map hitSource (hits (searchHits searchResult))) `shouldBe` [Just exampleTweet]++assertRight :: (Show a, MonadFail m) => Either a b -> m b+assertRight (Left x) = fail $ "Expected Right, got Left: " <> show x+assertRight (Right x) = pure x++-- | The response is not used, but make sure we return it so it gets parsed+waitForTaskToComplete :: (MonadBH m, MonadFail m) => Natural -> TaskNodeId -> m (TaskResponse ReindexResponse)+waitForTaskToComplete 0 taskNodeId = fail $ "Timed out waiting for task to complete, taskNodeId = " <> show taskNodeId+waitForTaskToComplete n taskNodeId = do+ task <- assertRight =<< tryPerformBHRequest (getTask taskNodeId)+ if taskResponseCompleted task+ then return task+ else liftIO (threadDelay 100000) >> waitForTaskToComplete (n - 1) taskNodeId
+ tests/Test/ScanScrollSpec.hs view
@@ -0,0 +1,27 @@+module Test.ScanScrollSpec (spec) where++import TestsUtils.Common+import TestsUtils.Import+import Prelude++spec :: Spec+spec =+ describe "Scan & Scroll API" $+ it "returns documents using the scan&scroll API" $+ withTestEnv $ do+ _ <- insertData+ _ <- insertOther+ let search =+ ( mkSearch+ (Just $ MatchAllQuery Nothing)+ Nothing+ )+ { size = Size 1+ }+ regular_search <- searchTweet search+ scan_search' <- scanSearch testIndex search :: BH IO [Hit Tweet]+ let scan_search = map hitSource scan_search'+ liftIO $+ regular_search `shouldBe` Right exampleTweet -- Check that the size restrtiction is being honored+ liftIO $+ scan_search `shouldMatchList` [Just exampleTweet, Just otherTweet]
− tests/Test/Script.hs
@@ -1,37 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}--module Test.Script where--import qualified Data.Aeson.KeyMap as X-import qualified Data.Map as M-import Test.Common-import Test.Import--spec :: Spec-spec =- describe "Script" $- it "returns a transformed document based on the script field" $- withTestEnv $ do- _ <- insertData- let query = MatchAllQuery Nothing- sfv =- toJSON $- Script- (Just (ScriptLanguage "painless"))- (ScriptInline "doc['age'].value * 2")- Nothing- sf =- ScriptFields $- X.fromList [("test1", sfv)]- search' = mkSearch (Just query) Nothing- search = search' {scriptFields = Just sf}- resp <- searchByIndex testIndex search- parsed <- parseEsResponse resp :: BH IO (Either EsError (SearchResult Value))- case parsed of- Left e ->- liftIO $ expectationFailure ("Expected a script-transformed result but got: " <> show e)- Right sr -> do- let Just results =- hitFields (head (hits (searchHits sr)))- liftIO $- results `shouldBe` HitFields (M.fromList [("test1", [Number 20000.0])])
+ tests/Test/ScriptSpec.hs view
@@ -0,0 +1,33 @@+{-# LANGUAGE OverloadedStrings #-}+{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}++module Test.ScriptSpec (spec) where++import qualified Data.Aeson.KeyMap as X+import qualified Data.Map as M+import TestsUtils.Common+import TestsUtils.Import++spec :: Spec+spec =+ describe "Script" $+ it "returns a transformed document based on the script field" $+ withTestEnv $ do+ _ <- insertData+ let query = MatchAllQuery Nothing+ sfv =+ toJSON $+ Script+ (Just (ScriptLanguage "painless"))+ (ScriptInline "doc['age'].value * 2")+ Nothing+ sf =+ ScriptFields $+ X.fromList [("test1", sfv)]+ search' = mkSearch (Just query) Nothing+ search = search' {scriptFields = Just sf}+ sr <- performBHRequest $ searchByIndex @Value testIndex search+ let Just results =+ hitFields (head (hits (searchHits sr)))+ liftIO $+ results `shouldBe` HitFields (M.fromList [("test1", [Number 20000.0])])
+ tests/Test/SearchAfterSpec.hs view
@@ -0,0 +1,43 @@+module Test.SearchAfterSpec (spec) where++import Control.Concurrent (threadDelay)+import qualified Data.Aeson as Aeson+import TestsUtils.Common+import TestsUtils.Import+import Prelude++spec :: Spec+spec =+ describe "Search After API" $+ it "returns document for search after query" $ do+ majorVersion <- fetchMajorVersion+ withTestEnv $ do+ _ <- insertData+ _ <- insertOther+ let sortSpec = DefaultSortSpec $ mkSort (FieldName "user") Ascending+ searchAfterKey' = [Aeson.toJSON ("bitemyapp" :: String)]+ search =+ Search+ { queryBody = Nothing,+ filterBody = Nothing,+ sortBody = Just [sortSpec],+ aggBody = Nothing,+ highlight = Nothing,+ trackSortScores = False,+ from = From 0,+ size = Size 10,+ searchType = SearchTypeDfsQueryThenFetch,+ searchAfterKey = Just searchAfterKey',+ fields = Nothing,+ scriptFields = Nothing,+ source = Nothing,+ suggestBody = Nothing,+ pointInTime = Nothing+ }+ when (majorVersion == 2) $+ liftIO $+ threadDelay 50000+ result <- searchTweets search+ let myTweet = result >>= grabFirst+ liftIO $+ myTweet `shouldBe` Right otherTweet
− tests/Test/Snapshots.hs
@@ -1,215 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}--module Test.Snapshots (spec) where--import qualified Data.Aeson.KeyMap as X-import qualified Data.List as L-import qualified Data.Text as T-import qualified Data.Vector as V-import qualified Network.HTTP.Types.Method as NHTM-import qualified Network.URI as URI-import Test.Common-import Test.Generators ()-import Test.Import--spec :: Spec-spec = do- describe "FsSnapshotRepo" $- prop "SnapshotRepo laws" $ \fsr ->- fromGSnapshotRepo (toGSnapshotRepo fsr) === Right (fsr :: FsSnapshotRepo)-- describe "Snapshot repos" $ do- it "always parses all snapshot repos API" $- when' canSnapshot $- withTestEnv $ do- res <- getSnapshotRepos AllSnapshotRepos- liftIO $ case res of- Left e -> expectationFailure ("Expected a right but got Left " <> show e)- Right _ -> return ()-- it "finds an existing list of repos" $- when' canSnapshot $- withTestEnv $ do- let r1n = SnapshotRepoName "bloodhound-repo1"- let r2n = SnapshotRepoName "bloodhound-repo2"- withSnapshotRepo r1n $ \r1 ->- withSnapshotRepo r2n $ \r2 -> do- repos <- getSnapshotRepos (SnapshotRepoList (ExactRepo r1n :| [ExactRepo r2n]))- liftIO $ case repos of- Right xs -> do- let srt = L.sortOn gSnapshotRepoName- srt xs `shouldBe` srt [r1, r2]- Left e -> expectationFailure (show e)-- it "creates and updates with updateSnapshotRepo" $- when' canSnapshot $- withTestEnv $ do- let r1n = SnapshotRepoName "bloodhound-repo1"- withSnapshotRepo r1n $ \r1 -> do- let Just (String dir) = X.lookup "location" (gSnapshotRepoSettingsObject (gSnapshotRepoSettings r1))- let noCompression = FsSnapshotRepo r1n (T.unpack dir) False Nothing Nothing Nothing- resp <- updateSnapshotRepo defaultSnapshotRepoUpdateSettings noCompression- liftIO (validateStatus resp 200)- Right [roundtrippedNoCompression] <- getSnapshotRepos (SnapshotRepoList (ExactRepo r1n :| []))- liftIO (roundtrippedNoCompression `shouldBe` toGSnapshotRepo noCompression)-- -- verify came around in 1.4 it seems- it "can verify existing repos" $- when' canSnapshot $- withTestEnv $ do- let r1n = SnapshotRepoName "bloodhound-repo1"- withSnapshotRepo r1n $ \_ -> do- res <- verifySnapshotRepo r1n- liftIO $ case res of- Right (SnapshotVerification vs)- | null vs -> expectationFailure "Expected nonempty set of verifying nodes"- | otherwise -> return ()- Left e -> expectationFailure (show e)-- describe "Snapshots" $ do- it "always parses all snapshots API" $- when' canSnapshot $- withTestEnv $ do- let r1n = SnapshotRepoName "bloodhound-repo1"- withSnapshotRepo r1n $ \_ -> do- res <- getSnapshots r1n AllSnapshots- liftIO $ case res of- Left e -> expectationFailure ("Expected a right but got Left " <> show e)- Right _ -> return ()-- it "can parse a snapshot that it created" $- when' canSnapshot $- withTestEnv $ do- let r1n = SnapshotRepoName "bloodhound-repo1"- withSnapshotRepo r1n $ \_ -> do- let s1n = SnapshotName "example-snapshot"- withSnapshot r1n s1n $ do- res <- getSnapshots r1n (SnapshotList (ExactSnap s1n :| []))- liftIO $ case res of- Right [snap]- | snapInfoState snap == SnapshotSuccess- && snapInfoName snap == s1n ->- return ()- | otherwise -> expectationFailure (show snap)- Right [] -> expectationFailure "There were no snapshots"- Right snaps -> expectationFailure ("Expected 1 snapshot but got" <> show (length snaps))- Left e -> expectationFailure (show e)-- describe "Snapshot restore" $ do- it "can restore a snapshot that we create" $- when' canSnapshot $- withTestEnv $ do- let r1n = SnapshotRepoName "bloodhound-repo1"- withSnapshotRepo r1n $ \_ -> do- let s1n = SnapshotName "example-snapshot"- withSnapshot r1n s1n $ do- let settings = defaultSnapshotRestoreSettings {snapRestoreWaitForCompletion = True}- -- have to close an index to restore it- resp1 <- closeIndex testIndex- liftIO (validateStatus resp1 200)- resp2 <- restoreSnapshot r1n s1n settings- liftIO (validateStatus resp2 200)-- it "can restore and rename" $- when' canSnapshot $- withTestEnv $ do- let r1n = SnapshotRepoName "bloodhound-repo1"- withSnapshotRepo r1n $ \_ -> do- let s1n = SnapshotName "example-snapshot"- withSnapshot r1n s1n $ do- let pat = RestoreRenamePattern "bloodhound-tests-twitter-(\\d+)"- let replace = RRTLit "restored-" :| [RRSubWholeMatch]- let expectedIndex = IndexName "restored-bloodhound-tests-twitter-1"- let overrides = RestoreIndexSettings {restoreOverrideReplicas = Just (ReplicaCount 0)}- let settings =- defaultSnapshotRestoreSettings- { snapRestoreWaitForCompletion = True,- snapRestoreRenamePattern = Just pat,- snapRestoreRenameReplacement = Just replace,- snapRestoreIndexSettingsOverrides = Just overrides- }- -- have to close an index to restore it- let go = do- resp <- restoreSnapshot r1n s1n settings- liftIO (validateStatus resp 200)- exists <- indexExists expectedIndex- liftIO (exists `shouldBe` True)- go `finally` deleteIndex expectedIndex---- | Get configured repo paths for snapshotting. Note that by default--- this is not enabled and if we are over es 1.5, we won't be able to--- test snapshotting. Note that this can and should be part of the--- client functionality in a much less ad-hoc incarnation.-getRepoPaths :: IO [FilePath]-getRepoPaths = withTestEnv $ do- bhe <- getBHEnv- let Server s = bhServer bhe- let tUrl = s <> "/" <> "_nodes"- initReq <- parseRequest (URI.escapeURIString URI.isAllowedInURI (T.unpack tUrl))- let req = setRequestIgnoreStatus $ initReq {method = NHTM.methodGet}- Right (Object o) <- parseEsResponse . BHResponse =<< liftIO (httpLbs req (bhManager bhe))- return $- fromMaybe mempty $ do- Object nodes <- X.lookup "nodes" o- Object firstNode <- snd <$> headMay (X.toList nodes)- Object settings <- X.lookup "settings" firstNode- Object path <- X.lookup "path" settings- Array repo <- X.lookup "repo" path- return [T.unpack t | String t <- V.toList repo]---- | 1.5 and earlier don't care about repo paths-canSnapshot :: IO Bool-canSnapshot = do- repoPaths <- getRepoPaths- return (not (null repoPaths))--withSnapshotRepo ::- ( MonadMask m,- MonadBH m- ) =>- SnapshotRepoName ->- (GenericSnapshotRepo -> m a) ->- m a-withSnapshotRepo srn@(SnapshotRepoName n) f = do- repoPaths <- liftIO getRepoPaths- -- we'll use the first repo path if available, otherwise system temp- -- dir. Note that this will fail on ES > 1.6, so be sure you use- -- @when' canSnapshot@.- case repoPaths of- (firstRepoPath : _) -> withTempDirectory firstRepoPath (T.unpack n) $ \dir -> bracket (alloc dir) free f- [] -> withSystemTempDirectory (T.unpack n) $ \dir -> bracket (alloc dir) free f- where- alloc dir = do- liftIO (setFileMode dir mode)- let repo = FsSnapshotRepo srn "bloodhound-tests-backups" True Nothing Nothing Nothing- resp <- updateSnapshotRepo defaultSnapshotRepoUpdateSettings repo- liftIO (validateStatus resp 200)- return (toGSnapshotRepo repo)- mode = ownerModes `unionFileModes` groupModes `unionFileModes` otherModes- free GenericSnapshotRepo {..} = do- resp <- deleteSnapshotRepo gSnapshotRepoName- liftIO (validateStatus resp 200)--withSnapshot ::- ( MonadMask m,- MonadBH m- ) =>- SnapshotRepoName ->- SnapshotName ->- m a ->- m a-withSnapshot srn sn = bracket_ alloc free- where- alloc = do- resp <- createSnapshot srn sn createSettings- liftIO (validateStatus resp 200)- -- We'll make this synchronous for testing purposes- createSettings =- defaultSnapshotCreateSettings- { snapWaitForCompletion = True,- snapIndices = Just (IndexList (testIndex :| []))- -- We don't actually need to back up any data- }- free =- deleteSnapshot srn sn
+ tests/Test/SnapshotsSpec.hs view
@@ -0,0 +1,207 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE QuasiQuotes #-}+{-# LANGUAGE RecordWildCards #-}+{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}++module Test.SnapshotsSpec (spec) where++import qualified Data.Aeson.KeyMap as X+import qualified Data.List as L+import qualified Data.Text as T+import qualified Data.Vector as V+import qualified Network.HTTP.Types.Method as NHTM+import TestsUtils.Common+import TestsUtils.Generators ()+import TestsUtils.Import++spec :: Spec+spec = do+ describe "FsSnapshotRepo" $+ prop "SnapshotRepo laws" $ \fsr ->+ fromGSnapshotRepo (toGSnapshotRepo fsr) === Right (fsr :: FsSnapshotRepo)++ describe "Snapshot repos" $ do+ it "always parses all snapshot repos API" $+ when' canSnapshot $+ withTestEnv $ do+ res <- tryPerformBHRequest $ getSnapshotRepos AllSnapshotRepos+ liftIO $ case res of+ Left e -> expectationFailure ("Expected a right but got Left " <> show e)+ Right _ -> return ()++ it "finds an existing list of repos" $+ when' canSnapshot $+ withTestEnv $ do+ let r1n = SnapshotRepoName "bloodhound-repo1"+ let r2n = SnapshotRepoName "bloodhound-repo2"+ withSnapshotRepo r1n $ \r1 ->+ withSnapshotRepo r2n $ \r2 -> do+ repos <- performBHRequest $ getSnapshotRepos (SnapshotRepoList (ExactRepo r1n :| [ExactRepo r2n]))+ let srt = L.sortOn gSnapshotRepoName+ liftIO $ srt repos `shouldBe` srt [r1, r2]++ it "creates and updates with updateSnapshotRepo" $+ when' canSnapshot $+ withTestEnv $ do+ let r1n = SnapshotRepoName "bloodhound-repo1"+ withSnapshotRepo r1n $ \r1 -> do+ let Just (String dir) = X.lookup "location" (gSnapshotRepoSettingsObject (gSnapshotRepoSettings r1))+ let noCompression = FsSnapshotRepo r1n (T.unpack dir) False Nothing Nothing Nothing+ resp <- performBHRequest $ updateSnapshotRepo defaultSnapshotRepoUpdateSettings noCompression+ liftIO $ resp `shouldBe` Acknowledged True+ [roundtrippedNoCompression] <- performBHRequest $ getSnapshotRepos (SnapshotRepoList (ExactRepo r1n :| []))+ liftIO (roundtrippedNoCompression `shouldBe` toGSnapshotRepo noCompression)++ -- verify came around in 1.4 it seems+ it "can verify existing repos" $+ when' canSnapshot $+ withTestEnv $ do+ let r1n = SnapshotRepoName "bloodhound-repo1"+ withSnapshotRepo r1n $ \_ -> do+ res <- performBHRequest $ verifySnapshotRepo r1n+ liftIO $ case res of+ SnapshotVerification vs+ | null vs -> expectationFailure "Expected nonempty set of verifying nodes"+ | otherwise -> return ()++ describe "Snapshots" $ do+ it "always parses all snapshots API" $+ when' canSnapshot $+ withTestEnv $ do+ let r1n = SnapshotRepoName "bloodhound-repo1"+ withSnapshotRepo r1n $ \_ -> do+ res <- tryPerformBHRequest $ getSnapshots r1n AllSnapshots+ liftIO $ case res of+ Left e -> expectationFailure ("Expected a right but got Left " <> show e)+ Right _ -> return ()++ it "can parse a snapshot that it created" $+ when' canSnapshot $+ withTestEnv $ do+ let r1n = SnapshotRepoName "bloodhound-repo1"+ withSnapshotRepo r1n $ \_ -> do+ let s1n = SnapshotName "example-snapshot"+ withSnapshot r1n s1n $ do+ res <- performBHRequest $ getSnapshots r1n (SnapshotList (ExactSnap s1n :| []))+ liftIO $ case res of+ [snap]+ | snapInfoState snap == SnapshotSuccess+ && snapInfoName snap == s1n ->+ return ()+ | otherwise -> expectationFailure (show snap)+ [] -> expectationFailure "There were no snapshots"+ snaps -> expectationFailure ("Expected 1 snapshot but got" <> show (length snaps))++ describe "Snapshot restore" $ do+ it "can restore a snapshot that we create" $+ when' canSnapshot $+ withTestEnv $ do+ let r1n = SnapshotRepoName "bloodhound-repo1"+ withSnapshotRepo r1n $ \_ -> do+ let s1n = SnapshotName "example-snapshot"+ withSnapshot r1n s1n $ do+ let settings = defaultSnapshotRestoreSettings {snapRestoreWaitForCompletion = True}+ -- have to close an index to restore it+ resp1 <- performBHRequest $ closeIndex testIndex+ liftIO $ resp1 `shouldBe` Acknowledged True+ resp2 <- performBHRequest $ restoreSnapshot r1n s1n settings+ liftIO $ resp2 `shouldBe` Accepted True++ it "can restore and rename" $+ when' canSnapshot $+ withTestEnv $ do+ let r1n = SnapshotRepoName "bloodhound-repo1"+ withSnapshotRepo r1n $ \_ -> do+ let s1n = SnapshotName "example-snapshot"+ withSnapshot r1n s1n $ do+ let pat = RestoreRenamePattern "bloodhound-tests-twitter-(\\d+)"+ let replace = RRTLit "restored-" :| [RRSubWholeMatch]+ let expectedIndex = [qqIndexName|restored-bloodhound-tests-twitter-1|]+ let overrides = RestoreIndexSettings {restoreOverrideReplicas = Just (ReplicaCount 0)}+ let settings =+ defaultSnapshotRestoreSettings+ { snapRestoreWaitForCompletion = True,+ snapRestoreRenamePattern = Just pat,+ snapRestoreRenameReplacement = Just replace,+ snapRestoreIndexSettingsOverrides = Just overrides+ }+ -- have to close an index to restore it+ let go = do+ resp <- performBHRequest $ restoreSnapshot r1n s1n settings+ liftIO $ resp `shouldBe` Accepted True+ exists <- performBHRequest $ indexExists expectedIndex+ liftIO (exists `shouldBe` True)+ go `finally` performBHRequest (deleteIndex expectedIndex)++-- | Get configured repo paths for snapshotting. Note that by default+-- this is not enabled and if we are over es 1.5, we won't be able to+-- test snapshotting. Note that this can and should be part of the+-- client functionality in a much less ad-hoc incarnation.+getRepoPaths :: IO [FilePath]+getRepoPaths = withTestEnv $ do+ Object o <-+ performBHRequest $ mkSimpleRequest @StatusIndependant NHTM.methodGet $ mkEndpoint ["_nodes"]+ return $+ fromMaybe mempty $ do+ Object nodes <- X.lookup "nodes" o+ Object firstNode <- snd <$> headMay (X.toList nodes)+ Object settings <- X.lookup "settings" firstNode+ Object path <- X.lookup "path" settings+ Array repo <- X.lookup "repo" path+ return [T.unpack t | String t <- V.toList repo]++-- | 1.5 and earlier don't care about repo paths+canSnapshot :: IO Bool+canSnapshot = do+ repoPaths <- getRepoPaths+ return (not (null repoPaths))++withSnapshotRepo ::+ ( MonadMask m,+ MonadBH m+ ) =>+ SnapshotRepoName ->+ (GenericSnapshotRepo -> m a) ->+ m a+withSnapshotRepo srn@(SnapshotRepoName n) f = do+ repoPaths <- liftIO getRepoPaths+ -- we'll use the first repo path if available, otherwise system temp+ -- dir. Note that this will fail on ES > 1.6, so be sure you use+ -- @when' canSnapshot@.+ case repoPaths of+ (firstRepoPath : _) -> withTempDirectory firstRepoPath (T.unpack n) $ \dir -> bracket (alloc dir) free f+ [] -> withSystemTempDirectory (T.unpack n) $ \dir -> bracket (alloc dir) free f+ where+ alloc dir = do+ liftIO (setFileMode dir mode)+ let repo = FsSnapshotRepo srn "bloodhound-tests-backups" True Nothing Nothing Nothing+ resp <- performBHRequest $ updateSnapshotRepo defaultSnapshotRepoUpdateSettings repo+ liftIO $ resp `shouldBe` Acknowledged True+ return (toGSnapshotRepo repo)+ mode = ownerModes `unionFileModes` groupModes `unionFileModes` otherModes+ free GenericSnapshotRepo {..} = do+ resp <- performBHRequest $ deleteSnapshotRepo gSnapshotRepoName+ liftIO $ resp `shouldBe` Acknowledged True++withSnapshot ::+ ( MonadMask m,+ MonadBH m+ ) =>+ SnapshotRepoName ->+ SnapshotName ->+ m a ->+ m a+withSnapshot srn sn = bracket_ alloc free+ where+ alloc = do+ resp <- performBHRequest $ createSnapshot srn sn createSettings+ liftIO $ resp `shouldBe` Acknowledged True+ -- We'll make this synchronous for testing purposes+ createSettings =+ defaultSnapshotCreateSettings+ { snapWaitForCompletion = True,+ snapIndices = Just (IndexList (testIndex :| []))+ -- We don't actually need to back up any data+ }+ free =+ performBHRequest $ deleteSnapshot srn sn
− tests/Test/Sorting.hs
@@ -1,37 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}--module Test.Sorting where--import Test.Common-import Test.Import--spec :: Spec-spec =- describe "sorting" $- it "returns documents in the right order" $- withTestEnv $ do- _ <- insertData- _ <- insertOther- let sortSpec = DefaultSortSpec $ mkSort (FieldName "age") Ascending- let search =- Search- { queryBody = Nothing,- filterBody = Nothing,- sortBody = Just [sortSpec],- aggBody = Nothing,- highlight = Nothing,- trackSortScores = False,- from = From 0,- size = Size 10,- searchType = SearchTypeDfsQueryThenFetch,- searchAfterKey = Nothing,- fields = Nothing,- scriptFields = Nothing,- source = Nothing,- suggestBody = Nothing,- pointInTime = Nothing- }- result <- searchTweets search- let myTweet = grabFirst result- liftIO $- myTweet `shouldBe` Right otherTweet
+ tests/Test/SortingSpec.hs view
@@ -0,0 +1,37 @@+{-# LANGUAGE OverloadedStrings #-}++module Test.SortingSpec (spec) where++import TestsUtils.Common+import TestsUtils.Import++spec :: Spec+spec =+ describe "sorting" $+ it "returns documents in the right order" $+ withTestEnv $ do+ _ <- insertData+ _ <- insertOther+ let sortSpec = DefaultSortSpec $ mkSort (FieldName "age") Ascending+ let search =+ Search+ { queryBody = Nothing,+ filterBody = Nothing,+ sortBody = Just [sortSpec],+ aggBody = Nothing,+ highlight = Nothing,+ trackSortScores = False,+ from = From 0,+ size = Size 10,+ searchType = SearchTypeDfsQueryThenFetch,+ searchAfterKey = Nothing,+ fields = Nothing,+ scriptFields = Nothing,+ source = Nothing,+ suggestBody = Nothing,+ pointInTime = Nothing+ }+ result <- searchTweets search+ let myTweet = result >>= grabFirst+ liftIO $+ myTweet `shouldBe` Right otherTweet
− tests/Test/SourceFiltering.hs
@@ -1,43 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}--module Test.SourceFiltering where--import qualified Data.Aeson.KeyMap as X-import Test.Common-import Test.Import--spec :: Spec-spec =- describe "Source filtering" $ do- it "doesn't include source when sources are disabled" $- withTestEnv $- searchExpectSource- NoSource- (Left (EsError (Just 500) "Source was missing"))-- it "includes a source" $- withTestEnv $- searchExpectSource- (SourcePatterns (PopPattern (Pattern "message")))- (Right (Object (X.fromList [("message", String "Use haskell!")])))-- it "includes sources" $- withTestEnv $- searchExpectSource- (SourcePatterns (PopPatterns [Pattern "user", Pattern "message"]))- (Right (Object (X.fromList [("user", String "bitemyapp"), ("message", String "Use haskell!")])))-- it "includes source patterns" $- withTestEnv $- searchExpectSource- (SourcePatterns (PopPattern (Pattern "*ge")))- (Right (Object (X.fromList [("age", Number 10000), ("message", String "Use haskell!")])))-- it "excludes source patterns" $- withTestEnv $- searchExpectSource- ( SourceIncludeExclude- (Include [])- (Exclude [Pattern "l*", Pattern "*ge", Pattern "postDate", Pattern "extra"])- )- (Right (Object (X.fromList [("user", String "bitemyapp")])))
+ tests/Test/SourceFilteringSpec.hs view
@@ -0,0 +1,43 @@+{-# LANGUAGE OverloadedStrings #-}++module Test.SourceFilteringSpec (spec) where++import qualified Data.Aeson.KeyMap as X+import TestsUtils.Common+import TestsUtils.Import++spec :: Spec+spec =+ describe "Source filtering" $ do+ it "doesn't include source when sources are disabled" $+ withTestEnv $+ searchExpectSource+ NoSource+ (Left (EsError Nothing "Source was missing"))++ it "includes a source" $+ withTestEnv $+ searchExpectSource+ (SourcePatterns (PopPattern (Pattern "message")))+ (Right (Object (X.fromList [("message", String "Use haskell!")])))++ it "includes sources" $+ withTestEnv $+ searchExpectSource+ (SourcePatterns (PopPatterns [Pattern "user", Pattern "message"]))+ (Right (Object (X.fromList [("user", String "bitemyapp"), ("message", String "Use haskell!")])))++ it "includes source patterns" $+ withTestEnv $+ searchExpectSource+ (SourcePatterns (PopPattern (Pattern "*ge")))+ (Right (Object (X.fromList [("age", Number 10000), ("message", String "Use haskell!")])))++ it "excludes source patterns" $+ withTestEnv $+ searchExpectSource+ ( SourceIncludeExclude+ (Include [])+ (Exclude [Pattern "l*", Pattern "*ge", Pattern "postDate", Pattern "extra"])+ )+ (Right (Object (X.fromList [("user", String "bitemyapp")])))
− tests/Test/Suggest.hs
@@ -1,24 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}--module Test.Suggest where--import Test.Common-import Test.Import--spec :: Spec-spec =- describe "Suggest" $- it "returns a search suggestion using the phrase suggester" $- withTestEnv $ do- _ <- insertData- let query = QueryMatchNoneQuery- phraseSuggester = mkPhraseSuggester (FieldName "message")- namedSuggester = Suggest "Use haskel" "suggest_name" (SuggestTypePhraseSuggester phraseSuggester)- search' = mkSearch (Just query) Nothing- search = search' {suggestBody = Just namedSuggester}- expectedText = Just "use haskell"- resp <- searchByIndex testIndex search- parsed <- parseEsResponse resp :: BH IO (Either EsError (SearchResult Tweet))- case parsed of- Left e -> liftIO $ expectationFailure ("Expected an search suggestion but got " <> show e)- Right sr -> liftIO $ (suggestOptionsText . head . suggestResponseOptions . head . nsrResponses <$> suggest sr) `shouldBe` expectedText
+ tests/Test/SuggestSpec.hs view
@@ -0,0 +1,21 @@+{-# LANGUAGE OverloadedStrings #-}++module Test.SuggestSpec (spec) where++import TestsUtils.Common+import TestsUtils.Import++spec :: Spec+spec =+ describe "Suggest" $+ it "returns a search suggestion using the phrase suggester" $+ withTestEnv $ do+ _ <- insertData+ let query = QueryMatchNoneQuery+ phraseSuggester = mkPhraseSuggester (FieldName "message")+ namedSuggester = Suggest "Use haskel" "suggest_name" (SuggestTypePhraseSuggester phraseSuggester)+ search' = mkSearch (Just query) Nothing+ search = search' {suggestBody = Just namedSuggester}+ expectedText = Just "use haskell"+ sr <- performBHRequest $ searchByIndex @Tweet testIndex search+ liftIO $ (suggestOptionsText . head . suggestResponseOptions . head . nsrResponses <$> suggest sr) `shouldBe` expectedText
− tests/Test/Templates.hs
@@ -1,30 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}--module Test.Templates where--import Test.Common-import Test.Import--spec :: Spec-spec =- describe "template API" $ do- it "can create a template" $- withTestEnv $ do- let idxTpl = IndexTemplate [IndexPattern "tweet-*"] (Just (IndexSettings (ShardCount 1) (ReplicaCount 1) defaultIndexMappingsLimits)) (toJSON TweetMapping)- resp <- putTemplate idxTpl (TemplateName "tweet-tpl")- liftIO $ validateStatus resp 200-- it "can detect if a template exists" $- withTestEnv $ do- exists <- templateExists (TemplateName "tweet-tpl")- liftIO $ exists `shouldBe` True-- it "can delete a template" $- withTestEnv $ do- resp <- deleteTemplate (TemplateName "tweet-tpl")- liftIO $ validateStatus resp 200-- it "can detect if a template doesn't exist" $- withTestEnv $ do- exists <- templateExists (TemplateName "tweet-tpl")- liftIO $ exists `shouldBe` False
+ tests/Test/TemplatesSpec.hs view
@@ -0,0 +1,30 @@+{-# LANGUAGE OverloadedStrings #-}++module Test.TemplatesSpec (spec) where++import TestsUtils.Common+import TestsUtils.Import++spec :: Spec+spec =+ describe "template API" $ do+ it "can create a template" $+ withTestEnv $ do+ let idxTpl = IndexTemplate [IndexPattern "tweet-*"] (Just (IndexSettings (ShardCount 1) (ReplicaCount 1) defaultIndexMappingsLimits)) (toJSON TweetMapping)+ resp <- performBHRequest $ putTemplate idxTpl (TemplateName "tweet-tpl")+ liftIO $ resp `shouldBe` Acknowledged True++ it "can detect if a template exists" $+ withTestEnv $ do+ exists <- performBHRequest $ templateExists (TemplateName "tweet-tpl")+ liftIO $ exists `shouldBe` True++ it "can delete a template" $+ withTestEnv $ do+ resp <- performBHRequest $ deleteTemplate (TemplateName "tweet-tpl")+ liftIO $ resp `shouldBe` Acknowledged True++ it "can detect if a template doesn't exist" $+ withTestEnv $ do+ exists <- performBHRequest $ templateExists (TemplateName "tweet-tpl")+ liftIO $ exists `shouldBe` False
+ tests/Test/TypesSpec.hs view
@@ -0,0 +1,61 @@+{-# LANGUAGE QuasiQuotes #-}++module Test.TypesSpec (spec) where++import qualified Data.Text as T+import TestsUtils.Common+import TestsUtils.Generators ()+import TestsUtils.Import+import Prelude++spec :: Spec+spec = do+ describe "error parsing" $+ it "can parse EsErrors for >= 2.0" $+ withTestEnv $ do+ errorResp <- tryPerformBHRequest $ verifySnapshotRepo (SnapshotRepoName "bogus")+ liftIO (errorResp `shouldBe` Left (EsError (Just 404) "[bogus] missing"))++ describe "Monoid (SearchHits a)" $+ prop "abides the monoid laws" $+ eq $+ prop_Monoid (T :: T (SearchHits ()))++ describe "mkDocVersion" $+ prop "can never construct an out of range docVersion" $ \i ->+ let res = mkDocVersion i+ in case res of+ Nothing -> property True+ Just dv ->+ (dv >= minBound)+ .&&. (dv <= maxBound)+ .&&. docVersionNumber dv+ === i++ describe "Enum DocVersion" $+ it "follows the laws of Enum, Bounded" $ do+ evaluate (succ maxBound :: DocVersion) `shouldThrow` anyErrorCall+ evaluate (pred minBound :: DocVersion) `shouldThrow` anyErrorCall+ evaluate (toEnum 0 :: DocVersion) `shouldThrow` anyErrorCall+ evaluate (toEnum 9200000000000000001 :: DocVersion) `shouldThrow` anyErrorCall+ enumFrom (pred maxBound :: DocVersion) `shouldBe` [pred maxBound, maxBound]+ enumFrom (pred maxBound :: DocVersion) `shouldBe` [pred maxBound, maxBound]+ enumFromThen minBound (pred maxBound :: DocVersion) `shouldBe` [minBound, pred maxBound]++ describe "IndexName" $ do+ it "Empty should fail" $+ mkIndexName "" `shouldBe` Left "Is empty"+ it "Long should fail" $+ mkIndexName (T.replicate 256 "x") `shouldBe` Left "Is longer than 255 bytes"+ it "Upper case should fail" $+ mkIndexName "azerTY" `shouldBe` Left "Contains uppercase letter(s)"+ it "Special symbols should fail" $+ mkIndexName "hello#world" `shouldBe` Left "Includes [\\/*?\"<>| ,#:]"+ it "Not starting with a letter should fail" $+ mkIndexName "-test" `shouldBe` Left "Starts with [-_+.]"+ it "'.' should fail" $+ mkIndexName "." `shouldBe` Left "Is (.|..)"+ it "'..' should fail" $+ mkIndexName ".." `shouldBe` Left "Is (.|..)"+ it "Regular should work" $+ mkIndexName "hello-world_42" `shouldBe` Right [qqIndexName|hello-world_42|]
+ tests/TestsUtils/ApproxEq.hs view
@@ -0,0 +1,75 @@+{-# LANGUAGE DefaultSignatures #-}+{-# LANGUAGE OverloadedStrings #-}++module TestsUtils.ApproxEq where++import qualified Data.List.NonEmpty as NE+import Database.Bloodhound+import TestsUtils.Import++-- | Typeclass for "equal where it matters". Use this to specify+-- less-strict equivalence for things such as lists that can wind up+-- in an unpredictable order+class ApproxEq a where+ (=~) :: a -> a -> Bool++ showApproxEq :: a -> String+ default showApproxEq :: (Show a) => a -> String+ showApproxEq = show++(==~) :: (ApproxEq a) => a -> a -> Property+a ==~ b = counterexample (showApproxEq a ++ " !=~ " ++ showApproxEq b) (a =~ b)++instance ApproxEq NominalDiffTime where (=~) = (==)++instance ApproxEq Bool where (=~) = (==)++instance ApproxEq Int where (=~) = (==)++instance (Eq a, Show a) => ApproxEq (Maybe a) where (=~) = (==)++instance ApproxEq Char where+ (=~) = (==)++instance ApproxEq NodeAttrFilter where (=~) = (==)++instance ApproxEq NodeAttrName where (=~) = (==)++instance (Eq a, Show a) => ApproxEq (NonEmpty a) where (=~) = (==)++instance (ApproxEq l, Show l, ApproxEq r, Show r) => ApproxEq (Either l r) where+ Left a =~ Left b = a =~ b+ Right a =~ Right b = a =~ b+ _ =~ _ = False+ showApproxEq (Left x) = "Left " <> showApproxEq x+ showApproxEq (Right x) = "Right " <> showApproxEq x++instance (ApproxEq a, Show a) => ApproxEq [a] where+ as =~ bs = and (zipWith (=~) as bs)++instance ApproxEq ReplicaCount where (=~) = (==)++instance ApproxEq ReplicaBounds where (=~) = (==)++instance ApproxEq Bytes where (=~) = (==)++instance ApproxEq AllocationPolicy where (=~) = (==)++instance ApproxEq InitialShardCount where (=~) = (==)++instance ApproxEq FSType where (=~) = (==)++-- | Due to the way nodeattrfilters get serialized here, they may come+-- out in a different order, but they are morally equivalent+instance ApproxEq UpdatableIndexSetting where+ RoutingAllocationInclude a =~ RoutingAllocationInclude b =+ NE.sort a =~ NE.sort b+ RoutingAllocationExclude a =~ RoutingAllocationExclude b =+ NE.sort a =~ NE.sort b+ RoutingAllocationRequire a =~ RoutingAllocationRequire b =+ NE.sort a =~ NE.sort b+ a =~ b = a == b+ showApproxEq (RoutingAllocationInclude xs) = show (RoutingAllocationInclude (NE.sort xs))+ showApproxEq (RoutingAllocationExclude xs) = show (RoutingAllocationExclude (NE.sort xs))+ showApproxEq (RoutingAllocationRequire xs) = show (RoutingAllocationRequire (NE.sort xs))+ showApproxEq x = show x
+ tests/TestsUtils/Common.hs view
@@ -0,0 +1,323 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE QuasiQuotes #-}+{-# LANGUAGE TemplateHaskell #-}++module TestsUtils.Common where++import qualified Data.Map as M+import qualified Data.Text as T+import qualified Data.Versions as Versions+import Lens.Micro (toListOf)+import qualified Network.HTTP.Types.Status as NHTS+import TestsUtils.Import++testServer :: Server+testServer = Server "http://localhost:9200"++testIndex :: IndexName+testIndex = [qqIndexName|bloodhound-tests-twitter-1|]++withTestEnv :: BH IO a -> IO a+withTestEnv = withBH defaultManagerSettings testServer++data Location = Location+ { lat :: Double,+ lon :: Double+ }+ deriving stock (Eq, Show)++data Tweet = Tweet+ { user :: Text,+ postDate :: UTCTime,+ message :: Text,+ age :: Int,+ location :: Location,+ extra :: Maybe Text+ }+ deriving stock (Eq, Show)++$(deriveJSON defaultOptions ''Location)+$(deriveJSON defaultOptions ''Tweet)++data ConversationMapping = ConversationMapping deriving stock (Eq, Show)++instance ToJSON ConversationMapping where+ toJSON ConversationMapping =+ object+ [ "properties"+ .= object+ [ "reply_join"+ .= object+ [ "type" .= ("join" :: Text),+ "relations" .= object ["message" .= ("reply" :: Text)]+ ],+ "user"+ .= object+ [ "type" .= ("text" :: Text),+ "fielddata" .= True+ ],+ -- Serializing the date as a date is breaking other tests, mysteriously.+ -- , "postDate" .= object [ "type" .= ("date" :: Text)+ -- , "format" .= ("YYYY-MM-dd`T`HH:mm:ss.SSSZZ" :: Text)]+ "message" .= object ["type" .= ("text" :: Text)],+ "age" .= object ["type" .= ("integer" :: Text)],+ "location" .= object ["type" .= ("geo_point" :: Text)],+ "extra" .= object ["type" .= ("keyword" :: Text)]+ ]+ ]++getServerVersion :: IO Versions.Version+getServerVersion = extractVersion <$> withTestEnv (performBHRequest getStatus)+ where+ extractVersion = versionNumber . number . version++createExampleIndex :: (MonadBH m) => m (BHResponse StatusDependant Acknowledged, Acknowledged)+createExampleIndex = do+ result <- tryPerformBHRequest (keepBHResponse $ createIndex (IndexSettings (ShardCount 1) (ReplicaCount 0) defaultIndexMappingsLimits) testIndex)+ case result of+ Left e+ | T.isSuffixOf "already exists" (errorMessage e) -> return (error "TODO rewrite this part too", Acknowledged False)+ | otherwise -> throwEsError e+ Right ack -> return ack++deleteExampleIndex :: (MonadBH m) => m (BHResponse StatusDependant Acknowledged, Acknowledged)+deleteExampleIndex =+ performBHRequest $ keepBHResponse $ deleteIndex testIndex++validateStatus :: (Show body) => BHResponse contextualized body -> Int -> Expectation+validateStatus resp expected =+ if actual == expected+ then return ()+ else expectationFailure ("Expected " <> show expected <> " but got " <> show actual <> ": " <> show body)+ where+ actual = NHTS.statusCode (responseStatus $ getResponse resp)+ body = responseBody $ getResponse resp++data TweetMapping = TweetMapping deriving stock (Eq, Show)++instance ToJSON TweetMapping where+ toJSON TweetMapping =+ object+ [ "properties"+ .= object+ [ "user"+ .= object+ [ "type" .= ("text" :: Text),+ "fielddata" .= True+ ],+ -- Serializing the date as a date is breaking other tests, mysteriously.+ -- , "postDate" .= object [ "type" .= ("date" :: Text)+ -- , "format" .= ("YYYY-MM-dd`T`HH:mm:ss.SSSZZ" :: Text)]+ "message" .= object ["type" .= ("text" :: Text)],+ "age" .= object ["type" .= ("integer" :: Text)],+ "location" .= object ["type" .= ("geo_point" :: Text)],+ "extra" .= object ["type" .= ("keyword" :: Text)]+ ]+ ]++exampleTweet :: Tweet+exampleTweet =+ Tweet+ { user = "bitemyapp",+ postDate =+ UTCTime+ (ModifiedJulianDay 55000)+ (secondsToDiffTime 10),+ message = "Use haskell!",+ age = 10000,+ location = Location 40.12 (-71.34),+ extra = Nothing+ }++tweetWithExtra :: Tweet+tweetWithExtra =+ Tweet+ { user = "bitemyapp",+ postDate =+ UTCTime+ (ModifiedJulianDay 55000)+ (secondsToDiffTime 10),+ message = "Use haskell!",+ age = 10000,+ location = Location 40.12 (-71.34),+ extra = Just "blah blah"+ }++exampleTweetWithAge :: Int -> Tweet+exampleTweetWithAge age' =+ Tweet+ { user = "bitemyapp",+ postDate =+ UTCTime+ (ModifiedJulianDay 55000)+ (secondsToDiffTime 10),+ message = "Use haskell!",+ age = age',+ location = Location 40.12 (-71.34),+ extra = Nothing+ }++newAge :: Int+newAge = 31337++newUser :: Text+newUser = "someotherapp"++tweetPatch :: Value+tweetPatch =+ object+ [ "age" .= newAge,+ "user" .= newUser+ ]++patchedTweet :: Tweet+patchedTweet = exampleTweet {age = newAge, user = newUser}++otherTweet :: Tweet+otherTweet =+ Tweet+ { user = "notmyapp",+ postDate =+ UTCTime+ (ModifiedJulianDay 55000)+ (secondsToDiffTime 11),+ message = "Use haskell!",+ age = 1000,+ location = Location 40.12 (-71.34),+ extra = Nothing+ }++resetIndex :: BH IO ()+resetIndex = do+ _ <- tryEsError deleteExampleIndex+ _ <- createExampleIndex+ _ <- performBHRequest $ putMapping @Value testIndex TweetMapping+ return ()++insertData :: BH IO (BHResponse StatusDependant IndexedDocument, IndexedDocument)+insertData = do+ _ <- tryEsError resetIndex+ insertData' defaultIndexDocumentSettings++insertData' :: IndexDocumentSettings -> BH IO (BHResponse StatusDependant IndexedDocument, IndexedDocument)+insertData' ids = do+ r <- performBHRequest $ keepBHResponse $ indexDocument testIndex ids exampleTweet (DocId "1")+ _ <- performBHRequest $ refreshIndex testIndex+ return r++insertTweetWithDocId :: Tweet -> Text -> BH IO IndexedDocument+insertTweetWithDocId tweet docId = do+ let ids = defaultIndexDocumentSettings+ r <- performBHRequest $ indexDocument testIndex ids tweet (DocId docId)+ _ <- performBHRequest $ refreshIndex testIndex+ return r++updateData :: BH IO IndexedDocument+updateData = do+ r <- performBHRequest $ updateDocument testIndex defaultIndexDocumentSettings tweetPatch (DocId "1")+ _ <- performBHRequest $ refreshIndex testIndex+ return r++insertOther :: BH IO ()+insertOther = do+ _ <- performBHRequest $ indexDocument testIndex defaultIndexDocumentSettings otherTweet (DocId "2")+ _ <- performBHRequest $ refreshIndex testIndex+ return ()++insertExtra :: BH IO ()+insertExtra = do+ _ <- performBHRequest $ indexDocument testIndex defaultIndexDocumentSettings tweetWithExtra (DocId "4")+ _ <- performBHRequest $ refreshIndex testIndex+ return ()++insertWithSpaceInId :: BH IO ()+insertWithSpaceInId = do+ _ <- performBHRequest $ indexDocument testIndex defaultIndexDocumentSettings exampleTweet (DocId "Hello World")+ _ <- performBHRequest $ refreshIndex testIndex+ return ()++searchTweet :: Search -> BH IO (Either EsError Tweet)+searchTweet search = (>>= grabFirst) <$> searchTweets search++searchTweets :: Search -> BH IO (Either EsError (SearchResult Tweet))+searchTweets search = tryPerformBHRequest $ searchByIndex testIndex search++searchExpectNoResults :: Search -> BH IO ()+searchExpectNoResults search = do+ result <- searchTweets search+ let emptyHits = fmap (hits . searchHits) result+ liftIO $+ emptyHits `shouldBe` Right []++searchExpectAggs :: Search -> BH IO ()+searchExpectAggs search = do+ result <- performBHRequest $ searchByIndex @Tweet testIndex search+ let isEmpty x = return (M.null x)+ liftIO $+ (aggregations result >>= isEmpty) `shouldBe` Just False++searchValidBucketAgg ::+ (BucketAggregation a, FromJSON a, Show a) =>+ Search ->+ Key ->+ (Key -> AggregationResults -> Maybe (Bucket a)) ->+ BH IO ()+searchValidBucketAgg search aggKey extractor = do+ result <- performBHRequest $ searchByIndex @Tweet testIndex search+ let bucketDocs = docCount . head . buckets+ let count = aggregations result >>= extractor aggKey >>= \x -> return (bucketDocs x)+ liftIO $+ count `shouldBe` Just 1++searchTermsAggHint :: [ExecutionHint] -> BH IO ()+searchTermsAggHint hints = do+ let terms hint = TermsAgg $ (mkTermsAggregation "user.keyword") {termExecutionHint = Just hint}+ let search hint = mkAggregateSearch Nothing $ mkAggregations "users" $ terms hint+ forM_ hints $ searchExpectAggs . search++-- forM_ hints (\x -> searchValidBucketAgg (search x) "users" toTerms)++searchTweetHighlight ::+ Search ->+ BH IO (Either EsError (Maybe HitHighlight))+searchTweetHighlight search = do+ result <- searchTweets search+ let tweetHit :: Either EsError (Maybe (Hit Tweet))+ tweetHit = fmap (headMay . hits . searchHits) result+ myHighlight :: Either EsError (Maybe HitHighlight)+ myHighlight = (join . fmap hitHighlight) <$> tweetHit+ return myHighlight++searchExpectSource :: Source -> Either EsError Value -> BH IO ()+searchExpectSource src expected = do+ _ <- insertData+ let query = QueryMatchQuery $ mkMatchQuery (FieldName "message") (QueryString "haskell")+ let search = (mkSearch (Just query) Nothing) {source = Just src}+ result <- performBHRequest $ searchByIndex testIndex search+ let value_ = grabFirst result+ liftIO $+ value_ `shouldBe` expected++is :: Versions.Version -> IO Bool+is v = getServerVersion >>= \x -> return $ x == v++esOnlyIT :: (HasCallStack, Example a) => IO (String -> a -> SpecWith (Arg a))+esOnlyIT = withMajorVersionIT (>= 6)++os2OnlyIT :: (HasCallStack, Example a) => IO (String -> a -> SpecWith (Arg a))+os2OnlyIT = withMajorVersionIT (== 2)++withMajorVersionIT :: (HasCallStack, Example a) => (Word -> Bool) -> IO (String -> a -> SpecWith (Arg a))+withMajorVersionIT p = do+ majoreVersion <- fetchMajorVersion+ return $+ if p majoreVersion+ then it+ else xit++fetchMajorVersion :: IO Word+fetchMajorVersion =+ withTestEnv $ do+ x <- performBHRequest $ getNodesInfo LocalNode+ let majoreVersion = versionNumber $ nodeInfoESVersion $ head $ nodesInfo x+ return $ head $ toListOf Versions.major majoreVersion
+ tests/TestsUtils/Generators.hs view
@@ -0,0 +1,625 @@+{-# LANGUAGE CPP #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE StandaloneDeriving #-}++module TestsUtils.Generators where++import qualified Data.Aeson.KeyMap as X+import qualified Data.List as L+import qualified Data.List.NonEmpty as NE+import qualified Data.Map as M+import qualified Data.Text as T+import qualified Data.Versions as Versions+import Database.Bloodhound+import Generic.Random+import TestsUtils.ApproxEq+import TestsUtils.Import++instance Arbitrary NominalDiffTime where+ arbitrary = fromInteger <$> arbitrary++#if !MIN_VERSION_QuickCheck(2,8,0)+instance (Arbitrary k, Ord k, Arbitrary v) => Arbitrary (M.Map k v) where+ arbitrary = M.fromList <$> arbitrary+#endif++instance Arbitrary Text where+ arbitrary = T.pack <$> arbitrary++instance Arbitrary UTCTime where+ arbitrary =+ UTCTime+ <$> arbitrary+ <*> (fromRational . toRational <$> choose (0 :: Double, 86400))++instance Arbitrary Day where+ arbitrary =+ ModifiedJulianDay . (2000 +) <$> arbitrary+ shrink =+ (ModifiedJulianDay <$>) . shrink . toModifiedJulianDay++#if !MIN_VERSION_QuickCheck(2,9,0)+instance Arbitrary a => Arbitrary (NonEmpty a) where+ arbitrary = liftA2 (:|) arbitrary arbitrary+#endif++arbitraryScore :: Gen Score+arbitraryScore = fmap getPositive <$> arbitrary++instance (Arbitrary a, Typeable a) => Arbitrary (Hit a) where+ arbitrary =+ Hit+ <$> arbitrary+ <*> arbitrary+ <*> arbitraryScore+ <*> arbitrary+ <*> return Nothing+ <*> arbitrary+ <*> arbitrary+ <*> return Nothing++instance Arbitrary HitFields where+ arbitrary = pure (HitFields M.empty)+ shrink = const []++instance Arbitrary HitsTotalRelation where+ arbitrary = oneof [pure HTR_EQ, pure HTR_GTE]++instance Arbitrary HitsTotal where+ arbitrary = do+ tot <- getPositive <$> arbitrary+ relation_ <- arbitrary+ return $ HitsTotal tot relation_++instance (Arbitrary a, Typeable a) => Arbitrary (SearchHits a) where+ arbitrary = reduceSize $ do+ tot <- arbitrary+ score <- arbitraryScore+ hs <- arbitrary+ return $ SearchHits tot score hs++reduceSize :: Gen a -> Gen a+reduceSize f = sized $ \n -> resize (n `div` 2) f++arbitraryAlphaNum :: Gen Char+arbitraryAlphaNum =+ oneof+ [ choose ('a', 'z'),+ choose ('A', 'Z'),+ choose ('0', '9')+ ]++instance Arbitrary RoutingValue where+ arbitrary = RoutingValue . T.pack <$> listOf1 arbitraryAlphaNum++instance Arbitrary AliasRouting where+ arbitrary =+ oneof+ [ allAlias,+ one,+ theOther,+ both'+ ]+ where+ one =+ GranularAliasRouting+ <$> (Just <$> arbitrary)+ <*> pure Nothing+ theOther =+ GranularAliasRouting Nothing+ <$> (Just <$> arbitrary)+ both' =+ GranularAliasRouting+ <$> (Just <$> arbitrary)+ <*> (Just <$> arbitrary)+ allAlias = AllAliasRouting <$> arbitrary++instance Arbitrary FieldName where+ arbitrary =+ FieldName+ . T.pack+ <$> listOf1 arbitraryAlphaNum++#if MIN_VERSION_base(4,10,0)+-- Test.QuickCheck.Modifiers++qcNonEmptyToNonEmpty :: NonEmptyList a -> NonEmpty a+qcNonEmptyToNonEmpty (NonEmpty (a : xs)) = (a :| xs)+qcNonEmptyToNonEmpty (NonEmpty []) = error "NonEmpty was empty!"++instance Arbitrary a => Arbitrary (NonEmpty a) where+ arbitrary =+ qcNonEmptyToNonEmpty+ <$> arbitrary+#endif+instance Arbitrary ScriptFields where+ arbitrary =+ pure $+ ScriptFields $+ X.fromList []++ shrink = const []++instance Arbitrary ScriptParams where+ arbitrary =+ pure $+ ScriptParams $+ X.fromList+ [ ("a", Number 42),+ ("b", String "forty two")+ ]++ shrink = const []++instance Arbitrary RegexpFlags where+ arbitrary =+ oneof+ [ pure AllRegexpFlags,+ pure NoRegexpFlags,+ SomeRegexpFlags <$> genUniqueFlags+ ]+ where+ genUniqueFlags =+ NE.fromList . L.nub+ <$> listOf1 arbitrary++instance Arbitrary IndexAliasCreate where+ arbitrary =+ IndexAliasCreate+ <$> arbitrary+ <*> reduceSize arbitrary++instance Arbitrary Query where+ arbitrary =+ reduceSize $+ oneof+ [ TermQuery <$> arbitrary <*> arbitrary,+ TermsQuery <$> arbitrary <*> arbitrary,+ QueryMatchQuery <$> arbitrary,+ QueryMultiMatchQuery <$> arbitrary,+ QueryBoolQuery <$> arbitrary,+ QueryBoostingQuery <$> arbitrary,+ QueryCommonTermsQuery <$> arbitrary,+ ConstantScoreQuery <$> arbitrary <*> arbitrary,+ QueryDisMaxQuery <$> arbitrary,+ QueryFuzzyLikeThisQuery <$> arbitrary,+ QueryFuzzyLikeFieldQuery <$> arbitrary,+ QueryFuzzyQuery <$> arbitrary,+ QueryHasChildQuery <$> arbitrary,+ QueryHasParentQuery <$> arbitrary,+ IdsQuery <$> arbitrary,+ QueryIndicesQuery <$> arbitrary,+ MatchAllQuery <$> arbitrary,+ QueryMoreLikeThisQuery <$> arbitrary,+ QueryMoreLikeThisFieldQuery <$> arbitrary,+ QueryNestedQuery <$> arbitrary,+ QueryPrefixQuery <$> arbitrary,+ QueryQueryStringQuery <$> arbitrary,+ QuerySimpleQueryStringQuery <$> arbitrary,+ QueryRangeQuery <$> arbitrary,+ QueryRegexpQuery <$> arbitrary+ ]++-- TODO: Implement shrink+-- shrink = genericShrink++instance Arbitrary Filter where+ arbitrary =+ Filter <$> arbitrary+ shrink (Filter q) =+ Filter <$> shrink q++instance Arbitrary ReplicaBounds where+ arbitrary =+ oneof+ [ replicasBounded,+ replicasLowerBounded,+ pure ReplicasUnbounded+ ]+ where+ replicasBounded = do+ Positive a <- arbitrary+ Positive b <- arbitrary+ return (ReplicasBounded a b)+ replicasLowerBounded = do+ Positive a <- arbitrary+ return (ReplicasLowerBounded a)++instance Arbitrary NodeAttrName where+ arbitrary =+ NodeAttrName+ . T.pack+ <$> listOf1 arbitraryAlphaNum++instance Arbitrary NodeAttrFilter where+ arbitrary = do+ n <- arbitrary+ xs <- listOf1 (listOf1 arbitraryAlphaNum)+ let (s, ss) = unpackConsPartial xs+ ts = T.pack <$> s :| ss+ return (NodeAttrFilter n ts)+ where+ -- listOf1 means this shouldn't blow up.+ unpackConsPartial (x : xs) = (x, xs)+ unpackConsPartial _ = error "unpackConsPartial failed but shouldn't have"++#if MIN_VERSION_versions(6,0,0)+instance Arbitrary VersionNumber where+ arbitrary = do+ chunks <- Versions.Chunks <$> arbitrary+ return $ VersionNumber $ Versions.Version Nothing chunks Nothing Nothing++instance Arbitrary Versions.Chunk where+ arbitrary =+ oneof+ [ Versions.Numeric <$> arbitrary,+ do+ n <- chooseInt (1, 5)+ Versions.Alphanum . T.pack <$> replicateM n (chooseEnum ('a', 'z'))]+#else+instance Arbitrary VersionNumber where+ arbitrary = do+ chunks <- arbitrary+ return $+ VersionNumber $+ Versions.Version {+ Versions._vEpoch = Nothing,+ Versions._vChunks = chunks, Versions._vRel = [], Versions._vMeta = Nothing}++instance Arbitrary Versions.VUnit where+ arbitrary =+ oneof+ [ Versions.Digits . fromIntegral <$> chooseInt (0, 1000),+ do+ n <- chooseInt (1, 5)+ Versions.Str . T.pack <$> replicateM n (chooseEnum ('a', 'z'))]+#endif++instance Arbitrary TemplateQueryKeyValuePairs where+ arbitrary = TemplateQueryKeyValuePairs . X.fromList <$> arbitrary+ shrink (TemplateQueryKeyValuePairs x) = map (TemplateQueryKeyValuePairs . X.fromList) . shrink $ X.toList x++instance Arbitrary IndexName where+ arbitrary = do+ n <- chooseInt (5, 15)+ indewName <- T.pack <$> replicateM n (chooseEnum ('a', 'z'))+ return $ either (\e -> error $ "Invalid generated IndexName " <> show indewName <> ":" <> T.unpack e) id $ mkIndexName indewName++deriving newtype instance Arbitrary DocId++instance Arbitrary Version where arbitrary = genericArbitraryU++deriving newtype instance Arbitrary BuildHash++deriving newtype instance Arbitrary IndexAliasRouting++deriving newtype instance Arbitrary ShardCount++deriving newtype instance Arbitrary ReplicaCount++deriving newtype instance Arbitrary TemplateName++deriving newtype instance Arbitrary IndexPattern++deriving newtype instance Arbitrary QueryString++deriving newtype instance Arbitrary CacheName++deriving newtype instance Arbitrary CacheKey++deriving newtype instance Arbitrary Existence++deriving newtype instance Arbitrary CutoffFrequency++deriving newtype instance Arbitrary Analyzer++deriving newtype instance Arbitrary MaxExpansions++deriving newtype instance Arbitrary Lenient++deriving newtype instance Arbitrary Tiebreaker++deriving newtype instance Arbitrary Boost++deriving newtype instance Arbitrary BoostTerms++deriving newtype instance Arbitrary MinimumMatch++deriving newtype instance Arbitrary DisableCoord++deriving newtype instance Arbitrary IgnoreTermFrequency++deriving newtype instance Arbitrary MinimumTermFrequency++deriving newtype instance Arbitrary MaxQueryTerms++instance Arbitrary Fuzziness where arbitrary = genericArbitraryU++deriving newtype instance Arbitrary PrefixLength++deriving newtype instance Arbitrary RelationName++deriving newtype instance Arbitrary PercentMatch++deriving newtype instance Arbitrary StopWord++deriving newtype instance Arbitrary QueryPath++deriving newtype instance Arbitrary AllowLeadingWildcard++deriving newtype instance Arbitrary LowercaseExpanded++deriving newtype instance Arbitrary EnablePositionIncrements++deriving newtype instance Arbitrary AnalyzeWildcard++deriving newtype instance Arbitrary GeneratePhraseQueries++deriving newtype instance Arbitrary Locale++deriving newtype instance Arbitrary MaxWordLength++deriving newtype instance Arbitrary MinWordLength++deriving newtype instance Arbitrary PhraseSlop++deriving newtype instance Arbitrary MinDocFrequency++deriving newtype instance Arbitrary MaxDocFrequency++deriving newtype instance Arbitrary Regexp++instance Arbitrary SimpleQueryStringQuery where arbitrary = genericArbitraryU++instance Arbitrary FieldOrFields where arbitrary = genericArbitraryU++instance Arbitrary SimpleQueryFlag where arbitrary = genericArbitraryU++instance Arbitrary RegexpQuery where arbitrary = genericArbitraryU++instance Arbitrary QueryStringQuery where arbitrary = genericArbitraryU++instance Arbitrary RangeQuery where arbitrary = genericArbitraryU++instance Arbitrary RangeValue where arbitrary = genericArbitraryU++instance Arbitrary PrefixQuery where arbitrary = genericArbitraryU++instance Arbitrary NestedQuery where arbitrary = genericArbitraryU++instance Arbitrary MoreLikeThisFieldQuery where arbitrary = genericArbitraryU++instance Arbitrary MoreLikeThisQuery where arbitrary = genericArbitraryU++instance Arbitrary IndicesQuery where arbitrary = genericArbitraryU++deriving newtype instance Arbitrary IgnoreUnmapped++deriving newtype instance Arbitrary MinChildren++deriving newtype instance Arbitrary MaxChildren++deriving newtype instance Arbitrary AggregateParentScore++instance Arbitrary HasParentQuery where arbitrary = genericArbitraryU++instance Arbitrary HasChildQuery where arbitrary = genericArbitraryU++instance Arbitrary FuzzyQuery where arbitrary = genericArbitraryU++instance Arbitrary FuzzyLikeFieldQuery where arbitrary = genericArbitraryU++instance Arbitrary FuzzyLikeThisQuery where arbitrary = genericArbitraryU++instance Arbitrary DisMaxQuery where arbitrary = genericArbitraryU++instance Arbitrary CommonTermsQuery where arbitrary = genericArbitraryU++instance Arbitrary DistanceRange where arbitrary = genericArbitraryU++instance Arbitrary MultiMatchQuery where arbitrary = genericArbitraryU++instance Arbitrary LessThanD where arbitrary = genericArbitraryU++instance Arbitrary LessThanEqD where arbitrary = genericArbitraryU++instance Arbitrary GreaterThanD where arbitrary = genericArbitraryU++instance Arbitrary GreaterThanEqD where arbitrary = genericArbitraryU++instance Arbitrary LessThan where arbitrary = genericArbitraryU++instance Arbitrary LessThanEq where arbitrary = genericArbitraryU++instance Arbitrary GreaterThan where arbitrary = genericArbitraryU++instance Arbitrary GreaterThanEq where arbitrary = genericArbitraryU++instance Arbitrary GeoPoint where arbitrary = genericArbitraryU++deriving newtype instance Arbitrary NullValue++instance Arbitrary MinimumMatchHighLow where arbitrary = genericArbitraryU++instance Arbitrary CommonMinimumMatch where arbitrary = genericArbitraryU++instance Arbitrary BoostingQuery where arbitrary = genericArbitraryU++instance Arbitrary BoolQuery where arbitrary = genericArbitraryU++instance Arbitrary MatchQuery where arbitrary = genericArbitraryU++instance Arbitrary MultiMatchQueryType where arbitrary = genericArbitraryU++instance Arbitrary BooleanOperator where arbitrary = genericArbitraryU++instance Arbitrary ZeroTermsQuery where arbitrary = genericArbitraryU++instance Arbitrary MatchQueryType where arbitrary = genericArbitraryU++instance Arbitrary SearchAliasRouting where arbitrary = genericArbitraryU++instance Arbitrary ScoreType where arbitrary = genericArbitraryU++instance Arbitrary Distance where arbitrary = genericArbitraryU++instance Arbitrary DistanceUnit where arbitrary = genericArbitraryU++instance Arbitrary DistanceType where arbitrary = genericArbitraryU++instance Arbitrary OptimizeBbox where arbitrary = genericArbitraryU++instance Arbitrary GeoBoundingBoxConstraint where arbitrary = genericArbitraryU++instance Arbitrary GeoFilterType where arbitrary = genericArbitraryU++instance Arbitrary GeoBoundingBox where arbitrary = genericArbitraryU++instance Arbitrary LatLon where arbitrary = genericArbitraryU++instance Arbitrary RangeExecution where arbitrary = genericArbitraryU++instance Arbitrary RegexpFlag where arbitrary = genericArbitraryU++instance Arbitrary BoolMatch where arbitrary = genericArbitraryU++instance Arbitrary Term where arbitrary = genericArbitraryU++instance Arbitrary IndexMappingsLimits where arbitrary = genericArbitraryU++instance Arbitrary IndexSettings where arbitrary = genericArbitraryU++instance Arbitrary TokenChar where arbitrary = genericArbitraryU++instance Arbitrary Ngram where arbitrary = genericArbitraryU++instance Arbitrary TokenizerDefinition where arbitrary = genericArbitraryU++deriving newtype instance Arbitrary TokenFilter++instance Arbitrary NgramFilter where arbitrary = genericArbitraryU++instance Arbitrary EdgeNgramFilterSide where arbitrary = genericArbitraryU++instance Arbitrary TokenFilterDefinition where arbitrary = genericArbitraryU++instance Arbitrary Language where arbitrary = genericArbitraryU++instance Arbitrary Shingle where arbitrary = genericArbitraryU++deriving newtype instance Arbitrary CharFilter++instance Arbitrary AnalyzerDefinition where arbitrary = genericArbitraryU++-- TODO: This should have a proper generator that doesn't+-- create garbage that has to be filtered out.+instance Arbitrary CharFilterDefinition where+ arbitrary =+ oneof+ [ CharFilterDefinitionMapping+ . chomp+ <$> arbitrary,+ CharFilterDefinitionPatternReplace+ <$> arbitrary+ <*> arbitrary+ <*> arbitrary+ ]+ where+ chomp =+ M.map T.strip+ . M.mapKeys (T.replace "=>" "" . T.strip)++instance Arbitrary Analysis where arbitrary = genericArbitraryU++deriving newtype instance Arbitrary Tokenizer++instance Arbitrary Compression where arbitrary = genericArbitraryU++deriving newtype instance Arbitrary Bytes++instance Arbitrary AllocationPolicy where arbitrary = genericArbitraryU++instance Arbitrary InitialShardCount where arbitrary = genericArbitraryU++instance Arbitrary FSType where arbitrary = genericArbitraryU++instance Arbitrary CompoundFormat where arbitrary = genericArbitraryU++instance Arbitrary FsSnapshotRepo where arbitrary = genericArbitraryU++deriving newtype instance Arbitrary SnapshotRepoName++instance Arbitrary DirectGeneratorSuggestModeTypes where arbitrary = genericArbitraryU++instance Arbitrary DirectGenerators where arbitrary = genericArbitraryU++instance Arbitrary PhraseSuggesterCollate where arbitrary = genericArbitraryU++instance Arbitrary PhraseSuggesterHighlighter where arbitrary = genericArbitraryU++deriving newtype instance Arbitrary Size++instance Arbitrary PhraseSuggester where arbitrary = genericArbitraryU++instance Arbitrary SuggestType where arbitrary = genericArbitraryU++instance Arbitrary Suggest where arbitrary = genericArbitraryU++instance Arbitrary FunctionScoreQuery where arbitrary = genericArbitraryU++instance Arbitrary FunctionScoreFunction where arbitrary = genericArbitraryU++instance Arbitrary FunctionScoreFunctions where arbitrary = genericArbitraryU++instance Arbitrary ComponentFunctionScoreFunction where arbitrary = genericArbitraryU++instance Arbitrary Script where arbitrary = genericArbitraryU++deriving newtype instance Arbitrary ScriptLanguage++instance Arbitrary ScriptSource where arbitrary = genericArbitraryU++instance Arbitrary ScoreMode where arbitrary = genericArbitraryU++instance Arbitrary BoostMode where arbitrary = genericArbitraryU++deriving newtype instance Arbitrary Seed++instance Arbitrary FieldValueFactor where arbitrary = genericArbitraryU++deriving newtype instance Arbitrary Weight++deriving newtype instance Arbitrary Factor++deriving newtype instance Arbitrary FactorMissingFieldValue++instance Arbitrary FactorModifier where arbitrary = genericArbitraryU++instance Arbitrary UpdatableIndexSetting where+ arbitrary = resize 10 genericArbitraryU++newtype UpdatableIndexSetting'+ = UpdatableIndexSetting' UpdatableIndexSetting+ deriving stock (Eq, Show, Typeable)+ deriving newtype (ToJSON, FromJSON, ApproxEq)++instance Arbitrary UpdatableIndexSetting' where+ arbitrary = do+ settings <- arbitrary+ return $+ UpdatableIndexSetting' $ case settings of+ RoutingAllocationInclude xs ->+ RoutingAllocationInclude (dropDuplicateAttrNames xs)+ RoutingAllocationExclude xs ->+ RoutingAllocationExclude (dropDuplicateAttrNames xs)+ RoutingAllocationRequire xs ->+ RoutingAllocationRequire (dropDuplicateAttrNames xs)+ x -> x+ where+ dropDuplicateAttrNames =+ NE.fromList . L.nubBy sameAttrName . NE.toList+ sameAttrName a b =+ nodeAttrFilterName a == nodeAttrFilterName b+ shrink (UpdatableIndexSetting' x) = map UpdatableIndexSetting' (shrink x)++instance Arbitrary InnerHits where arbitrary = genericArbitraryU
+ tests/TestsUtils/Import.hs view
@@ -0,0 +1,56 @@+{-# LANGUAGE OverloadedStrings #-}++module TestsUtils.Import+ ( module X,+ module TestsUtils.Import,+ )+where++import Control.Applicative as X+import Control.Exception as X (evaluate)+import Control.Monad as X+import Control.Monad.Catch as X+import Control.Monad.Reader as X+import Data.Aeson as X+import Data.Aeson.TH as X+import Data.Aeson.Types as X (parseEither)+import qualified Data.List as L+import Data.List.NonEmpty as X (NonEmpty (..))+import Data.Maybe as X+import Data.Monoid as X+import Data.Ord as X (comparing)+import Data.Proxy as X+import Data.Text as X (Text)+import Data.Time.Calendar as X (Day (..), fromGregorian)+import Data.Time.Clock as X+import Data.Typeable as X+import Database.Bloodhound.Client as X (BH, MonadBH (..), pitSearch, scanSearch, withBH)+import Database.Bloodhound.Requests as X+import Database.Bloodhound.Types as X hiding (key)+import Network.HTTP.Client as X hiding (Proxy, fileSize)+import System.IO.Temp as X+import System.PosixCompat.Files as X+import Test.Hspec as X+import Test.Hspec.QuickCheck as X (prop)+import Test.QuickCheck as X hiding (Result, Success, isSuccess)+import Test.QuickCheck.Property.Monoid as X (T (..), eq, prop_Monoid)+import Text.Pretty.Simple as X (pPrint)++noDuplicates :: (Eq a) => [a] -> Bool+noDuplicates xs = L.nub xs == xs++getSource :: EsResult a -> Maybe a+getSource = fmap _source . foundResult++grabFirst :: SearchResult a -> Either EsError a+grabFirst r =+ case hitSource $ head $ hits $ searchHits r of+ Nothing -> Left (EsError Nothing "Source was missing")+ Just x -> Right x++when' :: (Monad m) => m Bool -> m () -> m ()+when' b f = b >>= \x -> when x f++headMay :: [a] -> Maybe a+headMay (x : _) = Just x+headMay _ = Nothing
− tests/tests.hs
@@ -1,196 +0,0 @@-{-# LANGUAGE CPP #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE ScopedTypeVariables #-}-{-# LANGUAGE TypeApplications #-}-{-# OPTIONS_GHC -fno-warn-orphans #-}-#if __GLASGOW_HASKELL__ >= 802-{-# LANGUAGE MonoLocalBinds #-}-#endif-module Main where--import qualified Data.Aeson as Aeson-import qualified Data.Text as Text-import qualified Test.Aggregation as Aggregation-import qualified Test.BulkAPI as Bulk-import Test.Common-import qualified Test.Count as Count-import qualified Test.Documents as Documents-import qualified Test.Highlights as Highlights-import Test.Import-import qualified Test.Indices as Indices-import qualified Test.JSON as JSON-import qualified Test.Query as Query-import qualified Test.Script as Script-import qualified Test.Snapshots as Snapshots-import qualified Test.Sorting as Sorting-import qualified Test.SourceFiltering as SourceFiltering-import qualified Test.Suggest as Suggest-import qualified Test.Templates as Templates-import Prelude--main :: IO ()-main = hspec $ do- Aggregation.spec- Bulk.spec- Documents.spec- Highlights.spec- Indices.spec- JSON.spec- Query.spec- Script.spec- Snapshots.spec- Sorting.spec- SourceFiltering.spec- Suggest.spec- Templates.spec- Count.spec-- describe "error parsing" $- it "can parse EsErrors for >= 2.0" $- withTestEnv $ do- res <- getDocument @() (IndexName "bogus") (DocId "bogus_as_well")- errorResp <- parseEsResponse res- liftIO (errorResp `shouldBe` Left (EsError (Just 404) "no such index [bogus]"))-- describe "Monoid (SearchHits a)" $- prop "abides the monoid laws" $- eq $- prop_Monoid (T :: T (SearchHits ()))-- describe "mkDocVersion" $- prop "can never construct an out of range docVersion" $ \i ->- let res = mkDocVersion i- in case res of- Nothing -> property True- Just dv ->- (dv >= minBound)- .&&. (dv <= maxBound)- .&&. docVersionNumber dv- === i-- describe "getNodesInfo" $- it "fetches the responding node when LocalNode is used" $- withTestEnv $ do- res <- getNodesInfo LocalNode- liftIO $ case res of- -- This is really just a smoke test for response- -- parsing. Node info is so variable, there's not much I can- -- assert here.- Right NodesInfo {..} -> length nodesInfo `shouldBe` 1- Left e -> expectationFailure ("Expected NodesInfo but got " <> show e)-- describe "getNodesStats" $- it "fetches the responding node when LocalNode is used" $- withTestEnv $ do- res <- getNodesStats LocalNode- liftIO $ case res of- -- This is really just a smoke test for response- -- parsing. Node stats is so variable, there's not much I can- -- assert here.- Right NodesStats {..} -> length nodesStats `shouldBe` 1- Left e -> expectationFailure ("Expected NodesStats but got " <> show e)-- describe "Enum DocVersion" $- it "follows the laws of Enum, Bounded" $ do- evaluate (succ maxBound :: DocVersion) `shouldThrow` anyErrorCall- evaluate (pred minBound :: DocVersion) `shouldThrow` anyErrorCall- evaluate (toEnum 0 :: DocVersion) `shouldThrow` anyErrorCall- evaluate (toEnum 9200000000000000001 :: DocVersion) `shouldThrow` anyErrorCall- enumFrom (pred maxBound :: DocVersion) `shouldBe` [pred maxBound, maxBound]- enumFrom (pred maxBound :: DocVersion) `shouldBe` [pred maxBound, maxBound]- enumFromThen minBound (pred maxBound :: DocVersion) `shouldBe` [minBound, pred maxBound]-- describe "Scan & Scroll API" $- it "returns documents using the scan&scroll API" $- withTestEnv $ do- _ <- insertData- _ <- insertOther- let search =- ( mkSearch- (Just $ MatchAllQuery Nothing)- Nothing- )- { size = Size 1- }- regular_search <- searchTweet search- scan_search' <- scanSearch testIndex search :: BH IO [Hit Tweet]- let scan_search = map hitSource scan_search'- liftIO $- regular_search `shouldBe` Right exampleTweet -- Check that the size restrtiction is being honored- liftIO $- scan_search `shouldMatchList` [Just exampleTweet, Just otherTweet]-- describe "Point in time (PIT) API" $ do- it "returns a single document using the point in time (PIT) API" $- withTestEnv $ do- _ <- insertData- _ <- insertOther- let search =- ( mkSearch- (Just $ MatchAllQuery Nothing)- Nothing- )- { size = Size 1- }- regular_search <- searchTweet search- pit_search' <- pitSearch testIndex search :: BH IO [Hit Tweet]- let pit_search = map hitSource pit_search'- liftIO $- regular_search `shouldBe` Right exampleTweet -- Check that the size restriction is being honored- liftIO $- pit_search `shouldMatchList` [Just exampleTweet] -- TODO- it "returns many documents using the point in time (PIT) API" $- withTestEnv $ do- resetIndex- let ids = [1 .. 1000]- let docs = map exampleTweetWithAge ids- let docIds = map (Text.pack . show) ids- mapM_ (uncurry insertTweetWithDocId) (docs `zip` docIds)- let sort = mkSort (FieldName "postDate") Ascending- let search =- ( mkSearch- (Just $ MatchAllQuery Nothing)- Nothing- )- { sortBody = Just [DefaultSortSpec sort]- }- scan_search' <- scanSearch testIndex search :: BH IO [Hit Tweet]- let scan_search = map hitSource scan_search'- pit_search' <- pitSearch testIndex search :: BH IO [Hit Tweet]- let pit_search = map hitSource pit_search'- let expectedHits = map Just docs- liftIO $- scan_search `shouldMatchList` expectedHits- liftIO $- pit_search `shouldMatchList` expectedHits- describe "Search After API" $- it "returns document for search after query" $- withTestEnv $ do- _ <- insertData- _ <- insertOther- let sortSpec = DefaultSortSpec $ mkSort (FieldName "user") Ascending- searchAfterKey = [Aeson.toJSON ("bitemyapp" :: String)]- search =- Search- { queryBody = Nothing,- filterBody = Nothing,- sortBody = Just [sortSpec],- aggBody = Nothing,- highlight = Nothing,- trackSortScores = False,- from = From 0,- size = Size 10,- searchType = SearchTypeDfsQueryThenFetch,- searchAfterKey = Just searchAfterKey,- fields = Nothing,- scriptFields = Nothing,- source = Nothing,- suggestBody = Nothing,- pointInTime = Nothing- }- result <- searchTweets search- let myTweet = grabFirst result- liftIO $- myTweet `shouldBe` Right otherTweet