| Copyright | (C) 2014 2018 Chris Allen |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Chris Allen <cma@bitemyapp.com> |
| Stability | provisional |
| Portability | GHC |
| Safe Haskell | None |
| Language | GHC2021 |
Database.Bloodhound.Common.Client
Contents
- Bloodhound client functions
- Indices
- Mapping
- Documents
- Searching
- Templates
- Snapshot/Restore
- Async Search
- Nodes
- Cluster
- Index Lifecycle Management (ILM)
- Snapshot Lifecycle Management (SLM)
- Enrich
- Autoscaling
- Security — shared privilege vocabulary
- Security — roles (_securityrole/*)
- Security — role mappings (_securityrole_mapping/*)
- Security — users (_securityuser/*)
- Security — API keys (_securityapi_key)
- Security — authentication (_security_authenticate, _whoami, _logout)
- Security — service accounts (_securityservice/*)
- Security — SSO token (_securityoauth2, _securityoidc, _security/saml)
- Security — application privileges (_securityprivilege/*)
- Fleet
- Repositories Metering
- Rollup
- Searchable Snapshots
- Watcher
- Text structure
- Transform
- Migration
- Ingest Pipelines
- Async Search
- Request Utilities
- Authentication
- Count
- Validate
- Rank Evaluation
- Analyze
- Field Capabilities
- Search Shards
- Generic
Description
Client side functions for talking to Elasticsearch servers.
Synopsis
- withBH :: ManagerSettings -> Server -> BH IO a -> IO a
- createIndex :: MonadBH m => IndexSettings -> IndexName -> m Acknowledged
- createIndexOptions :: MonadBH m => CreateIndexOptions -> IndexName -> m Acknowledged
- data CreateIndexOptions = CreateIndexOptions {}
- data ActiveShardCount
- defaultCreateIndexOptions :: CreateIndexOptions
- createIndexWith :: MonadBH m => [UpdatableIndexSetting] -> Int -> IndexName -> m Acknowledged
- flushIndex :: MonadBH m => IndexName -> m ShardsResult
- flushIndexWith :: MonadBH m => FlushIndexOptions -> IndexName -> m ShardsResult
- data FlushIndexOptions = FlushIndexOptions {}
- defaultFlushIndexOptions :: FlushIndexOptions
- clearIndexCache :: MonadBH m => IndexName -> m ShardsResult
- reloadSearchAnalyzers :: MonadBH m => IndexName -> m ReloadSearchAnalyzersResponse
- reloadSearchAnalyzersWith :: MonadBH m => ReloadSearchAnalyzersOptions -> IndexName -> m ReloadSearchAnalyzersResponse
- data ReloadSearchAnalyzersResponse = ReloadSearchAnalyzersResponse {}
- data ReloadDetail = ReloadDetail {
- rdIndex :: IndexName
- rdReloadedAnalyzers :: [Text]
- rdReloadedNodeIds :: [Text]
- data ReloadSearchAnalyzersOptions = ReloadSearchAnalyzersOptions {}
- defaultReloadSearchAnalyzersOptions :: ReloadSearchAnalyzersOptions
- reloadSearchAnalyzersOptionsParams :: ReloadSearchAnalyzersOptions -> [(Text, Maybe Text)]
- diskUsage :: MonadBH m => IndexName -> m DiskUsageResponse
- diskUsageWith :: MonadBH m => DiskUsageOptions -> IndexName -> m DiskUsageResponse
- data DiskUsageResponse = DiskUsageResponse {}
- data DiskUsageIndex = DiskUsageIndex {}
- data DiskUsageFieldBreakdown = DiskUsageFieldBreakdown {
- dufbTotal :: Maybe Text
- dufbTotalInBytes :: Maybe Int
- dufbInvertedIndex :: Maybe DiskUsageInvertedIndex
- dufbStoredFields :: Maybe Text
- dufbStoredFieldsInBytes :: Maybe Int
- dufbDocValues :: Maybe Text
- dufbDocValuesInBytes :: Maybe Int
- dufbPoints :: Maybe Text
- dufbPointsInBytes :: Maybe Int
- dufbNorms :: Maybe Text
- dufbNormsInBytes :: Maybe Int
- dufbTermVectors :: Maybe Text
- dufbTermVectorsInBytes :: Maybe Int
- data DiskUsageInvertedIndex = DiskUsageInvertedIndex {}
- data DiskUsageOptions = DiskUsageOptions {}
- defaultDiskUsageOptions :: DiskUsageOptions
- diskUsageOptionsParams :: DiskUsageOptions -> [(Text, Maybe Text)]
- fieldUsageStats :: MonadBH m => IndexName -> m FieldUsageStatsResponse
- fieldUsageStatsWith :: MonadBH m => FieldUsageStatsOptions -> IndexName -> m FieldUsageStatsResponse
- data FieldUsageStatsResponse = FieldUsageStatsResponse {}
- newtype FieldUsageStatsIndex = FieldUsageStatsIndex {}
- data FieldUsageShard = FieldUsageShard {}
- data FieldUsageRouting = FieldUsageRouting {}
- data FieldUsageStats = FieldUsageStats {}
- data FieldUsageBreakdown = FieldUsageBreakdown {}
- data FieldUsageInvertedIndex = FieldUsageInvertedIndex {}
- data FieldUsageStatsOptions = FieldUsageStatsOptions {}
- defaultFieldUsageStatsOptions :: FieldUsageStatsOptions
- fieldUsageStatsOptionsParams :: FieldUsageStatsOptions -> [(Text, Maybe Text)]
- getScriptContexts :: MonadBH m => m ScriptContextsResponse
- data ScriptContextsResponse = ScriptContextsResponse {}
- data ScriptContextInfo = ScriptContextInfo {
- sciName :: Text
- sciMethods :: [ScriptContextMethod]
- data ScriptContextMethod = ScriptContextMethod {
- scmName :: Text
- scmReturnType :: Text
- scmParams :: [ScriptContextParam]
- data ScriptContextParam = ScriptContextParam {}
- getScriptLanguages :: MonadBH m => m ScriptLanguagesResponse
- data ScriptLanguagesResponse = ScriptLanguagesResponse {}
- data ScriptLanguageContext = ScriptLanguageContext {
- slcLanguage :: ScriptLanguage
- slcContexts :: [Text]
- deleteIndex :: MonadBH m => IndexName -> m Acknowledged
- updateIndexSettings :: MonadBH m => NonEmpty UpdatableIndexSetting -> IndexName -> m Acknowledged
- updateIndexSettingsWith :: MonadBH m => NonEmpty UpdatableIndexSetting -> IndexName -> UpdateIndexSettingsOptions -> m Acknowledged
- data UpdateIndexSettingsOptions = UpdateIndexSettingsOptions {}
- defaultUpdateIndexSettingsOptions :: UpdateIndexSettingsOptions
- getIndexSettings :: MonadBH m => IndexName -> m IndexSettingsSummary
- getIndexSettingsWith :: MonadBH m => IndexName -> GetIndexSettingsOptions -> m IndexSettingsSummary
- data GetIndexSettingsOptions = GetIndexSettingsOptions {}
- defaultGetIndexSettingsOptions :: GetIndexSettingsOptions
- getIndex :: MonadBH m => IndexName -> m IndexInfo
- getIndexStats :: MonadBH m => IndexName -> m IndexStats
- getIndexRecovery :: MonadBH m => IndexName -> m IndexRecovery
- getIndexSegments :: MonadBH m => IndexName -> m IndexSegments
- getShardStores :: MonadBH m => IndexName -> m ShardStores
- getShardStoresWith :: MonadBH m => IndexName -> ShardStoresOptions -> m ShardStores
- data ShardStoresOptions = ShardStoresOptions {}
- defaultShardStoresOptions :: ShardStoresOptions
- data IndexInfo = IndexInfo {}
- data IndexStats = IndexStats {}
- data IndexStatEntry = IndexStatEntry {}
- data IndexStatAggregate = IndexStatAggregate {}
- data IndexStatMetrics = IndexStatMetrics {}
- data IndexStatDocs = IndexStatDocs {}
- newtype IndexStatStore = IndexStatStore {}
- newtype IndexRecovery = IndexRecovery {}
- data IndexSegments = IndexSegments {}
- data ShardStores = ShardStores {}
- data ShardStoresShard = ShardStoresShard {}
- data ShardStore = ShardStore {}
- data ShardStoreNode = ShardStoreNode {
- shardStoreNodeName :: Maybe Text
- shardStoreNodeEphemeralId :: Maybe Text
- shardStoreNodeTransportAddress :: Maybe Text
- shardStoreNodeExternalId :: Maybe Text
- shardStoreNodeAttributes :: Maybe (Map Text Text)
- shardStoreNodeRoles :: Maybe [Text]
- shardStoreNodeVersion :: Maybe Text
- shardStoreNodeMinIndexVersion :: Maybe Int
- shardStoreNodeMaxIndexVersion :: Maybe Int
- shardStoreNodeOther :: Maybe Value
- data ShardStoreAllocation
- data ShardStoreException = ShardStoreException {}
- data ShardRecovery = ShardRecovery {
- shardRecoveryId :: Int
- shardRecoveryType :: Maybe Text
- shardRecoveryStage :: Maybe Text
- shardRecoveryPrimary :: Bool
- shardRecoveryStartTimeMillis :: Maybe Int
- shardRecoveryStopTimeMillis :: Maybe Int
- shardRecoveryTotalTimeMillis :: Maybe Int
- shardRecoverySource :: Maybe Value
- shardRecoveryTarget :: Maybe Value
- shardRecoveryIndex :: Maybe ShardRecoveryIndex
- shardRecoveryOther :: Value
- data ShardRecoveryIndex = ShardRecoveryIndex {}
- data ShardRecoveryFiles = ShardRecoveryFiles {}
- forceMergeIndex :: MonadBH m => IndexSelection -> ForceMergeIndexSettings -> m ShardsResult
- indexExists :: MonadBH m => IndexName -> m Bool
- openIndex :: MonadBH m => IndexName -> m Acknowledged
- openIndexWith :: MonadBH m => OpenCloseIndexOptions -> IndexName -> m Acknowledged
- closeIndex :: MonadBH m => IndexName -> m Acknowledged
- closeIndexWith :: MonadBH m => OpenCloseIndexOptions -> IndexName -> m Acknowledged
- data OpenCloseIndexOptions = OpenCloseIndexOptions {}
- defaultOpenCloseIndexOptions :: OpenCloseIndexOptions
- listIndices :: MonadBH m => m [IndexName]
- catIndices :: MonadBH m => m [(IndexName, Int)]
- catIndicesWith :: MonadBH m => CatIndicesOptions -> m [CatIndicesRow]
- catAliases :: MonadBH m => m [CatAliasesRow]
- catAliasesWith :: MonadBH m => Maybe AliasName -> CatAliasesOptions -> m [CatAliasesRow]
- catAllocation :: MonadBH m => m [CatAllocationRow]
- catAllocationWith :: MonadBH m => Maybe NodeName -> CatAllocationOptions -> m [CatAllocationRow]
- catCount :: MonadBH m => m [CatCountRow]
- catCountWith :: MonadBH m => Maybe IndexName -> CatCountOptions -> m [CatCountRow]
- catMaster :: MonadBH m => m [CatMasterRow]
- catMasterWith :: MonadBH m => CatMasterOptions -> m [CatMasterRow]
- catHealth :: MonadBH m => m [CatHealthRow]
- catHealthWith :: MonadBH m => CatHealthOptions -> m [CatHealthRow]
- catPendingTasks :: MonadBH m => m [CatPendingTasksRow]
- catPendingTasksWith :: MonadBH m => CatPendingTasksOptions -> m [CatPendingTasksRow]
- catPlugins :: MonadBH m => m [CatPluginsRow]
- catPluginsWith :: MonadBH m => CatPluginsOptions -> m [CatPluginsRow]
- catTemplates :: MonadBH m => m [CatTemplatesRow]
- catTemplatesWith :: MonadBH m => Maybe TemplateName -> CatTemplatesOptions -> m [CatTemplatesRow]
- catThreadPool :: MonadBH m => m [CatThreadPoolRow]
- catThreadPoolWith :: MonadBH m => Maybe IndexName -> CatThreadPoolOptions -> m [CatThreadPoolRow]
- catFielddata :: MonadBH m => m [CatFielddataRow]
- catFielddataWith :: MonadBH m => Maybe FieldName -> CatFielddataOptions -> m [CatFielddataRow]
- catNodeattrs :: MonadBH m => m [CatNodeattrsRow]
- catNodeattrsWith :: MonadBH m => CatNodeattrsOptions -> m [CatNodeattrsRow]
- catRepositories :: MonadBH m => m [CatRepositoriesRow]
- catRepositoriesWith :: MonadBH m => CatRepositoriesOptions -> m [CatRepositoriesRow]
- catShards :: MonadBH m => m [CatShardsRow]
- catShardsWith :: MonadBH m => Maybe IndexName -> CatShardsOptions -> m [CatShardsRow]
- catTasks :: MonadBH m => m [CatTasksRow]
- catTasksWith :: MonadBH m => CatTasksOptions -> m [CatTasksRow]
- catSnapshots :: MonadBH m => m [CatSnapshotsRow]
- catSnapshotsWith :: MonadBH m => Maybe SnapshotRepoName -> CatSnapshotsOptions -> m [CatSnapshotsRow]
- catNodes :: MonadBH m => m [CatNodesRow]
- catNodesWith :: MonadBH m => CatNodesOptions -> m [CatNodesRow]
- catSegments :: MonadBH m => m [CatSegmentsRow]
- catSegmentsWith :: MonadBH m => Maybe IndexName -> CatSegmentsOptions -> m [CatSegmentsRow]
- catRecovery :: MonadBH m => m [CatRecoveryRow]
- catRecoveryWith :: MonadBH m => Maybe IndexName -> CatRecoveryOptions -> m [CatRecoveryRow]
- catComponentTemplates :: MonadBH m => m [CatComponentTemplatesRow]
- catComponentTemplatesWith :: MonadBH m => Maybe Text -> CatComponentTemplatesOptions -> m [CatComponentTemplatesRow]
- catCircuitBreakers :: MonadBH m => m [CatCircuitBreakersRow]
- catCircuitBreakersWith :: MonadBH m => Maybe Text -> CatCircuitBreakersOptions -> m [CatCircuitBreakersRow]
- catMlJobs :: MonadBH m => m [CatMlJobsRow]
- catMlJobsWith :: MonadBH m => Maybe Text -> CatMlJobsOptions -> m [CatMlJobsRow]
- catMlDataFrameAnalytics :: MonadBH m => m [CatMlDataFrameAnalyticsRow]
- catMlDataFrameAnalyticsWith :: MonadBH m => Maybe Text -> CatMlDataFrameAnalyticsOptions -> m [CatMlDataFrameAnalyticsRow]
- catMlDatafeeds :: MonadBH m => m [CatMlDatafeedsRow]
- catMlDatafeedsWith :: MonadBH m => Maybe Text -> CatMlDatafeedsOptions -> m [CatMlDatafeedsRow]
- catMlTrainedModels :: MonadBH m => m [CatMlTrainedModelsRow]
- catMlTrainedModelsWith :: MonadBH m => Maybe Text -> CatMlTrainedModelsOptions -> m [CatMlTrainedModelsRow]
- catTransforms :: MonadBH m => m [CatTransformsRow]
- catTransformsWith :: MonadBH m => Maybe Text -> CatTransformsOptions -> m [CatTransformsRow]
- catHelp :: MonadBH m => m Text
- addIndexBlock :: MonadBH m => IndexName -> IndexBlock -> m Acknowledged
- removeIndexBlock :: MonadBH m => IndexName -> IndexBlock -> m Acknowledged
- data IndexBlock
- indexBlockText :: IndexBlock -> Text
- waitForYellowIndex :: MonadBH m => IndexName -> m HealthStatus
- rolloverIndex :: MonadBH m => IndexAliasName -> Maybe RolloverConditions -> m RolloverResponse
- data RolloverConditions = RolloverConditions {}
- data RolloverResponse = RolloverResponse {}
- defaultRolloverConditions :: RolloverConditions
- shrinkIndex :: MonadBH m => IndexName -> IndexName -> ShrinkSettings -> m Acknowledged
- newtype ShrinkSettings = ShrinkSettings {}
- defaultShrinkSettings :: ShrinkSettings
- splitIndex :: MonadBH m => IndexName -> IndexName -> SplitSettings -> m Acknowledged
- newtype SplitSettings = SplitSettings {}
- defaultSplitSettings :: SplitSettings
- cloneIndex :: MonadBH m => IndexName -> IndexName -> CloneSettings -> m Acknowledged
- newtype CloneSettings = CloneSettings {}
- defaultCloneSettings :: CloneSettings
- 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
- resolveIndex :: MonadBH m => [IndexPattern] -> m ResolvedIndices
- resolveIndexWith :: MonadBH m => ResolveIndexOptions -> [IndexPattern] -> m ResolvedIndices
- data ResolveIndexOptions = ResolveIndexOptions {}
- defaultResolveIndexOptions :: ResolveIndexOptions
- data ResolvedIndices = ResolvedIndices {}
- data ResolvedIndex = ResolvedIndex {}
- data ResolvedAlias = ResolvedAlias {}
- data ResolvedDataStream = ResolvedDataStream {}
- listDanglingIndices :: MonadBH m => m [DanglingIndex]
- importDanglingIndex :: MonadBH m => DanglingIndexUuid -> m Acknowledged
- importDanglingIndexWith :: MonadBH m => DanglingIndexUuid -> ImportDanglingIndexOptions -> m Acknowledged
- deleteDanglingIndex :: MonadBH m => DanglingIndexUuid -> m Acknowledged
- deleteDanglingIndexWith :: MonadBH m => DanglingIndexUuid -> DeleteDanglingIndexOptions -> m Acknowledged
- newtype DanglingIndexUuid = DanglingIndexUuid Text
- unDanglingIndexUuid :: DanglingIndexUuid -> Text
- data DanglingIndex = DanglingIndex {}
- newtype DanglingIndicesResponse = DanglingIndicesResponse {}
- data ImportDanglingIndexOptions = ImportDanglingIndexOptions {}
- defaultImportDanglingIndexOptions :: ImportDanglingIndexOptions
- data DeleteDanglingIndexOptions = DeleteDanglingIndexOptions {
- ddioMasterTimeout :: Maybe (TimeUnits, Word32)
- ddioTimeout :: Maybe (TimeUnits, Word32)
- defaultDeleteDanglingIndexOptions :: DeleteDanglingIndexOptions
- updateIndexAliases :: MonadBH m => NonEmpty IndexAliasAction -> m Acknowledged
- updateIndexAliasesWith :: MonadBH m => UpdateAliasesOptions -> NonEmpty IndexAliasAction -> m Acknowledged
- data UpdateAliasesOptions = UpdateAliasesOptions {
- uaoMasterTimeout :: Maybe (TimeUnits, Word32)
- uaoTimeout :: Maybe (TimeUnits, Word32)
- defaultUpdateAliasesOptions :: UpdateAliasesOptions
- updateAliasesOptionsParams :: UpdateAliasesOptions -> [(Text, Maybe Text)]
- createIndexAlias :: MonadBH m => IndexName -> IndexAliasName -> IndexAliasCreate -> m Acknowledged
- getIndexAliases :: MonadBH m => m IndexAliasesSummary
- getIndexAlias :: MonadBH m => IndexName -> Maybe AliasName -> m IndexAliasesInfo
- deleteIndexAlias :: MonadBH m => IndexAliasName -> m Acknowledged
- deleteIndexAliasFrom :: MonadBH m => IndexName -> IndexAliasName -> m Acknowledged
- aliasExists :: MonadBH m => IndexAliasName -> m Bool
- defaultIndexAliasCreate :: IndexAliasCreate
- putTemplate :: MonadBH m => IndexTemplate -> TemplateName -> m Acknowledged
- templateExists :: MonadBH m => TemplateName -> m Bool
- getTemplate :: MonadBH m => Maybe TemplateNamePattern -> m [TemplateInfo]
- deleteTemplate :: MonadBH m => TemplateName -> m Acknowledged
- data ComponentTemplate = ComponentTemplate {}
- data ComposableTemplate = ComposableTemplate {}
- data ComposableTemplateContent = ComposableTemplateContent {}
- data ComposableTemplateOptions = ComposableTemplateOptions {}
- defaultComposableTemplateOptions :: ComposableTemplateOptions
- composableTemplateOptionsParams :: ComposableTemplateOptions -> [(Text, Maybe Text)]
- putIndexTemplate :: MonadBH m => TemplateName -> ComposableTemplate -> m Acknowledged
- putIndexTemplateWith :: MonadBH m => TemplateName -> ComposableTemplate -> ComposableTemplateOptions -> m Acknowledged
- getIndexTemplate :: MonadBH m => Maybe TemplateNamePattern -> m [IndexTemplateInfo]
- deleteIndexTemplate :: MonadBH m => TemplateName -> m Acknowledged
- putComponentTemplate :: MonadBH m => TemplateName -> ComponentTemplate -> m Acknowledged
- deleteComponentTemplate :: MonadBH m => TemplateName -> m Acknowledged
- data IndexTemplateInfo = IndexTemplateInfo {}
- newtype GetIndexTemplatesResponse = GetIndexTemplatesResponse {}
- data TemplateInfo = TemplateInfo {
- tiName :: TemplateName
- tiOrder :: Maybe Int
- tiIndexPatterns :: [IndexPattern]
- tiSettings :: Maybe Value
- tiMappings :: Maybe Value
- tiAliases :: Maybe Object
- tiVersion :: Maybe Int
- newtype GetTemplatesResponse = GetTemplatesResponse {}
- getComponentTemplate :: MonadBH m => Maybe TemplateNamePattern -> m [ComponentTemplateInfo]
- data ComponentTemplateInfo = ComponentTemplateInfo {}
- newtype GetComponentTemplatesResponse = GetComponentTemplatesResponse {}
- newtype TemplateNamePattern = TemplateNamePattern Text
- data SimulatedTemplate = SimulatedTemplate {}
- data SimulatedTemplateOverlap = SimulatedTemplateOverlap {}
- simulateIndexTemplate :: MonadBH m => ComposableTemplate -> m SimulatedTemplate
- simulateIndexTemplateWith :: MonadBH m => ComposableTemplate -> ComposableTemplateOptions -> m SimulatedTemplate
- simulateIndex :: MonadBH m => IndexName -> m SimulatedTemplate
- simulateIndexWith :: MonadBH m => IndexName -> ComposableTemplateOptions -> m SimulatedTemplate
- putMapping :: forall r a m. (MonadBH m, FromJSON r, ToJSON a) => IndexName -> a -> m r
- putMappingWith :: forall r a m. (MonadBH m, FromJSON r, ToJSON a) => IndexName -> a -> PutMappingOptions -> m r
- getMapping :: forall r m. (MonadBH m, FromJSON r) => IndexName -> m r
- getFieldMapping :: forall r m. (MonadBH m, FromJSON r) => IndexName -> [FieldName] -> m r
- newtype FieldMappingResponse = FieldMappingResponse {}
- newtype FieldMappingIndexEntry = FieldMappingIndexEntry {}
- data FieldMappingDetail = FieldMappingDetail {}
- indexDocument :: forall doc m. (MonadBH m, ToJSON doc) => IndexName -> IndexDocumentSettings -> doc -> DocId -> m IndexedDocument
- updateDocument :: forall patch m. (MonadBH m, ToJSON patch) => IndexName -> IndexDocumentSettings -> patch -> DocId -> m IndexedDocument
- updateDocumentWith :: MonadBH m => IndexName -> IndexDocumentSettings -> UpdateBody -> DocId -> m IndexedDocument
- data UpdateBody
- = UpdateDoc {
- ubDoc :: Value
- ubDocAsUpsert :: Maybe Bool
- | UpdateScript { }
- = UpdateDoc {
- mkUpdateDoc :: Value -> UpdateBody
- mkUpdateScript :: Script -> UpdateBody
- updateByQuery :: (MonadBH m, FromJSON a) => IndexName -> Query -> Maybe Script -> m a
- updateByQueryWith :: forall a m. (MonadBH m, FromJSON a) => ByQueryOptions -> IndexName -> Query -> Maybe Script -> m a
- rethrottleUpdateByQuery :: MonadBH m => TaskNodeId -> RethrottleRate -> m TaskListResponse
- getDocument :: (MonadBH m, FromJSON a) => IndexName -> DocId -> m (EsResult a)
- getDocumentWith :: forall a m. (MonadBH m, FromJSON a) => GetDocumentOptions -> IndexName -> DocId -> m (EsResult a)
- getDocumentSource :: forall a m. (MonadBH m, FromJSON a) => IndexName -> DocId -> m (Maybe a)
- getDocumentSourceWith :: forall a m. (MonadBH m, FromJSON a) => GetDocumentSourceOptions -> IndexName -> DocId -> m (Maybe a)
- getDocuments :: (MonadBH m, FromJSON a) => IndexName -> [DocId] -> m (MultiGetResponse a)
- getDocumentsWith :: forall a m. (MonadBH m, FromJSON a) => MultiGetOptions -> IndexName -> [DocId] -> m (MultiGetResponse a)
- getDocumentsMulti :: (MonadBH m, FromJSON a) => MultiGet -> m (MultiGetResponse a)
- getDocumentsMultiWith :: forall a m. (MonadBH m, FromJSON a) => MultiGetOptions -> MultiGet -> m (MultiGetResponse a)
- data TermVectors = TermVectors {}
- data FieldTermVectors = FieldTermVectors {}
- data FieldStatistics = FieldStatistics {}
- data TermVectorStats = TermVectorStats {}
- data TermVectorToken = TermVectorToken {}
- data TermVectorsRequest = TermVectorsRequest {
- termVectorsRequestFields :: Maybe [FieldName]
- termVectorsRequestOffsets :: Maybe Bool
- termVectorsRequestPositions :: Maybe Bool
- termVectorsRequestTermStatistics :: Maybe Bool
- termVectorsRequestFieldStatistics :: Maybe Bool
- termVectorsRequestPayload :: Maybe Bool
- termVectorsRequestFilter :: Maybe TermVectorsFilter
- data TermVectorsFilter = TermVectorsFilter {}
- defaultTermVectorsRequest :: TermVectorsRequest
- defaultTermVectorsFilter :: TermVectorsFilter
- data TermVectorsOptions = TermVectorsOptions {}
- defaultTermVectorsOptions :: TermVectorsOptions
- termVectorsOptionsParams :: TermVectorsOptions -> [(Text, Maybe Text)]
- getTermVectors :: MonadBH m => IndexName -> DocId -> TermVectorsRequest -> m TermVectors
- getTermVectorsWith :: MonadBH m => TermVectorsOptions -> IndexName -> DocId -> TermVectorsRequest -> m TermVectors
- data MultiTermVectorsDoc = MultiTermVectorsDoc {
- multiTermVectorsDocIndex :: Maybe IndexName
- multiTermVectorsDocId :: DocId
- multiTermVectorsDocFields :: Maybe [FieldName]
- multiTermVectorsDocOffsets :: Maybe Bool
- multiTermVectorsDocPositions :: Maybe Bool
- multiTermVectorsDocTermStatistics :: Maybe Bool
- multiTermVectorsDocFieldStatistics :: Maybe Bool
- multiTermVectorsDocPayload :: Maybe Bool
- multiTermVectorsDocFilter :: Maybe TermVectorsFilter
- mkMultiTermVectorsDoc :: DocId -> MultiTermVectorsDoc
- newtype MultiTermVectors = MultiTermVectors {}
- newtype MultiTermVectorsResponse = MultiTermVectorsResponse {}
- getMultiTermVectors :: MonadBH m => MultiTermVectors -> m MultiTermVectorsResponse
- getMultiTermVectorsWith :: MonadBH m => TermVectorsOptions -> MultiTermVectors -> m MultiTermVectorsResponse
- getMultiTermVectorsByIndex :: MonadBH m => IndexName -> [DocId] -> m MultiTermVectorsResponse
- getMultiTermVectorsByIndexWith :: MonadBH m => TermVectorsOptions -> IndexName -> [DocId] -> m MultiTermVectorsResponse
- data GetDocumentOptions = GetDocumentOptions {}
- defaultGetDocumentOptions :: GetDocumentOptions
- data GetDocumentSourceOptions = GetDocumentSourceOptions {}
- defaultGetDocumentSourceOptions :: GetDocumentSourceOptions
- data MultiGetOptions = MultiGetOptions {}
- defaultMultiGetOptions :: MultiGetOptions
- data DeleteDocumentOptions = DeleteDocumentOptions {}
- defaultDeleteDocumentOptions :: DeleteDocumentOptions
- data DocumentExistsOptions = DocumentExistsOptions {}
- defaultDocumentExistsOptions :: DocumentExistsOptions
- data DocumentSourceExistsOptions = DocumentSourceExistsOptions {}
- defaultDocumentSourceExistsOptions :: DocumentSourceExistsOptions
- data ByQueryOptions = ByQueryOptions {
- bqoConflicts :: Maybe ConflictsPolicy
- bqoWaitForCompletion :: Maybe Bool
- bqoRefresh :: Maybe RefreshPolicy
- bqoTimeout :: Maybe Text
- bqoScroll :: Maybe Text
- bqoScrollSize :: Maybe Natural
- bqoSlices :: Maybe Slices
- bqoRouting :: Maybe Text
- bqoMaxDocs :: Maybe Natural
- bqoRequestCache :: Maybe Bool
- bqoPipeline :: Maybe Text
- data ConflictsPolicy
- data Slices
- defaultByQueryOptions :: ByQueryOptions
- documentExists :: MonadBH m => IndexName -> DocId -> m Bool
- documentExistsWith :: MonadBH m => DocumentExistsOptions -> IndexName -> DocId -> m Bool
- documentSourceExists :: MonadBH m => IndexName -> DocId -> m Bool
- documentSourceExistsWith :: MonadBH m => DocumentSourceExistsOptions -> IndexName -> DocId -> m Bool
- deleteDocument :: MonadBH m => IndexName -> DocId -> m IndexedDocument
- deleteDocumentWith :: MonadBH m => DeleteDocumentOptions -> IndexName -> DocId -> m IndexedDocument
- deleteByQuery :: (MonadBH m, FromJSON a) => IndexName -> Query -> m a
- deleteByQueryWith :: forall a m. (MonadBH m, FromJSON a) => ByQueryOptions -> IndexName -> Query -> m a
- rethrottleDeleteByQuery :: MonadBH m => TaskNodeId -> RethrottleRate -> m TaskListResponse
- data IndexedDocument = IndexedDocument {}
- 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]
- data DeletedDocumentsRetries = DeletedDocumentsRetries {}
- searchAll :: forall a m. (MonadBH m, FromJSON a) => Search -> m (SearchResult a)
- searchAllWith :: forall a m. (MonadBH m, FromJSON a) => SearchOptions -> Search -> m (SearchResult a)
- multiSearch :: forall a m. (MonadBH m, FromJSON a) => NonEmpty MultiSearchItem -> m (MultiSearchResponse a)
- multiSearchWith :: forall a m. (MonadBH m, FromJSON a) => SearchOptions -> NonEmpty MultiSearchItem -> m (MultiSearchResponse a)
- multiSearchByIndex :: forall a m. (MonadBH m, FromJSON a) => IndexName -> NonEmpty Search -> m (MultiSearchResponse a)
- multiSearchByIndexWith :: forall a m. (MonadBH m, FromJSON a) => SearchOptions -> IndexName -> NonEmpty Search -> m (MultiSearchResponse a)
- data MultiSearchTemplateItem = MultiSearchTemplateItem {
- multiSearchTemplateItemIndex :: Maybe IndexName
- multiSearchTemplateItemRouting :: Maybe Text
- multiSearchTemplateItemSearchType :: Maybe SearchType
- multiSearchTemplateItemPreference :: Maybe Text
- multiSearchTemplateItemAllowPartialSearchResults :: Maybe Bool
- multiSearchTemplateItemSearchTemplate :: SearchTemplate
- multiSearchTemplate :: forall a m. (MonadBH m, FromJSON a) => NonEmpty MultiSearchTemplateItem -> m (MultiSearchResponse a)
- multiSearchTemplateWith :: forall a m. (MonadBH m, FromJSON a) => SearchOptions -> NonEmpty MultiSearchTemplateItem -> m (MultiSearchResponse a)
- multiSearchTemplateByIndex :: forall a m. (MonadBH m, FromJSON a) => IndexName -> NonEmpty SearchTemplate -> m (MultiSearchResponse a)
- multiSearchTemplateByIndexWith :: forall a m. (MonadBH m, FromJSON a) => SearchOptions -> IndexName -> NonEmpty SearchTemplate -> m (MultiSearchResponse a)
- searchByIndex :: forall a m. (MonadBH m, FromJSON a) => IndexName -> Search -> m (SearchResult a)
- searchByIndexWith :: forall a m. (MonadBH m, FromJSON a) => IndexName -> SearchOptions -> Search -> m (SearchResult a)
- searchByIndices :: forall a m. (MonadBH m, FromJSON a) => NonEmpty IndexName -> Search -> m (SearchResult a)
- searchByIndicesWith :: forall a m. (MonadBH m, FromJSON a) => NonEmpty IndexName -> SearchOptions -> Search -> m (SearchResult a)
- explainDocument :: MonadBH m => IndexName -> DocId -> Query -> m ExplainResponse
- explainDocumentWith :: MonadBH m => ExplainOptions -> IndexName -> DocId -> Query -> m ExplainResponse
- data ExplainOptions = ExplainOptions {}
- defaultExplainOptions :: ExplainOptions
- explainOptionsParams :: ExplainOptions -> [(Text, Maybe Text)]
- searchByIndexTemplate :: forall a m. (MonadBH m, FromJSON a) => IndexName -> SearchTemplate -> m (SearchResult a)
- searchByIndicesTemplate :: forall a m. (MonadBH m, FromJSON a) => NonEmpty IndexName -> SearchTemplate -> m (SearchResult a)
- scanSearch :: (FromJSON a, MonadBH m) => IndexName -> Search -> m [Hit a]
- getInitialScroll :: forall a m. (MonadBH m, FromJSON a) => IndexName -> Search -> m (ParsedEsResponse (SearchResult a))
- getInitialSortedScroll :: forall a m. (MonadBH m, FromJSON a) => IndexName -> Search -> m (SearchResult a)
- advanceScroll :: forall a m. (MonadBH m, FromJSON a) => ScrollId -> NominalDiffTime -> m (SearchResult a)
- advanceScrollWith :: forall a m. (MonadBH m, FromJSON a) => AdvanceScrollOptions -> ScrollId -> NominalDiffTime -> m (SearchResult a)
- data AdvanceScrollOptions = AdvanceScrollOptions {}
- defaultAdvanceScrollOptions :: AdvanceScrollOptions
- advanceScrollOptionsParams :: AdvanceScrollOptions -> [(Text, Maybe Text)]
- clearScroll :: MonadBH m => ScrollId -> m ClearScrollResponse
- refreshIndex :: MonadBH m => IndexName -> m ShardsResult
- refreshIndexWith :: MonadBH m => RefreshIndexOptions -> IndexName -> m ShardsResult
- data RefreshIndexOptions = RefreshIndexOptions {}
- defaultRefreshIndexOptions :: RefreshIndexOptions
- mkSearch :: Maybe Query -> Maybe Filter -> Search
- data SearchOptions = SearchOptions {
- soAllowNoIndices :: Maybe Bool
- soExpandWildcards :: Maybe (NonEmpty ExpandWildcards)
- soIgnoreUnavailable :: Maybe Bool
- soPreference :: Maybe Text
- soRouting :: Maybe Text
- soRequestCache :: Maybe Bool
- soTypedKeys :: Maybe Bool
- soSeqNoPrimaryTerm :: Maybe Bool
- soMaxConcurrentShardRequests :: Maybe Int
- soBatchedReduceSize :: Maybe Int
- soCcsMinimizeRoundtrips :: Maybe Bool
- soAllowPartialSearchResults :: Maybe Bool
- soPreFilterShardSize :: Maybe Int
- soCancelAfterTimeInterval :: Maybe (TimeUnits, Word32)
- soMaxConcurrentSearches :: Maybe Int
- soSource :: Maybe Bool
- soSourceIncludes :: Maybe Text
- soSourceExcludes :: Maybe Text
- defaultSearchOptions :: SearchOptions
- mkAggregateSearch :: Maybe Query -> Aggregations -> Search
- mkHighlightSearch :: Maybe Query -> Highlights -> Search
- mkSearchTemplate :: Either SearchTemplateId SearchTemplateSource -> TemplateQueryKeyValuePairs -> SearchTemplate
- bulk :: MonadBH m => Vector BulkOperation -> m BulkResponse
- bulkWith :: MonadBH m => BulkSettings -> Vector BulkOperation -> m BulkResponse
- pageSearch :: From -> Size -> Search -> Search
- mkShardCount :: Int -> Maybe ShardCount
- mkReplicaCount :: Int -> Maybe ReplicaCount
- getStatus :: MonadBH m => m Status
- storeSearchTemplate :: MonadBH m => SearchTemplateId -> SearchTemplateSource -> m Acknowledged
- getSearchTemplate :: MonadBH m => SearchTemplateId -> m GetTemplateScript
- deleteSearchTemplate :: MonadBH m => SearchTemplateId -> m Acknowledged
- renderTemplate :: MonadBH m => SearchTemplate -> m (ParsedEsResponse Value)
- getSnapshotRepos :: MonadBH m => SnapshotRepoSelection -> m [GenericSnapshotRepo]
- getSnapshotReposWith :: MonadBH m => SnapshotRepoSelection -> SnapshotRepoGetOptions -> m [GenericSnapshotRepo]
- updateSnapshotRepo :: (MonadBH m, SnapshotRepo repo) => SnapshotRepoUpdateSettings -> repo -> m Acknowledged
- verifySnapshotRepo :: MonadBH m => SnapshotRepoName -> m SnapshotVerification
- verifySnapshotRepoWith :: MonadBH m => SnapshotRepoName -> SnapshotRepoTimeoutOptions -> m SnapshotVerification
- cleanupSnapshotRepo :: MonadBH m => SnapshotRepoName -> m SnapshotCleanupResult
- cleanupSnapshotRepoWith :: MonadBH m => SnapshotRepoName -> SnapshotMasterTimeoutOptions -> m SnapshotCleanupResult
- deleteSnapshotRepo :: MonadBH m => SnapshotRepoName -> m Acknowledged
- deleteSnapshotRepoWith :: MonadBH m => SnapshotRepoName -> SnapshotRepoTimeoutOptions -> m Acknowledged
- data SnapshotMasterTimeoutOptions = SnapshotMasterTimeoutOptions {}
- defaultSnapshotMasterTimeoutOptions :: SnapshotMasterTimeoutOptions
- data SnapshotRepoGetOptions = SnapshotRepoGetOptions {}
- defaultSnapshotRepoGetOptions :: SnapshotRepoGetOptions
- data SnapshotRepoTimeoutOptions = SnapshotRepoTimeoutOptions {
- srtoMasterTimeout :: Maybe (TimeUnits, Word32)
- srtoTimeout :: Maybe (TimeUnits, Word32)
- defaultSnapshotRepoTimeoutOptions :: SnapshotRepoTimeoutOptions
- createSnapshot :: MonadBH m => SnapshotRepoName -> SnapshotName -> SnapshotCreateSettings -> m CreateSnapshotResponse
- cloneSnapshot :: MonadBH m => SnapshotRepoName -> SnapshotName -> SnapshotName -> SnapshotCloneSettings -> m Acknowledged
- getSnapshots :: MonadBH m => SnapshotRepoName -> SnapshotSelection -> m [SnapshotInfo]
- getSnapshotsWith :: MonadBH m => SnapshotRepoName -> SnapshotSelection -> SnapshotSelectionOptions -> m [SnapshotInfo]
- data SnapshotSelectionOptions = SnapshotSelectionOptions {
- ssoMasterTimeout :: Maybe (TimeUnits, Word32)
- ssoVerbose :: Maybe Bool
- ssoIndexDetails :: Maybe Bool
- ssoIncludeRepository :: Maybe Bool
- ssoSort :: Maybe SnapshotSortField
- ssoOrder :: Maybe SnapshotSortOrder
- ssoSize :: Maybe Word32
- ssoOffset :: Maybe Word32
- ssoAfter :: Maybe Text
- ssoFromSortValue :: Maybe Text
- ssoIgnoreUnavailableSnapshots :: Maybe Bool
- ssoIndexNames :: Maybe Bool
- ssoSlmPolicyFilter :: Maybe Text
- data SnapshotSortField
- data SnapshotSortOrder
- defaultSnapshotSelectionOptions :: SnapshotSelectionOptions
- getSnapshotStatus :: MonadBH m => SnapshotRepoName -> SnapshotName -> m [SnapshotStatus]
- getSnapshotStatusWith :: MonadBH m => SnapshotRepoName -> SnapshotName -> SnapshotStatusOptions -> m [SnapshotStatus]
- data SnapshotStatusOptions = SnapshotStatusOptions {}
- defaultSnapshotStatusOptions :: SnapshotStatusOptions
- deleteSnapshot :: MonadBH m => SnapshotRepoName -> SnapshotName -> m Acknowledged
- deleteSnapshotWith :: MonadBH m => SnapshotRepoName -> SnapshotName -> SnapshotMasterTimeoutOptions -> m Acknowledged
- restoreSnapshot :: MonadBH m => SnapshotRepoName -> SnapshotName -> SnapshotRestoreSettings -> m Accepted
- reindex :: MonadBH m => ReindexRequest -> m ReindexResponse
- reindexWith :: MonadBH m => ReindexOptions -> ReindexRequest -> m ReindexResponse
- reindexAsync :: MonadBH m => ReindexRequest -> m TaskNodeId
- reindexAsyncWith :: MonadBH m => ReindexOptions -> ReindexRequest -> m TaskNodeId
- rethrottleReindex :: MonadBH m => TaskNodeId -> RethrottleRate -> m TaskListResponse
- data ReindexOptions = ReindexOptions {
- rioConflicts :: Maybe ConflictsPolicy
- rioRefresh :: Maybe RefreshPolicy
- rioTimeout :: Maybe Text
- rioScroll :: Maybe Text
- rioWaitForActiveShards :: Maybe ActiveShardCount
- rioRequestsPerSecond :: Maybe Natural
- rioSlices :: Maybe Slices
- rioPipeline :: Maybe Text
- rioRequireAlias :: Maybe Bool
- rioMaxDocs :: Maybe Natural
- defaultReindexOptions :: ReindexOptions
- reindexOptionsParams :: ReindexOptions -> [(Text, Maybe Text)]
- getTask :: (MonadBH m, FromJSON a) => TaskNodeId -> m (TaskResponse a)
- getTaskWith :: (MonadBH m, FromJSON a) => TaskGetOptions -> TaskNodeId -> m (TaskResponse a)
- cancelTask :: MonadBH m => TaskNodeId -> m TaskListResponse
- listTasks :: MonadBH m => Maybe TaskListOptions -> m TaskListResponse
- data TaskInfo = TaskInfo {}
- data TaskListNode = TaskListNode {}
- newtype TaskListResponse = TaskListResponse {}
- taskListFlat :: TaskListResponse -> [TaskInfo]
- data TaskListOptions = TaskListOptions {}
- data TaskListGroupBy
- defaultTaskListOptions :: TaskListOptions
- data TaskGetOptions = TaskGetOptions {}
- defaultTaskGetOptions :: TaskGetOptions
- getAsyncSearch :: (MonadBH m, FromJSON a) => AsyncSearchId -> m (AsyncSearchResult a)
- getAsyncSearchStatus :: MonadBH m => AsyncSearchId -> m AsyncSearchStatus
- getNodesInfo :: MonadBH m => NodeSelection -> m NodesInfo
- getNodesInfoWith :: MonadBH m => NodeSelection -> NodeInfoOptions -> m NodesInfo
- getNodesStats :: MonadBH m => NodeSelection -> m NodesStats
- getNodesStatsWith :: MonadBH m => NodeSelection -> NodeStatsOptions -> m NodesStats
- getNodesUsage :: MonadBH m => NodeSelection -> m NodesUsage
- getNodesUsageWith :: MonadBH m => NodeSelection -> NodeUsageOptions -> m NodesUsage
- getNodesHotThreads :: MonadBH m => Maybe NodeSelector -> Maybe ThreadCount -> m Text
- getNodesHotThreadsWith :: MonadBH m => Maybe NodeSelector -> HotThreadsOptions -> m Text
- reloadSecureSettings :: MonadBH m => Maybe NodeSelection -> m Acknowledged
- data NodeInfoMetric
- = NodeInfoMetricSettings
- | NodeInfoMetricOS
- | NodeInfoMetricProcess
- | NodeInfoMetricJVM
- | NodeInfoMetricThreadPool
- | NodeInfoMetricTransport
- | NodeInfoMetricHTTP
- | NodeInfoMetricPlugins
- | NodeInfoMetricIngest
- | NodeInfoMetricAggregations
- | NodeInfoMetricIndices
- | NodeInfoMetricDiscovery
- | NodeInfoMetricScripting
- | NodeInfoMetricAction
- | OtherNodeInfoMetric Text
- renderNodeInfoMetric :: NodeInfoMetric -> Text
- data NodeStatsMetric
- = NodeStatsMetricIndices
- | NodeStatsMetricOS
- | NodeStatsMetricProcess
- | NodeStatsMetricJVM
- | NodeStatsMetricThreadPool
- | NodeStatsMetricFS
- | NodeStatsMetricTransport
- | NodeStatsMetricHTTP
- | NodeStatsMetricBreakers
- | NodeStatsMetricScript
- | NodeStatsMetricDiscovery
- | NodeStatsMetricIngest
- | NodeStatsMetricAdaptiveSelection
- | NodeStatsMetricScriptCache
- | NodeStatsMetricIndexingPressure
- | NodeStatsMetricCgroup
- | OtherNodeStatsMetric Text
- renderNodeStatsMetric :: NodeStatsMetric -> Text
- data NodeStatsLevel
- renderNodeStatsLevel :: NodeStatsLevel -> Text
- data NodeUsageMetric
- renderNodeUsageMetric :: NodeUsageMetric -> Text
- getClusterHealth :: MonadBH m => m ClusterHealth
- getClusterHealthWith :: MonadBH m => ClusterHealthOptions -> m ClusterHealth
- getClusterHealthForIndex :: MonadBH m => IndexName -> m ClusterHealth
- getClusterHealthForIndexWith :: MonadBH m => ClusterHealthOptions -> IndexName -> m ClusterHealth
- data ClusterHealthOptions = ClusterHealthOptions {
- choLevel :: Maybe ClusterHealthLevel
- choLocal :: Maybe Bool
- choMasterTimeout :: Maybe (TimeUnits, Word32)
- choWaitForStatus :: Maybe ClusterHealthStatus
- choWaitForActiveShards :: Maybe ActiveShardCount
- choWaitForNodes :: Maybe Text
- choWaitForNoRelocatingShards :: Maybe Bool
- choWaitForNoInitializingShards :: Maybe Bool
- choTimeout :: Maybe (TimeUnits, Word32)
- data ClusterHealthLevel
- data ClusterHealthStatus
- defaultClusterHealthOptions :: ClusterHealthOptions
- getClusterSettings :: MonadBH m => m ClusterSettings
- getClusterSettingsWith :: MonadBH m => ClusterSettingsOptions -> m ClusterSettings
- data ClusterSettings = ClusterSettings {}
- data ClusterSettingsOptions = ClusterSettingsOptions {}
- defaultClusterSettingsOptions :: ClusterSettingsOptions
- updateClusterSettings :: MonadBH m => ClusterSettingsUpdate -> m Acknowledged
- updateClusterSettingsWith :: MonadBH m => ClusterSettingsUpdateOptions -> ClusterSettingsUpdate -> m Acknowledged
- data ClusterSettingsUpdate = ClusterSettingsUpdate {}
- defaultClusterSettingsUpdate :: ClusterSettingsUpdate
- data ClusterSettingsUpdateOptions = ClusterSettingsUpdateOptions {}
- defaultClusterSettingsUpdateOptions :: ClusterSettingsUpdateOptions
- getClusterState :: MonadBH m => m ClusterState
- getClusterStateWith :: MonadBH m => ClusterStateOptions -> m ClusterState
- data ClusterStateOptions = ClusterStateOptions {}
- data ClusterStateMetric
- renderClusterStateMetric :: ClusterStateMetric -> Text
- defaultClusterStateOptions :: ClusterStateOptions
- getClusterStats :: MonadBH m => m ClusterStats
- getPendingTasks :: MonadBH m => m [PendingTask]
- data PendingTask = PendingTask {}
- data PendingTaskPriority
- explainAllocation :: MonadBH m => Maybe AllocationExplainRequest -> m AllocationExplanation
- data AllocationExplainRequest = AllocationExplainRequest {}
- data AllocationExplanation = AllocationExplanation {
- aeIndex :: Maybe IndexName
- aeShard :: Maybe ShardId
- aePrimary :: Maybe Bool
- aeCurrentState :: Text
- aeCurrentNode :: Maybe Value
- aeRelocatingNode :: Maybe Value
- aeShardState :: Maybe Text
- aeUnassignedInfo :: Maybe Value
- aeAllocateDroning :: Maybe Bool
- aeClusterInfo :: Maybe Value
- aeNodes :: Maybe Value
- aeDecisions :: Maybe Value
- aeOther :: Value
- defaultAllocationExplainRequest :: AllocationExplainRequest
- mkAllocationExplainRequest :: IndexName -> ShardId -> Bool -> AllocationExplainRequest
- getRemoteClusterInfo :: MonadBH m => m RemoteClustersInfo
- newtype RemoteClustersInfo = RemoteClustersInfo {}
- data RemoteClusterInfo = RemoteClusterInfo {}
- data RemoteClusterMode
- updateVotingConfigExclusions :: MonadBH m => VotingConfigExclusionOptions -> m Acknowledged
- clearVotingConfigExclusions :: MonadBH m => m Acknowledged
- data VotingConfigExclusionOptions = VotingConfigExclusionOptions {}
- defaultVotingConfigExclusionOptions :: VotingConfigExclusionOptions
- votingConfigExclusionOptionsParams :: VotingConfigExclusionOptions -> [(Text, Maybe Text)]
- rerouteCluster :: MonadBH m => [RerouteCommand] -> m Acknowledged
- rerouteClusterWith :: MonadBH m => RerouteOptions -> [RerouteCommand] -> m RerouteResponse
- data RerouteCommand
- = RerouteMove { }
- | RerouteCancel { }
- | RerouteAllocateReplica { }
- | RerouteAllocateStalePrimary { }
- | RerouteAllocateEmptyPrimary { }
- | RerouteCmdOther Value
- data RerouteOptions = RerouteOptions {}
- defaultRerouteOptions :: RerouteOptions
- rerouteOptionsParams :: RerouteOptions -> [(Text, Maybe Text)]
- data RerouteResponse = RerouteResponse {
- rrAcknowledged :: Bool
- rrState :: Maybe Value
- rrExplanations :: Maybe [Value]
- rrOther :: Value
- getILMPolicy :: MonadBH m => Maybe ILMPolicyId -> m [ILMPolicyInfo]
- putILMPolicy :: MonadBH m => ILMPolicyId -> ILMPolicy -> m Acknowledged
- deleteILMPolicy :: MonadBH m => ILMPolicyId -> m Acknowledged
- explainILM :: MonadBH m => IndexName -> m ILMExplanations
- explainILMWith :: MonadBH m => ILMExplainOptions -> IndexName -> m ILMExplanations
- startILM :: MonadBH m => m Acknowledged
- stopILM :: MonadBH m => m Acknowledged
- getILMStatus :: MonadBH m => m ILMStatus
- moveILMStep :: MonadBH m => IndexName -> MoveStepRequest -> m Acknowledged
- retryILMStep :: MonadBH m => IndexName -> m Acknowledged
- removeILM :: MonadBH m => IndexName -> m Acknowledged
- migrateDataTiers :: MonadBH m => m MigrateDataTiersResponse
- migrateDataTiersWith :: MonadBH m => MigrateDataTiersOptions -> MigrateDataTiersRequest -> m MigrateDataTiersResponse
- newtype ILMPolicyId = ILMPolicyId {}
- newtype ILMPolicy = ILMPolicy {
- unILMPolicy :: Value
- data ILMPolicyInfo = ILMPolicyInfo {}
- data ILMInUseBy = ILMInUseBy {}
- data ILMExplanation = ILMExplanation {
- ilmExplanationIndex :: IndexName
- ilmExplanationManaged :: Bool
- ilmExplanationPolicy :: Maybe Text
- ilmExplanationPhase :: Maybe Text
- ilmExplanationPhaseTime :: Maybe Text
- ilmExplanationPhaseTimeMillis :: Maybe Int
- ilmExplanationAction :: Maybe Text
- ilmExplanationActionTime :: Maybe Text
- ilmExplanationActionTimeMillis :: Maybe Int
- ilmExplanationStep :: Maybe Text
- ilmExplanationStepTime :: Maybe Text
- ilmExplanationStepTimeMillis :: Maybe Int
- ilmExplanationStepInfo :: Maybe Value
- ilmExplanationAge :: Maybe Text
- ilmExplanationLifecycleDate :: Maybe Text
- ilmExplanationLifecycleDateMillis :: Maybe Int
- ilmExplanationIndexCreationDate :: Maybe Text
- ilmExplanationIndexCreationDateMillis :: Maybe Int
- ilmExplanationTimeSinceIndexCreation :: Maybe Text
- newtype ILMExplanations = ILMExplanations {}
- data ILMExplainOptions = ILMExplainOptions {}
- defaultILMExplainOptions :: ILMExplainOptions
- data ILMStepKey = ILMStepKey {}
- data MoveStepRequest = MoveStepRequest {}
- data ILMOperationMode
- newtype ILMStatus = ILMStatus {}
- data MigrateDataTiersRequest = MigrateDataTiersRequest {}
- defaultMigrateDataTiersRequest :: MigrateDataTiersRequest
- data MigrateDataTiersOptions = MigrateDataTiersOptions {}
- defaultMigrateDataTiersOptions :: MigrateDataTiersOptions
- data MigrateDataTiersResponse = MigrateDataTiersResponse {
- migrateDataTiersResponseDryRun :: Bool
- migrateDataTiersResponseRemovedLegacyTemplate :: Maybe Text
- migrateDataTiersResponseMigratedIlmPolicies :: [Text]
- migrateDataTiersResponseMigratedIndices :: [Text]
- migrateDataTiersResponseMigratedLegacyTemplates :: [Text]
- migrateDataTiersResponseMigratedComposableTemplates :: [Text]
- migrateDataTiersResponseMigratedComponentTemplates :: [Text]
- putSLMPolicy :: MonadBH m => SLMPolicyId -> SLMPolicy -> m Acknowledged
- getSLMPolicy :: MonadBH m => Maybe SLMPolicyId -> m [SLMPolicyInfo]
- deleteSLMPolicy :: MonadBH m => SLMPolicyId -> m Acknowledged
- executeSLMPolicy :: MonadBH m => SLMPolicyId -> m SnapshotName
- getSLMStatus :: MonadBH m => m SLMStatus
- stopSLM :: MonadBH m => m Acknowledged
- startSLM :: MonadBH m => m Acknowledged
- putEnrichPolicy :: MonadBH m => EnrichPolicyId -> EnrichPolicy -> m Acknowledged
- getEnrichPolicy :: MonadBH m => Maybe EnrichPolicyId -> m EnrichPoliciesResponse
- deleteEnrichPolicy :: MonadBH m => EnrichPolicyId -> m Acknowledged
- executeEnrichPolicy :: MonadBH m => EnrichPolicyId -> m Acknowledged
- executeEnrichPolicyWith :: MonadBH m => EnrichPolicyId -> EnrichExecuteOptions -> m Acknowledged
- getEnrichExecuteStats :: MonadBH m => m EnrichExecuteStatsResponse
- getEnrichPolicyExecuteStats :: MonadBH m => EnrichPolicyId -> m EnrichExecuteStatsResponse
- newtype EnrichPolicyId = EnrichPolicyId {}
- data EnrichPolicyType
- data EnrichPolicyConfig = EnrichPolicyConfig {}
- data EnrichPolicy = EnrichPolicy {}
- data EnrichPolicyInfo = EnrichPolicyInfo {}
- newtype EnrichPoliciesResponse = EnrichPoliciesResponse {}
- data EnrichPolicyPhase
- data EnrichExecuteStatsEntry = EnrichExecuteStatsEntry {}
- data EnrichExecuteStatsResponse = EnrichExecuteStatsResponse {}
- data EnrichExecuteOptions = EnrichExecuteOptions {}
- defaultEnrichExecuteOptions :: EnrichExecuteOptions
- putAutoscalingPolicy :: MonadBH m => AutoscalingPolicyName -> AutoscalingPolicy -> m Acknowledged
- getAutoscalingPolicy :: MonadBH m => AutoscalingPolicyName -> m AutoscalingPolicy
- deleteAutoscalingPolicy :: MonadBH m => AutoscalingPolicyName -> m Acknowledged
- getAutoscalingCapacity :: MonadBH m => m AutoscalingCapacity
- newtype AutoscalingPolicyName = AutoscalingPolicyName {}
- data AutoscalingPolicy = AutoscalingPolicy {}
- defaultAutoscalingPolicy :: AutoscalingPolicy
- newtype AutoscalingCapacity = AutoscalingCapacity {}
- data AutoscalingCapacityPolicy = AutoscalingCapacityPolicy {}
- data CapacitySize = CapacitySize {}
- data AutoscalingResource = AutoscalingResource {}
- data AutoscalingCurrentNode = AutoscalingCurrentNode {
- acndName :: Text
- acndExtras :: KeyMap Value
- data AutoscalingDeciderResult = AutoscalingDeciderResult {}
- newtype ClusterPrivilege = ClusterPrivilege {}
- newtype IndexPrivilegeName = IndexPrivilegeName {}
- newtype ApplicationName = ApplicationName {}
- newtype ApplicationPrivilegeName = ApplicationPrivilegeName {}
- newtype ResourceName = ResourceName {}
- data FieldSecurity = FieldSecurity {}
- defaultFieldSecurity :: FieldSecurity
- data IndexPrivilege = IndexPrivilege {}
- defaultIndexPrivilege :: IndexPattern -> IndexPrivilegeName -> IndexPrivilege
- data ApplicationPrivilege = ApplicationPrivilege {}
- defaultApplicationPrivilege :: ApplicationName -> ApplicationPrivilege
- putRole :: MonadBH m => RoleName -> Role -> m RoleCreatedResponse
- getRole :: MonadBH m => RoleName -> m RolesListResponse
- getRoles :: MonadBH m => m RolesListResponse
- deleteRole :: MonadBH m => RoleName -> m RoleDeletedResponse
- clearRoleCache :: MonadBH m => RoleName -> m ClearRoleCacheResponse
- newtype RoleName = RoleName {
- unRoleName :: Text
- data Role = Role {
- rCluster :: [ClusterPrivilege]
- rIndices :: [IndexPrivilege]
- rApplications :: [ApplicationPrivilege]
- rRunAs :: [Text]
- rMetadata :: KeyMap Value
- rTransientMetadata :: Maybe (KeyMap Value)
- rExtras :: KeyMap Value
- defaultRole :: Role
- newtype RoleCreatedResponse = RoleCreatedResponse {}
- data RoleDeletedResponse = RoleDeletedResponse {
- rdFound :: Maybe Bool
- rdAcknowledged :: Bool
- newtype RolesListResponse = RolesListResponse {
- rolesListEntries :: [(RoleName, Role)]
- newtype ClearRoleCacheResponse = ClearRoleCacheResponse {
- clearedRoles :: [RoleName]
- putRoleMapping :: MonadBH m => RoleMappingName -> RoleMapping -> m Acknowledged
- getRoleMapping :: MonadBH m => RoleMappingName -> m RoleMappingsListResponse
- getRoleMappings :: MonadBH m => m RoleMappingsListResponse
- deleteRoleMapping :: MonadBH m => RoleMappingName -> m Acknowledged
- newtype RoleMappingName = RoleMappingName {}
- data RoleMapping = RoleMapping {
- romEnabled :: Maybe Bool
- romRoles :: [RoleName]
- romRules :: RoleMappingRule
- romMetadata :: KeyMap Value
- romExtras :: KeyMap Value
- defaultRoleMapping :: RoleMapping
- data RoleMappingRule
- newtype RoleMappingsListResponse = RoleMappingsListResponse {}
- putUser :: MonadBH m => UserName -> UserCreateBody -> m UserCreatedResponse
- getUser :: MonadBH m => UserName -> m UsersListResponse
- getUsers :: MonadBH m => m UsersListResponse
- deleteUser :: MonadBH m => UserName -> m UserDeletedResponse
- enableUser :: MonadBH m => UserName -> m Acknowledged
- disableUser :: MonadBH m => UserName -> m Acknowledged
- changeUserPassword :: MonadBH m => UserName -> ChangePasswordBody -> m Acknowledged
- userHasPrivileges :: MonadBH m => UserName -> HasPrivilegesRequest -> m HasPrivilegesResponse
- selfHasPrivileges :: MonadBH m => HasPrivilegesRequest -> m HasPrivilegesResponse
- getUserPrivileges :: MonadBH m => m UserPrivileges
- newtype UserName = UserName {
- unUserName :: Text
- data User = User {}
- data UserCreateBody = UserCreateBody {
- ucbPassword :: Maybe SecretText
- ucbRoles :: [RoleName]
- ucbFullName :: Maybe Text
- ucbEmail :: Maybe Text
- ucbEnabled :: Maybe Bool
- ucbMetadata :: KeyMap Value
- defaultUserCreateBody :: UserCreateBody
- newtype UserCreatedResponse = UserCreatedResponse {}
- data UserDeletedResponse = UserDeletedResponse {
- udFound :: Maybe Bool
- udAcknowledged :: Bool
- newtype UsersListResponse = UsersListResponse {
- usersListEntries :: [(UserName, User)]
- newtype ChangePasswordBody = ChangePasswordBody {}
- data HasPrivilegesRequest = HasPrivilegesRequest {
- hprCluster :: [ClusterPrivilege]
- hprIndex :: [(IndexPattern, [IndexPrivilegeName])]
- hprApplication :: [(ApplicationName, [(ResourceName, [ApplicationPrivilegeName])])]
- defaultHasPrivilegesRequest :: HasPrivilegesRequest
- data HasPrivilegesResponse = HasPrivilegesResponse {
- hpUsername :: UserName
- hpHasAllRequested :: Bool
- hpCluster :: [(ClusterPrivilege, Bool)]
- hpIndex :: [(IndexPattern, [(IndexPrivilegeName, Bool)])]
- hpApplication :: [(ApplicationName, [(ResourceName, [(ApplicationPrivilegeName, Bool)])])]
- newtype HasPrivilegesIndexResult = HasPrivilegesIndexResult {
- hpirPrivileges :: [(IndexPrivilegeName, Bool)]
- newtype HasPrivilegesApplicationResult = HasPrivilegesApplicationResult {
- hparResources :: [(ResourceName, [(ApplicationPrivilegeName, Bool)])]
- data UserPrivileges = UserPrivileges {}
- data UserIndexPrivileges = UserIndexPrivileges {}
- data UserApplicationPrivileges = UserApplicationPrivileges {}
- createApiKey :: MonadBH m => CreateApiKeyRequest -> m ApiKeyCreatedResponse
- grantApiKey :: MonadBH m => GrantApiKeyRequest -> m ApiKeyCreatedResponse
- getApiKey :: MonadBH m => RetrieveApiKeyRequest -> m ApiKeyRetrievalResponse
- invalidateApiKey :: MonadBH m => InvalidateApiKeyRequest -> m InvalidateApiKeyResponse
- updateApiKey :: MonadBH m => ApiKeyId -> UpdateApiKeyRequest -> m Acknowledged
- queryApiKey :: MonadBH m => QueryApiKeyRequest -> m QueryApiKeyResponse
- queryApiKeyWith :: MonadBH m => QueryApiKeyRequest -> QueryApiKeyOptions -> m QueryApiKeyResponse
- authenticate :: MonadBH m => m AuthenticateResponse
- whoami :: MonadBH m => m WhoAmIResponse
- logout :: MonadBH m => LogoutRequest -> m LogoutResponse
- newtype ApiKeyId = ApiKeyId {
- unApiKeyId :: Text
- newtype ApiKeyName = ApiKeyName {
- unApiKeyName :: Text
- data CreateApiKeyRequest = CreateApiKeyRequest {}
- defaultCreateApiKeyRequest :: ApiKeyName -> CreateApiKeyRequest
- data ApiKeyCreatedResponse = ApiKeyCreatedResponse {}
- data GrantApiKeyRequest = GrantApiKeyRequest {}
- data GrantType
- data ApiKeySpec = ApiKeySpec {}
- defaultApiKeySpec :: ApiKeyName -> ApiKeySpec
- data RetrieveApiKeyRequest = RetrieveApiKeyRequest {
- rakId :: Maybe ApiKeyId
- rakName :: Maybe ApiKeyName
- rakOwner :: Maybe Bool
- rakRealmName :: Maybe Text
- rakUsername :: Maybe Text
- defaultRetrieveApiKeyRequest :: RetrieveApiKeyRequest
- data ApiKeyInfo = ApiKeyInfo {}
- apiKeyInfoExtrasLens :: Lens' ApiKeyInfo (KeyMap Value)
- data ApiKeyRetrievalResponse = ApiKeyRetrievalResponse {
- akrApiKeys :: [ApiKeyInfo]
- akrCount :: Maybe Int
- data InvalidateApiKeyRequest = InvalidateApiKeyRequest {}
- defaultInvalidateApiKeyRequest :: InvalidateApiKeyRequest
- data InvalidateApiKeyResponse = InvalidateApiKeyResponse {}
- data InvalidateApiKeyError = InvalidateApiKeyError {}
- data UpdateApiKeyRequest = UpdateApiKeyRequest {}
- data QueryApiKeyRequest = QueryApiKeyRequest {}
- defaultQueryApiKeyRequest :: QueryApiKeyRequest
- data QueryApiKeyResponse = QueryApiKeyResponse {}
- data QueryApiKeyOptions = QueryApiKeyOptions {}
- defaultQueryApiKeyOptions :: QueryApiKeyOptions
- data AuthenticateResponse = AuthenticateResponse {
- authUsername :: UserName
- authRoles :: [RoleName]
- authFullName :: Maybe Text
- authEmail :: Maybe Text
- authEnabled :: Maybe Bool
- authMetadata :: KeyMap Value
- authAuthenticationRealm :: Maybe SecurityRealm
- authLookupRealm :: Maybe SecurityRealm
- authAuthenticationProvider :: Maybe Text
- authPrincipal :: Maybe Text
- authExtras :: KeyMap Value
- data SecurityRealm = SecurityRealm {}
- data WhoAmIResponse = WhoAmIResponse {}
- whoAmIResponseExtrasLens :: Lens' WhoAmIResponse (KeyMap Value)
- data LogoutRequest = LogoutRequest {
- lrToken :: Text
- lrRefreshToken :: Maybe Text
- defaultLogoutRequest :: Text -> LogoutRequest
- newtype LogoutResponse = LogoutResponse {}
- getServiceAccounts :: MonadBH m => m ServiceAccountsListResponse
- getServiceAccountsInNamespace :: MonadBH m => ServiceAccountNamespace -> m ServiceAccountsListResponse
- getServiceAccount :: MonadBH m => ServiceAccountNamespace -> ServiceAccountService -> m ServiceAccountsListResponse
- createServiceToken :: MonadBH m => ServiceAccountNamespace -> ServiceAccountService -> Maybe ServiceTokenName -> m CreateServiceTokenResponse
- getServiceCredentials :: MonadBH m => ServiceAccountNamespace -> ServiceAccountService -> m GetServiceCredentialsResponse
- deleteServiceToken :: MonadBH m => ServiceAccountNamespace -> ServiceAccountService -> ServiceTokenName -> m ServiceTokenDeletedResponse
- newtype ServiceAccountNamespace = ServiceAccountNamespace {}
- newtype ServiceAccountService = ServiceAccountService {}
- newtype ServiceTokenName = ServiceTokenName {}
- data ServiceAccount = ServiceAccount {}
- defaultServiceAccount :: ServiceAccount
- newtype ServiceAccountsListResponse = ServiceAccountsListResponse {}
- data ServiceTokenSecret = ServiceTokenSecret {}
- data CreateServiceTokenResponse = CreateServiceTokenResponse {}
- data GetServiceCredentialsResponse = GetServiceCredentialsResponse {}
- data ServiceTokenDeletedResponse = ServiceTokenDeletedResponse {}
- getToken :: MonadBH m => GetTokenRequest -> m GetTokenResponse
- invalidateToken :: MonadBH m => InvalidateTokenRequest -> m InvalidateTokenResponse
- prepareSamlAuthentication :: MonadBH m => SamlPrepareRequest -> m SamlPrepareResponse
- authenticateSaml :: MonadBH m => SamlAuthenticateRequest -> m SsoTokenResponse
- logoutSaml :: MonadBH m => SamlLogoutRequest -> m SsoRedirectResponse
- prepareOidcAuthentication :: MonadBH m => OidcPrepareRequest -> m OidcPrepareResponse
- authenticateOidc :: MonadBH m => OidcAuthenticateRequest -> m SsoTokenResponse
- logoutOidc :: MonadBH m => OidcLogoutRequest -> m SsoRedirectResponse
- newtype SsoToken = SsoToken {}
- newtype SsoRefreshToken = SsoRefreshToken {}
- data OAuth2GrantType
- oAuth2GrantTypeText :: OAuth2GrantType -> Text
- data GetTokenRequest = GetTokenRequest {}
- defaultGetTokenRequest :: GetTokenRequest
- data GetTokenResponse = GetTokenResponse {}
- data TokenAuthentication = TokenAuthentication {}
- data SsoRealmInfo = SsoRealmInfo {}
- tokenAuthenticationExtrasLens :: Lens' TokenAuthentication (KeyMap Value)
- data InvalidateTokenRequest = InvalidateTokenRequest {}
- defaultInvalidateTokenRequest :: InvalidateTokenRequest
- data InvalidateTokenResponse = InvalidateTokenResponse {}
- data InvalidateTokenError = InvalidateTokenError {}
- data SsoTokenResponse = SsoTokenResponse {}
- newtype SsoRedirectResponse = SsoRedirectResponse {
- srdRedirect :: Maybe Text
- data SamlPrepareRequest = SamlPrepareRequest {}
- defaultSamlPrepareRequest :: SamlPrepareRequest
- data SamlPrepareResponse = SamlPrepareResponse {}
- data SamlAuthenticateRequest = SamlAuthenticateRequest {
- sarContent :: SecretText
- sarIds :: [Text]
- sarRealm :: Maybe Text
- data SamlLogoutRequest = SamlLogoutRequest {}
- data OidcPrepareRequest = OidcPrepareRequest {}
- defaultOidcPrepareRequest :: OidcPrepareRequest
- data OidcPrepareResponse = OidcPrepareResponse {}
- data OidcAuthenticateRequest = OidcAuthenticateRequest {}
- data OidcLogoutRequest = OidcLogoutRequest {}
- putPrivilege :: MonadBH m => ApplicationName -> ApplicationPrivilegeName -> ApplicationPrivilegeDefinition -> m PrivilegeCreatedResponse
- getPrivileges :: MonadBH m => m PrivilegesListResponse
- getPrivilegesInApplication :: MonadBH m => ApplicationName -> m PrivilegesListResponse
- getPrivilege :: MonadBH m => ApplicationName -> ApplicationPrivilegeName -> m PrivilegesListResponse
- deletePrivilege :: MonadBH m => ApplicationName -> ApplicationPrivilegeName -> m PrivilegeDeletedResponse
- clearPrivilegeCache :: MonadBH m => NonEmpty ApplicationName -> m ClearPrivilegeCacheResponse
- newtype ActionName = ActionName {
- unActionName :: Text
- data ApplicationPrivilegeDefinition = ApplicationPrivilegeDefinition {}
- defaultApplicationPrivilegeDefinition :: NonEmpty ActionName -> ApplicationPrivilegeDefinition
- data ApplicationPrivilegeInfo = ApplicationPrivilegeInfo {}
- newtype PrivilegesListResponse = PrivilegesListResponse {}
- newtype PrivilegeCreatedResponse = PrivilegeCreatedResponse {}
- newtype PrivilegeDeletedResponse = PrivilegeDeletedResponse {}
- newtype ClearPrivilegeCacheResponse = ClearPrivilegeCacheResponse {}
- getFleetGlobalCheckpoints :: MonadBH m => IndexName -> m FleetGlobalCheckpointsResponse
- getFleetGlobalCheckpointsWith :: MonadBH m => IndexName -> FleetGlobalCheckpointsOptions -> m FleetGlobalCheckpointsResponse
- fleetSearch :: (MonadBH m, FromJSON a) => IndexName -> Search -> m (SearchResult a)
- fleetSearchWith :: (MonadBH m, FromJSON a) => IndexName -> FleetSearchOptions -> Search -> m (SearchResult a)
- fleetMultiSearch :: (MonadBH m, FromJSON a) => IndexName -> NonEmpty MultiSearchItem -> m (MultiSearchResponse a)
- fleetMultiSearchWith :: (MonadBH m, FromJSON a) => IndexName -> FleetSearchOptions -> NonEmpty MultiSearchItem -> m (MultiSearchResponse a)
- newtype GlobalCheckpoint = GlobalCheckpoint {}
- data FleetGlobalCheckpointsResponse = FleetGlobalCheckpointsResponse {}
- data FleetGlobalCheckpointsOptions = FleetGlobalCheckpointsOptions {}
- defaultFleetGlobalCheckpointsOptions :: FleetGlobalCheckpointsOptions
- data FleetSearchOptions = FleetSearchOptions {}
- defaultFleetSearchOptions :: FleetSearchOptions
- newtype SLMPolicyId = SLMPolicyId {}
- newtype SLMPolicy = SLMPolicy {
- unSLMPolicy :: Value
- data SLMPolicyInfo = SLMPolicyInfo {}
- newtype SLMExecutionResult = SLMExecutionResult {}
- data SLMOperationMode
- data SLMStatus = SLMStatus {}
- getRepositoriesMetering :: MonadBH m => Maybe NodeSelection -> m RepositoriesMeteringResponse
- deleteRepositoriesMetering :: MonadBH m => Maybe NodeSelection -> m Acknowledged
- data RepositoriesMeteringResponse = RepositoriesMeteringResponse {}
- data NodeRepositoriesMetering = NodeRepositoriesMetering {}
- data RepositoryMeteringInfo = RepositoryMeteringInfo {
- rmiCloudProvider :: Maybe Text
- rmiRepoType :: Maybe Text
- rmiRepoEndpoint :: Maybe Text
- rmiRepoBucket :: Maybe Text
- rmiRepoBasePath :: Maybe Text
- rmiCreationCurrentRateLimit :: Maybe Value
- rmiDeletionCurrentRateLimit :: Maybe Value
- rmiCreationTotalCount :: Maybe Integer
- rmiDeletionTotalCount :: Maybe Integer
- rmiExtras :: KeyMap Value
- data RepositoriesMeteringNodesSummary = RepositoriesMeteringNodesSummary {
- rmnsTotal :: Int
- rmnsSuccessful :: Int
- rmnsFailed :: Int
- putRollupJob :: MonadBH m => RollupJobId -> RollupJobConfig -> m Acknowledged
- getRollupJob :: MonadBH m => Maybe RollupJobId -> m GetRollupJobsResponse
- deleteRollupJob :: MonadBH m => RollupJobId -> m Acknowledged
- startRollupJob :: MonadBH m => RollupJobId -> m RollupJobStarted
- stopRollupJob :: MonadBH m => RollupJobId -> m RollupJobStopped
- stopRollupJobWith :: MonadBH m => RollupJobId -> StopRollupJobOptions -> m RollupJobStopped
- getRollupJobStats :: MonadBH m => Maybe RollupJobId -> m GetRollupJobStatsResponse
- getRollupCapabilities :: MonadBH m => IndexPattern -> m RollupCapabilitiesResponse
- getRollupIndexCapabilities :: MonadBH m => IndexName -> m RollupCapabilitiesResponse
- rollupSearchByIndex :: (FromJSON a, MonadBH m) => IndexName -> Search -> m (SearchResult a)
- rollupSearchByIndexWith :: (FromJSON a, MonadBH m) => IndexName -> SearchOptions -> Search -> m (SearchResult a)
- newtype RollupJobId = RollupJobId {}
- data RollupJobConfig = RollupJobConfig {}
- defaultRollupJobConfig :: IndexPattern -> IndexName -> Text -> Int -> RollupDateHistogramGroup -> RollupJobConfig
- data RollupGroups = RollupGroups {}
- defaultRollupGroups :: RollupDateHistogramGroup -> RollupGroups
- data RollupDateHistogramGroup = RollupDateHistogramGroup {}
- defaultRollupDateHistogramGroup :: FieldName -> Text -> RollupDateHistogramGroup
- data RollupTermsGroup = RollupTermsGroup {}
- data RollupHistogramGroup = RollupHistogramGroup {}
- data RollupJobMetric = RollupJobMetric {}
- data RollupJobMetricAgg
- rollupJobMetricAggText :: RollupJobMetricAgg -> Text
- newtype GetRollupJobsResponse = GetRollupJobsResponse {}
- data RollupJob = RollupJob {}
- data RollupJobStatus = RollupJobStatus {}
- data RollupJobState
- rollupJobStateText :: RollupJobState -> Text
- data RollupJobStats = RollupJobStats {
- rstatPagesProcessed :: Integer
- rstatDocumentsProcessed :: Integer
- rstatRollupsIndexed :: Integer
- rstatTriggerCount :: Integer
- rstatIndexFailures :: Integer
- rstatIndexTimeInMs :: Integer
- rstatIndexTotal :: Integer
- rstatSearchFailures :: Integer
- rstatSearchTimeInMs :: Integer
- rstatSearchTotal :: Integer
- rstatProcessingTimeInMs :: Integer
- rstatProcessingTotal :: Integer
- rstatExtras :: KeyMap Value
- newtype GetRollupJobStatsResponse = GetRollupJobStatsResponse {}
- data RollupJobStatsEntry = RollupJobStatsEntry {}
- newtype RollupCapabilitiesResponse = RollupCapabilitiesResponse {}
- newtype RollupIndexCapabilities = RollupIndexCapabilities {}
- data RollupJobCapability = RollupJobCapability {}
- data RollupFieldCapability = RollupFieldCapability {}
- data RollupCapabilityAgg
- rollupCapabilityAggText :: RollupCapabilityAgg -> Text
- data StopRollupJobOptions = StopRollupJobOptions {}
- defaultStopRollupJobOptions :: StopRollupJobOptions
- newtype RollupJobStarted = RollupJobStarted {}
- newtype RollupJobStopped = RollupJobStopped {}
- mountSearchableSnapshot :: MonadBH m => SnapshotRepoName -> SnapshotName -> SearchableSnapshotMount -> m SearchableSnapshotMountResponse
- mountSearchableSnapshotWith :: MonadBH m => SnapshotRepoName -> SnapshotName -> SearchableSnapshotMount -> SearchableSnapshotMountOptions -> m SearchableSnapshotMountResponse
- getSearchableSnapshotsStats :: MonadBH m => m SearchableSnapshotsStatsResponse
- getSearchableSnapshotsCacheStats :: MonadBH m => IndexName -> m SearchableSnapshotsCacheStatsResponse
- clearSearchableSnapshotsCache :: MonadBH m => IndexName -> m Acknowledged
- data SearchableSnapshotMount = SearchableSnapshotMount {}
- defaultSearchableSnapshotMount :: IndexName -> SearchableSnapshotMount
- data SearchableSnapshotStorage
- data SearchableSnapshotMountOptions = SearchableSnapshotMountOptions {}
- defaultSearchableSnapshotMountOptions :: SearchableSnapshotMountOptions
- data SearchableSnapshotMountResponse = SearchableSnapshotMountResponse {}
- data SearchableSnapshotsStatsResponse = SearchableSnapshotsStatsResponse {}
- data SearchableSnapshotsCacheStatsResponse = SearchableSnapshotsCacheStatsResponse {
- sscsrIndices :: Maybe (KeyMap Value)
- sscsrExtras :: KeyMap Value
- putWatch :: MonadBH m => WatchId -> WatchBody -> m Acknowledged
- getWatch :: MonadBH m => WatchId -> m Watch
- deleteWatch :: MonadBH m => WatchId -> m Acknowledged
- executeWatch :: MonadBH m => WatchId -> m ExecuteWatchResponse
- executeWatchWith :: MonadBH m => ExecuteWatchOptions -> WatchId -> Maybe ExecuteWatchRequest -> m ExecuteWatchResponse
- ackWatch :: MonadBH m => WatchId -> m AckWatchResponse
- activateWatch :: MonadBH m => WatchId -> m WatchStateResponse
- deactivateWatch :: MonadBH m => WatchId -> m WatchStateResponse
- watcherStats :: MonadBH m => m WatcherStatsResponse
- watcherStatsWith :: MonadBH m => Maybe WatcherStatsMetric -> m WatcherStatsResponse
- getWatcherSettings :: MonadBH m => m WatcherSettings
- updateWatcherSettings :: MonadBH m => WatcherSettings -> m Acknowledged
- startWatcher :: MonadBH m => m Acknowledged
- stopWatcher :: MonadBH m => m Acknowledged
- newtype WatchId = WatchId {}
- newtype WatchBody = WatchBody {
- unWatchBody :: Value
- data Watch = Watch {}
- data WatchStatus = WatchStatus {}
- data WatchState
- newtype ExecuteWatchRequest = ExecuteWatchRequest {}
- data ExecuteWatchResponse = ExecuteWatchResponse {}
- data ExecuteWatchOptions = ExecuteWatchOptions {}
- defaultExecuteWatchOptions :: ExecuteWatchOptions
- data AckWatchResponse = AckWatchResponse {}
- data WatchStateResponse = WatchStateResponse {}
- data AckState
- data WatchExecutionState
- data WatcherStatsResponse = WatcherStatsResponse {}
- data WatcherStatsSummary = WatcherStatsSummary {}
- data WatcherStatsMetric
- data WatcherSettings = WatcherSettings {}
- findStructure :: MonadBH m => ByteString -> m FindStructureResponse
- findStructureWith :: MonadBH m => FindStructureOptions -> ByteString -> m FindStructureResponse
- findMessageStructure :: MonadBH m => FindMessageStructureRequest -> m FindStructureResponse
- findMessageStructureWith :: MonadBH m => FindMessageStructureOptions -> FindMessageStructureRequest -> m FindStructureResponse
- findFieldStructure :: MonadBH m => Text -> Text -> m FindStructureResponse
- findFieldStructureWith :: MonadBH m => FindFieldStructureOptions -> m FindStructureResponse
- testGrokPattern :: MonadBH m => TestGrokPatternRequest -> m TestGrokPatternResponse
- testGrokPatternWith :: MonadBH m => TestGrokPatternOptions -> TestGrokPatternRequest -> m TestGrokPatternResponse
- data FindStructureResponse = FindStructureResponse {
- fsrNumLinesAnalyzed :: Maybe Int
- fsrNumMessagesAnalyzed :: Maybe Int
- fsrSampleStart :: Maybe Text
- fsrCharset :: Maybe Text
- fsrHasByteOrderMarker :: Maybe Bool
- fsrFormat :: Maybe Text
- fsrNeedClientTimezone :: Maybe Bool
- fsrColumnNames :: Maybe [Text]
- fsrHasHeaderRow :: Maybe Bool
- fsrDelimiter :: Maybe Text
- fsrQuote :: Maybe Text
- fsrExcludeLinesPattern :: Maybe Text
- fsrGrokPattern :: Maybe Text
- fsrMappings :: Maybe Value
- fsrIngestPipeline :: Maybe Value
- fsrFieldStats :: Maybe (KeyMap FindStructureFieldStats)
- fsrExplanation :: Maybe [Text]
- data FindStructureFieldStats = FindStructureFieldStats {}
- data FindStructureTopHit = FindStructureTopHit {}
- data FindStructureOptions = FindStructureOptions {
- fsoCharset :: Maybe Text
- fsoColumnNames :: Maybe [Text]
- fsoDelimiter :: Maybe Text
- fsoExplain :: Maybe Bool
- fsoFormat :: Maybe Text
- fsoGrokPattern :: Maybe Text
- fsoHasHeaderRow :: Maybe Bool
- fsoLinesToSample :: Maybe Int
- fsoMaxColumnsPerLine :: Maybe Int
- fsoMaxSampleSizeBytes :: Maybe Int
- fsoOverride :: Maybe Bool
- fsoPreferIndented :: Maybe Bool
- fsoQuote :: Maybe Text
- fsoShouldTrimFields :: Maybe Bool
- fsoSkipLines :: Maybe Int
- fsoTimestampField :: Maybe Text
- fsoTimestampFormat :: Maybe Text
- defaultFindStructureOptions :: FindStructureOptions
- findStructureOptionsParams :: FindStructureOptions -> [(Text, Maybe Text)]
- newtype FindMessageStructureRequest = FindMessageStructureRequest {
- fmsrMessages :: [Text]
- data FindMessageStructureOptions = FindMessageStructureOptions {
- fmsoCharset :: Maybe Text
- fmsoColumnNames :: Maybe [Text]
- fmsoDelimiter :: Maybe Text
- fmsoExplain :: Maybe Bool
- fmsoFormat :: Maybe Text
- fmsoGrokPattern :: Maybe Text
- fmsoQuote :: Maybe Text
- fmsoShouldTrimFields :: Maybe Bool
- fmsoEcsCompatibility :: Maybe Text
- fmsoTimestampField :: Maybe Text
- fmsoTimestampFormat :: Maybe Text
- defaultFindMessageStructureOptions :: FindMessageStructureOptions
- findMessageStructureOptionsParams :: FindMessageStructureOptions -> [(Text, Maybe Text)]
- data FindFieldStructureOptions = FindFieldStructureOptions {
- ffsoIndex :: Maybe Text
- ffsoField :: Maybe Text
- ffsoDocumentsToSample :: Maybe Int
- ffsoColumnNames :: Maybe [Text]
- ffsoDelimiter :: Maybe Text
- ffsoQuote :: Maybe Text
- ffsoShouldTrimFields :: Maybe Bool
- ffsoFormat :: Maybe Text
- ffsoEcsCompatibility :: Maybe Text
- ffsoGrokPattern :: Maybe Text
- ffsoTimestampField :: Maybe Text
- ffsoTimestampFormat :: Maybe Text
- ffsoExplain :: Maybe Bool
- ffsoTimeout :: Maybe Text
- defaultFindFieldStructureOptions :: FindFieldStructureOptions
- findFieldStructureOptionsParams :: FindFieldStructureOptions -> [(Text, Maybe Text)]
- data TestGrokPatternRequest = TestGrokPatternRequest {
- tgprGrokPattern :: Text
- tgprText :: [Text]
- data TestGrokPatternResponse = TestGrokPatternResponse {
- tgprMatches :: [Value]
- data TestGrokPatternOptions = TestGrokPatternOptions {}
- defaultTestGrokPatternOptions :: TestGrokPatternOptions
- testGrokPatternOptionsParams :: TestGrokPatternOptions -> [(Text, Maybe Text)]
- putTransform :: MonadBH m => TransformId -> TransformConfig -> m PutTransformResponse
- putTransformWith :: MonadBH m => TransformId -> TransformConfig -> PutTransformOptions -> m PutTransformResponse
- updateTransform :: MonadBH m => TransformId -> TransformConfig -> m Acknowledged
- updateTransformWith :: MonadBH m => TransformId -> TransformConfig -> UpdateTransformOptions -> m Acknowledged
- getTransforms :: MonadBH m => Maybe TransformId -> m TransformsResponse
- getTransformsWith :: MonadBH m => Maybe TransformId -> GetTransformsOptions -> m TransformsResponse
- deleteTransform :: MonadBH m => TransformId -> m DeleteTransformResponse
- deleteTransformWith :: MonadBH m => TransformId -> DeleteTransformOptions -> m DeleteTransformResponse
- startTransform :: MonadBH m => TransformId -> m Acknowledged
- startTransformWith :: MonadBH m => TransformId -> StartTransformOptions -> m Acknowledged
- stopTransform :: MonadBH m => TransformId -> m StopTransformResponse
- stopTransformWith :: MonadBH m => TransformId -> StopTransformOptions -> m StopTransformResponse
- previewTransform :: MonadBH m => TransformConfig -> m PreviewTransformResponse
- previewTransformWith :: MonadBH m => TransformConfig -> PreviewTransformOptions -> m PreviewTransformResponse
- getTransformStats :: MonadBH m => Maybe TransformId -> m TransformStatsResponse
- getTransformStatsWith :: MonadBH m => Maybe TransformId -> GetTransformStatsOptions -> m TransformStatsResponse
- explainTransform :: MonadBH m => TransformId -> m TransformExplainResponse
- newtype TransformId = TransformId {}
- data TransformState
- data TransformHealth
- data TransformSource = TransformSource {}
- data TransformDestination = TransformDestination {}
- data TransformLatest = TransformLatest {}
- data TransformSync = TransformSync {}
- data TransformSyncTime = TransformSyncTime {}
- data TransformSettings = TransformSettings {}
- data TransformConfig = TransformConfig {
- tcSource :: TransformSource
- tcDest :: TransformDestination
- tcPivot :: Maybe Value
- tcLatest :: Maybe TransformLatest
- tcDescription :: Maybe Text
- tcFrequency :: Maybe Text
- tcSync :: Maybe TransformSync
- tcSettings :: Maybe TransformSettings
- tcId :: Maybe TransformId
- tcVersion :: Maybe Text
- tcCreateTime :: Maybe Value
- tcExtras :: KeyMap Value
- data PutTransformResponse = PutTransformResponse {}
- data TransformsResponse = TransformsResponse {
- trCount :: Maybe Int
- trTransforms :: [TransformConfig]
- trExtras :: KeyMap Value
- data DeleteTransformResponse = DeleteTransformResponse {}
- data StopTransformResponse = StopTransformResponse {}
- data PreviewTransformResponse = PreviewTransformResponse {}
- data TransformStatsResponse = TransformStatsResponse {
- tstrCount :: Maybe Int
- tstrStats :: [TransformStats]
- tstrExtras :: KeyMap Value
- data TransformStats = TransformStats {
- tstatId :: Maybe TransformId
- tstatState :: Maybe TransformState
- tstatHealth :: Maybe TransformHealth
- tstatCheckpointing :: Maybe Value
- tstatDocumentsIndexed :: Maybe Integer
- tstatDocumentsProcessed :: Maybe Integer
- tstatDocumentsDeleted :: Maybe Integer
- tstatDocumentsFailed :: Maybe Integer
- tstatExtras :: KeyMap Value
- data TransformExplainResponse = TransformExplainResponse {}
- data TransformExplainEntry = TransformExplainEntry {}
- data PutTransformOptions = PutTransformOptions {}
- defaultPutTransformOptions :: PutTransformOptions
- data UpdateTransformOptions = UpdateTransformOptions {}
- defaultUpdateTransformOptions :: UpdateTransformOptions
- data GetTransformsOptions = GetTransformsOptions {}
- defaultGetTransformsOptions :: GetTransformsOptions
- data DeleteTransformOptions = DeleteTransformOptions {}
- defaultDeleteTransformOptions :: DeleteTransformOptions
- data StartTransformOptions = StartTransformOptions {}
- defaultStartTransformOptions :: StartTransformOptions
- data StopTransformOptions = StopTransformOptions {}
- defaultStopTransformOptions :: StopTransformOptions
- data PreviewTransformOptions = PreviewTransformOptions {}
- defaultPreviewTransformOptions :: PreviewTransformOptions
- data GetTransformStatsOptions = GetTransformStatsOptions {}
- defaultGetTransformStatsOptions :: GetTransformStatsOptions
- getMigrationDeprecations :: MonadBH m => Maybe IndexName -> m MigrationDeprecations
- getSystemFeatures :: MonadBH m => m FeatureUpgradeStatus
- upgradeSystemFeatures :: MonadBH m => m Acknowledged
- data DeprecationLevel
- data Deprecation = Deprecation {}
- data MigrationDeprecations = MigrationDeprecations {
- migrationDeprecationsClusterSettings :: Maybe [Deprecation]
- migrationDeprecationsNodeSettings :: Maybe [Deprecation]
- migrationDeprecationsMlSettings :: Maybe [Deprecation]
- migrationDeprecationsIndexSettings :: Maybe (Map Text [Deprecation])
- migrationDeprecationsDataStreams :: Maybe (Map Text [Deprecation])
- migrationDeprecationsTemplates :: Maybe (Map Text [Deprecation])
- migrationDeprecationsILMPolicies :: Maybe (Map Text [Deprecation])
- data FeatureMigrationStatus
- data FeatureUpgradeIndex = FeatureUpgradeIndex {}
- data FeatureUpgradeInfo = FeatureUpgradeInfo {}
- data FeatureUpgradeStatus = FeatureUpgradeStatus {}
- putIngestPipeline :: MonadBH m => PipelineId -> IngestPipeline -> m Acknowledged
- getIngestPipeline :: MonadBH m => Maybe PipelineId -> m [IngestPipelineInfo]
- deleteIngestPipeline :: MonadBH m => PipelineId -> m Acknowledged
- simulateIngestPipeline :: MonadBH m => Maybe PipelineId -> IngestPipeline -> [Value] -> m SimulateResult
- getGrokPatterns :: MonadBH m => m GrokPatterns
- newtype GrokPatterns = GrokPatterns {}
- newtype PipelineId = PipelineId {
- unPipelineId :: Text
- newtype IngestPipeline = IngestPipeline {}
- data IngestPipelineInfo = IngestPipelineInfo {}
- newtype SimulateResult = SimulateResult {}
- deleteAsyncSearch :: MonadBH m => AsyncSearchId -> m Acknowledged
- submitAsyncSearch :: (FromJSON a, MonadBH m) => Search -> m (AsyncSearchResult a)
- submitAsyncSearchWith :: (FromJSON a, MonadBH m) => AsyncSearchSubmitOptions -> Search -> m (AsyncSearchResult a)
- newtype AsyncSearchId = AsyncSearchId {}
- data AsyncSearchResult a = AsyncSearchResult {
- asyncSearchId :: Maybe AsyncSearchId
- asyncSearchIsRunning :: Bool
- asyncSearchIsPartial :: Bool
- asyncSearchStartTimeInMillis :: Maybe Int
- asyncSearchExpirationTimeInMillis :: Maybe Int
- asyncSearchCompletionTimeInMillis :: Maybe Int
- asyncSearchTook :: Maybe Int
- asyncSearchTimedOut :: Maybe Bool
- asyncSearchNumReducePhases :: Maybe Int
- asyncSearchShards :: Maybe ShardResult
- asyncSearchHits :: Maybe (SearchHits a)
- asyncSearchAggregations :: Maybe AggregationResults
- data AsyncSearchStatus = AsyncSearchStatus {}
- data AsyncSearchSubmitOptions = AsyncSearchSubmitOptions {}
- defaultAsyncSearchSubmitOptions :: AsyncSearchSubmitOptions
- assoWaitForCompletionLens :: Lens' AsyncSearchSubmitOptions (Maybe Bool)
- assoKeepOnCompletionLens :: Lens' AsyncSearchSubmitOptions (Maybe Bool)
- assoKeepAliveLens :: Lens' AsyncSearchSubmitOptions (Maybe KeepAlive)
- assoBatchedReduceSizeLens :: Lens' AsyncSearchSubmitOptions (Maybe Word32)
- assoCcsMinimizeRoundtripsLens :: Lens' AsyncSearchSubmitOptions (Maybe Bool)
- encodeBulkOperations :: Vector BulkOperation -> ByteString
- encodeBulkOperation :: BulkOperation -> ByteString
- basicAuthHook :: Monad m => EsUsername -> EsPassword -> Request -> m Request
- countByIndex :: MonadBH m => IndexName -> CountQuery -> m CountResponse
- countByIndexWith :: MonadBH m => Maybe [IndexName] -> CountOptions -> CountQuery -> m CountResponse
- countAll :: MonadBH m => CountQuery -> m CountResponse
- data CountOptions = CountOptions {}
- defaultCountOptions :: CountOptions
- countOptionsParams :: CountOptions -> [(Text, Maybe Text)]
- validateQuery :: MonadBH m => IndexName -> ValidateQuery -> m ValidateQueryResponse
- validateQueryWith :: MonadBH m => Maybe [IndexName] -> ValidateOptions -> ValidateQuery -> m ValidateQueryResponse
- validateAll :: MonadBH m => ValidateQuery -> m ValidateQueryResponse
- data ValidateOptions = ValidateOptions {
- voExplain :: Maybe Bool
- voAll :: Maybe Bool
- voRewrite :: Maybe Text
- voIgnoreUnavailable :: Maybe Bool
- voAllowNoIndices :: Maybe Bool
- voExpandWildcards :: Maybe (NonEmpty ExpandWildcards)
- voQ :: Maybe Text
- voAnalyzer :: Maybe Text
- voAnalyzeWildcard :: Maybe Bool
- voDefaultOperator :: Maybe BooleanOperator
- voDf :: Maybe Text
- voLenient :: Maybe Bool
- voDefaultField :: Maybe Text
- defaultValidateOptions :: ValidateOptions
- validateOptionsParams :: ValidateOptions -> [(Text, Maybe Text)]
- evaluateRank :: MonadBH m => RankEvalRequest -> m RankEvalResponse
- evaluateRankByIndex :: MonadBH m => IndexName -> RankEvalRequest -> m RankEvalResponse
- evaluateRankWith :: MonadBH m => Maybe [IndexName] -> RankEvalOptions -> RankEvalRequest -> m RankEvalResponse
- data RankEvalOptions = RankEvalOptions {}
- defaultRankEvalOptions :: RankEvalOptions
- rankEvalOptionsParams :: RankEvalOptions -> [(Text, Maybe Text)]
- analyzeText :: MonadBH m => Maybe IndexName -> AnalyzeRequest -> m AnalyzeResponse
- getFieldCaps :: MonadBH m => Maybe [IndexName] -> [FieldPattern] -> m FieldCapsResponse
- getFieldCapsWith :: MonadBH m => Maybe [IndexName] -> FieldCapsOptions -> FieldCapsRequest -> m FieldCapsResponse
- newtype FieldPattern = FieldPattern {}
- data FieldCapsRequest = FieldCapsRequest {}
- defaultFieldCapsRequest :: FieldCapsRequest
- data FieldCapsOptions = FieldCapsOptions {}
- defaultFieldCapsOptions :: FieldCapsOptions
- fieldCapsOptionsParams :: FieldCapsOptions -> [(Text, Maybe Text)]
- data FieldCapsResponse = FieldCapsResponse {}
- data FieldCapability = FieldCapability {
- fieldCapabilityType :: Text
- fieldCapabilitySearchable :: Bool
- fieldCapabilityAggregatable :: Bool
- fieldCapabilityIndices :: Maybe [IndexName]
- fieldCapabilityNonSearchableIndices :: Maybe [IndexName]
- fieldCapabilityNonAggregatableIndices :: Maybe [IndexName]
- fieldCapabilityMetadataField :: Maybe Bool
- fieldCapabilityMeta :: Maybe (KeyMap [Value])
- getSearchShards :: MonadBH m => Maybe [IndexName] -> m SearchShardsResponse
- getSearchShardsWith :: MonadBH m => Maybe [IndexName] -> SearchShardsOptions -> m SearchShardsResponse
- data SearchShardsResponse = SearchShardsResponse {}
- data SearchShardsNode = SearchShardsNode {
- searchShardsNodeName :: Maybe Text
- searchShardsNodeEphemeralId :: Maybe Text
- searchShardsNodeTransportAddress :: Maybe Text
- searchShardsNodeHost :: Maybe Text
- searchShardsNodeIp :: Maybe Text
- searchShardsNodeAttributes :: Maybe (Map Text Text)
- searchShardsNodeRoles :: Maybe [Text]
- searchShardsNodeOther :: Maybe Value
- data SearchShardsShard = SearchShardsShard {
- searchShardsShardIndex :: IndexName
- searchShardsShardNode :: Maybe Text
- searchShardsShardPrimary :: Bool
- searchShardsShardShard :: Int
- searchShardsShardState :: SearchShardsState
- searchShardsShardRelocatingNode :: Maybe Text
- searchShardsShardAllocationId :: Maybe (Map Text Text)
- searchShardsShardOther :: Maybe Value
- data SearchShardsState
- data SearchShardsOptions = SearchShardsOptions {}
- defaultSearchShardsOptions :: SearchShardsOptions
- searchShardsOptionsParams :: SearchShardsOptions -> [(Text, Maybe Text)]
- newtype Acknowledged = Acknowledged {}
- newtype Accepted = Accepted {
- isAccepted :: Bool
- data IgnoredBody = IgnoredBody
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.
>>>: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 :}
withBH :: ManagerSettings -> Server -> BH IO a -> IO a Source #
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.
Indices
createIndex :: MonadBH m => IndexSettings -> IndexName -> m Acknowledged Source #
createIndexOptions :: MonadBH m => CreateIndexOptions -> IndexName -> m Acknowledged Source #
Create an index with the full set of body fields (settings,
mappings, aliases) and URI parameters (wait_for_active_shards,
master_timeout, timeout) accepted by the create-index endpoint.
This is a superset of createIndex / createIndexWith for callers
that need more than just settings. See CreateIndexOptions for the
shape and defaultCreateIndexOptions for an empty starting point.
Since: 0.26.0.0
data CreateIndexOptions Source #
CreateIndexOptions is the full set of inputs accepted by the
PUT /<index> (create-index) endpoint
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-create-index.html).
It carries both the body (settings, mappings, aliases) and the
URI parameters (wait_for_active_shards, master_timeout, timeout).
This is a superset of the legacy createIndex / createIndexWith
functions, which only let callers set settings. New code should
prefer createIndexOptions together
with defaultCreateIndexOptions:
let opts =defaultCreateIndexOptions{cioSettings=JustdefaultIndexSettings,cioMappings=Just(toJSONmyMapping),cioWaitForActiveShards=JustAllActiveShards} increateIndexOptionsopts (IndexName"foo")
For backwards compatibility defaultCreateIndexOptions produces no
body and no URI parameters; in particular defaultCreateIndexOptions
with emits a byte-for-byte identical
request to the legacy cioSettings = Just s.createIndex s
Note: mappings and aliases are deliberately typed as an opaque
Value / Object here. They are user-supplied JSON blobs the same
way templateMappings is on IndexTemplate — full schema-typed
modelling is tracked as a separate epic.
Constructors
| CreateIndexOptions | |
Fields
| |
Instances
| Show CreateIndexOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> CreateIndexOptions -> ShowS # show :: CreateIndexOptions -> String # showList :: [CreateIndexOptions] -> ShowS # | |
| Eq CreateIndexOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: CreateIndexOptions -> CreateIndexOptions -> Bool # (/=) :: CreateIndexOptions -> CreateIndexOptions -> Bool # | |
data ActiveShardCount Source #
Number of shard copies that must be active before a create-index (or
similar) operation returns, sent as the wait_for_active_shards URI
parameter. The server accepts the literal string "all" or any positive
integer up to number_of_replicas + 1.
Constructors
| AllActiveShards | Render as |
| ActiveShards Word | Render as the decimal string of the given count. Values larger
than |
Instances
defaultCreateIndexOptions :: CreateIndexOptions Source #
CreateIndexOptions with every optional field set to Nothing.
Renders to no body and no URI params, so the server uses its built-in
defaults for everything. Callers wanting the same behaviour as the
legacy should set
createIndex defaultIndexSettings explicitly.cioSettings = Just defaultIndexSettings
Arguments
| :: MonadBH m | |
| => [UpdatableIndexSetting] | |
| -> Int | shard count |
| -> IndexName | |
| -> m Acknowledged |
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.
flushIndex :: MonadBH m => IndexName -> m ShardsResult Source #
flushIndex will flush an index given a Server and an IndexName.
Returns ShardsResult (the {"_shards": {...}} envelope); reach the
inner counts via srShards.
flushIndexWith :: MonadBH m => FlushIndexOptions -> IndexName -> m ShardsResult Source #
flushIndexWith is the fully-parameterised form of flushIndex.
Pass defaultFlushIndexOptions to reproduce the legacy behaviour.
data FlushIndexOptions Source #
URI parameters accepted by POST index_flush
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-flush.html).
All five documented parameters are modelled: wait_if_ongoing, force,
ignore_unavailable, allow_no_indices and expand_wildcards. Every
field is optional so defaultFlushIndexOptions renders to no query
string — byte-for-byte identical to the legacy parameterless
flushIndex.
Constructors
| FlushIndexOptions | |
Fields | |
Instances
| Show FlushIndexOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> FlushIndexOptions -> ShowS # show :: FlushIndexOptions -> String # showList :: [FlushIndexOptions] -> ShowS # | |
| Eq FlushIndexOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: FlushIndexOptions -> FlushIndexOptions -> Bool # (/=) :: FlushIndexOptions -> FlushIndexOptions -> Bool # | |
defaultFlushIndexOptions :: FlushIndexOptions Source #
FlushIndexOptions with every parameter set to Nothing. Produces
no query string, so emits a
request identical to flushIndexWith defaultFlushIndexOptionsflushIndex.
clearIndexCache :: MonadBH m => IndexName -> m ShardsResult Source #
clearIndexCache clears the caches (query, fielddata, request)
for a single index. Wraps POST /<index>/_cache/clear.
Returns ShardsResult (the {"_shards": {...}} envelope), like the
neighbouring flushIndex and refreshIndex, because the ES/OS
response wraps the shard stats in a top-level _shards key. Only
?fielddata, ?query, ?request for selective clearing are not yet
exposed.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-clearcache.html and https://docs.opensearch.org/latest/api-reference/index-apis/clear-cache/.
Since: 0.26.0.0
reloadSearchAnalyzers :: MonadBH m => IndexName -> m ReloadSearchAnalyzersResponse Source #
reloadSearchAnalyzers reloads an index's updateable search
analyzers (e.g. updateable synonym/synonym_graph filters),
picking up changes to the underlying synonym files. Maps to
POST /{index}/_reload_search_analyzers.
Equivalent to
.reloadSearchAnalyzersWith defaultReloadSearchAnalyzersOptions
See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-reload-analyzers.html and https://docs.opensearch.org/latest/api-reference/index-apis/reload-search-analyzers/.
Since: 0.26.0.0
reloadSearchAnalyzersWith :: MonadBH m => ReloadSearchAnalyzersOptions -> IndexName -> m ReloadSearchAnalyzersResponse Source #
reloadSearchAnalyzersWith is the fully-parameterised form of
reloadSearchAnalyzers.
data ReloadSearchAnalyzersResponse Source #
Top-level response of POST /{target}/_reload_search_analyzers.
The _shards object summarises the per-node reload broadcast (its
total may exceed the index shard count, since the reload runs once
per node hosting a shard). The reload_details array carries one
entry per concrete index whose analyzers were actually reloaded.
Constructors
| ReloadSearchAnalyzersResponse | |
Fields
| |
Instances
data ReloadDetail Source #
One element of the reload_details array. Reports which search
analyzers were reloaded for a given index and the node ids on which
the reload took effect.
Constructors
| ReloadDetail | |
Fields
| |
Instances
| FromJSON ReloadDetail Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.ReloadSearchAnalyzers | |
| ToJSON ReloadDetail Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.ReloadSearchAnalyzers Methods toJSON :: ReloadDetail -> Value # toEncoding :: ReloadDetail -> Encoding # toJSONList :: [ReloadDetail] -> Value # toEncodingList :: [ReloadDetail] -> Encoding # omitField :: ReloadDetail -> Bool # | |
| Show ReloadDetail Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.ReloadSearchAnalyzers Methods showsPrec :: Int -> ReloadDetail -> ShowS # show :: ReloadDetail -> String # showList :: [ReloadDetail] -> ShowS # | |
| Eq ReloadDetail Source # | |
data ReloadSearchAnalyzersOptions Source #
URI parameters accepted by POST /{target}/_reload_search_analyzers.
See
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-reload-analyzers.html.
Every field is Maybe; defaultReloadSearchAnalyzersOptions leaves
them all Nothing, which emits no query string.
Constructors
| ReloadSearchAnalyzersOptions | |
Fields
| |
Instances
defaultReloadSearchAnalyzersOptions :: ReloadSearchAnalyzersOptions Source #
ReloadSearchAnalyzersOptions with every field Nothing. Emits an
empty query string, preserving the wire behaviour of the
parameterless POST /{target}/_reload_search_analyzers.
reloadSearchAnalyzersOptionsParams :: ReloadSearchAnalyzersOptions -> [(Text, Maybe Text)] Source #
Render a ReloadSearchAnalyzersOptions record as a (key, value)
list suitable for
withQueries. Nothing
fields are omitted, so defaultReloadSearchAnalyzersOptions produces
an empty list (and therefore no query string).
diskUsage :: MonadBH m => IndexName -> m DiskUsageResponse Source #
diskUsage analyses the disk usage of each field of an index. Maps
to POST /{index}/_disk_usage. ES-only feature (technical preview)
and resource-intensive; defaultDiskUsageOptions sets the required
run_expensive_tasks=true.
Equivalent to .diskUsageWith defaultDiskUsageOptions
See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-disk-usage.html.
Since: 0.26.0.0
diskUsageWith :: MonadBH m => DiskUsageOptions -> IndexName -> m DiskUsageResponse Source #
diskUsageWith is the fully-parameterised form of diskUsage.
data DiskUsageResponse Source #
Top-level response of POST /{target}/_disk_usage. The response
is an object with a _shards summary plus one top-level key per
concrete index that was analysed; because index names are not
statically known, the per-index payload is collected into a KeyMap.
Constructors
| DiskUsageResponse | |
Fields
| |
Instances
data DiskUsageIndex Source #
The per-index payload: human-readable and byte-precise store sizes,
an all_fields aggregate breakdown, and a fields map of per-field
breakdowns.
Constructors
| DiskUsageIndex | |
Fields
| |
Instances
| FromJSON DiskUsageIndex Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.DiskUsage Methods parseJSON :: Value -> Parser DiskUsageIndex # parseJSONList :: Value -> Parser [DiskUsageIndex] # | |
| ToJSON DiskUsageIndex Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.DiskUsage Methods toJSON :: DiskUsageIndex -> Value # toEncoding :: DiskUsageIndex -> Encoding # toJSONList :: [DiskUsageIndex] -> Value # toEncodingList :: [DiskUsageIndex] -> Encoding # omitField :: DiskUsageIndex -> Bool # | |
| Show DiskUsageIndex Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.DiskUsage Methods showsPrec :: Int -> DiskUsageIndex -> ShowS # show :: DiskUsageIndex -> String # showList :: [DiskUsageIndex] -> ShowS # | |
| Eq DiskUsageIndex Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.DiskUsage Methods (==) :: DiskUsageIndex -> DiskUsageIndex -> Bool # (/=) :: DiskUsageIndex -> DiskUsageIndex -> Bool # | |
data DiskUsageFieldBreakdown Source #
Breakdown of the disk usage of a single field (or the
all_fields aggregate). Each structural component (stored_fields,
doc_values, points, norms, term_vectors) is reported as a
human-readable size plus a byte count; inverted_index additionally
nests its own {total, total_in_bytes} object. All fields are
Maybe because the server omits a component when the field does not
use that structure (e.g. doc_values is absent for keyword
fields).
Constructors
Instances
data DiskUsageInvertedIndex Source #
The nested inverted_index object inside a
DiskUsageFieldBreakdown: its own human-readable and byte-precise
totals.
Constructors
| DiskUsageInvertedIndex | |
Instances
| FromJSON DiskUsageInvertedIndex Source # | |
| ToJSON DiskUsageInvertedIndex Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.DiskUsage Methods toJSON :: DiskUsageInvertedIndex -> Value # toEncoding :: DiskUsageInvertedIndex -> Encoding # toJSONList :: [DiskUsageInvertedIndex] -> Value # toEncodingList :: [DiskUsageInvertedIndex] -> Encoding # omitField :: DiskUsageInvertedIndex -> Bool # | |
| Show DiskUsageInvertedIndex Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.DiskUsage Methods showsPrec :: Int -> DiskUsageInvertedIndex -> ShowS # show :: DiskUsageInvertedIndex -> String # showList :: [DiskUsageInvertedIndex] -> ShowS # | |
| Eq DiskUsageInvertedIndex Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.DiskUsage Methods (==) :: DiskUsageInvertedIndex -> DiskUsageInvertedIndex -> Bool # (/=) :: DiskUsageInvertedIndex -> DiskUsageInvertedIndex -> Bool # | |
data DiskUsageOptions Source #
URI parameters accepted by POST /{target}/_disk_usage. See
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-disk-usage.html.
Note that run_expensive_tasks is required by the API (the call is
rejected without run_expensive_tasks=true); it is therefore a plain
Bool rather than Maybe, and defaultDiskUsageOptions sets it to
True so that the parameterless diskUsage works out of the box.
Although the ES 7.17 docs list wait_for_active_shards for this
endpoint, ES 7.17.25 actually rejects it with 400 contains
unrecognized parameter: [wait_for_active_shards], so it is not
modelled here. The remaining parameters — flush,
ignore_unavailable, allow_no_indices and expand_wildcards —
were live-verified accepted against ES 7.17.25.
Constructors
| DiskUsageOptions | |
Fields
| |
Instances
| Show DiskUsageOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.DiskUsage Methods showsPrec :: Int -> DiskUsageOptions -> ShowS # show :: DiskUsageOptions -> String # showList :: [DiskUsageOptions] -> ShowS # | |
| Eq DiskUsageOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.DiskUsage Methods (==) :: DiskUsageOptions -> DiskUsageOptions -> Bool # (/=) :: DiskUsageOptions -> DiskUsageOptions -> Bool # | |
defaultDiskUsageOptions :: DiskUsageOptions Source #
DiskUsageOptions with run_expensive_tasks set to True and
every other parameter Nothing. Unlike most default*Options in
this module, this does emit a query string
(?run_expensive_tasks=true) because the parameter is required by
the API.
diskUsageOptionsParams :: DiskUsageOptions -> [(Text, Maybe Text)] Source #
Render a DiskUsageOptions record as a (key, value) list
suitable for
withQueries.
Nothing fields are omitted, but run_expensive_tasks is always
rendered (it is required).
fieldUsageStats :: MonadBH m => IndexName -> m FieldUsageStatsResponse Source #
fieldUsageStats reports per-shard, per-field access counts. Maps
to GET /{index}/_field_usage_stats. ES-only feature (technical
preview).
Equivalent to
.fieldUsageStatsWith defaultFieldUsageStatsOptions
See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/field-usage-stats.html.
Since: 0.26.0.0
fieldUsageStatsWith :: MonadBH m => FieldUsageStatsOptions -> IndexName -> m FieldUsageStatsResponse Source #
fieldUsageStatsWith is the fully-parameterised form of
fieldUsageStats.
data FieldUsageStatsResponse Source #
Top-level response of GET /{index}/_field_usage_stats. As with
the disk-usage response, the payload is an object with a _shards
summary plus one top-level key per index, collected into a KeyMap.
Constructors
| FieldUsageStatsResponse | |
Fields
| |
Instances
newtype FieldUsageStatsIndex Source #
Per-index payload: a shards array of FieldUsageShard.
Constructors
| FieldUsageStatsIndex | |
Fields | |
Instances
| FromJSON FieldUsageStatsIndex Source # | |
| ToJSON FieldUsageStatsIndex Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.FieldUsageStats Methods toJSON :: FieldUsageStatsIndex -> Value # toEncoding :: FieldUsageStatsIndex -> Encoding # toJSONList :: [FieldUsageStatsIndex] -> Value # toEncodingList :: [FieldUsageStatsIndex] -> Encoding # omitField :: FieldUsageStatsIndex -> Bool # | |
| Show FieldUsageStatsIndex Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.FieldUsageStats Methods showsPrec :: Int -> FieldUsageStatsIndex -> ShowS # show :: FieldUsageStatsIndex -> String # showList :: [FieldUsageStatsIndex] -> ShowS # | |
| Eq FieldUsageStatsIndex Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.FieldUsageStats Methods (==) :: FieldUsageStatsIndex -> FieldUsageStatsIndex -> Bool # (/=) :: FieldUsageStatsIndex -> FieldUsageStatsIndex -> Bool # | |
data FieldUsageShard Source #
One shard entry within the shards array. Carries the tracking
id, the tracking start time, the shard routing, and the aggregate
field-usage stats.
Constructors
| FieldUsageShard | |
Fields | |
Instances
| FromJSON FieldUsageShard Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.FieldUsageStats Methods parseJSON :: Value -> Parser FieldUsageShard # parseJSONList :: Value -> Parser [FieldUsageShard] # | |
| ToJSON FieldUsageShard Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.FieldUsageStats Methods toJSON :: FieldUsageShard -> Value # toEncoding :: FieldUsageShard -> Encoding # toJSONList :: [FieldUsageShard] -> Value # toEncodingList :: [FieldUsageShard] -> Encoding # omitField :: FieldUsageShard -> Bool # | |
| Show FieldUsageShard Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.FieldUsageStats Methods showsPrec :: Int -> FieldUsageShard -> ShowS # show :: FieldUsageShard -> String # showList :: [FieldUsageShard] -> ShowS # | |
| Eq FieldUsageShard Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.FieldUsageStats Methods (==) :: FieldUsageShard -> FieldUsageShard -> Bool # (/=) :: FieldUsageShard -> FieldUsageShard -> Bool # | |
data FieldUsageRouting Source #
The routing object: shard placement metadata.
Constructors
| FieldUsageRouting | |
Instances
data FieldUsageStats Source #
The stats object: an all_fields aggregate breakdown plus a
per-field map.
Constructors
| FieldUsageStats | |
Instances
| FromJSON FieldUsageStats Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.FieldUsageStats Methods parseJSON :: Value -> Parser FieldUsageStats # parseJSONList :: Value -> Parser [FieldUsageStats] # | |
| ToJSON FieldUsageStats Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.FieldUsageStats Methods toJSON :: FieldUsageStats -> Value # toEncoding :: FieldUsageStats -> Encoding # toJSONList :: [FieldUsageStats] -> Value # toEncodingList :: [FieldUsageStats] -> Encoding # omitField :: FieldUsageStats -> Bool # | |
| Show FieldUsageStats Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.FieldUsageStats Methods showsPrec :: Int -> FieldUsageStats -> ShowS # show :: FieldUsageStats -> String # showList :: [FieldUsageStats] -> ShowS # | |
| Eq FieldUsageStats Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.FieldUsageStats Methods (==) :: FieldUsageStats -> FieldUsageStats -> Bool # (/=) :: FieldUsageStats -> FieldUsageStats -> Bool # | |
data FieldUsageBreakdown Source #
Per-field (or all_fields) usage breakdown. any counts any kind
of use; the remaining fields count use of a specific structure.
Constructors
| FieldUsageBreakdown | |
Fields
| |
Instances
data FieldUsageInvertedIndex Source #
The nested inverted_index object inside a FieldUsageBreakdown.
Constructors
| FieldUsageInvertedIndex | |
Fields
| |
Instances
data FieldUsageStatsOptions Source #
URI parameters accepted by GET /{index}/_field_usage_stats. See
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/field-usage-stats.html.
Every field is Maybe; defaultFieldUsageStatsOptions leaves them
all Nothing, which emits no query string.
Although the ES 7.17 docs list wait_for_active_shards,
master_timeout and timeout for this endpoint, ES 7.17.25 actually
rejects all three with 400 contains unrecognized parameters:
[master_timeout], [timeout], [wait_for_active_shards], so they are
not modelled here. The remaining parameters — fields,
expand_wildcards, ignore_unavailable and allow_no_indices —
were live-verified accepted against ES 7.17.25.
Constructors
| FieldUsageStatsOptions | |
Fields | |
Instances
| Show FieldUsageStatsOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.FieldUsageStats Methods showsPrec :: Int -> FieldUsageStatsOptions -> ShowS # show :: FieldUsageStatsOptions -> String # showList :: [FieldUsageStatsOptions] -> ShowS # | |
| Eq FieldUsageStatsOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.FieldUsageStats Methods (==) :: FieldUsageStatsOptions -> FieldUsageStatsOptions -> Bool # (/=) :: FieldUsageStatsOptions -> FieldUsageStatsOptions -> Bool # | |
defaultFieldUsageStatsOptions :: FieldUsageStatsOptions Source #
FieldUsageStatsOptions with every field Nothing. Emits an empty
query string, preserving the wire behaviour of the parameterless
GET /{index}/_field_usage_stats.
fieldUsageStatsOptionsParams :: FieldUsageStatsOptions -> [(Text, Maybe Text)] Source #
Render a FieldUsageStatsOptions record as a (key, value) list
suitable for
withQueries.
Nothing fields are omitted, so defaultFieldUsageStatsOptions
produces an empty list (and therefore no query string).
getScriptContexts :: MonadBH m => m ScriptContextsResponse Source #
getScriptContexts lists every Painless / expression execution
context the cluster knows about, with each context's method
catalogue. Maps to GET /_script_context.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/painless-api-reference.html.
Since: 0.26.0.0
data ScriptContextsResponse Source #
Top-level response of GET /_script_context. The contexts array
has one entry per execution context the server's script engines
expose (e.g. aggs, filter, score, update, painless_test).
The list is server-defined and varies across versions and installed
plugins; treat it as a diagnostic catalogue rather than a stable
enumeration.
Constructors
| ScriptContextsResponse | |
Fields
| |
Instances
data ScriptContextInfo Source #
One element of the contexts array: a named execution context and
the methods available to scripts running in it.
Constructors
| ScriptContextInfo | |
Fields
| |
Instances
data ScriptContextMethod Source #
One method exposed by a ScriptContextInfo. The scmReturnType
and scpType values are fully-qualified JVM type names (e.g.
java.util.Map, org.elasticsearch.analysis.common.AnalysisPredicateScript$Token);
they are opaque transport strings intended for diagnostic display,
not stable across versions.
Constructors
| ScriptContextMethod | |
Fields
| |
Instances
data ScriptContextParam Source #
One formal parameter of a ScriptContextMethod. Both fields are
present whenever the parameter exists.
Constructors
| ScriptContextParam | |
Instances
getScriptLanguages :: MonadBH m => m ScriptLanguagesResponse Source #
getScriptLanguages lists the script languages the cluster
supports and, per language, the execution contexts in which each may
run. Maps to GET /_script_language.
Note: on OpenSearch 1.3 this endpoint returns HTTP 500 (a server bug); calls against a 1.3 cluster will fail.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/painless-api-reference.html.
Since: 0.26.0.0
data ScriptLanguagesResponse Source #
Top-level response of GET /_script_language.
The types_allowed array lists the script source forms the cluster
accepts (in practice always ["inline", "stored"]); the
language_contexts array has one entry per supported language, each
naming the execution contexts in which that language may run.
Constructors
| ScriptLanguagesResponse | |
Fields
| |
Instances
data ScriptLanguageContext Source #
One element of the language_contexts array: a supported language
and the execution contexts in which it may run. The slcLanguage
values (expression, mustache, painless) match the lang field
of Script,
so the existing ScriptLanguage newtype is reused for coherence.
Constructors
| ScriptLanguageContext | |
Fields
| |
Instances
| FromJSON ScriptLanguageContext Source # | |
| ToJSON ScriptLanguageContext Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.ScriptLanguages Methods toJSON :: ScriptLanguageContext -> Value # toEncoding :: ScriptLanguageContext -> Encoding # toJSONList :: [ScriptLanguageContext] -> Value # toEncodingList :: [ScriptLanguageContext] -> Encoding # omitField :: ScriptLanguageContext -> Bool # | |
| Show ScriptLanguageContext Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.ScriptLanguages Methods showsPrec :: Int -> ScriptLanguageContext -> ShowS # show :: ScriptLanguageContext -> String # showList :: [ScriptLanguageContext] -> ShowS # | |
| Eq ScriptLanguageContext Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.ScriptLanguages Methods (==) :: ScriptLanguageContext -> ScriptLanguageContext -> Bool # (/=) :: ScriptLanguageContext -> ScriptLanguageContext -> Bool # | |
deleteIndex :: MonadBH m => IndexName -> m Acknowledged Source #
deleteIndex will delete an index given a Server and an IndexName.
>>>_ <- runBH' $ createIndex defaultIndexSettings (IndexName "didimakeanindex")>>>response <- runBH' $ deleteIndex (IndexName "didimakeanindex")>>>isSuccess responseTrue>>>runBH' $ indexExists (IndexName "didimakeanindex")False
updateIndexSettings :: MonadBH m => NonEmpty UpdatableIndexSetting -> IndexName -> m Acknowledged Source #
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 responseTrue
Equivalent to .updateIndexSettingsWith updates defaultUpdateIndexSettingsOptions
updateIndexSettingsWith :: MonadBH m => NonEmpty UpdatableIndexSetting -> IndexName -> UpdateIndexSettingsOptions -> m Acknowledged Source #
updateIndexSettingsWith is the fully-parameterised form of
updateIndexSettings. Pass defaultUpdateIndexSettingsOptions to
reproduce the legacy behaviour.
data UpdateIndexSettingsOptions Source #
URI parameters accepted by PUT index_settings
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-update-settings.html).
The four documented parameters are modelled: master_timeout,
timeout, preserve_existing and flat_settings. Every field is
optional so defaultUpdateIndexSettingsOptions renders to no query
string — byte-for-byte identical to the legacy parameterless
updateIndexSettings. Durations
are (unit, magnitude) pairs (e.g. ( renders
as TimeUnitSeconds, 30)30s), matching OpenCloseIndexOptions.
Constructors
| UpdateIndexSettingsOptions | |
Fields
| |
Instances
defaultUpdateIndexSettingsOptions :: UpdateIndexSettingsOptions Source #
UpdateIndexSettingsOptions with every parameter set to Nothing.
Produces no query string, so emits a request identical to
updateIndexSettingsWith updates name
defaultUpdateIndexSettingsOptionsupdateIndexSettings.
getIndexSettings :: MonadBH m => IndexName -> m IndexSettingsSummary Source #
getIndexSettings retrieves the live settings of a single index.
Equivalent to .getIndexSettingsWith name defaultGetIndexSettingsOptions
getIndexSettingsWith :: MonadBH m => IndexName -> GetIndexSettingsOptions -> m IndexSettingsSummary Source #
getIndexSettingsWith is the fully-parameterised form of
getIndexSettings. Pass defaultGetIndexSettingsOptions to reproduce
the legacy behaviour.
data GetIndexSettingsOptions Source #
URI parameters accepted by GET index_settings
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-get-settings.html).
The four documented parameters are modelled: master_timeout,
flat_settings, include_defaults and local. Every field is
optional so defaultGetIndexSettingsOptions renders to no query
string — byte-for-byte identical to the legacy parameterless
getIndexSettings. Durations are
(unit, magnitude) pairs (e.g. ( renders as
TimeUnitSeconds, 30)30s), matching OpenCloseIndexOptions.
Constructors
| GetIndexSettingsOptions | |
Fields
| |
Instances
| Show GetIndexSettingsOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> GetIndexSettingsOptions -> ShowS # show :: GetIndexSettingsOptions -> String # showList :: [GetIndexSettingsOptions] -> ShowS # | |
| Eq GetIndexSettingsOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: GetIndexSettingsOptions -> GetIndexSettingsOptions -> Bool # (/=) :: GetIndexSettingsOptions -> GetIndexSettingsOptions -> Bool # | |
defaultGetIndexSettingsOptions :: GetIndexSettingsOptions Source #
GetIndexSettingsOptions with every parameter set to Nothing.
Produces no query string, so emits a request identical to
getIndexSettingsWith name
defaultGetIndexSettingsOptionsgetIndexSettings.
getIndex :: MonadBH m => IndexName -> m IndexInfo Source #
getIndex fetches the full definition of a single index — its
aliases, mappings and settings — in one request. Wraps the
GET /<index> endpoint
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-get-index.html).
getIndexStats :: MonadBH m => IndexName -> m IndexStats Source #
getIndexStats returns statistics for a single index — the
GET /<index>/_stats endpoint
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-stats.html).
getIndexRecovery :: MonadBH m => IndexName -> m IndexRecovery Source #
getIndexRecovery returns information about ongoing and completed
shard recoveries for the given index (e.g. after snapshot restore,
replica allocation or peer recovery on node restart). Wraps the
GET /<index>/_recovery endpoint
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-recovery.html).
getIndexSegments :: MonadBH m => IndexName -> m IndexSegments Source #
getIndexSegments returns low-level Lucene segment information
for the given index, one entry per shard copy (primary and each
replica). Wraps the GET /<index>/_segments endpoint
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-segments.html;
also implemented by OpenSearch — see
https://docs.opensearch.org/latest/api-reference/index-apis/segments/).
getShardStores :: MonadBH m => IndexName -> m ShardStores Source #
getShardStores returns store information for every shard copy
(primary and each replica) of the given index, one entry per copy
describing where it is allocated and its allocation state. Wraps the
GET /<index>/_shard_stores endpoint
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-shards-stores.html;
also implemented by OpenSearch — see
https://docs.opensearch.org/latest/api-reference/index-apis/shard-stores/).
Equivalent to . Use
the getShardStoresWith defaultShardStoresOptionsWith variant to pass URI parameters such as status
(cluster-health filter). Surfaced as StatusDependant so genuine
server-side errors (auth, missing index, 5xx, ...) decode as an
EsError.
getShardStoresWith :: MonadBH m => IndexName -> ShardStoresOptions -> m ShardStores Source #
Like getShardStores but additionally accepts ShardStoresOptions
rendered as URI parameters. defaultShardStoresOptions makes this
byte-for-byte identical to getShardStores.
data ShardStoresOptions Source #
URI parameters accepted by GET {index}_shard_stores. The four
documented parameters are modelled: status (cluster-health filter,
comma-joined on the wire), ignore_unavailable, allow_no_indices
and expand_wildcards (comma-joined). Every field is optional so
defaultShardStoresOptions renders to no query string at all —
byte-for-byte identical to a parameterless call.
expand_wildcards reuses ExpandWildcards (matching
ResolveIndexOptions, OpenCloseIndexOptions and friends); status
is a list because the server accepts a comma-separated combination
(e.g. [ShardStoresStatusYellow, ShardStoresStatusRed], the
server-side default).
Constructors
| ShardStoresOptions | |
Fields | |
Instances
| Show ShardStoresOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> ShardStoresOptions -> ShowS # show :: ShardStoresOptions -> String # showList :: [ShardStoresOptions] -> ShowS # | |
| Eq ShardStoresOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: ShardStoresOptions -> ShardStoresOptions -> Bool # (/=) :: ShardStoresOptions -> ShardStoresOptions -> Bool # | |
defaultShardStoresOptions :: ShardStoresOptions Source #
ShardStoresOptions with every parameter set to Nothing. Produces
no query string, so
emits a request byte-for-byte identical to getShardStoresWith defaultShardStoresOptionsgetShardStores.
Response of the GET /{index} (get-index) endpoint, which returns
the aliases, mappings and settings of one index in a single
envelope. The server wraps the payload in a single-key object keyed
by the index name — the same shape as IndexSettingsSummary — but
additionally surfaces aliases and mappings alongside the settings.
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-get-index.html
Constructors
| IndexInfo | |
Fields
| |
data IndexStats Source #
Top-level envelope of the GET /<index>/_stats response. Carries
the shard result, an optional _all rollup (present when the server
aggregates the requested indices) and the per-index entries keyed by
index name.
Constructors
| IndexStats | |
Instances
| FromJSON IndexStats Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices | |
| Show IndexStats Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> IndexStats -> ShowS # show :: IndexStats -> String # showList :: [IndexStats] -> ShowS # | |
| Eq IndexStats Source # | |
data IndexStatEntry Source #
Per-index entry inside indexStatsIndices. Carries the index's
metadata (uuid, health, status) alongside the primaries and
total metric blocks.
Constructors
| IndexStatEntry | |
Instances
| FromJSON IndexStatEntry Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser IndexStatEntry # parseJSONList :: Value -> Parser [IndexStatEntry] # | |
| Show IndexStatEntry Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> IndexStatEntry -> ShowS # show :: IndexStatEntry -> String # showList :: [IndexStatEntry] -> ShowS # | |
| Eq IndexStatEntry Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: IndexStatEntry -> IndexStatEntry -> Bool # (/=) :: IndexStatEntry -> IndexStatEntry -> Bool # | |
data IndexStatAggregate Source #
The _all rollup returned when the server aggregates multiple
indices (or a single one) into one summary. Lacks the per-index
uuid, health and status fields.
Constructors
| IndexStatAggregate | |
Instances
| FromJSON IndexStatAggregate Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser IndexStatAggregate # parseJSONList :: Value -> Parser [IndexStatAggregate] # | |
| Show IndexStatAggregate Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> IndexStatAggregate -> ShowS # show :: IndexStatAggregate -> String # showList :: [IndexStatAggregate] -> ShowS # | |
| Eq IndexStatAggregate Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: IndexStatAggregate -> IndexStatAggregate -> Bool # (/=) :: IndexStatAggregate -> IndexStatAggregate -> Bool # | |
data IndexStatMetrics Source #
A metric block (either primaries or total). The docs and
store sub-objects are typed; every other section (indexing, search,
merge, flush, refresh, query_cache, fielddata, segments, translog,
completion, ...) is preserved verbatim in indexStatMetricsOther.
Note: docs and store appear both as typed fields and verbatim
inside indexStatMetricsOther (which captures the whole original
object). The typed copies are authoritative; the verbatim copy exists
so callers can navigate any not-yet-typed section without waiting for
a follow-up bead to promote it.
Constructors
| IndexStatMetrics | |
Instances
| FromJSON IndexStatMetrics Source # | Parse a metric block. |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser IndexStatMetrics # parseJSONList :: Value -> Parser [IndexStatMetrics] # | |
| Show IndexStatMetrics Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> IndexStatMetrics -> ShowS # show :: IndexStatMetrics -> String # showList :: [IndexStatMetrics] -> ShowS # | |
| Eq IndexStatMetrics Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: IndexStatMetrics -> IndexStatMetrics -> Bool # (/=) :: IndexStatMetrics -> IndexStatMetrics -> Bool # | |
data IndexStatDocs Source #
docs sub-object: live document count and deleted document count.
Constructors
| IndexStatDocs | |
Fields | |
Instances
| FromJSON IndexStatDocs Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser IndexStatDocs # parseJSONList :: Value -> Parser [IndexStatDocs] # | |
| Show IndexStatDocs Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> IndexStatDocs -> ShowS # show :: IndexStatDocs -> String # showList :: [IndexStatDocs] -> ShowS # | |
| Eq IndexStatDocs Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: IndexStatDocs -> IndexStatDocs -> Bool # (/=) :: IndexStatDocs -> IndexStatDocs -> Bool # | |
newtype IndexStatStore Source #
store sub-object: physical store size in bytes.
Constructors
| IndexStatStore | |
Fields | |
Instances
| FromJSON IndexStatStore Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser IndexStatStore # parseJSONList :: Value -> Parser [IndexStatStore] # | |
| Show IndexStatStore Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> IndexStatStore -> ShowS # show :: IndexStatStore -> String # showList :: [IndexStatStore] -> ShowS # | |
| Eq IndexStatStore Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: IndexStatStore -> IndexStatStore -> Bool # (/=) :: IndexStatStore -> IndexStatStore -> Bool # | |
newtype IndexRecovery Source #
Top-level envelope of the GET /<index>/_recovery response. The
keys are index names echoed back by the server (parsed through
IndexName's FromJSON instance, the lenient validator that accepts
hidden indices like .kibana, matching IndexStats).
Constructors
| IndexRecovery | |
Fields | |
Instances
| FromJSON IndexRecovery Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser IndexRecovery # parseJSONList :: Value -> Parser [IndexRecovery] # | |
| Show IndexRecovery Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> IndexRecovery -> ShowS # show :: IndexRecovery -> String # showList :: [IndexRecovery] -> ShowS # | |
| Eq IndexRecovery Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: IndexRecovery -> IndexRecovery -> Bool # (/=) :: IndexRecovery -> IndexRecovery -> Bool # | |
data IndexSegments Source #
Top-level envelope of the GET {index}_segments response. The
outer map is keyed by index name (parsed through IndexName's
FromJSON instance, the lenient validator that accepts hidden
indices like .kibana, matching IndexStats and IndexRecovery).
The inner map is keyed by shard number as a string.
Constructors
| IndexSegments | |
Fields | |
Instances
| FromJSON IndexSegments Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser IndexSegments # parseJSONList :: Value -> Parser [IndexSegments] # | |
| Show IndexSegments Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> IndexSegments -> ShowS # show :: IndexSegments -> String # showList :: [IndexSegments] -> ShowS # | |
| Eq IndexSegments Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: IndexSegments -> IndexSegments -> Bool # (/=) :: IndexSegments -> IndexSegments -> Bool # | |
data ShardStores Source #
Top-level envelope of the GET {index}_shard_stores response.
The outer map is keyed by index name (parsed through IndexName's
FromJSON instance, the lenient validator that accepts hidden
indices like .kibana, matching IndexSegments and IndexRecovery).
The inner map is keyed by shard number as a string (kept as Text
because ES documents it as a string and uses non-numeric suffixes
for relocating copies in some responses).
Constructors
| ShardStores | |
Fields | |
Instances
| FromJSON ShardStores Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices | |
| Show ShardStores Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> ShardStores -> ShowS # show :: ShardStores -> String # showList :: [ShardStores] -> ShowS # | |
| Eq ShardStores Source # | |
data ShardStoresShard Source #
Per-shard wrapper inside a ShardStores response. ES reports
every copy of a shard (primary and each replica) under the same
shard number, collected in shardStoresShardStores. A shard with
no assigned copy stores emits an empty list.
Constructors
| ShardStoresShard | |
Fields | |
Instances
| FromJSON ShardStoresShard Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser ShardStoresShard # parseJSONList :: Value -> Parser [ShardStoresShard] # | |
| Show ShardStoresShard Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> ShardStoresShard -> ShowS # show :: ShardStoresShard -> String # showList :: [ShardStoresShard] -> ShowS # | |
| Eq ShardStoresShard Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: ShardStoresShard -> ShardStoresShard -> Bool # (/=) :: ShardStoresShard -> ShardStoresShard -> Bool # | |
data ShardStore Source #
A single store copy. The server emits a dynamic per-node key (the
node id) alongside the known sibling fields (shardStoreAllocationId,
shardStoreAllocation, shardStoreStoreException); the parser peels
off the known keys and treats the single remaining Object-valued key
as (node_id, . Any other non-known entry (typically
a future scalar sibling field) is preserved verbatim in
ShardStoreNode)shardStoreOther, mirroring segmentOther and shardStoreNodeOther.
Constructors
| ShardStore | |
Instances
| FromJSON ShardStore Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices | |
| Show ShardStore Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> ShardStore -> ShowS # show :: ShardStore -> String # showList :: [ShardStore] -> ShowS # | |
| Eq ShardStore Source # | |
data ShardStoreNode Source #
Per-node metadata attached to each store copy. ES emits a richer
set of fields than OpenSearch (which only documents name,
ephemeral_id, transport_address and attributes); the typed
subset below is the union of both, with anything else preserved
verbatim in shardStoreNodeOther (mirroring segmentOther).
Constructors
Instances
| FromJSON ShardStoreNode Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser ShardStoreNode # parseJSONList :: Value -> Parser [ShardStoreNode] # | |
| Show ShardStoreNode Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> ShardStoreNode -> ShowS # show :: ShardStoreNode -> String # showList :: [ShardStoreNode] -> ShowS # | |
| Eq ShardStoreNode Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: ShardStoreNode -> ShardStoreNode -> Bool # (/=) :: ShardStoreNode -> ShardStoreNode -> Bool # | |
data ShardStoreAllocation Source #
The per-copy allocation enum. Wire values are lowercase strings.
ES recognises three values; OpenSearch documents only
ShardStoreAllocationPrimary and ShardStoreAllocationReplica. The
ShardStoreAllocationOther constructor preserves any future /
engine-specific value verbatim.
Constructors
| ShardStoreAllocationPrimary | |
| ShardStoreAllocationReplica | |
| ShardStoreAllocationUnavailable | |
| ShardStoreAllocationOther Text |
Instances
data ShardStoreException Source #
The optional store_exception sub-object, emitted when a store
could not be read. OpenSearch documents type and reason; ES
emits the same pair (and occasionally additional fields, preserved
in shardStoreExceptionOther).
Constructors
| ShardStoreException | |
Instances
| FromJSON ShardStoreException Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser ShardStoreException # parseJSONList :: Value -> Parser [ShardStoreException] # | |
| Show ShardStoreException Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> ShardStoreException -> ShowS # show :: ShardStoreException -> String # showList :: [ShardStoreException] -> ShowS # | |
| Eq ShardStoreException Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: ShardStoreException -> ShardStoreException -> Bool # (/=) :: ShardStoreException -> ShardStoreException -> Bool # | |
data ShardRecovery Source #
A single shard recovery entry. The id is the shard number; type
reports the source of the recovery (SNAPSHOT, REPLICA,
EXISTING_STORE, EMPTY_STORE or PEER_RECOVERY); stage reports
the current phase (INITIALIZING, INDEX, FINALIZE or DONE).
Constructors
Instances
| FromJSON ShardRecovery Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser ShardRecovery # parseJSONList :: Value -> Parser [ShardRecovery] # | |
| Show ShardRecovery Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> ShardRecovery -> ShowS # show :: ShardRecovery -> String # showList :: [ShardRecovery] -> ShowS # | |
| Eq ShardRecovery Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: ShardRecovery -> ShardRecovery -> Bool # (/=) :: ShardRecovery -> ShardRecovery -> Bool # | |
data ShardRecoveryIndex Source #
The index sub-block of a shard recovery. The files progress
object — the most useful summary of a recovery's progress — is typed;
everything else in the index sub-object (size, total_time,
source_throttle_time, target_throttle_time, translog, verify_index,
...) is preserved verbatim in shardRecoveryIndexOther so callers can
navigate it with aeson while later beads promote individual sections to
typed records.
Constructors
| ShardRecoveryIndex | |
Instances
| FromJSON ShardRecoveryIndex Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser ShardRecoveryIndex # parseJSONList :: Value -> Parser [ShardRecoveryIndex] # | |
| Show ShardRecoveryIndex Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> ShardRecoveryIndex -> ShowS # show :: ShardRecoveryIndex -> String # showList :: [ShardRecoveryIndex] -> ShowS # | |
| Eq ShardRecoveryIndex Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: ShardRecoveryIndex -> ShardRecoveryIndex -> Bool # (/=) :: ShardRecoveryIndex -> ShardRecoveryIndex -> Bool # | |
data ShardRecoveryFiles Source #
The files progress object: counts and a server-rendered percentage
string such as "100.0%".
Constructors
| ShardRecoveryFiles | |
Instances
| FromJSON ShardRecoveryFiles Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser ShardRecoveryFiles # parseJSONList :: Value -> Parser [ShardRecoveryFiles] # | |
| Show ShardRecoveryFiles Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> ShardRecoveryFiles -> ShowS # show :: ShardRecoveryFiles -> String # showList :: [ShardRecoveryFiles] -> ShowS # | |
| Eq ShardRecoveryFiles Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: ShardRecoveryFiles -> ShardRecoveryFiles -> Bool # (/=) :: ShardRecoveryFiles -> ShardRecoveryFiles -> Bool # | |
forceMergeIndex :: MonadBH m => IndexSelection -> ForceMergeIndexSettings -> m ShardsResult Source #
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.
indexExists :: MonadBH m => IndexName -> m Bool Source #
indexExists enables you to check if an index exists. Returns Bool
in IO
>>>exists <- runBH' $ indexExists testIndex
openIndex :: MonadBH m => IndexName -> m Acknowledged Source #
openIndex opens an index given a Server and an IndexName. Explained in further detail at
http://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-open-close.html
>>>response <- runBH' $ openIndex testIndex
openIndexWith :: MonadBH m => OpenCloseIndexOptions -> IndexName -> m Acknowledged Source #
openIndexWith is the fully-parameterised form of openIndex. Pass
defaultOpenCloseIndexOptions to reproduce the legacy behaviour.
closeIndex :: MonadBH m => IndexName -> m Acknowledged Source #
closeIndex closes an index given a Server and an IndexName. Explained in further detail at
http://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-open-close.html
>>>response <- runBH' $ closeIndex testIndex
closeIndexWith :: MonadBH m => OpenCloseIndexOptions -> IndexName -> m Acknowledged Source #
closeIndexWith is the fully-parameterised form of closeIndex. Pass
defaultOpenCloseIndexOptions to reproduce the legacy behaviour.
data OpenCloseIndexOptions Source #
URI parameters accepted by POST index_open and
POST index_close
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-open-close.html).
All six documented parameters are modelled: wait_for_active_shards,
ignore_unavailable, allow_no_indices, expand_wildcards,
master_timeout (deprecated alias cluster_manager_timeout on ES
7.16+/OS) and timeout. Every field is optional so
defaultOpenCloseIndexOptions renders to no query string at all —
byte-for-byte identical to the legacy parameterless
openIndex / closeIndex.
wait_for_active_shards reuses ActiveShardCount (so AllActiveShards
renders as all and as the bare decimal), matching
the convention used by
ActiveShards nClusterHealthOptions
and
CreateIndexOptions.
Durations are (unit, magnitude) pairs (e.g. (
renders as TimeUnitSeconds, 30)30s).
Constructors
| OpenCloseIndexOptions | |
Instances
| Show OpenCloseIndexOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> OpenCloseIndexOptions -> ShowS # show :: OpenCloseIndexOptions -> String # showList :: [OpenCloseIndexOptions] -> ShowS # | |
| Eq OpenCloseIndexOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: OpenCloseIndexOptions -> OpenCloseIndexOptions -> Bool # (/=) :: OpenCloseIndexOptions -> OpenCloseIndexOptions -> Bool # | |
defaultOpenCloseIndexOptions :: OpenCloseIndexOptions Source #
OpenCloseIndexOptions with every parameter set to Nothing. Produces
no query string, so and
openIndexWith defaultOpenCloseIndexOptions emit requests identical
to closeIndexWith defaultOpenCloseIndexOptionsopenIndex and closeIndex.
listIndices :: MonadBH m => m [IndexName] Source #
listIndices returns a list of all index names on a given Server
catIndices :: MonadBH m => m [(IndexName, Int)] Source #
catIndices returns a list of all index names on a given Server as well as their doc counts
catIndicesWith :: MonadBH m => CatIndicesOptions -> m [CatIndicesRow] Source #
catIndicesWith is the fully-parameterised form of catIndices.
See Database.Bloodhound.Common.Requests and
CatIndicesOptions
for the available parameters.
catAliases :: MonadBH m => m [CatAliasesRow] Source #
catAliases lists every index alias on the cluster via
GET /_cat/aliases?format=json. Equivalent to
.catAliasesWith Nothing defaultCatAliasesOptions
catAliasesWith :: MonadBH m => Maybe AliasName -> CatAliasesOptions -> m [CatAliasesRow] Source #
catAliasesWith is the fully-parameterised form of catAliases.
See Database.Bloodhound.Common.Requests and
CatAliasesOptions
for the available parameters.
catAllocation :: MonadBH m => m [CatAllocationRow] Source #
catAllocation lists the allocation of disk space for indexes and
the number of shards on each data node via
GET /_cat/allocation?format=json. Equivalent to
.catAllocationWith Nothing defaultCatAllocationOptions
catAllocationWith :: MonadBH m => Maybe NodeName -> CatAllocationOptions -> m [CatAllocationRow] Source #
catAllocationWith is the fully-parameterised form of
catAllocation. See Database.Bloodhound.Common.Requests and
CatAllocationOptions
for the available parameters.
catCount :: MonadBH m => m [CatCountRow] Source #
catCount reports the document count for the whole cluster via
GET /_cat/count?format=json. Equivalent to
.catCountWith Nothing defaultCatCountOptions
catCountWith :: MonadBH m => Maybe IndexName -> CatCountOptions -> m [CatCountRow] Source #
catCountWith is the fully-parameterised form of catCount. See
Database.Bloodhound.Common.Requests and
CatCountOptions
for the available parameters.
catMaster :: MonadBH m => m [CatMasterRow] Source #
catMaster reports the identity of the elected master node via
GET /_cat/master?format=json. Equivalent to
.catMasterWith defaultCatMasterOptions
catMasterWith :: MonadBH m => CatMasterOptions -> m [CatMasterRow] Source #
catMasterWith is the fully-parameterised form of catMaster. See
Database.Bloodhound.Common.Requests and
CatMasterOptions
for the available parameters.
catHealth :: MonadBH m => m [CatHealthRow] Source #
catHealth reports a one-row-per-snapshot summary of cluster
health via GET /_cat/health?format=json. Equivalent to
.catHealthWith defaultCatHealthOptions
catHealthWith :: MonadBH m => CatHealthOptions -> m [CatHealthRow] Source #
catHealthWith is the fully-parameterised form of catHealth. See
Database.Bloodhound.Common.Requests and
CatHealthOptions
for the available parameters.
catPendingTasks :: MonadBH m => m [CatPendingTasksRow] Source #
catPendingTasks lists the cluster-level tasks waiting to be
executed via GET /_cat/pending_tasks?format=json. Equivalent to
.catPendingTasksWith defaultCatPendingTasksOptions
catPendingTasksWith :: MonadBH m => CatPendingTasksOptions -> m [CatPendingTasksRow] Source #
catPendingTasksWith is the fully-parameterised form of
catPendingTasks. See Database.Bloodhound.Common.Requests and
CatPendingTasksOptions
for the available parameters.
catPlugins :: MonadBH m => m [CatPluginsRow] Source #
catPlugins lists the plugins installed on each node via
GET /_cat/plugins?format=json. Equivalent to
.catPluginsWith defaultCatPluginsOptions
catPluginsWith :: MonadBH m => CatPluginsOptions -> m [CatPluginsRow] Source #
catPluginsWith is the fully-parameterised form of catPlugins.
See Database.Bloodhound.Common.Requests and
CatPluginsOptions
for the available parameters.
catTemplates :: MonadBH m => m [CatTemplatesRow] Source #
catTemplates lists the cluster's index templates via
GET /_cat/templates?format=json. Equivalent to
.catTemplatesWith Nothing defaultCatTemplatesOptions
catTemplatesWith :: MonadBH m => Maybe TemplateName -> CatTemplatesOptions -> m [CatTemplatesRow] Source #
catTemplatesWith is the fully-parameterised form of catTemplates.
See Database.Bloodhound.Common.Requests and
CatTemplatesOptions
for the available parameters.
catThreadPool :: MonadBH m => m [CatThreadPoolRow] Source #
catThreadPool lists the thread pools of each node via
GET /_cat/thread_pool?format=json. Equivalent to
.catThreadPoolWith Nothing defaultCatThreadPoolOptions
catThreadPoolWith :: MonadBH m => Maybe IndexName -> CatThreadPoolOptions -> m [CatThreadPoolRow] Source #
catThreadPoolWith is the fully-parameterised form of
catThreadPool. See Database.Bloodhound.Common.Requests and
CatThreadPoolOptions
for the available parameters.
catFielddata :: MonadBH m => m [CatFielddataRow] Source #
catFielddata lists the amount of heap memory currently used by
the field data cache, per field per node, via
GET /_cat/fielddata?format=json. Equivalent to
.catFielddataWith Nothing defaultCatFielddataOptions
catFielddataWith :: MonadBH m => Maybe FieldName -> CatFielddataOptions -> m [CatFielddataRow] Source #
catFielddataWith is the fully-parameterised form of
catFielddata. See Database.Bloodhound.Common.Requests and
CatFielddataOptions
for the available parameters.
catNodeattrs :: MonadBH m => m [CatNodeattrsRow] Source #
catNodeattrs lists custom node attributes via
GET /_cat/nodeattrs?format=json. Equivalent to
.catNodeattrsWith defaultCatNodeattrsOptions
catNodeattrsWith :: MonadBH m => CatNodeattrsOptions -> m [CatNodeattrsRow] Source #
catNodeattrsWith is the fully-parameterised form of
catNodeattrs. See Database.Bloodhound.Common.Requests and
CatNodeattrsOptions
for the available parameters.
catRepositories :: MonadBH m => m [CatRepositoriesRow] Source #
catRepositories lists snapshot repositories registered on the
cluster via GET /_cat/repositories?format=json. Equivalent to
.catRepositoriesWith defaultCatRepositoriesOptions
catRepositoriesWith :: MonadBH m => CatRepositoriesOptions -> m [CatRepositoriesRow] Source #
catRepositoriesWith is the fully-parameterised form of
catRepositories. See Database.Bloodhound.Common.Requests and
CatRepositoriesOptions
for the available parameters.
catShards :: MonadBH m => m [CatShardsRow] Source #
catShards lists the state of every primary and replica shard in
the cluster via GET /_cat/shards?format=json. Equivalent to
.catShardsWith Nothing defaultCatShardsOptions
catShardsWith :: MonadBH m => Maybe IndexName -> CatShardsOptions -> m [CatShardsRow] Source #
catShardsWith is the fully-parameterised form of catShards.
See Database.Bloodhound.Common.Requests and
CatShardsOptions
for the available parameters.
catTasks :: MonadBH m => m [CatTasksRow] Source #
catTasks lists the tasks currently executing on the cluster via
GET /_cat/tasks?format=json. Equivalent to
.catTasksWith defaultCatTasksOptions
catTasksWith :: MonadBH m => CatTasksOptions -> m [CatTasksRow] Source #
catTasksWith is the fully-parameterised form of catTasks. See
Database.Bloodhound.Common.Requests and
CatTasksOptions
for the available parameters.
catSnapshots :: MonadBH m => m [CatSnapshotsRow] Source #
catSnapshots lists the snapshots stored in every snapshot
repository registered on the cluster via
GET /_cat/snapshots?format=json. Equivalent to
.catSnapshotsWith Nothing defaultCatSnapshotsOptions
catSnapshotsWith :: MonadBH m => Maybe SnapshotRepoName -> CatSnapshotsOptions -> m [CatSnapshotsRow] Source #
catSnapshotsWith is the fully-parameterised form of
catSnapshots. See Database.Bloodhound.Common.Requests and
CatSnapshotsOptions
for the available parameters.
catNodes :: MonadBH m => m [CatNodesRow] Source #
catNodes lists the cluster topology — one row per node with its
identity, resource usage, and elected-master flag — via
GET /_cat/nodes?format=json. Equivalent to
.catNodesWith defaultCatNodesOptions
catNodesWith :: MonadBH m => CatNodesOptions -> m [CatNodesRow] Source #
catNodesWith is the fully-parameterised form of catNodes.
See Database.Bloodhound.Common.Requests and
CatNodesOptions
for the available parameters.
catSegments :: MonadBH m => m [CatSegmentsRow] Source #
catSegments lists the low-level Lucene segments of each shard of
each index via GET /_cat/segments?format=json. Equivalent to
.catSegmentsWith Nothing defaultCatSegmentsOptions
catSegmentsWith :: MonadBH m => Maybe IndexName -> CatSegmentsOptions -> m [CatSegmentsRow] Source #
catSegmentsWith is the fully-parameterised form of catSegments.
See Database.Bloodhound.Common.Requests and
CatSegmentsOptions
for the available parameters.
catRecovery :: MonadBH m => m [CatRecoveryRow] Source #
catRecovery lists shard recovery progress for each shard of each
index via GET /_cat/recovery?format=json. Equivalent to
.catRecoveryWith Nothing defaultCatRecoveryOptions
catRecoveryWith :: MonadBH m => Maybe IndexName -> CatRecoveryOptions -> m [CatRecoveryRow] Source #
catRecoveryWith is the fully-parameterised form of catRecovery.
See Database.Bloodhound.Common.Requests and
CatRecoveryOptions
for the available parameters.
catComponentTemplates :: MonadBH m => m [CatComponentTemplatesRow] Source #
catComponentTemplates lists the component templates.
See catComponentTemplates and
CatComponentTemplatesRow.
Since: 0.26.0.0
catComponentTemplatesWith :: MonadBH m => Maybe Text -> CatComponentTemplatesOptions -> m [CatComponentTemplatesRow] Source #
catComponentTemplatesWith is the fully-parameterised form of
catComponentTemplates.
Since: 0.26.0.0
catCircuitBreakers :: MonadBH m => m [CatCircuitBreakersRow] Source #
catCircuitBreakers lists the JVM circuit breakers.
See catCircuitBreakers and
CatCircuitBreakersRow.
Since: 0.26.0.0
catCircuitBreakersWith :: MonadBH m => Maybe Text -> CatCircuitBreakersOptions -> m [CatCircuitBreakersRow] Source #
catCircuitBreakersWith is the fully-parameterised form of
catCircuitBreakers.
Since: 0.26.0.0
catMlJobs :: MonadBH m => m [CatMlJobsRow] Source #
catMlJobs lists the ML anomaly-detection jobs.
See catMlJobs and
CatMlJobsRow.
Since: 0.26.0.0
catMlJobsWith :: MonadBH m => Maybe Text -> CatMlJobsOptions -> m [CatMlJobsRow] Source #
catMlJobsWith is the fully-parameterised form of catMlJobs.
Since: 0.26.0.0
catMlDataFrameAnalytics :: MonadBH m => m [CatMlDataFrameAnalyticsRow] Source #
catMlDataFrameAnalytics lists the ML data frame analytics jobs.
See catMlDataFrameAnalytics and
CatMlDataFrameAnalyticsRow.
Since: 0.26.0.0
catMlDataFrameAnalyticsWith :: MonadBH m => Maybe Text -> CatMlDataFrameAnalyticsOptions -> m [CatMlDataFrameAnalyticsRow] Source #
catMlDataFrameAnalyticsWith is the fully-parameterised form of
catMlDataFrameAnalytics.
Since: 0.26.0.0
catMlDatafeeds :: MonadBH m => m [CatMlDatafeedsRow] Source #
catMlDatafeeds lists the ML datafeeds.
See catMlDatafeeds and
CatMlDatafeedsRow.
Since: 0.26.0.0
catMlDatafeedsWith :: MonadBH m => Maybe Text -> CatMlDatafeedsOptions -> m [CatMlDatafeedsRow] Source #
catMlDatafeedsWith is the fully-parameterised form of
catMlDatafeeds.
Since: 0.26.0.0
catMlTrainedModels :: MonadBH m => m [CatMlTrainedModelsRow] Source #
catMlTrainedModels lists the ML trained models.
See catMlTrainedModels and
CatMlTrainedModelsRow.
Since: 0.26.0.0
catMlTrainedModelsWith :: MonadBH m => Maybe Text -> CatMlTrainedModelsOptions -> m [CatMlTrainedModelsRow] Source #
catMlTrainedModelsWith is the fully-parameterised form of
catMlTrainedModels.
Since: 0.26.0.0
catTransforms :: MonadBH m => m [CatTransformsRow] Source #
catTransforms lists the transforms.
See catTransforms and
CatTransformsRow.
Since: 0.26.0.0
catTransformsWith :: MonadBH m => Maybe Text -> CatTransformsOptions -> m [CatTransformsRow] Source #
catTransformsWith is the fully-parameterised form of catTransforms.
Since: 0.26.0.0
addIndexBlock :: MonadBH m => IndexName -> IndexBlock -> m Acknowledged Source #
addIndexBlock applies an IndexBlock to an index via
PUT <index>_block/<block>, returning Acknowledged on
success. Useful for cluster maintenance: temporarily disabling
writes, reads, or metadata operations without closing the index.
See addIndexBlock for the
underlying request builder, and
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-blocks.html
for the upstream documentation.
Since: 0.26.0.0
removeIndexBlock :: MonadBH m => IndexName -> IndexBlock -> m Acknowledged Source #
removeIndexBlock releases an IndexBlock from an index.
Counterpart to addIndexBlock. Because the dedicated
PUT <index>_block/<block> endpoint is add-only on every
supported backend (ES7+ and OS1+), the removal uses
PUT <index>_settings with the matching BlocksX False
UpdatableIndexSetting. Surfaced as StatusDependant so a 404
for a missing index decodes as a structured EsError (unlike
updateIndexSettings, which is StatusIndependant). See
removeIndexBlock for details.
Since: 0.26.0.0
data IndexBlock Source #
The block kind passed as the last path segment of
PUT <index>_block/<block>
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-blocks.html,
https://docs.opensearch.org/latest/api-reference/index-apis/block-index/).
Each constructor maps to a documented wire string rendered by
indexBlockText. This is the canonical way to apply an index block.
The dedicated _block endpoint is add-only on every supported
backend (ES7+/OS1+), so removal routes through
PUT <index>_settings with the matching UpdatableIndexSetting
via indexBlockToSetting — see
removeIndexBlock. The
BlocksWrite, BlocksRead, BlocksReadOnly, BlocksMetaData,
BlocksReadOnlyAllowDelete ToJSON renderers emit the
index.blocks.X form ES requires (fixed in bloodhound-442).
Constructors
| IndexBlockWrite |
|
| IndexBlockRead |
|
| IndexBlockReadOnly |
|
| IndexBlockMetadata |
|
Instances
| Show IndexBlock Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> IndexBlock -> ShowS # show :: IndexBlock -> String # showList :: [IndexBlock] -> ShowS # | |
| Eq IndexBlock Source # | |
indexBlockText :: IndexBlock -> Text Source #
Wire string for an IndexBlock. Single source of truth used by
addIndexBlock to render the
trailing path segment of PUT <index>_block/<block>.
waitForYellowIndex :: MonadBH m => IndexName -> m HealthStatus Source #
Block until the index becomes available for indexing documents. This is useful for integration tests in which indices are rapidly created and deleted.
rolloverIndex :: MonadBH m => IndexAliasName -> Maybe RolloverConditions -> m RolloverResponse Source #
rolloverIndex rolls an alias over to a new index when the
supplied conditions are met on the alias's current write index. The
alias must point at exactly one write index whose name matches the
rollover naming convention (e.g. logs-000001 -> logs-000002).
Wraps POST <alias>_rollover.
Pass to set thresholds (any subset of
Just conditionsrolloverConditionsMaxAge / rolloverConditionsMaxDocs /
rolloverConditionsMaxSize / rolloverConditionsMaxPrimaryShardSize;
at least one should be Just). Pass Nothing to roll over
unconditionally. See RolloverResponse for the result.
Since: 0.26.0.0
data RolloverConditions Source #
Conditions under which rolloverIndex should roll the alias over to a new
index. At least one field should be Just when the value is actually sent
to the server; the Maybe fields let the caller express any subset.
Sizes and ages carry units (e.g. "7d", "50gb") so they are Text
rather than numbers, matching the on-the-wire grammar used by both
Elasticsearch and OpenSearch. rolloverConditionsMaxDocs is a plain
integer.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-rollover-index.html and https://docs.opensearch.org/latest/api-reference/index-apis/rollover-index/.
Since: 0.26.0.0
Constructors
| RolloverConditions | |
Instances
data RolloverResponse Source #
Response body for POST alias_rollover.
All fields are modelled defensively with .:.? to tolerate backends
that omit them. The ES OpenAPI spec marks every field as Required
in the 200 body, but other backends (OpenSearch) may be looser, and a
dry_run response still populates old_index/new_index with the
candidate names.
conditions, when present, is the server's own evaluation of the
supplied thresholds: a map from a human-readable condition
description (e.g. "[max_docs: 1]") to whether that condition was
met (True) or not (False). The shape is therefore not the same
as RolloverConditions — the server re-renders thresholds as
display strings rather than echoing the request body.
Since: 0.26.0.0
Constructors
| RolloverResponse | |
Instances
| FromJSON RolloverResponse Source # | |||||
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser RolloverResponse # parseJSONList :: Value -> Parser [RolloverResponse] # | |||||
| ToJSON RolloverResponse Source # | |||||
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods toJSON :: RolloverResponse -> Value # toEncoding :: RolloverResponse -> Encoding # toJSONList :: [RolloverResponse] -> Value # toEncodingList :: [RolloverResponse] -> Encoding # omitField :: RolloverResponse -> Bool # | |||||
| Generic RolloverResponse Source # | |||||
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Associated Types
Methods from :: RolloverResponse -> Rep RolloverResponse x # to :: Rep RolloverResponse x -> RolloverResponse # | |||||
| Show RolloverResponse Source # | |||||
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> RolloverResponse -> ShowS # show :: RolloverResponse -> String # showList :: [RolloverResponse] -> ShowS # | |||||
| Eq RolloverResponse Source # | |||||
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: RolloverResponse -> RolloverResponse -> Bool # (/=) :: RolloverResponse -> RolloverResponse -> Bool # | |||||
| type Rep RolloverResponse Source # | |||||
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices type Rep RolloverResponse = D1 ('MetaData "RolloverResponse" "Database.Bloodhound.Internal.Versions.Common.Types.Indices" "bloodhound-1.0.0.0-49XSndf62hW73KoVhdlR9I" 'False) (C1 ('MetaCons "RolloverResponse" 'PrefixI 'True) ((S1 ('MetaSel ('Just "rolloverResponseAcknowledged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "rolloverResponseShardsAcknowledged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "rolloverResponseOldIndex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe IndexName)))) :*: ((S1 ('MetaSel ('Just "rolloverResponseNewIndex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe IndexName)) :*: S1 ('MetaSel ('Just "rolloverResponseRolledOver") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "rolloverResponseDryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "rolloverResponseConditions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Map Text Bool))))))) | |||||
defaultRolloverConditions :: RolloverConditions Source #
RolloverConditions with every threshold set to Nothing. Useful
only as a seed for record updates, e.g.
defaultRolloverConditions { rolloverConditionsMaxDocs = Just 1000 }
WARNING: sending defaultRolloverConditions verbatim to the
server produces an empty conditions object, which the rollover
endpoint will reject. Always override at least one field with
Just before passing it to rolloverIndex. To roll over
unconditionally, pass Nothing instead.
shrinkIndex :: MonadBH m => IndexName -> IndexName -> ShrinkSettings -> m Acknowledged Source #
Shrink an existing index into a new index with fewer primary shards.
Wraps POST <source>_shrink/<target>. The source must be
read-only (index.blocks.write: true) and all primary shards must be
co-located on one node; the target's number_of_shards must be a
divisor of the source's. Override shrinkSettingsOptions to set the
target shard count, aliases and the other body fields and URI
parameters (wait_for_active_shards, master_timeout, timeout).
Since: 0.26.0.0
newtype ShrinkSettings Source #
Body and URI parameters for POST index_shrink/target. The
source index must be read-only (index.blocks.write: true) and every
primary shard of the source must be resident on a single node before
the call; the target's number_of_shards must be a divisor of the
source's. Wrap defaultCreateIndexOptions (or override
shrinkSettingsOptions) to populate settings / aliases for the
new index.
Since: 0.26.0.0
Constructors
| ShrinkSettings | |
Fields | |
Instances
| Show ShrinkSettings Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> ShrinkSettings -> ShowS # show :: ShrinkSettings -> String # showList :: [ShrinkSettings] -> ShowS # | |
| Eq ShrinkSettings Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: ShrinkSettings -> ShrinkSettings -> Bool # (/=) :: ShrinkSettings -> ShrinkSettings -> Bool # | |
defaultShrinkSettings :: ShrinkSettings Source #
ShrinkSettings with every optional field set to Nothing:
empty body, no URI parameters. The server then copies the source
index's settings verbatim and applies its built-in defaults for
anything missing.
Since: 0.26.0.0
splitIndex :: MonadBH m => IndexName -> IndexName -> SplitSettings -> m Acknowledged Source #
Split an existing index into a new index with more primary shards.
Wraps POST <source>_split/<target>. The source must be
read-only (index.blocks.write: true); the target's
number_of_shards must be a multiple of the source's, and the
source's index.number_of_routing_shards must be a multiple of the
target's. See shrinkSettingsOptions for the body and URI parameter
surface.
Since: 0.26.0.0
newtype SplitSettings Source #
Body and URI parameters for POST index_split/target. The
source index must be read-only (index.blocks.write: true); the
target's number_of_shards must be a multiple of the source's, and
the source's index.number_of_routing_shards must be a multiple of
the target's. See ShrinkSettings for the field layout — both
newtypes wrap CreateIndexOptions.
Since: 0.26.0.0
Constructors
| SplitSettings | |
Fields | |
Instances
| Show SplitSettings Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> SplitSettings -> ShowS # show :: SplitSettings -> String # showList :: [SplitSettings] -> ShowS # | |
| Eq SplitSettings Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: SplitSettings -> SplitSettings -> Bool # (/=) :: SplitSettings -> SplitSettings -> Bool # | |
defaultSplitSettings :: SplitSettings Source #
SplitSettings with every optional field set to Nothing.
Since: 0.26.0.0
cloneIndex :: MonadBH m => IndexName -> IndexName -> CloneSettings -> m Acknowledged Source #
Clone an existing index into a new index with the same mappings and
settings. Wraps POST <source>_clone/<target>. The source must
be read-only (index.blocks.write: true); the target inherits the
source's number_of_shards. See shrinkSettingsOptions for the
body and URI parameter surface (the record is wrapped under
cloneSettingsOptions here).
Since: 0.26.0.0
newtype CloneSettings Source #
Body and URI parameters for POST index_clone/target. The
source index must be read-only (index.blocks.write: true); the
target inherits the source's number_of_shards. See
ShrinkSettings for the field layout.
Since: 0.26.0.0
Constructors
| CloneSettings | |
Fields | |
Instances
| Show CloneSettings Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> CloneSettings -> ShowS # show :: CloneSettings -> String # showList :: [CloneSettings] -> ShowS # | |
| Eq CloneSettings Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: CloneSettings -> CloneSettings -> Bool # (/=) :: CloneSettings -> CloneSettings -> Bool # | |
defaultCloneSettings :: CloneSettings Source #
CloneSettings with every optional field set to Nothing.
Since: 0.26.0.0
data HealthStatus Source #
Constructors
| HealthStatus | |
Fields
| |
Instances
| FromJSON HealthStatus Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Nodes | |
| Show HealthStatus Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Nodes Methods showsPrec :: Int -> HealthStatus -> ShowS # show :: HealthStatus -> String # showList :: [HealthStatus] -> ShowS # | |
| Eq HealthStatus Source # | |
resolveIndex :: MonadBH m => [IndexPattern] -> m ResolvedIndices Source #
resolveIndex resolves indices, aliases and data streams matching
the given patterns. Wraps GET _resolveindex/{name}
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-resolve-index-api.html;
also implemented by OpenSearch — see
https://docs.opensearch.org/latest/api-reference/index-apis/resolve-index/).
Patterns are comma-joined into a single path segment; an empty list
is treated as the wildcard *. Use resolveIndexWith to pass URI
parameters such as expand_wildcards. Surfaced as StatusDependant
so genuine server-side errors (auth, malformed pattern, ...) decode
as an EsError. A missing concrete target usually returns 200 with
empty result arrays rather than a 404 — see ResolveIndexOptions
for the ignore_unavailable knob (documented on ES 8.x+, silently
accepted by OpenSearch).
resolveIndexWith :: MonadBH m => ResolveIndexOptions -> [IndexPattern] -> m ResolvedIndices Source #
Like resolveIndex but additionally accepts ResolveIndexOptions
rendered as URI parameters. defaultResolveIndexOptions makes this
byte-for-byte identical to resolveIndex.
data ResolveIndexOptions Source #
URI parameters accepted by GET _resolveindex. Only
expand_wildcards is documented by every backend (ES 7.17, ES 8.x,
ES 9.x, OpenSearch); ignore_unavailable and allow_no_indices are
documented by ES 8.x/9.x but accepted (undocumented) by OpenSearch.
The deprecated ES-7.x-only ignore_throttled and the ES-9.2-only
mode parameters are not modelled here.
expand_wildcards is a list because the server accepts a
comma-separated combination (e.g.
[ExpandWildcardsOpen, ExpandWildcardsHidden]). Note that
ExpandWildcardsHidden must be combined with ExpandWildcardsOpen
and/or ExpandWildcardsClosed — the server rejects a bare
hidden.
Constructors
| ResolveIndexOptions | |
Fields | |
Instances
| Show ResolveIndexOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> ResolveIndexOptions -> ShowS # show :: ResolveIndexOptions -> String # showList :: [ResolveIndexOptions] -> ShowS # | |
| Eq ResolveIndexOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: ResolveIndexOptions -> ResolveIndexOptions -> Bool # (/=) :: ResolveIndexOptions -> ResolveIndexOptions -> Bool # | |
defaultResolveIndexOptions :: ResolveIndexOptions Source #
ResolveIndexOptions with every parameter set to Nothing. Produces
no query string, so a call made with this value is byte-identical to a
parameterless call.
data ResolvedIndices Source #
Top-level envelope of the GET _resolveindex response. Carries
the three arrays the server always returns (even when empty):
indices, aliases and data_streams.
Constructors
| ResolvedIndices | |
Instances
| FromJSON ResolvedIndices Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser ResolvedIndices # parseJSONList :: Value -> Parser [ResolvedIndices] # | |
| Show ResolvedIndices Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> ResolvedIndices -> ShowS # show :: ResolvedIndices -> String # showList :: [ResolvedIndices] -> ShowS # | |
| Eq ResolvedIndices Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: ResolvedIndices -> ResolvedIndices -> Bool # (/=) :: ResolvedIndices -> ResolvedIndices -> Bool # | |
data ResolvedIndex Source #
One entry in the indices array. The universally-present name
and attributes fields are typed; aliases (the alias names that
point at this index) is optional and defaults to empty when absent;
data_stream and mode are ES-9.x-only and kept as Maybe.
attributes is intentionally [Text] rather than a sum type: the
documented value set differs across versions (ES 8.17 enumerates
open, closed, hidden, system, frozen; frozen is removed
in ES 9.x; OpenSearch does not enumerate the values at all), so a
permissive list preserves forward compatibility.
The remainder of the entry (any not-yet-typed field the server may
add) is captured verbatim in resolvedIndexOther so callers can
navigate it with aeson.
Strict names: resolvedIndexName is parsed through
IndexName's FromJSON instance, which runs mkIndexNameSystem.
A name that violates that validator — most realistically a
<cluster>:<index> remote-cluster reference (the : is
rejected) — fails the entire ResolvedIndices parse, not just
this entry. This matches the precedent set by FieldMappingResponse
and IndexStats.
Constructors
| ResolvedIndex | |
Instances
| FromJSON ResolvedIndex Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser ResolvedIndex # parseJSONList :: Value -> Parser [ResolvedIndex] # | |
| Show ResolvedIndex Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> ResolvedIndex -> ShowS # show :: ResolvedIndex -> String # showList :: [ResolvedIndex] -> ShowS # | |
| Eq ResolvedIndex Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: ResolvedIndex -> ResolvedIndex -> Bool # (/=) :: ResolvedIndex -> ResolvedIndex -> Bool # | |
data ResolvedAlias Source #
One entry in the aliases array. name is the alias;
indices lists the concrete indices the alias resolves to. The
ES-9.x OpenAPI spec types indices as string | array[string], but
every documented example renders it as an array; the FromJSON
instance below accepts both forms (a bare string is lifted to a
singleton list) so the same parser works regardless of backend.
Constructors
| ResolvedAlias | |
Fields | |
Instances
| FromJSON ResolvedAlias Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser ResolvedAlias # parseJSONList :: Value -> Parser [ResolvedAlias] # | |
| Show ResolvedAlias Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> ResolvedAlias -> ShowS # show :: ResolvedAlias -> String # showList :: [ResolvedAlias] -> ShowS # | |
| Eq ResolvedAlias Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: ResolvedAlias -> ResolvedAlias -> Bool # (/=) :: ResolvedAlias -> ResolvedAlias -> Bool # | |
data ResolvedDataStream Source #
One entry in the data_streams array. The ES-9.x OpenAPI spec
types backing_indices as string | array[string]; as with
ResolvedAlias, the parser accepts both forms. OpenSearch's example
always returns an empty data_streams array, so this type is
exercised primarily against Elasticsearch.
Constructors
| ResolvedDataStream | |
Instances
| FromJSON ResolvedDataStream Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser ResolvedDataStream # parseJSONList :: Value -> Parser [ResolvedDataStream] # | |
| Show ResolvedDataStream Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> ResolvedDataStream -> ShowS # show :: ResolvedDataStream -> String # showList :: [ResolvedDataStream] -> ShowS # | |
| Eq ResolvedDataStream Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: ResolvedDataStream -> ResolvedDataStream -> Bool # (/=) :: ResolvedDataStream -> ResolvedDataStream -> Bool # | |
Dangling indices
listDanglingIndices :: MonadBH m => m [DanglingIndex] Source #
listDanglingIndices returns every dangling index currently
known to the cluster. See listDanglingIndices for the
underlying builder and wire-shape details. Not implemented by
OpenSearch — a request against an OS backend surfaces as an
EsError.
Since: 0.26.0.0
importDanglingIndex :: MonadBH m => DanglingIndexUuid -> m Acknowledged Source #
importDanglingIndex re-attaches a dangling index to the cluster
metadata via POST _dangling{uuid}. The
accept_data_loss=true flag is set by
defaultImportDanglingIndexOptions. See importDanglingIndex.
Since: 0.26.0.0
importDanglingIndexWith :: MonadBH m => DanglingIndexUuid -> ImportDanglingIndexOptions -> m Acknowledged Source #
Fully-parameterised form of importDanglingIndex. Pass
defaultImportDanglingIndexOptions to reproduce the bare behaviour.
See importDanglingIndexWith.
Since: 0.26.0.0
deleteDanglingIndex :: MonadBH m => DanglingIndexUuid -> m Acknowledged Source #
deleteDanglingIndex permanently removes a dangling index's
on-disk data via DELETE _dangling{uuid}. See
deleteDanglingIndex.
Since: 0.26.0.0
deleteDanglingIndexWith :: MonadBH m => DanglingIndexUuid -> DeleteDanglingIndexOptions -> m Acknowledged Source #
Fully-parameterised form of deleteDanglingIndex. Pass
defaultDeleteDanglingIndexOptions to send no parameters at all.
See deleteDanglingIndexWith.
Since: 0.26.0.0
newtype DanglingIndexUuid Source #
The UUID used by Elasticsearch to identify a dangling index in the
_dangling{uuid} path. This is the index_uuid reported by
GET /_dangling (a 22-character base64-encoded UUID, e.g.
wWy3QpguT5S-u2f0x2GXoQ).
Constructors
| DanglingIndexUuid Text |
Instances
| Show DanglingIndexUuid Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Dangling Methods showsPrec :: Int -> DanglingIndexUuid -> ShowS # show :: DanglingIndexUuid -> String # showList :: [DanglingIndexUuid] -> ShowS # | |
| Eq DanglingIndexUuid Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Dangling Methods (==) :: DanglingIndexUuid -> DanglingIndexUuid -> Bool # (/=) :: DanglingIndexUuid -> DanglingIndexUuid -> Bool # | |
| Ord DanglingIndexUuid Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Dangling Methods compare :: DanglingIndexUuid -> DanglingIndexUuid -> Ordering # (<) :: DanglingIndexUuid -> DanglingIndexUuid -> Bool # (<=) :: DanglingIndexUuid -> DanglingIndexUuid -> Bool # (>) :: DanglingIndexUuid -> DanglingIndexUuid -> Bool # (>=) :: DanglingIndexUuid -> DanglingIndexUuid -> Bool # max :: DanglingIndexUuid -> DanglingIndexUuid -> DanglingIndexUuid # min :: DanglingIndexUuid -> DanglingIndexUuid -> DanglingIndexUuid # | |
data DanglingIndex Source #
One entry in the GET /_dangling response. The
creation_date_millis field is the epoch-millisecond timestamp at
which the index was created; it is required by the spec, so we parse
it strictly as an Int.
The node_ids field is the list of node IDs holding the dangling
index's data; it is required and emitted as an array by the server.
The index_name is surfaced as plain Text rather than
IndexName:
a dangling index originated on another cluster and its name may not
satisfy this library's index-name validator. Callers that want to
re-import it under a sanitized name can do so themselves.
Constructors
| DanglingIndex | |
Instances
| FromJSON DanglingIndex Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Dangling Methods parseJSON :: Value -> Parser DanglingIndex # parseJSONList :: Value -> Parser [DanglingIndex] # | |
| Show DanglingIndex Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Dangling Methods showsPrec :: Int -> DanglingIndex -> ShowS # show :: DanglingIndex -> String # showList :: [DanglingIndex] -> ShowS # | |
| Eq DanglingIndex Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Dangling Methods (==) :: DanglingIndex -> DanglingIndex -> Bool # (/=) :: DanglingIndex -> DanglingIndex -> Bool # | |
newtype DanglingIndicesResponse Source #
Envelope returned by GET /_dangling:
{"dangling_indices": [ ... ]}. An empty list is the common case
on a healthy cluster.
Constructors
| DanglingIndicesResponse | |
Fields | |
Instances
| FromJSON DanglingIndicesResponse Source # | |
| Show DanglingIndicesResponse Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Dangling Methods showsPrec :: Int -> DanglingIndicesResponse -> ShowS # show :: DanglingIndicesResponse -> String # showList :: [DanglingIndicesResponse] -> ShowS # | |
| Eq DanglingIndicesResponse Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Dangling Methods (==) :: DanglingIndicesResponse -> DanglingIndicesResponse -> Bool # (/=) :: DanglingIndicesResponse -> DanglingIndicesResponse -> Bool # | |
data ImportDanglingIndexOptions Source #
URI parameters accepted by POST _dangling{uuid}.
accept_data_loss is required by the server — the request fails
400 without it. The default defaultImportDanglingIndexOptions
sets it to True (the only meaningful value), but the field is
exposed in case a future caller wants to inspect or override it
(e.g. to render an "I have not consented" request shape for
audit logging).
master_timeout and timeout follow the project-wide
(unit, magnitude) convention rendered via timeUnitsSuffix
(e.g. ( -> TimeUnitSeconds, 30)30s). Nothing omits the
parameter.
Constructors
| ImportDanglingIndexOptions | |
Fields
| |
Instances
| Show ImportDanglingIndexOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Dangling Methods showsPrec :: Int -> ImportDanglingIndexOptions -> ShowS # show :: ImportDanglingIndexOptions -> String # showList :: [ImportDanglingIndexOptions] -> ShowS # | |
| Eq ImportDanglingIndexOptions Source # | |
defaultImportDanglingIndexOptions :: ImportDanglingIndexOptions Source #
True for accept_data_loss (the server-required value), no
master_timeout, no timeout.
data DeleteDanglingIndexOptions Source #
URI parameters accepted by DELETE _dangling{uuid}. Same
shape as ImportDanglingIndexOptions minus the accept_data_loss
flag (delete does not require it).
Constructors
| DeleteDanglingIndexOptions | |
Fields
| |
Instances
| Show DeleteDanglingIndexOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Dangling Methods showsPrec :: Int -> DeleteDanglingIndexOptions -> ShowS # show :: DeleteDanglingIndexOptions -> String # showList :: [DeleteDanglingIndexOptions] -> ShowS # | |
| Eq DeleteDanglingIndexOptions Source # | |
defaultDeleteDanglingIndexOptions :: DeleteDanglingIndexOptions Source #
No parameters. defaultDeleteDanglingIndexOptions emits no
query string at all.
Index Aliases
updateIndexAliases :: MonadBH m => NonEmpty IndexAliasAction -> m Acknowledged Source #
updateIndexAliases updates the server's index alias
table. Operations are atomic. Explained in further detail at
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-aliases.html
>>>let src = IndexName "a-real-index">>>let aliasName = IndexName "an-alias">>>let iAlias = IndexAlias src (IndexAliasName aliasName)>>>let aliasCreate = defaultIndexAliasCreate>>>_ <- runBH' $ deleteIndex src>>>isSuccess <$> runBH' (createIndex defaultIndexSettings src)True>>>runBH' $ indexExists srcTrue>>>isSuccess <$> runBH' (updateIndexAliases (AddAlias iAlias aliasCreate :| []))True>>>runBH' $ indexExists aliasNameTrue
updateIndexAliasesWith :: MonadBH m => UpdateAliasesOptions -> NonEmpty IndexAliasAction -> m Acknowledged Source #
updateIndexAliasesWith is the fully-parameterised form of
updateIndexAliases. See Database.Bloodhound.Common.Requests for
the underlying builder and UpdateAliasesOptions for the available
URI parameters.
data UpdateAliasesOptions Source #
The URI parameters accepted by POST /_aliases
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-aliases.html):
master_timeout (the pre-7.16 alias of cluster_manager_timeout,
still accepted by every supported backend) and timeout. Both are
modelled as a magnitude paired with a TimeUnits suffix (e.g.
( renders as TimeUnitSeconds, 30)30s).
Every field is optional, so defaultUpdateAliasesOptions produces no
query string at all — byte-for-byte identical to a parameterless call
to updateIndexAliases.
Constructors
| UpdateAliasesOptions | |
Fields
| |
Instances
| Show UpdateAliasesOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> UpdateAliasesOptions -> ShowS # show :: UpdateAliasesOptions -> String # showList :: [UpdateAliasesOptions] -> ShowS # | |
| Eq UpdateAliasesOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: UpdateAliasesOptions -> UpdateAliasesOptions -> Bool # (/=) :: UpdateAliasesOptions -> UpdateAliasesOptions -> Bool # | |
defaultUpdateAliasesOptions :: UpdateAliasesOptions Source #
UpdateAliasesOptions with every parameter set to Nothing.
Produces no query string, so emits a request identical to
updateIndexAliasesWith
defaultUpdateAliasesOptionsupdateIndexAliases.
updateAliasesOptionsParams :: UpdateAliasesOptions -> [(Text, Maybe Text)] Source #
Render UpdateAliasesOptions as a list of (key, value) pairs
suitable for withQueries. Nothing fields are omitted, so
defaultUpdateAliasesOptions produces an empty list (and therefore
no query string).
createIndexAlias :: MonadBH m => IndexName -> IndexAliasName -> IndexAliasCreate -> m Acknowledged Source #
Add an alias to a single index via PUT {index}_alias/{name} —
the non-atomic, single-action variant of updateIndexAliases. Pass
defaultIndexAliasCreate for an empty body. Returns the server's
Acknowledged flag.
>>>_ <- runBH' $ createIndexAlias (IndexName "my-index") (IndexAliasName (IndexName "my-alias")) defaultIndexAliasCreate
getIndexAliases :: MonadBH m => m IndexAliasesSummary Source #
Get all aliases configured on the server.
getIndexAlias :: MonadBH m => IndexName -> Maybe AliasName -> m IndexAliasesInfo Source #
Get aliases for a single source index, optionally narrowed to one
alias name (GET {index}_alias[/{name}]). See
Database.Bloodhound.Common.Requests for the underlying builder and
the wire-shape details. A missing index or named alias surfaces as
an EsError (404); wrap with tryEsError for a miss-tolerant
variant.
>>>IndexAliasesInfo _ <- runBH' $ getIndexAlias (IndexName "my-index") (Just (AliasName (IndexName "my-alias")))
deleteIndexAlias :: MonadBH m => IndexAliasName -> m Acknowledged Source #
Delete a single alias name, removing it from every index it is
currently associated with (the underlying request uses the _all
wildcard). See deleteIndexAliasFrom for a per-source-index variant.
deleteIndexAliasFrom :: MonadBH m => IndexName -> IndexAliasName -> m Acknowledged Source #
Remove an alias from a single source index, hitting
DELETE {index}_alias/{name}. Leaves any other index publishing
the same alias name untouched.
aliasExists :: MonadBH m => IndexAliasName -> m Bool Source #
Check whether an alias name exists anywhere in the cluster, hitting
HEAD _alias{name}. Returns False when the alias is absent (404)
rather than throwing.
>>>present <- runBH' $ aliasExists (IndexAliasName (IndexName "my-alias"))
defaultIndexAliasCreate :: IndexAliasCreate Source #
IndexAliasCreate with every field set to Nothing. Renders to the
empty object {}. New code is encouraged to start from
defaultIndexAliasCreate and override individual fields via the
...Lens accessors:
let body =defaultIndexAliasCreate{aliasCreateIsWriteIndex=JustTrue} inupdateIndexAliases(AddAliasalias body :| [])
Index Templates
putTemplate :: MonadBH m => IndexTemplate -> TemplateName -> m Acknowledged Source #
putTemplate creates a template given an IndexTemplate and a TemplateName.
Explained in further detail at
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-templates.html
>>>let idxTpl = IndexTemplate [IndexPattern "tweet-*"] (Just (IndexSettings (ShardCount 1) (ReplicaCount 1))) [toJSON TweetMapping]>>>resp <- runBH' $ putTemplate idxTpl (TemplateName "tweet-tpl")
templateExists :: MonadBH m => TemplateName -> m Bool Source #
templateExists checks to see if a template exists.
>>>exists <- runBH' $ templateExists (TemplateName "tweet-tpl")
getTemplate :: MonadBH m => Maybe TemplateNamePattern -> m [TemplateInfo] Source #
getTemplate fetches legacy templates (the GET /_template
endpoint). Read-side counterpart of putTemplate. See
getTemplate for the wire
envelope details and the TemplateInfo body shape.
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-get-template.html)
deleteTemplate :: MonadBH m => TemplateName -> m Acknowledged Source #
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")
data ComponentTemplate Source #
Request body for PUT _component_template{name}. The
cpTemplate content is the same ComposableTemplateContent shape
used by ComposableTemplate (settings / mappings / aliases), reused
here verbatim — the inner template object is byte-identical between
the two endpoints. Every field is optional and emitted only when
present (via omitNulls), so a minimal ComponentTemplate with
Nothing everywhere produces {} on the wire, which the server
accepts as an empty component template.
Constructors
| ComponentTemplate | |
Fields
| |
Instances
| FromJSON ComponentTemplate Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser ComponentTemplate # parseJSONList :: Value -> Parser [ComponentTemplate] # | |
| ToJSON ComponentTemplate Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods toJSON :: ComponentTemplate -> Value # toEncoding :: ComponentTemplate -> Encoding # toJSONList :: [ComponentTemplate] -> Value # toEncodingList :: [ComponentTemplate] -> Encoding # omitField :: ComponentTemplate -> Bool # | |
| Show ComponentTemplate Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> ComponentTemplate -> ShowS # show :: ComponentTemplate -> String # showList :: [ComponentTemplate] -> ShowS # | |
| Eq ComponentTemplate Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: ComponentTemplate -> ComponentTemplate -> Bool # (/=) :: ComponentTemplate -> ComponentTemplate -> Bool # | |
data ComposableTemplate Source #
Request body for PUT _index_template{name}. The index_patterns
field is required by the server; the ctTemplate content and every
metadata field is optional and emitted only when present and
non-empty (via omitNulls, so Nothing and both render
to no field), so a minimal Just []ComposableTemplate with just
produces ctIndexPatterns = [...]{"index_patterns": [...]} on
the wire.
Constructors
| ComposableTemplate | |
Fields
| |
Instances
| FromJSON ComposableTemplate Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser ComposableTemplate # parseJSONList :: Value -> Parser [ComposableTemplate] # | |
| ToJSON ComposableTemplate Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods toJSON :: ComposableTemplate -> Value # toEncoding :: ComposableTemplate -> Encoding # toJSONList :: [ComposableTemplate] -> Value # toEncodingList :: [ComposableTemplate] -> Encoding # omitField :: ComposableTemplate -> Bool # | |
| Show ComposableTemplate Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> ComposableTemplate -> ShowS # show :: ComposableTemplate -> String # showList :: [ComposableTemplate] -> ShowS # | |
| Eq ComposableTemplate Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: ComposableTemplate -> ComposableTemplate -> Bool # (/=) :: ComposableTemplate -> ComposableTemplate -> Bool # | |
data ComposableTemplateContent Source #
Inner template object of a ComposableTemplate. Carries the
settings, mappings and aliases that Elasticsearch applies to
every new index matching the surrounding ComposableTemplate's
index_patterns. Every field is optional — omitting one leaves the
server free to derive it from a component template or its defaults —
and each is encoded as a raw JSON Value so callers can express
arbitrary settings (not just the typed subset modelled by
IndexSettings), exactly like CreateIndexOptions does for
PUT /{index}.
Constructors
| ComposableTemplateContent | |
Fields
| |
Instances
| FromJSON ComposableTemplateContent Source # | |
| ToJSON ComposableTemplateContent Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods toJSON :: ComposableTemplateContent -> Value # toEncoding :: ComposableTemplateContent -> Encoding # toJSONList :: [ComposableTemplateContent] -> Value # | |
| Show ComposableTemplateContent Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> ComposableTemplateContent -> ShowS # show :: ComposableTemplateContent -> String # showList :: [ComposableTemplateContent] -> ShowS # | |
| Eq ComposableTemplateContent Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: ComposableTemplateContent -> ComposableTemplateContent -> Bool # (/=) :: ComposableTemplateContent -> ComposableTemplateContent -> Bool # | |
data ComposableTemplateOptions Source #
URI parameters accepted by PUT _index_template{name} that are
modelled here: create (fail the request if a template with the
given name already exists, instead of upserting), master_timeout
(the pre-7.16 alias of cluster_manager_timeout, still accepted by
every supported backend) and cause (an opaque reason string
recorded in the server logs). Every field is optional so
defaultComposableTemplateOptions renders to no parameters at all —
byte-for-byte identical to a parameterless call via putIndexTemplate.
Constructors
| ComposableTemplateOptions | |
Fields
| |
Instances
| Show ComposableTemplateOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> ComposableTemplateOptions -> ShowS # show :: ComposableTemplateOptions -> String # showList :: [ComposableTemplateOptions] -> ShowS # | |
| Eq ComposableTemplateOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: ComposableTemplateOptions -> ComposableTemplateOptions -> Bool # (/=) :: ComposableTemplateOptions -> ComposableTemplateOptions -> Bool # | |
defaultComposableTemplateOptions :: ComposableTemplateOptions Source #
ComposableTemplateOptions with every parameter set to Nothing.
Produces no query string, so emits a request identical to
putIndexTemplateWith name tpl
defaultComposableTemplateOptionsputIndexTemplate.
composableTemplateOptionsParams :: ComposableTemplateOptions -> [(Text, Maybe Text)] Source #
Render ComposableTemplateOptions as a list of (key, value)
pairs suitable for withQueries. Nothing fields are omitted, so
defaultComposableTemplateOptions produces an empty list (and
therefore no query string).
putIndexTemplate :: MonadBH m => TemplateName -> ComposableTemplate -> m Acknowledged Source #
putIndexTemplate creates or updates a composable index template
(the PUT _index_template{name} endpoint, available since
Elasticsearch 7.8 and in OpenSearch 2.x). This is the modern
replacement for the legacy putTemplate (which targets
PUT /_template): composable templates can be assembled from
reusable component templates and carry an explicit priority for
deterministic conflict resolution.
Unlike the legacy putTemplate this surfaces 4xx responses as
EsErrors. To fail when a template with the given name already
exists, use putIndexTemplateWith with .ctoCreate = Just True
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-put-index-template.html)
putIndexTemplateWith :: MonadBH m => TemplateName -> ComposableTemplate -> ComposableTemplateOptions -> m Acknowledged Source #
Like putIndexTemplate but additionally accepts
ComposableTemplateOptions rendered as URI parameters. Use
defaultComposableTemplateOptions to send no parameters at all.
getIndexTemplate :: MonadBH m => Maybe TemplateNamePattern -> m [IndexTemplateInfo] Source #
getIndexTemplate fetches composable index templates (the
GET /_index_template endpoint). Read-side counterpart of
putIndexTemplate.
→ list every composable template on the cluster.Nothing→ list the templates whose names matchJust(TemplateNamePatternp)p(a literal name or a glob such as"logs-*"; the server does the matching). A pattern that matches no template surfaces as anEsError(HTTP 404); wrap withtryPerformBHRequestif you need miss-tolerant lookup.
The body of each returned IndexTemplateInfo is decoded into a
ComposableTemplate.
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-get-template.html)
deleteIndexTemplate :: MonadBH m => TemplateName -> m Acknowledged Source #
deleteIndexTemplate deletes a composable index template
(DELETE _index_template{name}). It is the write-side counterpart
of putIndexTemplate. Like getIndexTemplate, a 404 for a missing
template is surfaced as an EsError; wrap with
tryPerformBHRequest for miss-tolerant deletion.
putComponentTemplate :: MonadBH m => TemplateName -> ComponentTemplate -> m Acknowledged Source #
putComponentTemplate creates or updates a reusable component
template (PUT _component_template{name}, available since
Elasticsearch 7.8 and in OpenSearch 2.x). Component templates are
building blocks composed into composable index templates (see
ComposableTemplate's composed_of field); they have no
index_patterns of their own.
Like putIndexTemplate, this surfaces 4xx responses as EsErrors.
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-component-template.html)
deleteComponentTemplate :: MonadBH m => TemplateName -> m Acknowledged Source #
deleteComponentTemplate deletes a reusable component template
(DELETE _component_template{name}). It is the write-side counterpart
of putComponentTemplate. Like deleteIndexTemplate, a 404 for a
missing template is surfaced as an EsError; wrap with
tryPerformBHRequest for miss-tolerant deletion.
data IndexTemplateInfo Source #
One entry in a GET /_index_template response: the template's
name paired with its index_template body (decoded into a
ComposableTemplate). The wire shape is
{"name": ..., "index_template": {...}}.
Constructors
| IndexTemplateInfo | |
Fields | |
Instances
| FromJSON IndexTemplateInfo Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser IndexTemplateInfo # parseJSONList :: Value -> Parser [IndexTemplateInfo] # | |
| ToJSON IndexTemplateInfo Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods toJSON :: IndexTemplateInfo -> Value # toEncoding :: IndexTemplateInfo -> Encoding # toJSONList :: [IndexTemplateInfo] -> Value # toEncodingList :: [IndexTemplateInfo] -> Encoding # omitField :: IndexTemplateInfo -> Bool # | |
| Show IndexTemplateInfo Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> IndexTemplateInfo -> ShowS # show :: IndexTemplateInfo -> String # showList :: [IndexTemplateInfo] -> ShowS # | |
| Eq IndexTemplateInfo Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: IndexTemplateInfo -> IndexTemplateInfo -> Bool # (/=) :: IndexTemplateInfo -> IndexTemplateInfo -> Bool # | |
newtype GetIndexTemplatesResponse Source #
Envelope returned by GET /_index_template. The server wraps the
matching templates in a single index_templates array (see
IndexTemplateInfo); this newtype peels off that outer key.
Constructors
| GetIndexTemplatesResponse | |
Instances
| FromJSON GetIndexTemplatesResponse Source # | |
| ToJSON GetIndexTemplatesResponse Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods toJSON :: GetIndexTemplatesResponse -> Value # toEncoding :: GetIndexTemplatesResponse -> Encoding # toJSONList :: [GetIndexTemplatesResponse] -> Value # | |
| Show GetIndexTemplatesResponse Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> GetIndexTemplatesResponse -> ShowS # show :: GetIndexTemplatesResponse -> String # showList :: [GetIndexTemplatesResponse] -> ShowS # | |
| Eq GetIndexTemplatesResponse Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: GetIndexTemplatesResponse -> GetIndexTemplatesResponse -> Bool # (/=) :: GetIndexTemplatesResponse -> GetIndexTemplatesResponse -> Bool # | |
data TemplateInfo Source #
One entry in a GET /_template response: the template's name
(lifted from the outer JSON key by GetTemplatesResponse) paired
with its legacy body fields. Every field except tiName and
tiIndexPatterns is optional — ES omits absent fields on the wire
rather than emitting null, and Nothing round-trips back to an
absent key via the ToJSON instance.
Constructors
| TemplateInfo | |
Fields
| |
Instances
| FromJSON TemplateInfo Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices | |
| ToJSON TemplateInfo Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods toJSON :: TemplateInfo -> Value # toEncoding :: TemplateInfo -> Encoding # toJSONList :: [TemplateInfo] -> Value # toEncodingList :: [TemplateInfo] -> Encoding # omitField :: TemplateInfo -> Bool # | |
| Show TemplateInfo Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> TemplateInfo -> ShowS # show :: TemplateInfo -> String # showList :: [TemplateInfo] -> ShowS # | |
| Eq TemplateInfo Source # | |
newtype GetTemplatesResponse Source #
Envelope returned by GET /_template. The server returns the
matching templates as a single object keyed by template name (each
value being a TemplateInfo body); this newtype peels off that
outer key, lifting each key into the corresponding entry's tiName.
Constructors
| GetTemplatesResponse | |
Fields | |
Instances
| FromJSON GetTemplatesResponse Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser GetTemplatesResponse # parseJSONList :: Value -> Parser [GetTemplatesResponse] # | |
| ToJSON GetTemplatesResponse Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods toJSON :: GetTemplatesResponse -> Value # toEncoding :: GetTemplatesResponse -> Encoding # toJSONList :: [GetTemplatesResponse] -> Value # toEncodingList :: [GetTemplatesResponse] -> Encoding # omitField :: GetTemplatesResponse -> Bool # | |
| Show GetTemplatesResponse Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> GetTemplatesResponse -> ShowS # show :: GetTemplatesResponse -> String # showList :: [GetTemplatesResponse] -> ShowS # | |
| Eq GetTemplatesResponse Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: GetTemplatesResponse -> GetTemplatesResponse -> Bool # (/=) :: GetTemplatesResponse -> GetTemplatesResponse -> Bool # | |
getComponentTemplate :: MonadBH m => Maybe TemplateNamePattern -> m [ComponentTemplateInfo] Source #
getComponentTemplate fetches reusable component templates (the
GET /_component_template endpoint, available since Elasticsearch
7.8 and in OpenSearch 2.x). Read-side counterpart of
putComponentTemplate. See getComponentTemplate for the
shape of the Maybe TemplateNamePattern argument.
Like getIndexTemplate, this is StatusDependant: a 4xx (in
particular a 404 when no component template matches the pattern)
is surfaced as an EsError. Callers that want miss-tolerant lookup
should use tryPerformBHRequest.
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/getting-component-templates.html)
data ComponentTemplateInfo Source #
One entry in a GET /_component_template response: the template's
name paired with its component_template body (decoded into a
ComponentTemplate). The wire shape is
{"name": ..., "component_template": {...}}.
Constructors
| ComponentTemplateInfo | |
Fields | |
Instances
| FromJSON ComponentTemplateInfo Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser ComponentTemplateInfo # parseJSONList :: Value -> Parser [ComponentTemplateInfo] # | |
| ToJSON ComponentTemplateInfo Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods toJSON :: ComponentTemplateInfo -> Value # toEncoding :: ComponentTemplateInfo -> Encoding # toJSONList :: [ComponentTemplateInfo] -> Value # toEncodingList :: [ComponentTemplateInfo] -> Encoding # omitField :: ComponentTemplateInfo -> Bool # | |
| Show ComponentTemplateInfo Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> ComponentTemplateInfo -> ShowS # show :: ComponentTemplateInfo -> String # showList :: [ComponentTemplateInfo] -> ShowS # | |
| Eq ComponentTemplateInfo Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: ComponentTemplateInfo -> ComponentTemplateInfo -> Bool # (/=) :: ComponentTemplateInfo -> ComponentTemplateInfo -> Bool # | |
newtype GetComponentTemplatesResponse Source #
Envelope returned by GET /_component_template. The server wraps
the matching templates in a single component_templates array (see
ComponentTemplateInfo); this newtype peels off that outer key.
Constructors
| GetComponentTemplatesResponse | |
Instances
| FromJSON GetComponentTemplatesResponse Source # | |
| ToJSON GetComponentTemplatesResponse Source # | |
| Show GetComponentTemplatesResponse Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> GetComponentTemplatesResponse -> ShowS # show :: GetComponentTemplatesResponse -> String # showList :: [GetComponentTemplatesResponse] -> ShowS # | |
| Eq GetComponentTemplatesResponse Source # | |
newtype TemplateNamePattern Source #
A glob pattern matched against template names by
GET /_index_template/{pattern} (e.g. "serv*", "logs-*"). The
server resolves the wildcard; the client forwards the literal text
verbatim, exactly as for TemplateName. Introduced to distinguish
the path-style "match many templates" argument from the
"identify-one-template" TemplateName used by PUT and DELETE.
Like every path newtype in this library, the value is interpolated
into the URL without percent-encoding, so it must not contain /,
? or # — those characters would corrupt the request path or
inject spurious query parameters.
Constructors
| TemplateNamePattern Text |
Instances
| FromJSON TemplateNamePattern Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser TemplateNamePattern # parseJSONList :: Value -> Parser [TemplateNamePattern] # | |
| ToJSON TemplateNamePattern Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods toJSON :: TemplateNamePattern -> Value # toEncoding :: TemplateNamePattern -> Encoding # toJSONList :: [TemplateNamePattern] -> Value # toEncodingList :: [TemplateNamePattern] -> Encoding # omitField :: TemplateNamePattern -> Bool # | |
| Show TemplateNamePattern Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> TemplateNamePattern -> ShowS # show :: TemplateNamePattern -> String # showList :: [TemplateNamePattern] -> ShowS # | |
| Eq TemplateNamePattern Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: TemplateNamePattern -> TemplateNamePattern -> Bool # (/=) :: TemplateNamePattern -> TemplateNamePattern -> Bool # | |
data SimulatedTemplate Source #
Response body of POST _index_template_simulate. The template
field reuses ComposableTemplateContent because the resolved
settings/mappings/aliases shape is identical to the per-template
content type. Forward-compat keys survive in stOther.
Constructors
| SimulatedTemplate | |
Fields
| |
Instances
| FromJSON SimulatedTemplate Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser SimulatedTemplate # parseJSONList :: Value -> Parser [SimulatedTemplate] # | |
| ToJSON SimulatedTemplate Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods toJSON :: SimulatedTemplate -> Value # toEncoding :: SimulatedTemplate -> Encoding # toJSONList :: [SimulatedTemplate] -> Value # toEncodingList :: [SimulatedTemplate] -> Encoding # omitField :: SimulatedTemplate -> Bool # | |
| Show SimulatedTemplate Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> SimulatedTemplate -> ShowS # show :: SimulatedTemplate -> String # showList :: [SimulatedTemplate] -> ShowS # | |
| Eq SimulatedTemplate Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: SimulatedTemplate -> SimulatedTemplate -> Bool # (/=) :: SimulatedTemplate -> SimulatedTemplate -> Bool # | |
data SimulatedTemplateOverlap Source #
One entry in the overlapping array of a SimulatedTemplate
response: the name of an existing composable template whose
index_patterns overlap the simulated template's patterns. Forward-
compat keys survive in stoOther.
Constructors
| SimulatedTemplateOverlap | |
Fields
| |
Instances
| FromJSON SimulatedTemplateOverlap Source # | |
| ToJSON SimulatedTemplateOverlap Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods toJSON :: SimulatedTemplateOverlap -> Value # toEncoding :: SimulatedTemplateOverlap -> Encoding # toJSONList :: [SimulatedTemplateOverlap] -> Value # | |
| Show SimulatedTemplateOverlap Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> SimulatedTemplateOverlap -> ShowS # show :: SimulatedTemplateOverlap -> String # showList :: [SimulatedTemplateOverlap] -> ShowS # | |
| Eq SimulatedTemplateOverlap Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: SimulatedTemplateOverlap -> SimulatedTemplateOverlap -> Bool # (/=) :: SimulatedTemplateOverlap -> SimulatedTemplateOverlap -> Bool # | |
simulateIndexTemplate :: MonadBH m => ComposableTemplate -> m SimulatedTemplate Source #
simulateIndexTemplate resolves a hypothetical ComposableTemplate
against the templates already registered on the cluster (the
POST _index_template_simulate endpoint, available since
Elasticsearch 7.8 and in OpenSearch 2.x). The server returns the
merged settings/mappings/aliases that would be applied to a
new matching index, plus the list of existing composable templates
whose index_patterns overlap the supplied template's patterns.
Like putIndexTemplate, this surfaces 4xx responses as EsErrors.
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-simulate-template.html)
simulateIndexTemplateWith :: MonadBH m => ComposableTemplate -> ComposableTemplateOptions -> m SimulatedTemplate Source #
Like simulateIndexTemplate but additionally accepts
ComposableTemplateOptions rendered as URI parameters. Use
defaultComposableTemplateOptions to send no parameters at all.
simulateIndex :: MonadBH m => IndexName -> m SimulatedTemplate Source #
simulateIndex resolves the composable index template(s) that
Elasticsearch would apply to a hypothetical new index with the given
name (POST _index_template_simulate_index/{name}, available since
Elasticsearch 7.8 and in OpenSearch 2.x). Returns the merged
settings/mappings/aliases and any lower-priority templates that
also matched. Read-only — safe to call without side effects.
This is the index-name-driven counterpart of simulateIndexTemplate
(which takes a ComposableTemplate body).
simulateIndexWith :: MonadBH m => IndexName -> ComposableTemplateOptions -> m SimulatedTemplate Source #
Like simulateIndex but additionally accepts ComposableTemplateOptions
rendered as URI parameters. Use defaultComposableTemplateOptions to
send no parameters at all, in which case the emitted request is
byte-for-byte identical to simulateIndex. See simulateIndexWith in
the Requests module for the wire-shape details.
Mapping
putMapping :: forall r a m. (MonadBH m, FromJSON r, ToJSON a) => IndexName -> a -> m r Source #
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 respResponse {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}
putMappingWith :: forall r a m. (MonadBH m, FromJSON r, ToJSON a) => IndexName -> a -> PutMappingOptions -> m r Source #
putMappingWith is the fully-parameterised form of putMapping.
Every URI parameter accepted by PUT {index}_mapping is exposed via
PutMappingOptions. defaultPutMappingOptions makes this
byte-for-byte identical to putMapping. See putMappingWith
for details.
getMapping :: forall r m. (MonadBH m, FromJSON r) => IndexName -> m r Source #
getMapping fetches the mapping for a given index. Wraps the
GET /<index>/_mapping endpoint
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-get-mapping.html).
The response is generic over any FromJSON r, mirroring
putMapping. Decode into a Value for an untyped view of the mapping
(the response is shaped {<index>: {mappings: {...}}}), or into a
custom type. Use getIndex to fetch aliases and settings alongside
the mappings in a single request.
getFieldMapping :: forall r m. (MonadBH m, FromJSON r) => IndexName -> [FieldName] -> m r Source #
getFieldMapping fetches the mapping for specific fields of a given
index. Wraps the GET /<index>/_mapping/field/<fields> endpoint
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-get-field-mapping.html).
The response is generic over any FromJSON @r', mirroring getMapping.
Decode into a Value for an untyped view, or into
FieldMappingResponse for a structured one.
newtype FieldMappingResponse Source #
Response shape for GET /<index>/_mapping/field/<fields>
(https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-get-field-mapping.html).
The server returns one entry per requested index. Use this type when you
want a structured view of the response; decode into a Value instead if
you need the raw JSON.
Index names in the response are decoded as Map keys and are therefore
not subject to the mkIndexNameSystem validation that IndexName's
value-level FromJSON performs; the server may legitimately echo back
indices whose names the client would refuse to create.
Constructors
| FieldMappingResponse | |
Instances
| FromJSON FieldMappingResponse Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser FieldMappingResponse # parseJSONList :: Value -> Parser [FieldMappingResponse] # | |
| Show FieldMappingResponse Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> FieldMappingResponse -> ShowS # show :: FieldMappingResponse -> String # showList :: [FieldMappingResponse] -> ShowS # | |
| Eq FieldMappingResponse Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: FieldMappingResponse -> FieldMappingResponse -> Bool # (/=) :: FieldMappingResponse -> FieldMappingResponse -> Bool # | |
newtype FieldMappingIndexEntry Source #
Per-index portion of a FieldMappingResponse, keyed by the requested
field name. The server may also return intermediate path components when
a sub-field is requested, hence the Map rather than a list.
Constructors
| FieldMappingIndexEntry | |
Instances
| FromJSON FieldMappingIndexEntry Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser FieldMappingIndexEntry # parseJSONList :: Value -> Parser [FieldMappingIndexEntry] # | |
| Show FieldMappingIndexEntry Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> FieldMappingIndexEntry -> ShowS # show :: FieldMappingIndexEntry -> String # showList :: [FieldMappingIndexEntry] -> ShowS # | |
| Eq FieldMappingIndexEntry Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: FieldMappingIndexEntry -> FieldMappingIndexEntry -> Bool # (/=) :: FieldMappingIndexEntry -> FieldMappingIndexEntry -> Bool # | |
data FieldMappingDetail Source #
Details for a single requested field.
The nested mapping object carries the same schema-unstable per-type
properties that motivate getMapping
being polymorphic, so it is kept as a Value here.
Constructors
| FieldMappingDetail | |
Fields | |
Instances
| FromJSON FieldMappingDetail Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods parseJSON :: Value -> Parser FieldMappingDetail # parseJSONList :: Value -> Parser [FieldMappingDetail] # | |
| Show FieldMappingDetail Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods showsPrec :: Int -> FieldMappingDetail -> ShowS # show :: FieldMappingDetail -> String # showList :: [FieldMappingDetail] -> ShowS # | |
| Eq FieldMappingDetail Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Indices Methods (==) :: FieldMappingDetail -> FieldMappingDetail -> Bool # (/=) :: FieldMappingDetail -> FieldMappingDetail -> Bool # | |
Documents
indexDocument :: forall doc m. (MonadBH m, ToJSON doc) => IndexName -> IndexDocumentSettings -> doc -> DocId -> m IndexedDocument Source #
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 respResponse {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}
updateDocument :: forall patch m. (MonadBH m, ToJSON patch) => IndexName -> IndexDocumentSettings -> patch -> DocId -> m IndexedDocument Source #
updateDocument provides a way to perform an partial update of a
an already indexed document.
updateDocumentWith :: MonadBH m => IndexName -> IndexDocumentSettings -> UpdateBody -> DocId -> m IndexedDocument Source #
Like updateDocument but accepts the full UpdateBody union,
supporting script-driven updates, upserts, doc_as_upsert and
scripted_upsert. The IndexDocumentSettings argument still supplies
the URI-level parameters shared with the Index API.
data UpdateBody Source #
Body of POST /{index}/_update/{id}. The Elasticsearch Update
API takes either a partial document (the doc form) or a script
(the script form); the two cannot be mixed in the same request.
See
docs-update.
The legacy updateDocument
function constructs the UpdateDoc form from its patch argument;
use updateDocumentWith (added
alongside this type) to send the UpdateScript form.
Constructors
| UpdateDoc | Partial-document update: sends |
Fields
| |
| UpdateScript | Script-driven update: sends
|
Instances
| ToJSON UpdateBody Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Document Methods toJSON :: UpdateBody -> Value # toEncoding :: UpdateBody -> Encoding # toJSONList :: [UpdateBody] -> Value # toEncodingList :: [UpdateBody] -> Encoding # omitField :: UpdateBody -> Bool # | |
| Show UpdateBody Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Document Methods showsPrec :: Int -> UpdateBody -> ShowS # show :: UpdateBody -> String # showList :: [UpdateBody] -> ShowS # | |
| Eq UpdateBody Source # | |
mkUpdateDoc :: Value -> UpdateBody Source #
Smart constructor for the {"doc": …} body with no upsert behaviour.
mkUpdateScript :: Script -> UpdateBody Source #
Smart constructor for a script-only update (no upsert document, no scripted_upsert).
updateByQueryWith :: forall a m. (MonadBH m, FromJSON a) => ByQueryOptions -> IndexName -> Query -> Maybe Script -> m a Source #
Like updateByQuery but accepts ByQueryOptions for URI-level
parameters (conflicts, wait_for_completion, slices, max_docs,
routing, scroll_size, refresh, timeout, scroll,
request_cache, pipeline).
rethrottleUpdateByQuery :: MonadBH m => TaskNodeId -> RethrottleRate -> m TaskListResponse Source #
rethrottleUpdateByQuery changes the maximum documents-per-second
rate of an in-progress asynchronous update_by_query task. Maps to
POST _update_by_query{task_id}/_rethrottle?requests_per_second=n.
Returns a TaskListResponse (same shape as cancelTask) listing
the task(s) whose rate was changed — an empty node list means the
task had already finished. Pass the TaskNodeId returned by an
asynchronous updateByQueryWith (called with
bqoWaitForCompletion = Just False). Use RethrottleUnlimited to
disable throttling, or for any non-negative
decimal rate.RethrottlePerSecond n
getDocument :: (MonadBH m, FromJSON a) => IndexName -> DocId -> m (EsResult a) Source #
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")
getDocumentWith :: forall a m. (MonadBH m, FromJSON a) => GetDocumentOptions -> IndexName -> DocId -> m (EsResult a) Source #
Like getDocument but accepts GetDocumentOptions for URI-level
parameters (_source, _source_includes/_source_excludes,
stored_fields, preference, realtime, refresh, routing,
version, version_type).
getDocumentSource :: forall a m. (MonadBH m, FromJSON a) => IndexName -> DocId -> m (Maybe a) Source #
getDocumentSource fetches only the _source of a document (no
metadata envelope). Maps to
GET /{index}/_doc/{id}/_source. Returns Nothing when the
document does not exist (HTTP 404); other non-2xx responses throw
EsError (use
tryPerformBHRequest to
surface them as instead).Either EsError (Maybe a)
getDocumentSourceWith :: forall a m. (MonadBH m, FromJSON a) => GetDocumentSourceOptions -> IndexName -> DocId -> m (Maybe a) Source #
Like getDocumentSource but accepts GetDocumentSourceOptions
carrying the source-filtering and routing parameters that apply to
the source-only endpoint.
getDocuments :: (MonadBH m, FromJSON a) => IndexName -> [DocId] -> m (MultiGetResponse a) Source #
getDocumentsWith :: forall a m. (MonadBH m, FromJSON a) => MultiGetOptions -> IndexName -> [DocId] -> m (MultiGetResponse a) Source #
Like getDocuments but accepts MultiGetOptions applied at the
URI level.
getDocumentsMulti :: (MonadBH m, FromJSON a) => MultiGet -> m (MultiGetResponse a) Source #
getDocumentsMultiWith :: forall a m. (MonadBH m, FromJSON a) => MultiGetOptions -> MultiGet -> m (MultiGetResponse a) Source #
Like getDocumentsMulti but accepts MultiGetOptions applied at
the URI level. Per-document filtering is carried by the MultiGet body.
data TermVectors Source #
Response body for POST /{index}/_termvectors/{id}.
The _index and _id fields are kept as raw Text (matching the
EsResult wrapper)
rather than parsed into IndexName,
so that unusual system-index names that fail the
IndexName validator do not cause the whole response to be
rejected. The spec marks _id as optional on this response;
termVectorsId therefore defaults to when the server
omits it (rather than failing the decode or exposing a DocId ""Maybe).
Constructors
| TermVectors | |
Instances
| FromJSON TermVectors Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors | |
| Show TermVectors Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods showsPrec :: Int -> TermVectors -> ShowS # show :: TermVectors -> String # showList :: [TermVectors] -> ShowS # | |
| Eq TermVectors Source # | |
data FieldTermVectors Source #
Per-field term-vector block. The field_statistics object is
only present when the request asked for it
(termVectorsRequestFieldStatistics = Just True); terms is
always present when the field exists in the document, and is empty
if the field has no indexed terms.
Constructors
| FieldTermVectors | |
Instances
| FromJSON FieldTermVectors Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods parseJSON :: Value -> Parser FieldTermVectors # parseJSONList :: Value -> Parser [FieldTermVectors] # | |
| Show FieldTermVectors Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods showsPrec :: Int -> FieldTermVectors -> ShowS # show :: FieldTermVectors -> String # showList :: [FieldTermVectors] -> ShowS # | |
| Eq FieldTermVectors Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods (==) :: FieldTermVectors -> FieldTermVectors -> Bool # (/=) :: FieldTermVectors -> FieldTermVectors -> Bool # | |
data FieldStatistics Source #
Aggregate statistics for a field, reported when
termVectorsRequestFieldStatistics is Just True.
Constructors
| FieldStatistics | |
Instances
| FromJSON FieldStatistics Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods parseJSON :: Value -> Parser FieldStatistics # parseJSONList :: Value -> Parser [FieldStatistics] # | |
| Show FieldStatistics Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods showsPrec :: Int -> FieldStatistics -> ShowS # show :: FieldStatistics -> String # showList :: [FieldStatistics] -> ShowS # | |
| Eq FieldStatistics Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods (==) :: FieldStatistics -> FieldStatistics -> Bool # (/=) :: FieldStatistics -> FieldStatistics -> Bool # | |
data TermVectorStats Source #
Statistics for a single term, keyed by the term text in
fieldTermVectorsTerms. doc_freq and ttf are only present when
termVectorsRequestTermStatistics is Just True.
Constructors
| TermVectorStats | |
Instances
| FromJSON TermVectorStats Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods parseJSON :: Value -> Parser TermVectorStats # parseJSONList :: Value -> Parser [TermVectorStats] # | |
| Show TermVectorStats Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods showsPrec :: Int -> TermVectorStats -> ShowS # show :: TermVectorStats -> String # showList :: [TermVectorStats] -> ShowS # | |
| Eq TermVectorStats Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods (==) :: TermVectorStats -> TermVectorStats -> Bool # (/=) :: TermVectorStats -> TermVectorStats -> Bool # | |
data TermVectorToken Source #
A single token occurrence of a term. position, start_offset,
end_offset are present when the request enabled
positions/offsets respectively; payload is present when
payloads are enabled and the token carries one.
Constructors
| TermVectorToken | |
Instances
| FromJSON TermVectorToken Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods parseJSON :: Value -> Parser TermVectorToken # parseJSONList :: Value -> Parser [TermVectorToken] # | |
| Show TermVectorToken Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods showsPrec :: Int -> TermVectorToken -> ShowS # show :: TermVectorToken -> String # showList :: [TermVectorToken] -> ShowS # | |
| Eq TermVectorToken Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods (==) :: TermVectorToken -> TermVectorToken -> Bool # (/=) :: TermVectorToken -> TermVectorToken -> Bool # | |
data TermVectorsRequest Source #
Body for POST /{index}/_termvectors/{id}. Every field is
Maybe; defaultTermVectorsRequest leaves them all Nothing so
the server falls back to its documented defaults
(offsets=true, positions=true, field_statistics=true,
term_statistics=false, payload=true, no fields filter).
Note that the server defaults are not echoed back by the encoder:
a Nothing field is simply omitted, producing the same wire shape
as a request with no body at all when no field is set.
Constructors
| TermVectorsRequest | |
Fields
| |
Instances
| ToJSON TermVectorsRequest Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods toJSON :: TermVectorsRequest -> Value # toEncoding :: TermVectorsRequest -> Encoding # toJSONList :: [TermVectorsRequest] -> Value # toEncodingList :: [TermVectorsRequest] -> Encoding # omitField :: TermVectorsRequest -> Bool # | |
| Show TermVectorsRequest Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods showsPrec :: Int -> TermVectorsRequest -> ShowS # show :: TermVectorsRequest -> String # showList :: [TermVectorsRequest] -> ShowS # | |
| Eq TermVectorsRequest Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods (==) :: TermVectorsRequest -> TermVectorsRequest -> Bool # (/=) :: TermVectorsRequest -> TermVectorsRequest -> Bool # | |
data TermVectorsFilter Source #
Optional filter applied to the terms returned. Every field
corresponds to a constraint documented at
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/docs-termvectors.html#docs-termvectors-api-request-body.
All fields are Maybe to mirror the request-shape convention used
elsewhere in this package.
Constructors
| TermVectorsFilter | |
Instances
| ToJSON TermVectorsFilter Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods toJSON :: TermVectorsFilter -> Value # toEncoding :: TermVectorsFilter -> Encoding # toJSONList :: [TermVectorsFilter] -> Value # toEncodingList :: [TermVectorsFilter] -> Encoding # omitField :: TermVectorsFilter -> Bool # | |
| Show TermVectorsFilter Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods showsPrec :: Int -> TermVectorsFilter -> ShowS # show :: TermVectorsFilter -> String # showList :: [TermVectorsFilter] -> ShowS # | |
| Eq TermVectorsFilter Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods (==) :: TermVectorsFilter -> TermVectorsFilter -> Bool # (/=) :: TermVectorsFilter -> TermVectorsFilter -> Bool # | |
defaultTermVectorsRequest :: TermVectorsRequest Source #
TermVectorsRequest with every field set to Nothing. Sending
this to the server reproduces the legacy parameterless behaviour of
the endpoint.
defaultTermVectorsFilter :: TermVectorsFilter Source #
TermVectorsFilter with every threshold set to Nothing.
data TermVectorsOptions Source #
URI parameters of the POST /{index}/_termvectors/{id},
POST /_mtermvectors, and POST /{index}/_mtermvectors
endpoints. See
docs-termvectors.
Every field is Maybe; defaultTermVectorsOptions leaves them all
Nothing so the legacy parameterless getTermVectors
/ getMultiTermVectors entry
points remain byte-for-byte identical on the wire, and
termVectorsOptionsParams drops Nothing fields via catMaybes.
Constructors
| TermVectorsOptions | |
Fields
| |
Instances
| Show TermVectorsOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods showsPrec :: Int -> TermVectorsOptions -> ShowS # show :: TermVectorsOptions -> String # showList :: [TermVectorsOptions] -> ShowS # | |
| Eq TermVectorsOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods (==) :: TermVectorsOptions -> TermVectorsOptions -> Bool # (/=) :: TermVectorsOptions -> TermVectorsOptions -> Bool # | |
defaultTermVectorsOptions :: TermVectorsOptions Source #
TermVectorsOptions with every field Nothing. Emits an empty
query string, preserving the wire behaviour of the legacy
parameterless getTermVectors
/ getMultiTermVectors /
getMultiTermVectorsByIndex.
termVectorsOptionsParams :: TermVectorsOptions -> [(Text, Maybe Text)] Source #
Render a TermVectorsOptions record as a key=value list for
withQueries.
Nothing fields are omitted; the order of the list is stable but
unspecified.
getTermVectors :: MonadBH m => IndexName -> DocId -> TermVectorsRequest -> m TermVectors Source #
getTermVectors returns information and statistics about the
terms in the fields of a particular document. Maps to
POST /{index}/_termvectors/{id}. Pass
defaultTermVectorsRequest to reproduce the parameterless form;
populate TermVectorsRequest fields to request fields,
offsets, positions, term_statistics, field_statistics,
payload, or apply a TermVectorsFilter.
getTermVectorsWith :: MonadBH m => TermVectorsOptions -> IndexName -> DocId -> TermVectorsRequest -> m TermVectors Source #
Like getTermVectors but accepts TermVectorsOptions carrying
the URI-level parameters (preference, realtime, routing,
version, version_type). defaultTermVectorsOptions makes the
wire output byte-identical to getTermVectors.
data MultiTermVectorsDoc Source #
One document entry in a MultiTermVectors body. Fields mirror
TermVectorsRequest so each document can override the
fields/offsets/positions/term_statistics/
field_statistics/payload/filter knobs independently.
multiTermVectorsDocIndex is only required when the index is not
already in the URL path (i.e. when calling
getMultiTermVectors rather
than the by-index variant).
Constructors
| MultiTermVectorsDoc | |
Fields
| |
Instances
| ToJSON MultiTermVectorsDoc Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods toJSON :: MultiTermVectorsDoc -> Value # toEncoding :: MultiTermVectorsDoc -> Encoding # toJSONList :: [MultiTermVectorsDoc] -> Value # toEncodingList :: [MultiTermVectorsDoc] -> Encoding # omitField :: MultiTermVectorsDoc -> Bool # | |
| Show MultiTermVectorsDoc Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods showsPrec :: Int -> MultiTermVectorsDoc -> ShowS # show :: MultiTermVectorsDoc -> String # showList :: [MultiTermVectorsDoc] -> ShowS # | |
| Eq MultiTermVectorsDoc Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods (==) :: MultiTermVectorsDoc -> MultiTermVectorsDoc -> Bool # (/=) :: MultiTermVectorsDoc -> MultiTermVectorsDoc -> Bool # | |
mkMultiTermVectorsDoc :: DocId -> MultiTermVectorsDoc Source #
Construct a MultiTermVectorsDoc from just its id, with no
_index and no per-doc parameter overrides. The most common case
when targeting a single index via the URL-path variant
(getMultiTermVectorsByIndex).
newtype MultiTermVectors Source #
Body for POST /_mtermvectors and POST /{index}/_mtermvectors.
Wraps a list of MultiTermVectorsDoc entries and encodes as
{"docs": [...]}.
Constructors
| MultiTermVectors | |
Fields | |
Instances
| ToJSON MultiTermVectors Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods toJSON :: MultiTermVectors -> Value # toEncoding :: MultiTermVectors -> Encoding # toJSONList :: [MultiTermVectors] -> Value # toEncodingList :: [MultiTermVectors] -> Encoding # omitField :: MultiTermVectors -> Bool # | |
| Show MultiTermVectors Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods showsPrec :: Int -> MultiTermVectors -> ShowS # show :: MultiTermVectors -> String # showList :: [MultiTermVectors] -> ShowS # | |
| Eq MultiTermVectors Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods (==) :: MultiTermVectors -> MultiTermVectors -> Bool # (/=) :: MultiTermVectors -> MultiTermVectors -> Bool # | |
newtype MultiTermVectorsResponse Source #
Response body for POST /_mtermvectors. The server returns one
TermVectors entry per requested document, in request order,
wrapped in a {"docs": [...]} envelope.
Constructors
| MultiTermVectorsResponse | |
Fields | |
Instances
| FromJSON MultiTermVectorsResponse Source # | |
| Show MultiTermVectorsResponse Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods showsPrec :: Int -> MultiTermVectorsResponse -> ShowS # show :: MultiTermVectorsResponse -> String # showList :: [MultiTermVectorsResponse] -> ShowS # | |
| Eq MultiTermVectorsResponse Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.TermVectors Methods (==) :: MultiTermVectorsResponse -> MultiTermVectorsResponse -> Bool # (/=) :: MultiTermVectorsResponse -> MultiTermVectorsResponse -> Bool # | |
getMultiTermVectors :: MonadBH m => MultiTermVectors -> m MultiTermVectorsResponse Source #
getMultiTermVectors returns term vectors for multiple documents
in a single request. Maps to POST /_mtermvectors (no index in
the URL). Each MultiTermVectorsDoc must carry its own _index.
For the single-index form, see getMultiTermVectorsByIndex.
getMultiTermVectorsWith :: MonadBH m => TermVectorsOptions -> MultiTermVectors -> m MultiTermVectorsResponse Source #
Like getMultiTermVectors but accepts TermVectorsOptions
carrying the URI-level parameters (preference, realtime,
routing, version, version_type). defaultTermVectorsOptions
makes the wire output byte-identical to getMultiTermVectors.
getMultiTermVectorsByIndex :: MonadBH m => IndexName -> [DocId] -> m MultiTermVectorsResponse Source #
getMultiTermVectorsByIndex is the single-index form of
getMultiTermVectors. Maps to
POST /{index}/_mtermvectors. Each DocId is wrapped with
mkMultiTermVectorsDoc (no per-doc _index, no parameter
overrides); for per-document overrides, build the
MultiTermVectors body directly and use getMultiTermVectors.
getMultiTermVectorsByIndexWith :: MonadBH m => TermVectorsOptions -> IndexName -> [DocId] -> m MultiTermVectorsResponse Source #
Like getMultiTermVectorsByIndex but accepts TermVectorsOptions
carrying the URI-level parameters (preference, realtime,
routing, version, version_type). defaultTermVectorsOptions
makes the wire output byte-identical to getMultiTermVectorsByIndex.
data GetDocumentOptions Source #
URI parameters of the GET /{index}/_doc/{id} endpoint and its
multi-get siblings. See
docs-get
and
docs-multi-get.
Constructors
| GetDocumentOptions | |
Fields
| |
Instances
| Show GetDocumentOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Document Methods showsPrec :: Int -> GetDocumentOptions -> ShowS # show :: GetDocumentOptions -> String # showList :: [GetDocumentOptions] -> ShowS # | |
| Eq GetDocumentOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Document Methods (==) :: GetDocumentOptions -> GetDocumentOptions -> Bool # (/=) :: GetDocumentOptions -> GetDocumentOptions -> Bool # | |
defaultGetDocumentOptions :: GetDocumentOptions Source #
GetDocumentOptions with every field Nothing. Emits an empty
query string, preserving the wire behaviour of the legacy
parameterless getDocument.
data GetDocumentSourceOptions Source #
URI parameters of the
GET /{index}/_doc/{id}/_source endpoint. This is a subset of
GetDocumentOptions: the _source=true/_source=false toggle is
meaningless for a source-only endpoint (the whole response is the
_source object), and stored_fields is not honoured by the
source API (it belongs to the full GET envelope). See
docs-get-source-api.
Constructors
| GetDocumentSourceOptions | |
Fields
| |
Instances
| Show GetDocumentSourceOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Document Methods showsPrec :: Int -> GetDocumentSourceOptions -> ShowS # show :: GetDocumentSourceOptions -> String # showList :: [GetDocumentSourceOptions] -> ShowS # | |
| Eq GetDocumentSourceOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Document Methods (==) :: GetDocumentSourceOptions -> GetDocumentSourceOptions -> Bool # (/=) :: GetDocumentSourceOptions -> GetDocumentSourceOptions -> Bool # | |
defaultGetDocumentSourceOptions :: GetDocumentSourceOptions Source #
GetDocumentSourceOptions with every field Nothing. Emits an
empty query string, preserving the wire behaviour of the
parameterless
getDocumentSource.
data MultiGetOptions Source #
URI parameters of the POST /_mget and POST {index}_mget
endpoints. See
docs-multi-get.
Every field is Maybe; defaultMultiGetOptions leaves them all
Nothing so the legacy parameterless getDocuments
/ getDocumentsMulti entry
points remain byte-for-byte identical on the wire, and
multiGetOptionsParams drops Nothing fields via catMaybes.
Per-document _source/stored_fields filtering is not carried
here — it lives on each MultiGetDoc in the MultiGet body, and
overrides the URI-level setting for that single document.
Constructors
| MultiGetOptions | |
Fields
| |
Instances
| Show MultiGetOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.MultiGet Methods showsPrec :: Int -> MultiGetOptions -> ShowS # show :: MultiGetOptions -> String # showList :: [MultiGetOptions] -> ShowS # | |
| Eq MultiGetOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.MultiGet Methods (==) :: MultiGetOptions -> MultiGetOptions -> Bool # (/=) :: MultiGetOptions -> MultiGetOptions -> Bool # | |
defaultMultiGetOptions :: MultiGetOptions Source #
MultiGetOptions with every field Nothing. Emits an empty query
string, preserving the wire behaviour of the legacy parameterless
getDocuments /
getDocumentsMulti.
data DeleteDocumentOptions Source #
URI parameters of the DELETE /{index}/_doc/{id} endpoint. See
docs-delete.
This is a hybrid of GetDocumentOptions (for the read-side
version/version_type/routing parameters, which use the
simple Word64 + VersionType form rather than the write-side
VersionControl ADT — delete has no "force" or "external_gte"
semantics) and IndexDocumentSettings (for the write-side
refresh, wait_for_active_shards, if_seq_no/if_primary_term
parameters, which share their types with the Index API).
timeout has no dedicated newtype in this library yet and is
passed through as Text (e.g. "5s"), matching
ByQueryOptions's bqoTimeout.
Constructors
| DeleteDocumentOptions | |
Fields
| |
Instances
| Show DeleteDocumentOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Document Methods showsPrec :: Int -> DeleteDocumentOptions -> ShowS # show :: DeleteDocumentOptions -> String # showList :: [DeleteDocumentOptions] -> ShowS # | |
| Eq DeleteDocumentOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Document Methods (==) :: DeleteDocumentOptions -> DeleteDocumentOptions -> Bool # (/=) :: DeleteDocumentOptions -> DeleteDocumentOptions -> Bool # | |
defaultDeleteDocumentOptions :: DeleteDocumentOptions Source #
DeleteDocumentOptions with every field Nothing. Emits an
empty query string, preserving the wire behaviour of the legacy
parameterless
deleteDocument.
data DocumentExistsOptions Source #
URI parameters of the HEAD /{index}/_doc/{id} existence
check. See
docs-get-api-query-params.
This is the HEAD counterpart of GetDocumentOptions restricted to
the parameters that influence shard selection freshness OCC on
a request that carries no body: the _source/_source_includes/
_source_excludes toggles are meaningless (a HEAD returns no body),
but stored_fields is still a documented parameter and is kept
here for API-surface completeness. refresh uses the read-side
Bool form (pre-check, like GetDocumentOptions's gdoRefresh)
rather than the write-side RefreshPolicy.
Constructors
| DocumentExistsOptions | |
Fields
| |
Instances
| Show DocumentExistsOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Document Methods showsPrec :: Int -> DocumentExistsOptions -> ShowS # show :: DocumentExistsOptions -> String # showList :: [DocumentExistsOptions] -> ShowS # | |
| Eq DocumentExistsOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Document Methods (==) :: DocumentExistsOptions -> DocumentExistsOptions -> Bool # (/=) :: DocumentExistsOptions -> DocumentExistsOptions -> Bool # | |
defaultDocumentExistsOptions :: DocumentExistsOptions Source #
DocumentExistsOptions with every field Nothing. Emits an
empty query string, preserving the wire behaviour of the legacy
parameterless
documentExists.
data DocumentSourceExistsOptions Source #
URI parameters of the HEAD /{index}/_doc/{id}/_source
existence check. See
docs-get-source-api.
This is the HEAD counterpart of GetDocumentSourceOptions: a
strict subset of DocumentExistsOptions that drops stored_fields
(the source API does not honour it). The _source toggle is
meaningless for a source-only endpoint and is also absent.
Constructors
| DocumentSourceExistsOptions | |
Fields
| |
Instances
| Show DocumentSourceExistsOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Document Methods showsPrec :: Int -> DocumentSourceExistsOptions -> ShowS # show :: DocumentSourceExistsOptions -> String # showList :: [DocumentSourceExistsOptions] -> ShowS # | |
| Eq DocumentSourceExistsOptions Source # | |
defaultDocumentSourceExistsOptions :: DocumentSourceExistsOptions Source #
DocumentSourceExistsOptions with every field Nothing. Emits
an empty query string, preserving the wire behaviour of the legacy
parameterless
documentSourceExists.
data ByQueryOptions Source #
Shared URI parameters of POST /{index}/_update_by_query and
POST /{index}/_delete_by_query. The two endpoints accept the same
parameter set (see the ES docs); a single record therefore covers
both. The body is not affected — only the URI.
Constructors
| ByQueryOptions | |
Fields
| |
Instances
| Show ByQueryOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Document Methods showsPrec :: Int -> ByQueryOptions -> ShowS # show :: ByQueryOptions -> String # showList :: [ByQueryOptions] -> ShowS # | |
| Eq ByQueryOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Document Methods (==) :: ByQueryOptions -> ByQueryOptions -> Bool # (/=) :: ByQueryOptions -> ByQueryOptions -> Bool # | |
data ConflictsPolicy Source #
How the update_by_query / delete_by_query conflicts URI
parameter should behave when a version conflict occurs. See
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/docs-update-by-query.html#docs-update-by-query-api-query-params.
Constructors
| ConflictsProceed |
|
| ConflictsAbort |
|
Instances
| Show ConflictsPolicy Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Document Methods showsPrec :: Int -> ConflictsPolicy -> ShowS # show :: ConflictsPolicy -> String # showList :: [ConflictsPolicy] -> ShowS # | |
| Eq ConflictsPolicy Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Document Methods (==) :: ConflictsPolicy -> ConflictsPolicy -> Bool # (/=) :: ConflictsPolicy -> ConflictsPolicy -> Bool # | |
The slices parameter — the number of sub-tasks to parallelise the
by-query work across. See
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/docs-update-by-query.html#docs-update-by-query-api-slices.
Constructors
| SlicesAuto |
|
| SlicesCount Natural |
|
defaultByQueryOptions :: ByQueryOptions Source #
ByQueryOptions with every field Nothing. Emits an empty query
string, preserving the wire behaviour of the legacy parameterless
updateByQuery and
deleteByQuery.
documentExistsWith :: MonadBH m => DocumentExistsOptions -> IndexName -> DocId -> m Bool Source #
Like documentExists but accepts DocumentExistsOptions for the
URI-level parameters (stored_fields, preference, realtime,
refresh, routing, version, version_type). See
documentExistsWith for the wire-level details.
documentSourceExists :: MonadBH m => IndexName -> DocId -> m Bool Source #
documentSourceExists checks whether _source is present for the
given document, hitting HEAD /{index}/_doc/{id}/_source.
Returns False on any non-2xx status (including 404); see
documentSourceExists for the wire-level details.
documentSourceExistsWith :: MonadBH m => DocumentSourceExistsOptions -> IndexName -> DocId -> m Bool Source #
Like documentSourceExists but accepts
DocumentSourceExistsOptions for the URI-level parameters
(preference, realtime, refresh, routing, version,
version_type). See documentSourceExistsWith for the
wire-level details.
deleteDocument :: MonadBH m => IndexName -> DocId -> m IndexedDocument Source #
deleteDocument is the primary way to delete a single document.
>>>_ <- runBH' $ deleteDocument testIndex (DocId "1")
deleteDocumentWith :: MonadBH m => DeleteDocumentOptions -> IndexName -> DocId -> m IndexedDocument Source #
Like deleteDocument but accepts DeleteDocumentOptions for
URI-level parameters (wait_for_active_shards, refresh,
routing, timeout, version, version_type, if_seq_no,
if_primary_term).
deleteByQuery :: (MonadBH m, FromJSON a) => IndexName -> Query -> m a Source #
deleteByQuery performs a deletion on every document that matches a query.
>>>let query = TermQuery (Term "user" "bitemyapp") Nothing>>>_ <- runBH' $ deleteByQuery testIndex query
deleteByQueryWith :: forall a m. (MonadBH m, FromJSON a) => ByQueryOptions -> IndexName -> Query -> m a Source #
Like deleteByQuery but accepts ByQueryOptions for URI-level
parameters (same set as updateByQueryWith). The response type is
polymorphic: instantiate at TaskNodeId when called with
bqoWaitForCompletion = Just False to get the async task id.
rethrottleDeleteByQuery :: MonadBH m => TaskNodeId -> RethrottleRate -> m TaskListResponse Source #
rethrottleDeleteByQuery changes the maximum documents-per-second
rate of an in-progress asynchronous delete_by_query task. Maps to
POST _delete_by_query{task_id}/_rethrottle?requests_per_second=n.
Returns a TaskListResponse (same shape as cancelTask) listing
the task(s) whose rate was changed — an empty node list means the
task had already finished. Pass the TaskNodeId returned by an
asynchronous deleteByQueryWith (called with
bqoWaitForCompletion = Just False). Use RethrottleUnlimited to
disable throttling, or for any non-negative
decimal rate.RethrottlePerSecond n
data IndexedDocument Source #
Constructors
| IndexedDocument | |
Fields
| |
Instances
| FromJSON IndexedDocument Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Nodes Methods parseJSON :: Value -> Parser IndexedDocument # parseJSONList :: Value -> Parser [IndexedDocument] # | |
| Show IndexedDocument Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Nodes Methods showsPrec :: Int -> IndexedDocument -> ShowS # show :: IndexedDocument -> String # showList :: [IndexedDocument] -> ShowS # | |
| Eq IndexedDocument Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Nodes Methods (==) :: IndexedDocument -> IndexedDocument -> Bool # (/=) :: IndexedDocument -> IndexedDocument -> Bool # | |
data DeletedDocuments Source #
Constructors
| DeletedDocuments | |
Fields
| |
Instances
| FromJSON DeletedDocuments Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Nodes Methods parseJSON :: Value -> Parser DeletedDocuments # parseJSONList :: Value -> Parser [DeletedDocuments] # | |
| Show DeletedDocuments Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Nodes Methods showsPrec :: Int -> DeletedDocuments -> ShowS # show :: DeletedDocuments -> String # showList :: [DeletedDocuments] -> ShowS # | |
| Eq DeletedDocuments Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Nodes Methods (==) :: DeletedDocuments -> DeletedDocuments -> Bool # (/=) :: DeletedDocuments -> DeletedDocuments -> Bool # | |
data DeletedDocumentsRetries Source #
Constructors
| DeletedDocumentsRetries | |
Fields | |
Instances
| FromJSON DeletedDocumentsRetries Source # | |
| Show DeletedDocumentsRetries Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Nodes Methods showsPrec :: Int -> DeletedDocumentsRetries -> ShowS # show :: DeletedDocumentsRetries -> String # showList :: [DeletedDocumentsRetries] -> ShowS # | |
| Eq DeletedDocumentsRetries Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Nodes Methods (==) :: DeletedDocumentsRetries -> DeletedDocumentsRetries -> Bool # (/=) :: DeletedDocumentsRetries -> DeletedDocumentsRetries -> Bool # | |
Searching
searchAllWith :: forall a m. (MonadBH m, FromJSON a) => SearchOptions -> Search -> m (SearchResult a) Source #
searchAllWith is a variant of searchAll that accepts a
SearchOptions record for URI-level parameters such as preference,
routing, and request_cache. See SearchOptions for the full set.
multiSearch :: forall a m. (MonadBH m, FromJSON a) => NonEmpty MultiSearchItem -> m (MultiSearchResponse a) Source #
multiSearchWith :: forall a m. (MonadBH m, FromJSON a) => SearchOptions -> NonEmpty MultiSearchItem -> m (MultiSearchResponse a) Source #
multiSearchWith is a variant of multiSearch that accepts a
SearchOptions record for URI-level parameters
(max_concurrent_searches, typed_keys, ...). Per-header fields ride
on each MultiSearchItem.
multiSearchByIndex :: forall a m. (MonadBH m, FromJSON a) => IndexName -> NonEmpty Search -> m (MultiSearchResponse a) Source #
multiSearchByIndexWith :: forall a m. (MonadBH m, FromJSON a) => SearchOptions -> IndexName -> NonEmpty Search -> m (MultiSearchResponse a) Source #
multiSearchByIndexWith is a variant of multiSearchByIndex that
accepts a SearchOptions record.
data MultiSearchTemplateItem Source #
One item in an _msearch/template request body.
The header line of each NDJSON pair carries the same per-search hints
as MultiSearchItem (see
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/search-multi-search-template.html):
index- target index, optional at the request level
routing- custom routing value(s)
search_typequery_then_fetchordfs_query_then_fetchpreference- shard preference, e.g.
_local allow_partial_search_results- tolerate shard failures for this item
The body line is a SearchTemplate rendered by its existing ToJSON
instance (source/id, params, explain, profile).
Constructors
| MultiSearchTemplateItem | |
Fields
| |
Instances
| ToJSON MultiSearchTemplateItem Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.MultiSearchTemplate Methods toJSON :: MultiSearchTemplateItem -> Value # toEncoding :: MultiSearchTemplateItem -> Encoding # toJSONList :: [MultiSearchTemplateItem] -> Value # | |
| Show MultiSearchTemplateItem Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.MultiSearchTemplate Methods showsPrec :: Int -> MultiSearchTemplateItem -> ShowS # show :: MultiSearchTemplateItem -> String # showList :: [MultiSearchTemplateItem] -> ShowS # | |
| Eq MultiSearchTemplateItem Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.MultiSearchTemplate Methods (==) :: MultiSearchTemplateItem -> MultiSearchTemplateItem -> Bool # (/=) :: MultiSearchTemplateItem -> MultiSearchTemplateItem -> Bool # | |
multiSearchTemplate :: forall a m. (MonadBH m, FromJSON a) => NonEmpty MultiSearchTemplateItem -> m (MultiSearchResponse a) Source #
multiSearchTemplate performs a multi-search template request
against _msearch/template. Each MultiSearchTemplateItem pairs a
per-sub-request header with a SearchTemplate body. See
multiSearchTemplate.
multiSearchTemplateWith :: forall a m. (MonadBH m, FromJSON a) => SearchOptions -> NonEmpty MultiSearchTemplateItem -> m (MultiSearchResponse a) Source #
multiSearchTemplateWith is a variant of multiSearchTemplate that
accepts a SearchOptions record.
multiSearchTemplateByIndex :: forall a m. (MonadBH m, FromJSON a) => IndexName -> NonEmpty SearchTemplate -> m (MultiSearchResponse a) Source #
multiSearchTemplateByIndex runs an _msearch/template scoped to a
single index.
multiSearchTemplateByIndexWith :: forall a m. (MonadBH m, FromJSON a) => SearchOptions -> IndexName -> NonEmpty SearchTemplate -> m (MultiSearchResponse a) Source #
multiSearchTemplateByIndexWith is a variant of
multiSearchTemplateByIndex that accepts a SearchOptions record.
searchByIndex :: forall a m. (MonadBH m, FromJSON a) => IndexName -> Search -> m (SearchResult a) Source #
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
searchByIndexWith :: forall a m. (MonadBH m, FromJSON a) => IndexName -> SearchOptions -> Search -> m (SearchResult a) Source #
searchByIndexWith is a variant of searchByIndex that accepts a
SearchOptions record for URI-level parameters such as preference,
routing, and request_cache. See SearchOptions for the full set.
>>>let opts = defaultSearchOptions { soPreference = Just "_local", soRequestCache = Just True }>>>response <- runBH' $ searchByIndexWith testIndex opts search
searchByIndices :: forall a m. (MonadBH m, FromJSON a) => NonEmpty IndexName -> Search -> m (SearchResult a) Source #
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.
searchByIndicesWith :: forall a m. (MonadBH m, FromJSON a) => NonEmpty IndexName -> SearchOptions -> Search -> m (SearchResult a) Source #
searchByIndicesWith is a variant of searchByIndices that accepts a
SearchOptions record for URI-level parameters. See SearchOptions for
the full set.
explainDocument :: MonadBH m => IndexName -> DocId -> Query -> m ExplainResponse Source #
explainDocument computes a score explanation for a single
document under a given Query (see
ES docs,
OpenSearch docs).
See explainDocument for the full semantics, in
particular the three distinguishable outcomes: matched; doc exists
but query does not match (explanation is Just (Explanation 0.0
...)); and missing document (explanation is Nothing). A missing
document does not surface as an EsError — its HTTP-404 body is
shaped like an ExplainResponse and decodes cleanly as
ExplainResponse { explainResponseMatched = False, explainResponseExplanation = Nothing }.
explainDocumentWith :: MonadBH m => ExplainOptions -> IndexName -> DocId -> Query -> m ExplainResponse Source #
Like explainDocument but accepts an ExplainOptions record
carrying the URI-level _explain parameters (routing,
preference, stored_fields, _source filtering, and the
query-parsing default_operator/analyzer/df/
analyze_wildcard/lenient). defaultExplainOptions makes this
byte-for-byte equivalent to explainDocument. See
explainDocumentWith for the full semantics.
data ExplainOptions Source #
URI parameters of the POST /{index}/_explain/{id} endpoint. See
ES _explain docs
and
OpenSearch _explain docs.
Every field is Maybe; defaultExplainOptions leaves them all
Nothing, which emits no query string and is therefore byte-for-byte
equivalent to the legacy parameterless
explainDocument.
Important: explainDocumentWith always sends the Query as a JSON
body ({"query": ...}). The five query-parsing parameters below are
only honoured by the server when _explain is driven by a URI-mode
q=... query string, which this client does not currently emit —
they are therefore inert on the wire today and are modelled here
prospectively (so a future URI-search variant can expose them without
a schema change). Setting them has no effect until such a variant
exists:
The source-selection and routing parameters apply regardless of how the query is supplied:
Constructors
| ExplainOptions | |
Fields
| |
Instances
| Show ExplainOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Explain Methods showsPrec :: Int -> ExplainOptions -> ShowS # show :: ExplainOptions -> String # showList :: [ExplainOptions] -> ShowS # | |
| Eq ExplainOptions Source # | |
Defined in Database.Bloodhound.Internal.Versions.Common.Types.Explain Methods (==) :: ExplainOptions -> ExplainOptions -> Bool # (/=) :: ExplainOptions -> ExplainOptions -> Bool # | |
defaultExplainOptions :: ExplainOptions Source #
ExplainOptions with every field Nothing. Emits an empty query
string, preserving the wire behaviour of the legacy parameterless
explainDocument.
explainOptionsParams :: ExplainOptions -> [(Text, Maybe Text)] Source #
Render an ExplainOptions record as a (key, value) list suitable
for
withQueries. Nothing
fields are omitted, so defaultExplainOptions produces an empty list
(and therefore no query string). The order of the list is stable but
unspecified — callers and tests should treat it as a set.
searchByIndexTemplate :: forall a m. (MonadBH m, FromJSON a) => IndexName -> SearchTemplate -> m (SearchResult a) Source #
searchByIndicesTemplate :: forall a m. (MonadBH m, FromJSON a) => NonEmpty IndexName -> SearchTemplate -> m (SearchResult a) Source #
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.
scanSearch :: (FromJSON a, MonadBH m) => IndexName -> Search -> m [Hit a] Source #
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.
getInitialScroll :: forall a m. (MonadBH m, FromJSON a) => IndexName -> Search -> m (ParsedEsResponse (SearchResult a)) Source #
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
getInitialSortedScroll :: forall a m. (MonadBH m, FromJSON a) => IndexName -> Search -> m (SearchResult a) Source #
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.
Arguments
| :: forall a m. (MonadBH m, FromJSON a) | |
| => ScrollId | |
| -> NominalDiffTime | How |